From 7a19cf1e779bee9155d331350df56a40682a7ac6 Mon Sep 17 00:00:00 2001 From: Valentin Weiss <10179089+WeissDev@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:21:36 +0100 Subject: [PATCH 1/2] chore: upgrade uniffi-bindgen-react-native to 0.31.0-2 Upgrade ubrn from 0.29.3-1 to 0.31.0-2 for React Native 0.84 compatibility and 16KB page alignment support on Android. - Update matrix-rust-sdk patch to use uniffi 0.31 (instead of downgrading to 0.29) - Add patch for ubrn to fix native bindings generation (cd into crate directory before running cargo metadata) - Regenerate all bindings (Android, iOS, TypeScript, C++) --- ReactNativeMatrixSdk.podspec | 2 +- android/CMakeLists.txt | 3 + android/cpp-adapter.cpp | 32 +- .../rustcomponents/sdk/matrix_sdk_ffi.kt | 19961 ++++++----- .../main/java/uniffi/matrix_sdk/matrix_sdk.kt | 876 +- .../uniffi/matrix_sdk_base/matrix_sdk_base.kt | 586 +- .../matrix_sdk_common/matrix_sdk_common.kt | 570 +- .../matrix_sdk_crypto/matrix_sdk_crypto.kt | 597 +- .../uniffi/matrix_sdk_ui/matrix_sdk_ui.kt | 589 +- cpp/generated/matrix_sdk.cpp | 378 +- cpp/generated/matrix_sdk_base.cpp | 357 +- cpp/generated/matrix_sdk_common.cpp | 356 +- cpp/generated/matrix_sdk_crypto.cpp | 356 +- cpp/generated/matrix_sdk_ffi.cpp | 28402 ++++++++++------ cpp/generated/matrix_sdk_ffi.hpp | 1448 +- cpp/generated/matrix_sdk_ui.cpp | 357 +- example/ios/Podfile.lock | 10 +- matrix-rust-sdk.patch | 165 +- package.json | 2 +- ...uniffi-bindgen-react-native+0.29.3-1.patch | 12 - ...uniffi-bindgen-react-native+0.31.0-2.patch | 44 + src/generated/matrix_sdk-ffi.ts | 75 +- src/generated/matrix_sdk.ts | 213 +- src/generated/matrix_sdk_base-ffi.ts | 69 +- src/generated/matrix_sdk_base.ts | 56 +- src/generated/matrix_sdk_common-ffi.ts | 69 +- src/generated/matrix_sdk_common.ts | 35 +- src/generated/matrix_sdk_crypto-ffi.ts | 69 +- src/generated/matrix_sdk_crypto.ts | 62 +- src/generated/matrix_sdk_ffi-ffi.ts | 2090 +- src/generated/matrix_sdk_ffi.ts | 8439 ++--- src/generated/matrix_sdk_ui-ffi.ts | 69 +- src/generated/matrix_sdk_ui.ts | 35 +- swift/matrix_sdk.swift | 457 +- swift/matrix_sdk_base.swift | 80 +- swift/matrix_sdk_common.swift | 46 +- swift/matrix_sdk_crypto.swift | 173 +- swift/matrix_sdk_ffi.swift | 10986 +++--- swift/matrix_sdk_ui.swift | 91 +- yarn.lock | 10 +- 40 files changed, 41304 insertions(+), 36923 deletions(-) delete mode 100644 patches/uniffi-bindgen-react-native+0.29.3-1.patch create mode 100644 patches/uniffi-bindgen-react-native+0.31.0-2.patch diff --git a/ReactNativeMatrixSdk.podspec b/ReactNativeMatrixSdk.podspec index 3a96a44..daa3fa7 100644 --- a/ReactNativeMatrixSdk.podspec +++ b/ReactNativeMatrixSdk.podspec @@ -17,7 +17,7 @@ Pod::Spec.new do |s| s.source_files = "ios/**/*.{h,m,mm,swift}", "ios/generated/**/*.{h,m,mm}", "cpp/**/*.{hpp,cpp,c,h}", "cpp/generated/**/*.{hpp,cpp,c,h}" s.vendored_frameworks = "build/RnMatrixRustSdk.xcframework" - s.dependency "uniffi-bindgen-react-native", "0.29.3-1" + s.dependency "uniffi-bindgen-react-native", "0.31.0-2" # Use install_modules_dependencies helper to install the dependencies if React Native version >=0.71.0. # See https://github.com/facebook/react-native/blob/febf6b7f33fdb4904669f99d795eba4c0f95d7bf/scripts/cocoapods/new_architecture.rb#L79. diff --git a/android/CMakeLists.txt b/android/CMakeLists.txt index 27d7e98..88197dc 100644 --- a/android/CMakeLists.txt +++ b/android/CMakeLists.txt @@ -42,6 +42,9 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-all") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Werror") +# Set linker flags for 16KB page size alignment (required for Android 15+) +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,max-page-size=16384") + cmake_path( SET MY_RUST_LIB ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI}/libmatrix_sdk_ffi.so diff --git a/android/cpp-adapter.cpp b/android/cpp-adapter.cpp index 1656417..2f7ec1f 100644 --- a/android/cpp-adapter.cpp +++ b/android/cpp-adapter.cpp @@ -24,34 +24,14 @@ Java_com_unomed_reactnativematrixsdk_ReactNativeMatrixSdkModule_nativeInstallRus jlong rtPtr, jobject callInvokerHolderJavaObj ) { - // https://github.com/realm/realm-js/blob/main/packages/realm/binding/android/src/main/cpp/io_realm_react_RealmReactModule.cpp#L122-L145 - // React Native uses the fbjni library for handling JNI, which has the concept of "hybrid objects", - // which are Java objects containing a pointer to a C++ object. The CallInvokerHolder, which has the - // invokeAsync method we want access to, is one such hybrid object. - // Rather than reworking our code to use fbjni throughout, this code unpacks the C++ object from the Java - // object `callInvokerHolderJavaObj` manually, based on reverse engineering the fbjni code. - - // 1. Get the Java object referred to by the mHybridData field of the Java holder object - auto callInvokerHolderClass = env->GetObjectClass(callInvokerHolderJavaObj); - auto hybridDataField = env->GetFieldID(callInvokerHolderClass, "mHybridData", "Lcom/facebook/jni/HybridData;"); - auto hybridDataObj = env->GetObjectField(callInvokerHolderJavaObj, hybridDataField); - - // 2. Get the destructor Java object referred to by the mDestructor field from the myHybridData Java object - auto hybridDataClass = env->FindClass("com/facebook/jni/HybridData"); - auto destructorField = - env->GetFieldID(hybridDataClass, "mDestructor", "Lcom/facebook/jni/HybridData$Destructor;"); - auto destructorObj = env->GetObjectField(hybridDataObj, destructorField); - - // 3. Get the mNativePointer field from the mDestructor Java object - auto destructorClass = env->FindClass("com/facebook/jni/HybridData$Destructor"); - auto nativePointerField = env->GetFieldID(destructorClass, "mNativePointer", "J"); - auto nativePointerValue = env->GetLongField(destructorObj, nativePointerField); - - // 4. Cast the mNativePointer back to its C++ type - auto nativePointer = reinterpret_cast(nativePointerValue); - auto jsCallInvoker = nativePointer->getCallInvoker(); + using JCallInvokerHolder = facebook::react::CallInvokerHolder; + auto holderLocal = facebook::jni::make_local(callInvokerHolderJavaObj); + auto holderRef = facebook::jni::static_ref_cast(holderLocal); + auto* holderCxx = holderRef->cthis(); + auto jsCallInvoker = holderCxx->getCallInvoker(); auto runtime = reinterpret_cast(rtPtr); + return unomed_reactnativematrixsdk::installRustCrate(*runtime, jsCallInvoker); } 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 36405a0..2541563 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 @@ -125,7 +125,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_matrix_sdk_ffi_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -141,51 +141,17 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rustbuffer_free(buf, status) + UniffiLib.ffi_matrix_sdk_ffi_rustbuffer_free(buf, status) } } @Suppress("TooGenericExceptionThrown") fun asByteBuffer() = - this.data?.getByteBuffer(0, this.len.toLong())?.also { + this.data?.getByteBuffer(0, this.len)?.also { it.order(ByteOrder.BIG_ENDIAN) } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -382,8 +348,9 @@ internal inline fun uniffiTraitInterfaceCall( try { writeReturn(makeCall()) } catch(e: kotlin.Exception) { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } @@ -400,28 +367,41 @@ internal inline fun uniffiTraitInterfaceCallWithError( callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) } else { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -444,294 +424,264 @@ private fun findLibraryName(componentName: String): String { return "matrix_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } internal interface UniffiCallbackInterfaceAccountDataListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`event`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceBackupStateListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceCallDeclineListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`declinerUserId`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceClientDelegateMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`isSoftLogout`: Byte,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } @@ -741,9 +691,45 @@ internal interface UniffiCallbackInterfaceClientSessionDelegateMethod0 : com.sun internal interface UniffiCallbackInterfaceClientSessionDelegateMethod1 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`session`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } +internal interface UniffiCallbackInterfaceIgnoredUsersListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`ignoredUserIds`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`mediaPreviewConfig`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceProgressWatcherMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`progress`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceRoomAccountDataListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`event`: RustBuffer.ByValue,`roomId`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`roomId`: RustBuffer.ByValue,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`roomId`: RustBuffer.ByValue,`update`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceSyncNotificationListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`notification`: RustBuffer.ByValue,`roomId`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceBackupStateListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} internal interface UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } +internal interface UniffiCallbackInterfaceRecoveryStateListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceVerificationStateListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} internal interface UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`state`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } @@ -753,45 +739,33 @@ internal interface UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerM internal interface UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`state`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } +internal interface UniffiCallbackInterfaceQrLoginProgressListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`state`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} +internal interface UniffiCallbackInterfaceCallDeclineListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`declinerUserId`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} internal interface UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`identityStatusChange`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceIgnoredUsersListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`ignoredUserIds`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceKnockRequestsListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`joinRequests`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } internal interface UniffiCallbackInterfaceLiveLocationShareListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`liveLocationShares`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`mediaPreviewConfig`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfacePaginationStatusListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`status`: RustBufferRoomPaginationStatus.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceProgressWatcherMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`progress`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceQrLoginProgressListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`state`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +internal interface UniffiCallbackInterfaceRoomInfoListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`roomInfo`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceRecoveryStateListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +internal interface UniffiCallbackInterfaceSendQueueListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`update`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceRoomAccountDataListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`event`: RustBuffer.ByValue,`roomId`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +internal interface UniffiCallbackInterfaceTypingNotificationsListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`typingUserIds`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } internal interface UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`roomEntriesUpdate`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceRoomInfoListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`roomInfo`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceRoomListEntriesListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`roomEntriesUpdate`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } @@ -804,15 +778,6 @@ internal interface UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 : internal interface UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`syncIndicator`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceSendQueueListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`update`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`roomId`: RustBuffer.ByValue,`error`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} -internal interface UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`roomId`: RustBuffer.ByValue,`update`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`details`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } @@ -846,512 +811,636 @@ internal interface UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 : co internal interface UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`roomUpdates`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceSyncNotificationListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`notification`: RustBuffer.ByValue,`roomId`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceSyncServiceStateObserverMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`state`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } +internal interface UniffiCallbackInterfacePaginationStatusListenerMethod0 : com.sun.jna.Callback { + fun callback(`uniffiHandle`: Long,`status`: RustBufferRoomPaginationStatus.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) +} internal interface UniffiCallbackInterfaceTimelineListenerMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`diff`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceTypingNotificationsListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`typingUserIds`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`info`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) } -internal interface UniffiCallbackInterfaceVerificationStateListenerMethod0 : com.sun.jna.Callback { - fun callback(`uniffiHandle`: Long,`status`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) -} internal interface UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 : com.sun.jna.Callback { fun callback(`uniffiHandle`: Long,`capabilities`: RustBuffer.ByValue,`uniffiOutReturn`: RustBuffer,uniffiCallStatus: UniffiRustCallStatus,) } -@Structure.FieldOrder("onChange", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onChange") internal open class UniffiVTableCallbackInterfaceAccountDataListener( - @JvmField internal var `onChange`: UniffiCallbackInterfaceAccountDataListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onChange`: UniffiCallbackInterfaceAccountDataListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onChange`: UniffiCallbackInterfaceAccountDataListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceAccountDataListener(`onChange`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onChange`: UniffiCallbackInterfaceAccountDataListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceAccountDataListener(`uniffiFree`,`uniffiClone`,`onChange`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceAccountDataListener) { - `onChange` = other.`onChange` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onChange` = other.`onChange` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceBackupStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceBackupStateListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "didReceiveAuthError") +internal open class UniffiVTableCallbackInterfaceClientDelegate( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `didReceiveAuthError`: UniffiCallbackInterfaceClientDelegateMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceBackupStateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceBackupStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `didReceiveAuthError`: UniffiCallbackInterfaceClientDelegateMethod0? = null, + ): UniffiVTableCallbackInterfaceClientDelegate(`uniffiFree`,`uniffiClone`,`didReceiveAuthError`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceBackupStateListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceClientDelegate) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `didReceiveAuthError` = other.`didReceiveAuthError` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceBackupSteadyStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceBackupSteadyStateListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "retrieveSessionFromKeychain", "saveSessionInKeychain") +internal open class UniffiVTableCallbackInterfaceClientSessionDelegate( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `retrieveSessionFromKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod0? = null, + @JvmField internal var `saveSessionInKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod1? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceBackupSteadyStateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceBackupSteadyStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `retrieveSessionFromKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod0? = null, + `saveSessionInKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod1? = null, + ): UniffiVTableCallbackInterfaceClientSessionDelegate(`uniffiFree`,`uniffiClone`,`retrieveSessionFromKeychain`,`saveSessionInKeychain`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceBackupSteadyStateListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceClientSessionDelegate) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `retrieveSessionFromKeychain` = other.`retrieveSessionFromKeychain` + `saveSessionInKeychain` = other.`saveSessionInKeychain` } } -@Structure.FieldOrder("call", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceCallDeclineListener( - @JvmField internal var `call`: UniffiCallbackInterfaceCallDeclineListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") +internal open class UniffiVTableCallbackInterfaceIgnoredUsersListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceIgnoredUsersListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceCallDeclineListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceCallDeclineListener(`call`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceIgnoredUsersListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceIgnoredUsersListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceCallDeclineListener) { - `call` = other.`call` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceIgnoredUsersListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("didReceiveAuthError", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceClientDelegate( - @JvmField internal var `didReceiveAuthError`: UniffiCallbackInterfaceClientDelegateMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onChange") +internal open class UniffiVTableCallbackInterfaceMediaPreviewConfigListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onChange`: UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `didReceiveAuthError`: UniffiCallbackInterfaceClientDelegateMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceClientDelegate(`didReceiveAuthError`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onChange`: UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceMediaPreviewConfigListener(`uniffiFree`,`uniffiClone`,`onChange`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceClientDelegate) { - `didReceiveAuthError` = other.`didReceiveAuthError` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceMediaPreviewConfigListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onChange` = other.`onChange` } } -@Structure.FieldOrder("retrieveSessionFromKeychain", "saveSessionInKeychain", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceClientSessionDelegate( - @JvmField internal var `retrieveSessionFromKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod0? = null, - @JvmField internal var `saveSessionInKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod1? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "transmissionProgress") +internal open class UniffiVTableCallbackInterfaceProgressWatcher( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `transmissionProgress`: UniffiCallbackInterfaceProgressWatcherMethod0? = null, ) : Structure() { class UniffiByValue( - `retrieveSessionFromKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod0? = null, - `saveSessionInKeychain`: UniffiCallbackInterfaceClientSessionDelegateMethod1? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceClientSessionDelegate(`retrieveSessionFromKeychain`,`saveSessionInKeychain`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `transmissionProgress`: UniffiCallbackInterfaceProgressWatcherMethod0? = null, + ): UniffiVTableCallbackInterfaceProgressWatcher(`uniffiFree`,`uniffiClone`,`transmissionProgress`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceClientSessionDelegate) { - `retrieveSessionFromKeychain` = other.`retrieveSessionFromKeychain` - `saveSessionInKeychain` = other.`saveSessionInKeychain` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceProgressWatcher) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `transmissionProgress` = other.`transmissionProgress` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceEnableRecoveryProgressListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onChange") +internal open class UniffiVTableCallbackInterfaceRoomAccountDataListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onChange`: UniffiCallbackInterfaceRoomAccountDataListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceEnableRecoveryProgressListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onChange`: UniffiCallbackInterfaceRoomAccountDataListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomAccountDataListener(`uniffiFree`,`uniffiClone`,`onChange`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceEnableRecoveryProgressListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomAccountDataListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onChange` = other.`onChange` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onError") +internal open class UniffiVTableCallbackInterfaceSendQueueRoomErrorListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onError`: UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onError`: UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSendQueueRoomErrorListener(`uniffiFree`,`uniffiClone`,`onError`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSendQueueRoomErrorListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onError` = other.`onError` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceGrantQrLoginProgressListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onNotification") +internal open class UniffiVTableCallbackInterfaceSyncNotificationListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onNotification`: UniffiCallbackInterfaceSyncNotificationListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceGrantQrLoginProgressListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onNotification`: UniffiCallbackInterfaceSyncNotificationListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSyncNotificationListener(`uniffiFree`,`uniffiClone`,`onNotification`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceGrantQrLoginProgressListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSyncNotificationListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onNotification` = other.`onNotification` } } -@Structure.FieldOrder("call", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceIdentityStatusChangeListener( - @JvmField internal var `call`: UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceBackupStateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceBackupStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceIdentityStatusChangeListener(`call`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceBackupStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceBackupStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceIdentityStatusChangeListener) { - `call` = other.`call` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceBackupStateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("call", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceIgnoredUsersListener( - @JvmField internal var `call`: UniffiCallbackInterfaceIgnoredUsersListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceBackupSteadyStateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceBackupSteadyStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceIgnoredUsersListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceIgnoredUsersListener(`call`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceBackupSteadyStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceBackupSteadyStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceIgnoredUsersListener) { - `call` = other.`call` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceBackupSteadyStateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("call", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceKnockRequestsListener( - @JvmField internal var `call`: UniffiCallbackInterfaceKnockRequestsListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceEnableRecoveryProgressListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceKnockRequestsListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceKnockRequestsListener(`call`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceEnableRecoveryProgressListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceKnockRequestsListener) { - `call` = other.`call` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceEnableRecoveryProgressListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("call", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceLiveLocationShareListener( - @JvmField internal var `call`: UniffiCallbackInterfaceLiveLocationShareListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceRecoveryStateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRecoveryStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceLiveLocationShareListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceLiveLocationShareListener(`call`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceRecoveryStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRecoveryStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceLiveLocationShareListener) { - `call` = other.`call` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRecoveryStateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onChange", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceMediaPreviewConfigListener( - @JvmField internal var `onChange`: UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceVerificationStateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onChange`: UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceMediaPreviewConfigListener(`onChange`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceVerificationStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceMediaPreviewConfigListener) { - `onChange` = other.`onChange` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceVerificationStateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("settingsDidChange", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "settingsDidChange") internal open class UniffiVTableCallbackInterfaceNotificationSettingsDelegate( - @JvmField internal var `settingsDidChange`: UniffiCallbackInterfaceNotificationSettingsDelegateMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `settingsDidChange`: UniffiCallbackInterfaceNotificationSettingsDelegateMethod0? = null, ) : Structure() { class UniffiByValue( - `settingsDidChange`: UniffiCallbackInterfaceNotificationSettingsDelegateMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceNotificationSettingsDelegate(`settingsDidChange`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `settingsDidChange`: UniffiCallbackInterfaceNotificationSettingsDelegateMethod0? = null, + ): UniffiVTableCallbackInterfaceNotificationSettingsDelegate(`uniffiFree`,`uniffiClone`,`settingsDidChange`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceNotificationSettingsDelegate) { - `settingsDidChange` = other.`settingsDidChange` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `settingsDidChange` = other.`settingsDidChange` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfacePaginationStatusListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfacePaginationStatusListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfacePaginationStatusListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfacePaginationStatusListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfacePaginationStatusListener) { + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener) { + `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` `onUpdate` = other.`onUpdate` + } + +} +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener( + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0? = null, +) : Structure() { + class UniffiByValue( + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue + + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("transmissionProgress", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceProgressWatcher( - @JvmField internal var `transmissionProgress`: UniffiCallbackInterfaceProgressWatcherMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceGrantQrLoginProgressListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `transmissionProgress`: UniffiCallbackInterfaceProgressWatcherMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceProgressWatcher(`transmissionProgress`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceGrantQrLoginProgressListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceProgressWatcher) { - `transmissionProgress` = other.`transmissionProgress` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceGrantQrLoginProgressListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") internal open class UniffiVTableCallbackInterfaceQrLoginProgressListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceQrLoginProgressListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceQrLoginProgressListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceQrLoginProgressListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceQrLoginProgressListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceQrLoginProgressListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceQrLoginProgressListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceQrLoginProgressListener) { + `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` `onUpdate` = other.`onUpdate` + } + +} +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") +internal open class UniffiVTableCallbackInterfaceCallDeclineListener( + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceCallDeclineListenerMethod0? = null, +) : Structure() { + class UniffiByValue( + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceCallDeclineListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceCallDeclineListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue + + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceCallDeclineListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRecoveryStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRecoveryStateListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") +internal open class UniffiVTableCallbackInterfaceIdentityStatusChangeListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceRecoveryStateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRecoveryStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceIdentityStatusChangeListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRecoveryStateListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceIdentityStatusChangeListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("onChange", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRoomAccountDataListener( - @JvmField internal var `onChange`: UniffiCallbackInterfaceRoomAccountDataListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") +internal open class UniffiVTableCallbackInterfaceKnockRequestsListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceKnockRequestsListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onChange`: UniffiCallbackInterfaceRoomAccountDataListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomAccountDataListener(`onChange`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceKnockRequestsListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceKnockRequestsListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomAccountDataListener) { - `onChange` = other.`onChange` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceKnockRequestsListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") +internal open class UniffiVTableCallbackInterfaceLiveLocationShareListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceLiveLocationShareListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceLiveLocationShareListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceLiveLocationShareListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceLiveLocationShareListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("call", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") internal open class UniffiVTableCallbackInterfaceRoomInfoListener( - @JvmField internal var `call`: UniffiCallbackInterfaceRoomInfoListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceRoomInfoListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceRoomInfoListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomInfoListener(`call`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceRoomInfoListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomInfoListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomInfoListener) { - `call` = other.`call` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRoomListEntriesListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListEntriesListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceSendQueueListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSendQueueListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceRoomListEntriesListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomListEntriesListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSendQueueListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSendQueueListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListEntriesListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSendQueueListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRoomListLoadingStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "call") +internal open class UniffiVTableCallbackInterfaceTypingNotificationsListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `call`: UniffiCallbackInterfaceTypingNotificationsListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomListLoadingStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `call`: UniffiCallbackInterfaceTypingNotificationsListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceTypingNotificationsListener(`uniffiFree`,`uniffiClone`,`call`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListLoadingStateListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceTypingNotificationsListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `call` = other.`call` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRoomListServiceStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListServiceStateListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceRoomListServiceStateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomListServiceStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListServiceStateListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceRoomListEntriesListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListEntriesListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceRoomListEntriesListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomListEntriesListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListEntriesListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceSendQueueListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSendQueueListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceRoomListLoadingStateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSendQueueListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSendQueueListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomListLoadingStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSendQueueListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListLoadingStateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onError", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceSendQueueRoomErrorListener( - @JvmField internal var `onError`: UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceRoomListServiceStateListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListServiceStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onError`: UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSendQueueRoomErrorListener(`onError`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceRoomListServiceStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomListServiceStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSendQueueRoomErrorListener) { - `onError` = other.`onError` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListServiceStateListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("didReceiveVerificationRequest", "didAcceptVerificationRequest", "didStartSasVerification", "didReceiveVerificationData", "didFail", "didCancel", "didFinish", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "didReceiveVerificationRequest", "didAcceptVerificationRequest", "didStartSasVerification", "didReceiveVerificationData", "didFail", "didCancel", "didFinish") internal open class UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate( + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, @JvmField internal var `didReceiveVerificationRequest`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0? = null, @JvmField internal var `didAcceptVerificationRequest`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1? = null, @JvmField internal var `didStartSasVerification`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2? = null, @@ -1359,9 +1448,10 @@ internal open class UniffiVTableCallbackInterfaceSessionVerificationControllerDe @JvmField internal var `didFail`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4? = null, @JvmField internal var `didCancel`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5? = null, @JvmField internal var `didFinish`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6? = null, - @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, ) : Structure() { class UniffiByValue( + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + `uniffiClone`: UniffiCallbackInterfaceClone? = null, `didReceiveVerificationRequest`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0? = null, `didAcceptVerificationRequest`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1? = null, `didStartSasVerification`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2? = null, @@ -1369,10 +1459,11 @@ internal open class UniffiVTableCallbackInterfaceSessionVerificationControllerDe `didFail`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4? = null, `didCancel`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5? = null, `didFinish`: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6? = null, - `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate(`didReceiveVerificationRequest`,`didAcceptVerificationRequest`,`didStartSasVerification`,`didReceiveVerificationData`,`didFail`,`didCancel`,`didFinish`,`uniffiFree`,), Structure.ByValue + ): UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate(`uniffiFree`,`uniffiClone`,`didReceiveVerificationRequest`,`didAcceptVerificationRequest`,`didStartSasVerification`,`didReceiveVerificationData`,`didFail`,`didCancel`,`didFinish`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate) { + `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` `didReceiveVerificationRequest` = other.`didReceiveVerificationRequest` `didAcceptVerificationRequest` = other.`didAcceptVerificationRequest` `didStartSasVerification` = other.`didStartSasVerification` @@ -1380,3938 +1471,2689 @@ internal open class UniffiVTableCallbackInterfaceSessionVerificationControllerDe `didFail` = other.`didFail` `didCancel` = other.`didCancel` `didFinish` = other.`didFinish` - `uniffiFree` = other.`uniffiFree` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") internal open class UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener) { - `onUpdate` = other.`onUpdate` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") internal open class UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener) { - `onUpdate` = other.`onUpdate` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") internal open class UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener) { - `onUpdate` = other.`onUpdate` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") internal open class UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener) { - `onUpdate` = other.`onUpdate` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onNotification", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceSyncNotificationListener( - @JvmField internal var `onNotification`: UniffiCallbackInterfaceSyncNotificationListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfaceSyncServiceStateObserver( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSyncServiceStateObserverMethod0? = null, ) : Structure() { class UniffiByValue( - `onNotification`: UniffiCallbackInterfaceSyncNotificationListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSyncNotificationListener(`onNotification`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceSyncServiceStateObserverMethod0? = null, + ): UniffiVTableCallbackInterfaceSyncServiceStateObserver(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSyncNotificationListener) { - `onNotification` = other.`onNotification` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSyncServiceStateObserver) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceSyncServiceStateObserver( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSyncServiceStateObserverMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") +internal open class UniffiVTableCallbackInterfacePaginationStatusListener( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfacePaginationStatusListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceSyncServiceStateObserverMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceSyncServiceStateObserver(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfacePaginationStatusListenerMethod0? = null, + ): UniffiVTableCallbackInterfacePaginationStatusListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSyncServiceStateObserver) { - `onUpdate` = other.`onUpdate` + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfacePaginationStatusListener) { `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("onUpdate", "uniffiFree") +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUpdate") internal open class UniffiVTableCallbackInterfaceTimelineListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceTimelineListenerMethod0? = null, @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUpdate`: UniffiCallbackInterfaceTimelineListenerMethod0? = null, ) : Structure() { class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceTimelineListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceTimelineListener(`onUpdate`,`uniffiFree`,), Structure.ByValue + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUpdate`: UniffiCallbackInterfaceTimelineListenerMethod0? = null, + ): UniffiVTableCallbackInterfaceTimelineListener(`uniffiFree`,`uniffiClone`,`onUpdate`,), Structure.ByValue internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceTimelineListener) { - `onUpdate` = other.`onUpdate` `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUpdate` = other.`onUpdate` } } -@Structure.FieldOrder("call", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceTypingNotificationsListener( - @JvmField internal var `call`: UniffiCallbackInterfaceTypingNotificationsListenerMethod0? = null, +@Structure.FieldOrder("uniffiFree", "uniffiClone", "onUtd") +internal open class UniffiVTableCallbackInterfaceUnableToDecryptDelegate( @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `onUtd`: UniffiCallbackInterfaceUnableToDecryptDelegateMethod0? = null, ) : Structure() { class UniffiByValue( - `call`: UniffiCallbackInterfaceTypingNotificationsListenerMethod0? = null, `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceTypingNotificationsListener(`call`,`uniffiFree`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceTypingNotificationsListener) { - `call` = other.`call` - `uniffiFree` = other.`uniffiFree` - } - -} -@Structure.FieldOrder("onUtd", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceUnableToDecryptDelegate( - @JvmField internal var `onUtd`: UniffiCallbackInterfaceUnableToDecryptDelegateMethod0? = null, - @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, -) : Structure() { - class UniffiByValue( - `onUtd`: UniffiCallbackInterfaceUnableToDecryptDelegateMethod0? = null, - `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceUnableToDecryptDelegate(`onUtd`,`uniffiFree`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceUnableToDecryptDelegate) { - `onUtd` = other.`onUtd` - `uniffiFree` = other.`uniffiFree` - } - -} -@Structure.FieldOrder("onUpdate", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceVerificationStateListener( - @JvmField internal var `onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0? = null, - @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, -) : Structure() { - class UniffiByValue( - `onUpdate`: UniffiCallbackInterfaceVerificationStateListenerMethod0? = null, - `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceVerificationStateListener(`onUpdate`,`uniffiFree`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceVerificationStateListener) { - `onUpdate` = other.`onUpdate` - `uniffiFree` = other.`uniffiFree` - } - -} -@Structure.FieldOrder("acquireCapabilities", "uniffiFree") -internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider( - @JvmField internal var `acquireCapabilities`: UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0? = null, - @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, -) : Structure() { - class UniffiByValue( - `acquireCapabilities`: UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0? = null, - `uniffiFree`: UniffiCallbackInterfaceFree? = null, - ): UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(`acquireCapabilities`,`uniffiFree`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider) { - `acquireCapabilities` = other.`acquireCapabilities` - `uniffiFree` = other.`uniffiFree` - } - -} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `onUtd`: UniffiCallbackInterfaceUnableToDecryptDelegateMethod0? = null, + ): UniffiVTableCallbackInterfaceUnableToDecryptDelegate(`uniffiFree`,`uniffiClone`,`onUtd`,), Structure.ByValue + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceUnableToDecryptDelegate) { + `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `onUtd` = other.`onUtd` + } +} +@Structure.FieldOrder("uniffiFree", "uniffiClone", "acquireCapabilities") +internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider( + @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null, + @JvmField internal var `uniffiClone`: UniffiCallbackInterfaceClone? = null, + @JvmField internal var `acquireCapabilities`: UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0? = null, +) : Structure() { + class UniffiByValue( + `uniffiFree`: UniffiCallbackInterfaceFree? = null, + `uniffiClone`: UniffiCallbackInterfaceClone? = null, + `acquireCapabilities`: UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0? = null, + ): UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(`uniffiFree`,`uniffiClone`,`acquireCapabilities`,), Structure.ByValue + internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider) { + `uniffiFree` = other.`uniffiFree` + `uniffiClone` = other.`uniffiClone` + `acquireCapabilities` = other.`acquireCapabilities` + } +} +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_ffi")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( +external fun uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id( +external fun uniffi_matrix_sdk_ffi_checksum_func_init_platform( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url( +external fun uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( +external fun uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_init_platform( +external fun uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid( +external fun uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_log_event( +external fun uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( +external fun uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink( +external fun uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink( +external fun uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html( +external fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote( +external fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown( +external fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote( +external fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new( +external fun uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget( +external fun uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from( +external fun uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer( +external fun uniffi_matrix_sdk_ffi_checksum_func_log_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name( +external fun uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha( +external fun uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role( +external fun uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( ): Short -fun uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level( +external fun uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send( +external fun uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth( +external fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_account_data( +external fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_account_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji( +external fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions( +external fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo( +external fun uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_account_data( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_create_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_account_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_device_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_display_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_create_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_encryption( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_device_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_display_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_encryption( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_profile( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_profile( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_get_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_homeserver( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_homeserver( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_knock( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_login( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_logout( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_knock( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_notification_client( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_login( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_logout( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_notification_client( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_restore_session( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_rooms( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_search_users( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_server( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_restore_session( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_session( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_rooms( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_search_users( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_server( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_session( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_space_service( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_space_service( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_sync_service( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_upload_media( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_user_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_sync_service( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_upload_media( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_user_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh( +external fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates( +external fun uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recover( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recover( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel( +external fun uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset( +external fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept( +external fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline( +external fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban( +external fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen( +external fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis( +external fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info( +external fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode( +external fun uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count( +external fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants( +external fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases( +external fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes( +external fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_ban_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_decline_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_ban_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_display_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_edit( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_decline_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_display_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_edit( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_forget( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_heroes( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_forget( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_heroes( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_inviter( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_is_direct( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_is_public( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_inviter( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_is_space( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_is_direct( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_join( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_is_public( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_kick_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_is_space( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_latest_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_join( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_leave( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_kick_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_latest_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_leave( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_member( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_members( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_member( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_membership( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_members( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_preview_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_membership( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_raw_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_redact( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_preview_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_report_content( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_raw_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_report_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_redact( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_room_info( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_report_content( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_report_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_send_raw( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_room_info( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_set_name( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_send_raw( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_set_topic( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_set_name( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_set_topic( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_successor_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_timeline( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_topic( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_successor_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_unban_user( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_timeline( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_topic( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_unban_user( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results( +external fun uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search( +external fun uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters( +external fun uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlist_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_info( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave( +external fun uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details( +external fun uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( +external fun uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_info( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend( +external fun uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request( +external fun uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request( +external fun uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms( +external fun uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space( +external fun uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_span_enter( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_span_exit( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_span_is_none( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit( +external fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase( +external fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size( +external fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained( +external fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( +external fun uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_start( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_start( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_state( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_state( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos( +external fun uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel( +external fun uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished( +external fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( +external fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener( +external fun uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_edit( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_edit( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( +external fun uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count( +external fun uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation( +external fun uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( +external fun uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( +external fun uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin( +external fun uniffi_matrix_sdk_ffi_checksum_method_span_enter( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( +external fun uniffi_matrix_sdk_ffi_checksum_method_span_exit( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_span_is_none( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run( +external fun uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv( +external fun uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send( +external fun uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_span_current( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_span_new( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_span_current( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_span_new( ): Short -fun uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include( +external fun uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( +external fun uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( +external fun uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( +external fun uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain( +external fun uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change( +external fun uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change( +external fun uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress( +external fun uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( +external fun uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request( +external fun uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call( +external fun uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd( +external fun uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update( +external fun uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd( ): Short -fun uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities( +external fun uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities( ): Short -fun ffi_matrix_sdk_ffi_uniffi_contract_version( +external fun ffi_matrix_sdk_ffi_uniffi_contract_version( ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "matrix_sdk_ffi" - // For large crates we prevent `MethodTooLargeException` (see #2340) - // N.B. the name of the extension is very misleading, since it is - // rather `InterfaceTooLargeException`, caused by too many methods - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - uniffiCallbackInterfaceAccountDataListener.register(lib) - uniffiCallbackInterfaceBackupStateListener.register(lib) - uniffiCallbackInterfaceBackupSteadyStateListener.register(lib) - uniffiCallbackInterfaceCallDeclineListener.register(lib) - uniffiCallbackInterfaceClientDelegate.register(lib) - uniffiCallbackInterfaceClientSessionDelegate.register(lib) - uniffiCallbackInterfaceEnableRecoveryProgressListener.register(lib) - uniffiCallbackInterfaceGeneratedQrLoginProgressListener.register(lib) - uniffiCallbackInterfaceGrantGeneratedQrLoginProgressListener.register(lib) - uniffiCallbackInterfaceGrantQrLoginProgressListener.register(lib) - uniffiCallbackInterfaceIdentityStatusChangeListener.register(lib) - uniffiCallbackInterfaceIgnoredUsersListener.register(lib) - uniffiCallbackInterfaceKnockRequestsListener.register(lib) - uniffiCallbackInterfaceLiveLocationShareListener.register(lib) - uniffiCallbackInterfaceMediaPreviewConfigListener.register(lib) - uniffiCallbackInterfaceNotificationSettingsDelegate.register(lib) - uniffiCallbackInterfacePaginationStatusListener.register(lib) - uniffiCallbackInterfaceProgressWatcher.register(lib) - uniffiCallbackInterfaceQrLoginProgressListener.register(lib) - uniffiCallbackInterfaceRecoveryStateListener.register(lib) - uniffiCallbackInterfaceRoomAccountDataListener.register(lib) - uniffiCallbackInterfaceRoomDirectorySearchEntriesListener.register(lib) - uniffiCallbackInterfaceRoomInfoListener.register(lib) - uniffiCallbackInterfaceRoomListEntriesListener.register(lib) - uniffiCallbackInterfaceRoomListLoadingStateListener.register(lib) - uniffiCallbackInterfaceRoomListServiceStateListener.register(lib) - uniffiCallbackInterfaceRoomListServiceSyncIndicatorListener.register(lib) - uniffiCallbackInterfaceSendQueueListener.register(lib) - uniffiCallbackInterfaceSendQueueRoomErrorListener.register(lib) - uniffiCallbackInterfaceSendQueueRoomUpdateListener.register(lib) - uniffiCallbackInterfaceSessionVerificationControllerDelegate.register(lib) - uniffiCallbackInterfaceSpaceRoomListEntriesListener.register(lib) - uniffiCallbackInterfaceSpaceRoomListPaginationStateListener.register(lib) - uniffiCallbackInterfaceSpaceRoomListSpaceListener.register(lib) - uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.register(lib) - uniffiCallbackInterfaceSyncNotificationListener.register(lib) - uniffiCallbackInterfaceSyncServiceStateObserver.register(lib) - uniffiCallbackInterfaceTimelineListener.register(lib) - uniffiCallbackInterfaceTypingNotificationsListener.register(lib) - uniffiCallbackInterfaceUnableToDecryptDelegate.register(lib) - uniffiCallbackInterfaceVerificationStateListener.register(lib) - uniffiCallbackInterfaceWidgetCapabilitiesProvider.register(lib) - uniffi.matrix_sdk.uniffiEnsureInitialized() - uniffi.matrix_sdk_base.uniffiEnsureInitialized() - uniffi.matrix_sdk_common.uniffiEnsureInitialized() - uniffi.matrix_sdk_crypto.uniffiEnsureInitialized() - uniffi.matrix_sdk_ui.uniffiEnsureInitialized() - // Loading of library with integrity check done. - lib - } - - // The Cleaner for the whole library - internal val CLEANER: UniffiCleaner by lazy { - UniffiCleaner.create() - } - } - - // FFI functions - fun uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_checkcodesender(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +internal object UniffiLib { + + // The Cleaner for the whole library + internal val CLEANER: UniffiCleaner by lazy { + UniffiCleaner.create() + } + + + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_ffi")) + uniffiCallbackInterfaceAccountDataListener.register(this) + uniffiCallbackInterfaceBackupStateListener.register(this) + uniffiCallbackInterfaceBackupSteadyStateListener.register(this) + uniffiCallbackInterfaceCallDeclineListener.register(this) + uniffiCallbackInterfaceClientDelegate.register(this) + uniffiCallbackInterfaceClientSessionDelegate.register(this) + uniffiCallbackInterfaceEnableRecoveryProgressListener.register(this) + uniffiCallbackInterfaceGeneratedQrLoginProgressListener.register(this) + uniffiCallbackInterfaceGrantGeneratedQrLoginProgressListener.register(this) + uniffiCallbackInterfaceGrantQrLoginProgressListener.register(this) + uniffiCallbackInterfaceIdentityStatusChangeListener.register(this) + uniffiCallbackInterfaceIgnoredUsersListener.register(this) + uniffiCallbackInterfaceKnockRequestsListener.register(this) + uniffiCallbackInterfaceLiveLocationShareListener.register(this) + uniffiCallbackInterfaceMediaPreviewConfigListener.register(this) + uniffiCallbackInterfaceNotificationSettingsDelegate.register(this) + uniffiCallbackInterfacePaginationStatusListener.register(this) + uniffiCallbackInterfaceProgressWatcher.register(this) + uniffiCallbackInterfaceQrLoginProgressListener.register(this) + uniffiCallbackInterfaceRecoveryStateListener.register(this) + uniffiCallbackInterfaceRoomAccountDataListener.register(this) + uniffiCallbackInterfaceRoomDirectorySearchEntriesListener.register(this) + uniffiCallbackInterfaceRoomInfoListener.register(this) + uniffiCallbackInterfaceRoomListEntriesListener.register(this) + uniffiCallbackInterfaceRoomListLoadingStateListener.register(this) + uniffiCallbackInterfaceRoomListServiceStateListener.register(this) + uniffiCallbackInterfaceRoomListServiceSyncIndicatorListener.register(this) + uniffiCallbackInterfaceSendQueueListener.register(this) + uniffiCallbackInterfaceSendQueueRoomErrorListener.register(this) + uniffiCallbackInterfaceSendQueueRoomUpdateListener.register(this) + uniffiCallbackInterfaceSessionVerificationControllerDelegate.register(this) + uniffiCallbackInterfaceSpaceRoomListEntriesListener.register(this) + uniffiCallbackInterfaceSpaceRoomListPaginationStateListener.register(this) + uniffiCallbackInterfaceSpaceRoomListSpaceListener.register(this) + uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.register(this) + uniffiCallbackInterfaceSyncNotificationListener.register(this) + uniffiCallbackInterfaceSyncServiceStateObserver.register(this) + uniffiCallbackInterfaceTimelineListener.register(this) + uniffiCallbackInterfaceTypingNotificationsListener.register(this) + uniffiCallbackInterfaceUnableToDecryptDelegate.register(this) + uniffiCallbackInterfaceVerificationStateListener.register(this) + uniffiCallbackInterfaceWidgetCapabilitiesProvider.register(this) + uniffi.matrix_sdk.uniffiEnsureInitialized() + uniffi.matrix_sdk_base.uniffiEnsureInitialized() + uniffi.matrix_sdk_common.uniffiEnsureInitialized() + uniffi.matrix_sdk_crypto.uniffiEnsureInitialized() + uniffi.matrix_sdk_ui.uniffiEnsureInitialized() + + } + external fun uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions(`ptr`: Long,`mentions`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send(`ptr`: Pointer,`code`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_clone_ssohandler(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_client(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_client(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_ssohandler(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth(`ptr`: Pointer,`authorizationData`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish(`ptr`: Long,`callbackUrl`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_ssohandler_url(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_clone_client(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_account_data(`ptr`: Pointer,`eventType`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_free_client(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth(`ptr`: Long,`authorizationData`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_account_url(`ptr`: Pointer,`action`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_account_data(`ptr`: Long,`eventType`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji(`ptr`: Pointer,`emoji`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_account_url(`ptr`: Long,`action`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_avatar_url(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_avatar_url(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo(`ptr`: Pointer,`roomId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo(`ptr`: Long,`roomId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_client_clear_caches(`ptr`: Pointer,`syncService`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_clear_caches(`ptr`: Long,`syncService`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_create_room(`ptr`: Pointer,`request`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_create_room(`ptr`: Long,`request`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt(`ptr`: Pointer,`jwt`: RustBuffer.ByValue,`initialDeviceName`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt(`ptr`: Long,`jwt`: RustBuffer.ByValue,`initialDeviceName`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account(`ptr`: Pointer,`authData`: RustBuffer.ByValue,`eraseData`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account(`ptr`: Long,`authData`: RustBuffer.ByValue,`eraseData`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher(`ptr`: Pointer,`identifiers`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher(`ptr`: Long,`identifiers`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_device_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_device_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_display_name(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_display_name(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues(`ptr`: Pointer,`enable`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues(`ptr`: Long,`enable`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress(`ptr`: Pointer,`enable`: Byte,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress(`ptr`: Long,`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, +external fun uniffi_matrix_sdk_ffi_fn_method_client_encryption(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_content(`ptr`: Pointer,`mediaSource`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_file(`ptr`: Pointer,`mediaSource`: Pointer,`filename`: RustBuffer.ByValue,`mimeType`: RustBuffer.ByValue,`useCache`: Byte,`tempDir`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_content(`ptr`: Long,`mediaSource`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_file(`ptr`: Long,`mediaSource`: Long,`filename`: RustBuffer.ByValue,`mimeType`: RustBuffer.ByValue,`useCache`: Byte,`tempDir`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail(`ptr`: Pointer,`mediaSource`: Pointer,`width`: Long,`height`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail(`ptr`: Long,`mediaSource`: Long,`width`: Long,`height`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_profile(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_profile(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_room(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_room(`ptr`: Long,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias(`ptr`: Pointer,`roomAlias`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias(`ptr`: Long,`roomAlias`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`viaServers`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id(`ptr`: Long,`roomId`: RustBuffer.ByValue,`viaServers`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_get_url(`ptr`: Pointer,`url`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_url(`ptr`: Long,`url`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_homeserver(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_homeserver(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_ignore_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_ignore_user(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_ignored_users(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_ignored_users(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available(`ptr`: Pointer,`alias`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available(`ptr`: Long,`alias`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id(`ptr`: Pointer,`roomId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id(`ptr`: Long,`roomId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias(`ptr`: Pointer,`roomIdOrAlias`: RustBuffer.ByValue,`serverNames`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias(`ptr`: Long,`roomIdOrAlias`: RustBuffer.ByValue,`serverNames`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_knock(`ptr`: Pointer,`roomIdOrAlias`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue,`serverNames`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_knock(`ptr`: Long,`roomIdOrAlias`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue,`serverNames`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_login(`ptr`: Pointer,`username`: RustBuffer.ByValue,`password`: RustBuffer.ByValue,`initialDeviceName`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_login(`ptr`: Long,`username`: RustBuffer.ByValue,`password`: RustBuffer.ByValue,`initialDeviceName`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_email(`ptr`: Pointer,`email`: RustBuffer.ByValue,`password`: RustBuffer.ByValue,`initialDeviceName`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_email(`ptr`: Long,`email`: RustBuffer.ByValue,`password`: RustBuffer.ByValue,`initialDeviceName`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback(`ptr`: Pointer,`callbackUrl`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback(`ptr`: Long,`callbackUrl`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_logout(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_logout(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler(`ptr`: Pointer,`oidcConfiguration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_notification_client(`ptr`: Pointer,`processSetup`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event(`ptr`: Pointer,`eventType`: RustBuffer.ByValue,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`eventType`: RustBuffer.ByValue,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler(`ptr`: Long,`oidcConfiguration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_notification_client(`ptr`: Long,`processSetup`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event(`ptr`: Long,`eventType`: RustBuffer.ByValue,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event(`ptr`: Long,`roomId`: RustBuffer.ByValue,`eventType`: RustBuffer.ByValue,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias(`ptr`: Pointer,`roomAlias`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_restore_session(`ptr`: Pointer,`session`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with(`ptr`: Pointer,`session`: RustBuffer.ByValue,`roomLoadSettings`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists(`ptr`: Pointer,`roomAlias`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_rooms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias(`ptr`: Long,`roomAlias`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_restore_session(`ptr`: Long,`session`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with(`ptr`: Long,`session`: RustBuffer.ByValue,`roomLoadSettings`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists(`ptr`: Long,`roomAlias`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_rooms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_search_users(`ptr`: Pointer,`searchTerm`: RustBuffer.ByValue,`limit`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_search_users(`ptr`: Long,`searchTerm`: RustBuffer.ByValue,`limit`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_server(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_server(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_session(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_session(`ptr`: Long,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, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_account_data(`ptr`: Long,`eventType`: RustBuffer.ByValue,`content`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_set_delegate(`ptr`: Pointer,`delegate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_delegate(`ptr`: Long,`delegate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_set_display_name(`ptr`: Pointer,`name`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_display_name(`ptr`: Long,`name`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy(`ptr`: Pointer,`policy`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy(`ptr`: Long,`policy`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy(`ptr`: Pointer,`policy`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy(`ptr`: Long,`policy`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy(`ptr`: Pointer,`policy`: RustBufferMediaRetentionPolicy.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy(`ptr`: Long,`policy`: RustBufferMediaRetentionPolicy.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_set_pusher(`ptr`: Pointer,`identifiers`: RustBuffer.ByValue,`kind`: RustBuffer.ByValue,`appDisplayName`: RustBuffer.ByValue,`deviceDisplayName`: RustBuffer.ByValue,`profileTag`: RustBuffer.ByValue,`lang`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_pusher(`ptr`: Long,`identifiers`: RustBuffer.ByValue,`kind`: RustBuffer.ByValue,`appDisplayName`: RustBuffer.ByValue,`deviceDisplayName`: RustBuffer.ByValue,`profileTag`: RustBuffer.ByValue,`lang`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate(`ptr`: Pointer,`utdDelegate`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate(`ptr`: Long,`utdDelegate`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version(`ptr`: Long,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, +external fun uniffi_matrix_sdk_ffi_fn_method_client_space_service(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login(`ptr`: Long,`redirectUrl`: RustBuffer.ByValue,`idpId`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info(`ptr`: Long,`roomId`: RustBuffer.ByValue,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_sync_service(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room(`ptr`: Pointer,`room`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_sync_service(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_unignore_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room(`ptr`: Long,`room`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar(`ptr`: Pointer,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_unignore_user(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_upload_media(`ptr`: Pointer,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar(`ptr`: Long,`mimeType`: RustBuffer.ByValue,`data`: 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,`deviceId`: RustBuffer.ByValue,`additionalScopes`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_client_upload_media(`ptr`: Long,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue,`progressWatcher`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_client_user_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc(`ptr`: Long,`oidcConfiguration`: RustBuffer.ByValue,`prompt`: RustBuffer.ByValue,`loginHint`: RustBuffer.ByValue,`deviceId`: RustBuffer.ByValue,`additionalScopes`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_user_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_clientbuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji(`ptr`: Long,`emoji`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates(`ptr`: Pointer,`certificates`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups(`ptr`: Pointer,`autoEnableBackups`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing(`ptr`: Pointer,`autoEnableCrossSigning`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy(`ptr`: Pointer,`backupDownloadStrategy`: RustBufferBackupDownloadStrategy.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build(`ptr`: Pointer, -): 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, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite(`ptr`: Pointer,`enableShareHistoryOnInvite`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url(`ptr`: Pointer,`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy(`ptr`: Pointer,`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config(`ptr`: Pointer,`config`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy(`ptr`: Pointer,`strategy`: RustBufferCollectStrategy.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name(`ptr`: Pointer,`serverName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url(`ptr`: Pointer,`serverNameOrUrl`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths(`ptr`: Pointer,`dataPath`: RustBuffer.ByValue,`cachePath`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate(`ptr`: Pointer,`sessionDelegate`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder(`ptr`: Pointer,`versionBuilder`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store(`ptr`: Pointer,`config`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): 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,`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 -fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username(`ptr`: Pointer,`username`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_encryption(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_encryption(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist(`ptr`: Long,`path`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_clientbuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new(uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates(`ptr`: Long,`certificates`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups(`ptr`: Long,`autoEnableBackups`: Byte,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing(`ptr`: Long,`autoEnableCrossSigning`: Byte,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy(`ptr`: Long,`backupDownloadStrategy`: RustBufferBackupDownloadStrategy.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery(`ptr`: Pointer,`waitForBackupsToUpload`: Byte,`passphrase`: RustBuffer.ByValue,`progressListener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name(`ptr`: Long,`holderName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings(`ptr`: Long,`decryptionSettings`: RustBufferDecryptionSettings.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_recover(`ptr`: Pointer,`recoveryKey`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset(`ptr`: Pointer,`oldRecoveryKey`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`fallbackToServer`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite(`ptr`: Long,`enableShareHistoryOnInvite`: Byte,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state(`ptr`: Pointer,`progressListener`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url(`ptr`: Long,`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate(`ptr`: Pointer,`progressListener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy(`ptr`: Long,`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan(`ptr`: Pointer,`qrCodeData`: Pointer,`progressListener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config(`ptr`: Long,`config`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): 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, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_identityresethandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy(`ptr`: Long,`strategy`: RustBufferCollectStrategy.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name(`ptr`: Long,`serverName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url(`ptr`: Long,`serverNameOrUrl`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths(`ptr`: Long,`dataPath`: RustBuffer.ByValue,`cachePath`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate(`ptr`: Long,`sessionDelegate`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder(`ptr`: Long,`versionBuilder`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store(`ptr`: Long,`config`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled(`ptr`: Long,`enabled`: Byte,`threadSubscriptions`: Byte,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent(`ptr`: Long,`userAgent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username(`ptr`: Long,`username`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_encryption(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_encryption(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset(`ptr`: Pointer,`auth`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery(`ptr`: Long,`waitForBackupsToUpload`: Byte,`passphrase`: RustBuffer.ByValue,`progressListener`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_recover(`ptr`: Long,`recoveryKey`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset(`ptr`: Long,`oldRecoveryKey`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity(`ptr`: Long,`userId`: RustBuffer.ByValue,`fallbackToServer`: Byte, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline(`ptr`: Pointer,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state(`ptr`: Long,`progressListener`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban(`ptr`: Pointer,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_clone_identityresethandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_identityresethandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields(`ptr`: Pointer,`strict`: Byte,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave(`ptr`: Pointer,`roomIds`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate(`ptr`: Pointer,`progressListener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset(`ptr`: Long,`auth`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan(`ptr`: Pointer,`qrCodeData`: Pointer,`progressListener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_clone_useridentity(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_useridentity(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist(`ptr`: Pointer,`path`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_useridentity_pin(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_clone_mediasource(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_mediasource(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_timelineevent(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_timelineevent(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json(`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url(`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_mediasource_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_notificationclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_notificationclient(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_notificationclient(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_notificationclient(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification(`ptr`: Long,`roomId`: RustBuffer.ByValue,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications(`ptr`: Pointer,`requests`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications(`ptr`: Long,`requests`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room(`ptr`: Long,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_notificationsettings(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_notificationsettings(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_notificationsettings(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_notificationsettings(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode(`ptr`: Long,`isEncrypted`: Byte,`isOneToOne`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings(`ptr`: Long,`roomId`: RustBuffer.ByValue,`isEncrypted`: Byte,`isOneToOne`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode(`ptr`: Pointer,`isEncrypted`: Byte,`isOneToOne`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules(`ptr`: Long,`enabled`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode(`ptr`: Long,`roomId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`isEncrypted`: Byte,`isOneToOne`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules(`ptr`: Pointer,`enabled`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode(`ptr`: Pointer,`roomId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode(`ptr`: Long,`roomId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled(`ptr`: Long,`enabled`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule(`ptr`: Long,`ruleId`: RustBuffer.ByValue,`ruleKind`: RustBuffer.ByValue,`actions`: RustBuffer.ByValue,`conditions`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode(`ptr`: Pointer,`roomId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode(`ptr`: Long,`isEncrypted`: Byte,`isOneToOne`: Byte,`mode`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled(`ptr`: Pointer,`enabled`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate(`ptr`: Long,`delegate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled(`ptr`: Long,`enabled`: Byte, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled(`ptr`: Long,`enabled`: Byte, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode(`ptr`: Long,`roomId`: RustBuffer.ByValue,`mode`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled(`ptr`: Long,`enabled`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule(`ptr`: Pointer,`ruleId`: RustBuffer.ByValue,`ruleKind`: RustBuffer.ByValue,`actions`: RustBuffer.ByValue,`conditions`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room(`ptr`: Long,`roomId`: RustBuffer.ByValue,`isEncrypted`: Byte,`isOneToOne`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode(`ptr`: Pointer,`isEncrypted`: Byte,`isOneToOne`: Byte,`mode`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate(`ptr`: Pointer,`delegate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_checkcodesender(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled(`ptr`: Pointer,`enabled`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send(`ptr`: Long,`code`: Byte, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate(`ptr`: Long,`progressListener`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan(`ptr`: Long,`qrCodeData`: Long,`progressListener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled(`ptr`: Pointer,`enabled`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`mode`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate(`ptr`: Long,`progressListener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled(`ptr`: Pointer,`enabled`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan(`ptr`: Long,`qrCodeData`: Long,`progressListener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,`isEncrypted`: Byte,`isOneToOne`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_qrcodedata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_qrcodedata(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes(`bytes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_room(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_room(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline(`ptr`: Long,`reason`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban(`ptr`: Long,`reason`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_room(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_room(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_room_active_members_count(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_active_members_count(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes(`ptr`: Pointer,`changes`: RustBufferRoomPowerLevelChanges.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes(`ptr`: Long,`changes`: RustBufferRoomPowerLevelChanges.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_avatar_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_avatar_url(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_ban_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_ban_user(`ptr`: Long,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft(`ptr`: Pointer,`threadRoot`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft(`ptr`: Long,`threadRoot`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_decline_call(`ptr`: Pointer,`rtcNotificationEventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_decline_call(`ptr`: Long,`rtcNotificationEventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_display_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_display_name(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_edit(`ptr`: Pointer,`eventId`: RustBuffer.ByValue,`newContent`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_edit(`ptr`: Long,`eventId`: RustBuffer.ByValue,`newContent`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue(`ptr`: Pointer,`enable`: Byte,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue(`ptr`: Long,`enable`: Byte,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_room_encryption_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_encryption_state(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBufferEncryptionState.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription(`ptr`: Pointer,`threadRootEventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription(`ptr`: Long,`threadRootEventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_forget(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_forget(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_room_heroes(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_heroes(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend(`ptr`: Pointer,`devices`: RustBuffer.ByValue,`sendHandle`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend(`ptr`: Long,`devices`: RustBuffer.ByValue,`sendHandle`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_ignore_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_ignore_user(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_inviter(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_inviter(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_is_direct(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_is_direct(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_is_public(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_is_public(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_room_is_space(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_is_space(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_room_join(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_join(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_kick_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_kick_user(`ptr`: Long,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_latest_event(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_latest_event(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_leave(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_leave(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft(`ptr`: Pointer,`threadRoot`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft(`ptr`: Long,`threadRoot`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event(`ptr`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked(`ptr`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read(`ptr`: Pointer,`receiptType`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read(`ptr`: Long,`receiptType`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink(`ptr`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_member(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_member(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_member_display_name(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_member_display_name(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_members(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_members(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_membership(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_membership(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_preview_room(`ptr`: Pointer,`via`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_preview_room(`ptr`: Long,`via`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory(`ptr`: Pointer,`alias`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory(`ptr`: Long,`alias`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_raw_name(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_room_raw_name(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_redact(`ptr`: Pointer,`eventId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_redact(`ptr`: Long,`eventId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory(`ptr`: Pointer,`alias`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory(`ptr`: Long,`alias`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_report_content(`ptr`: Pointer,`eventId`: RustBuffer.ByValue,`score`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_report_content(`ptr`: Long,`eventId`: RustBuffer.ByValue,`score`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_report_room(`ptr`: Pointer,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_report_room(`ptr`: Long,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_room_info(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_room_info(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft(`ptr`: Pointer,`draft`: RustBuffer.ByValue,`threadRoot`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft(`ptr`: Long,`draft`: RustBuffer.ByValue,`threadRoot`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_send_live_location(`ptr`: Pointer,`geoUri`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_send_live_location(`ptr`: Long,`geoUri`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_send_raw(`ptr`: Pointer,`eventType`: RustBuffer.ByValue,`content`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_send_raw(`ptr`: Long,`eventType`: RustBuffer.ByValue,`content`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite(`ptr`: Pointer,`isFavourite`: Byte,`tagOrder`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite(`ptr`: Long,`isFavourite`: Byte,`tagOrder`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority(`ptr`: Pointer,`isLowPriority`: Byte,`tagOrder`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority(`ptr`: Long,`isLowPriority`: Byte,`tagOrder`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_set_name(`ptr`: Pointer,`name`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_set_name(`ptr`: Long,`name`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription(`ptr`: Pointer,`threadRootEventId`: RustBuffer.ByValue,`subscribed`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription(`ptr`: Long,`threadRootEventId`: RustBuffer.ByValue,`subscribed`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_set_topic(`ptr`: Pointer,`topic`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_set_topic(`ptr`: Long,`topic`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag(`ptr`: Pointer,`newValue`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag(`ptr`: Long,`newValue`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share(`ptr`: Pointer,`durationMillis`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share(`ptr`: Long,`durationMillis`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events(`ptr`: Pointer,`rtcNotificationEventId`: RustBuffer.ByValue,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events(`ptr`: Long,`rtcNotificationEventId`: RustBuffer.ByValue,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_room_successor_room(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_timeline(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration(`ptr`: Pointer,`configuration`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_topic(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_room_typing_notice(`ptr`: Pointer,`isTyping`: Byte, +external fun uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_unban_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_successor_room(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias(`ptr`: Pointer,`alias`: RustBuffer.ByValue,`altAliases`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_timeline(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility(`ptr`: Pointer,`visibility`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration(`ptr`: Long,`configuration`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules(`ptr`: Pointer,`newRule`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_topic(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_room_typing_notice(`ptr`: Long,`isTyping`: Byte, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users(`ptr`: Pointer,`updates`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_unban_user(`ptr`: Long,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility(`ptr`: Pointer,`visibility`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias(`ptr`: Long,`alias`: RustBuffer.ByValue,`altAliases`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar(`ptr`: Pointer,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue,`mediaInfo`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility(`ptr`: Long,`visibility`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend(`ptr`: Pointer,`userIds`: RustBuffer.ByValue,`sendHandle`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules(`ptr`: Long,`newRule`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users(`ptr`: Long,`updates`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility(`ptr`: Long,`visibility`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar(`ptr`: Long,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue,`mediaInfo`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend(`ptr`: Long,`userIds`: RustBuffer.ByValue,`sendHandle`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search(`ptr`: Pointer,`filter`: RustBuffer.ByValue,`batchSize`: Int,`viaServerName`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_roomlist(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roomlist(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters(`ptr`: Pointer,`pageSize`: Int,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with(`ptr`: Pointer,`pageSize`: Int,`enableLatestEventSorter`: Byte,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_roomlist_room(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter(`ptr`: Pointer,`kind`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roomlistservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms(`ptr`: Pointer, -): Long -fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms(`ptr`: Pointer,`roomIds`: RustBuffer.ByValue, -): Long -fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator(`ptr`: Pointer,`delayBeforeShowingInMs`: Int,`delayBeforeHidingInMs`: Int,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Int -fun uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk(`ptr`: Pointer,`chunkSize`: Int,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk(`ptr`: Long,`chunkSize`: Int,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions(`ptr`: Pointer,`mentions`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message(`ptr`: Pointer,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message(`ptr`: Long,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state(`ptr`: Pointer,`stateEvent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state(`ptr`: Long,`stateEvent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message(`ptr`: Long,`userId`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`stateEvent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state(`ptr`: Long,`userId`: RustBuffer.ByValue,`stateEvent`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification(`ptr`: Pointer,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification(`ptr`: Long,`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_roompreview(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_roompreview(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results(`ptr`: Long,`listener`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search(`ptr`: Long,`filter`: RustBuffer.ByValue,`batchSize`: Int,`viaServerName`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_roomlist(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_roomlist(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_roompreview_forget(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters(`ptr`: Long,`pageSize`: Int,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with(`ptr`: Long,`pageSize`: Int,`enableLatestEventSorter`: Byte,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roompreview_info(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_roomlist_room(`ptr`: Long,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roompreview_leave(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter(`ptr`: Long,`kind`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_roomlistservice(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(`ptr`: Long,`roomId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms(`ptr`: Long,`roomIds`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator(`ptr`: Long,`delayBeforeShowingInMs`: Int,`delayBeforeHidingInMs`: Int,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Int +external fun uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Int +external fun uniffi_matrix_sdk_ffi_fn_clone_roompreview(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_roompreview(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_roompreview_forget(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roompreview_info(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roompreview_leave(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_sendhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_sendhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_mediasource(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_mediasource(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json(`json`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url(`url`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_mediasource_url(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request(`ptr`: Pointer,`senderId`: RustBuffer.ByValue,`flowId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request(`ptr`: Long,`senderId`: RustBuffer.ByValue,`flowId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification(`ptr`: Pointer,`userId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification(`ptr`: Long,`userId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate(`ptr`: Pointer,`delegate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate(`ptr`: Long,`delegate`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol(`ptr`: Long,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, +external fun uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave(`ptr`: Long,`roomIds`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBufferSpaceRoomListPaginationState.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space(`ptr`: Long,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_method_spaceroomlist_subscribe_to_space_updates(`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, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_spaceservice(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_spaceservice(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space(`ptr`: Pointer,`childId`: RustBuffer.ByValue,`spaceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space(`ptr`: Long,`childId`: RustBuffer.ByValue,`spaceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child(`ptr`: Pointer,`childId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child(`ptr`: Long,`childId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space(`ptr`: Pointer,`spaceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space(`ptr`: Long,`spaceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space(`ptr`: Pointer,`childId`: RustBuffer.ByValue,`spaceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space(`ptr`: Long,`childId`: RustBuffer.ByValue,`spaceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list(`ptr`: Pointer,`spaceId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list(`ptr`: Long,`spaceId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces(`ptr`: Long,`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, -): Unit -fun uniffi_matrix_sdk_ffi_fn_constructor_span_current(uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_constructor_span_new(`file`: RustBuffer.ByValue,`line`: RustBuffer.ByValue,`level`: RustBuffer.ByValue,`target`: RustBuffer.ByValue,`name`: RustBuffer.ByValue,`bridgeTraceId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span(`target`: RustBuffer.ByValue,`parentTraceId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_span_enter(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_span_exit(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_span_is_none(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new(`dataPath`: RustBuffer.ByValue,`cachePath`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size(`ptr`: Pointer,`cacheSize`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit(`ptr`: Pointer,`limit`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase(`ptr`: Pointer,`passphrase`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size(`ptr`: Pointer,`poolMaxSize`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_ssohandler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_ssohandler(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish(`ptr`: Pointer,`callbackUrl`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new(`dataPath`: RustBuffer.ByValue,`cachePath`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_ssohandler_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_syncservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_syncservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size(`ptr`: Long,`cacheSize`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit(`ptr`: Long,`limit`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase(`ptr`: Long,`passphrase`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size(`ptr`: Long,`poolMaxSize`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_syncservice(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_syncservice(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_syncservice_start(`ptr`: Long, ): 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, +external fun uniffi_matrix_sdk_ffi_fn_method_syncservice_state(`ptr`: Long,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_syncservice_state(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_syncservice_stop(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_syncservice_stop(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish(`ptr`: Pointer, -): Long -fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos(`ptr`: Pointer,`enable`: Byte,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_taskhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_taskhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos(`ptr`: Long,`enable`: Byte,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_taskhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_taskhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_clone_threadsummary(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_threadsummary(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields(`ptr`: Long,`strict`: Byte,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_timeline(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_timeline(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content(`ptr`: Pointer,`msgType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_sendhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_sendhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_timeline(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_timeline(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener(`ptr`: Long,`listener`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content(`ptr`: Long,`msgType`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll(`ptr`: Pointer,`question`: RustBuffer.ByValue,`answers`: RustBuffer.ByValue,`maxSelections`: Byte,`pollKind`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll(`ptr`: Long,`question`: RustBuffer.ByValue,`answers`: RustBuffer.ByValue,`maxSelections`: Byte,`pollKind`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_edit(`ptr`: Pointer,`eventOrTransactionId`: RustBuffer.ByValue,`newContent`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_edit(`ptr`: Long,`eventOrTransactionId`: RustBuffer.ByValue,`newContent`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll(`ptr`: Pointer,`pollStartEventId`: RustBuffer.ByValue,`text`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll(`ptr`: Long,`pollStartEventId`: RustBuffer.ByValue,`text`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event(`ptr`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id(`ptr`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details(`ptr`: Pointer,`eventIdStr`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details(`ptr`: Long,`eventIdStr`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read(`ptr`: Pointer,`receiptType`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read(`ptr`: Long,`receiptType`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards(`ptr`: Pointer,`numEvents`: Short, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards(`ptr`: Long,`numEvents`: Short, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards(`ptr`: Pointer,`numEvents`: Short, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards(`ptr`: Long,`numEvents`: Short, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event(`ptr`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event(`ptr`: Pointer,`eventOrTransactionId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event(`ptr`: Long,`eventOrTransactionId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption(`ptr`: Pointer,`sessionIds`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption(`ptr`: Long,`sessionIds`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send(`ptr`: Pointer,`msg`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send(`ptr`: Long,`msg`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio(`ptr`: Long,`params`: RustBuffer.ByValue,`audioInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_file(`ptr`: Long,`params`: RustBuffer.ByValue,`fileInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_image(`ptr`: Long,`params`: RustBuffer.ByValue,`thumbnailSource`: RustBuffer.ByValue,`imageInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_location(`ptr`: Long,`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_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,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,`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,`repliedToEventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response(`ptr`: Long,`pollStartEventId`: RustBuffer.ByValue,`answers`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response(`ptr`: Pointer,`pollStartEventId`: RustBuffer.ByValue,`answers`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt(`ptr`: Long,`receiptType`: RustBuffer.ByValue,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt(`ptr`: Pointer,`receiptType`: RustBuffer.ByValue,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(`ptr`: Long,`msg`: Long,`eventId`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply(`ptr`: Pointer,`msg`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_video(`ptr`: Long,`params`: RustBuffer.ByValue,`thumbnailSource`: RustBuffer.ByValue,`videoInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -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,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status(`ptr`: Pointer,`listener`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message(`ptr`: Long,`params`: RustBuffer.ByValue,`audioInfo`: RustBuffer.ByValue,`waveform`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction(`ptr`: Pointer,`itemId`: RustBuffer.ByValue,`key`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status(`ptr`: Long,`listener`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction(`ptr`: Long,`itemId`: RustBuffer.ByValue,`key`: RustBuffer.ByValue, ): Long -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, +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(`ptr`: Long,`eventId`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery(`ptr`: Long,`params`: RustBuffer.ByValue,`itemInfos`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_timelineitem(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_timelineitem(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude(`eventTypes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include(`eventTypes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_clone_timelineitem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_timelineitem(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude(`eventTypes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include(`eventTypes`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join(`ptr`: Long, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_threadsummary(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_threadsummary(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Int -fun uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Int -fun uniffi_matrix_sdk_ffi_fn_clone_useridentity(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_useridentity(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_span(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_span(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_method_useridentity_pin(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_constructor_span_current(uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_constructor_span_new(`file`: RustBuffer.ByValue,`line`: RustBuffer.ByValue,`level`: RustBuffer.ByValue,`target`: RustBuffer.ByValue,`name`: RustBuffer.ByValue,`bridgeTraceId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span(`target`: RustBuffer.ByValue,`parentTraceId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_method_span_enter(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_span_exit(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, +): Unit +external fun uniffi_matrix_sdk_ffi_fn_method_span_is_none(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_widgetdriver(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_free_widgetdriver(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run(`ptr`: Pointer,`room`: Pointer,`capabilitiesProvider`: Long, +external fun uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run(`ptr`: Long,`room`: Long,`capabilitiesProvider`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv(`ptr`: Pointer, +external fun uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv(`ptr`: Long, ): Long -fun uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send(`ptr`: Pointer,`msg`: RustBuffer.ByValue, +external fun uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send(`ptr`: Long,`msg`: RustBuffer.ByValue, ): Long -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener(`vtable`: UniffiVTableCallbackInterfaceAccountDataListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener(`vtable`: UniffiVTableCallbackInterfaceAccountDataListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener(`vtable`: UniffiVTableCallbackInterfaceBackupStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate(`vtable`: UniffiVTableCallbackInterfaceClientDelegate, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener(`vtable`: UniffiVTableCallbackInterfaceBackupSteadyStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate(`vtable`: UniffiVTableCallbackInterfaceClientSessionDelegate, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener(`vtable`: UniffiVTableCallbackInterfaceCallDeclineListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener(`vtable`: UniffiVTableCallbackInterfaceIgnoredUsersListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate(`vtable`: UniffiVTableCallbackInterfaceClientDelegate, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener(`vtable`: UniffiVTableCallbackInterfaceMediaPreviewConfigListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate(`vtable`: UniffiVTableCallbackInterfaceClientSessionDelegate, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher(`vtable`: UniffiVTableCallbackInterfaceProgressWatcher, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener(`vtable`: UniffiVTableCallbackInterfaceEnableRecoveryProgressListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener(`vtable`: UniffiVTableCallbackInterfaceRoomAccountDataListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener(`vtable`: UniffiVTableCallbackInterfaceSendQueueRoomErrorListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener(`vtable`: UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceGrantQrLoginProgressListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener(`vtable`: UniffiVTableCallbackInterfaceSyncNotificationListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener(`vtable`: UniffiVTableCallbackInterfaceIdentityStatusChangeListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener(`vtable`: UniffiVTableCallbackInterfaceBackupStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener(`vtable`: UniffiVTableCallbackInterfaceIgnoredUsersListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener(`vtable`: UniffiVTableCallbackInterfaceBackupSteadyStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener(`vtable`: UniffiVTableCallbackInterfaceKnockRequestsListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener(`vtable`: UniffiVTableCallbackInterfaceEnableRecoveryProgressListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener(`vtable`: UniffiVTableCallbackInterfaceLiveLocationShareListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener(`vtable`: UniffiVTableCallbackInterfaceRecoveryStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener(`vtable`: UniffiVTableCallbackInterfaceMediaPreviewConfigListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener(`vtable`: UniffiVTableCallbackInterfaceVerificationStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate(`vtable`: UniffiVTableCallbackInterfaceNotificationSettingsDelegate, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate(`vtable`: UniffiVTableCallbackInterfaceNotificationSettingsDelegate, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener(`vtable`: UniffiVTableCallbackInterfacePaginationStatusListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher(`vtable`: UniffiVTableCallbackInterfaceProgressWatcher, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceQrLoginProgressListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceGrantQrLoginProgressListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener(`vtable`: UniffiVTableCallbackInterfaceRecoveryStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener(`vtable`: UniffiVTableCallbackInterfaceQrLoginProgressListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener(`vtable`: UniffiVTableCallbackInterfaceRoomAccountDataListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener(`vtable`: UniffiVTableCallbackInterfaceCallDeclineListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener(`vtable`: UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener(`vtable`: UniffiVTableCallbackInterfaceIdentityStatusChangeListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener(`vtable`: UniffiVTableCallbackInterfaceRoomInfoListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener(`vtable`: UniffiVTableCallbackInterfaceKnockRequestsListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener(`vtable`: UniffiVTableCallbackInterfaceRoomListEntriesListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener(`vtable`: UniffiVTableCallbackInterfaceLiveLocationShareListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener(`vtable`: UniffiVTableCallbackInterfaceRoomListLoadingStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener(`vtable`: UniffiVTableCallbackInterfaceRoomInfoListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener(`vtable`: UniffiVTableCallbackInterfaceRoomListServiceStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener(`vtable`: UniffiVTableCallbackInterfaceSendQueueListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener(`vtable`: UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener(`vtable`: UniffiVTableCallbackInterfaceTypingNotificationsListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener(`vtable`: UniffiVTableCallbackInterfaceSendQueueListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener(`vtable`: UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener(`vtable`: UniffiVTableCallbackInterfaceSendQueueRoomErrorListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener(`vtable`: UniffiVTableCallbackInterfaceRoomListEntriesListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener(`vtable`: UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener(`vtable`: UniffiVTableCallbackInterfaceRoomListLoadingStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate(`vtable`: UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener(`vtable`: UniffiVTableCallbackInterfaceRoomListServiceStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener(`vtable`: UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate(`vtable`: UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener(`vtable`: UniffiVTableCallbackInterfaceSyncNotificationListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver(`vtable`: UniffiVTableCallbackInterfaceSyncServiceStateObserver, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener(`vtable`: UniffiVTableCallbackInterfaceTimelineListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver(`vtable`: UniffiVTableCallbackInterfaceSyncServiceStateObserver, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener(`vtable`: UniffiVTableCallbackInterfaceTypingNotificationsListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener(`vtable`: UniffiVTableCallbackInterfacePaginationStatusListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate(`vtable`: UniffiVTableCallbackInterfaceUnableToDecryptDelegate, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener(`vtable`: UniffiVTableCallbackInterfaceTimelineListener, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener(`vtable`: UniffiVTableCallbackInterfaceVerificationStateListener, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate(`vtable`: UniffiVTableCallbackInterfaceUnableToDecryptDelegate, ): Unit -fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider(`vtable`: UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider, +external fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider(`vtable`: UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider, ): Unit -fun uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message(`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_func_create_caption_edit(`caption`: RustBuffer.ByValue,`formattedCaption`: RustBuffer.ByValue,`mentions`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id(uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha(uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(`widgetSettings`: RustBuffer.ByValue,`room`: Pointer,`props`: RustBuffer.ByValue, -): Long -fun uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions(`ownUserId`: RustBuffer.ByValue,`ownDeviceId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id(uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_init_platform(`config`: RustBuffer.ByValue,`useLightweightTokioRuntime`: Byte,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_init_platform(`config`: RustBuffer.ByValue,`useLightweightTokioRuntime`: Byte,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid(`alias`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun uniffi_matrix_sdk_ffi_fn_func_log_event(`file`: RustBuffer.ByValue,`line`: RustBuffer.ByValue,`level`: RustBuffer.ByValue,`target`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer(`configuration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_func_make_widget_driver(`settings`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink(`roomAlias`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBuffer.ByValue +external fun uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid(`alias`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Byte +external fun uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name(`roomName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink(`roomAlias`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink(`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink(`userId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role(`role`: RustBufferRoomMemberRole.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html(`body`: RustBuffer.ByValue,`htmlBody`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote(`body`: RustBuffer.ByValue,`htmlBody`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown(`md`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown_as_emote(`md`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_new(`msgtype`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget(`props`: RustBufferVirtualElementCallWidgetProperties.ByValue,`config`: RustBufferVirtualElementCallWidgetConfig.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level(`powerLevel`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): RustBufferRoomMemberRole.ByValue +external fun uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message(`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html(`body`: RustBuffer.ByValue,`htmlBody`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote(`body`: RustBuffer.ByValue,`htmlBody`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown(`md`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown_as_emote(`md`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_message_event_content_new(`msgtype`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from(`uri`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from(`uri`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_create_caption_edit(`caption`: RustBuffer.ByValue,`formattedCaption`: RustBuffer.ByValue,`mentions`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer(`configuration`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_log_event(`file`: RustBuffer.ByValue,`line`: RustBuffer.ByValue,`level`: RustBuffer.ByValue,`target`: RustBuffer.ByValue,`message`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name(`roomName`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(`widgetSettings`: RustBuffer.ByValue,`room`: Long,`props`: RustBuffer.ByValue, +): Long +external fun uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions(`ownUserId`: RustBuffer.ByValue,`ownDeviceId`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha(uniffi_out_err: UniffiRustCallStatus, +external fun uniffi_matrix_sdk_ffi_fn_func_make_widget_driver(`settings`: RustBuffer.ByValue,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, +external fun uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget(`props`: RustBufferVirtualElementCallWidgetProperties.ByValue,`config`: RustBufferVirtualElementCallWidgetConfig.ByValue,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, +external fun ffi_matrix_sdk_ffi_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_matrix_sdk_ffi_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_matrix_sdk_ffi_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, ): Unit -fun ffi_matrix_sdk_ffi_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_matrix_sdk_ffi_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_u8(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_u8(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_u8(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_u8(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun ffi_matrix_sdk_ffi_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_i8(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_i8(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_i8(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_i8(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Byte -fun ffi_matrix_sdk_ffi_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_u16(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_u16(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_u16(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_u16(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Short -fun ffi_matrix_sdk_ffi_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_i16(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_i16(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_i16(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_i16(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Short -fun ffi_matrix_sdk_ffi_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_u32(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_u32(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_u32(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_u32(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Int -fun ffi_matrix_sdk_ffi_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_i32(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_i32(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_i32(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_i32(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Int -fun ffi_matrix_sdk_ffi_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_u64(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_u64(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_u64(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_u64(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun ffi_matrix_sdk_ffi_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_i64(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_i64(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_i64(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_i64(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Long -fun ffi_matrix_sdk_ffi_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_f32(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_f32(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_f32(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_f32(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Float -fun ffi_matrix_sdk_ffi_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_f64(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_f64(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_f64(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_f64(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Double -fun ffi_matrix_sdk_ffi_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_pointer(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_rust_buffer(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_rust_buffer(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): RustBuffer.ByValue -fun ffi_matrix_sdk_ffi_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_cancel_void(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_cancel_void(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_free_void(`handle`: Long, +external fun ffi_matrix_sdk_ffi_rust_future_free_void(`handle`: Long, ): Unit -fun ffi_matrix_sdk_ffi_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, +external fun ffi_matrix_sdk_ffi_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, ): Unit + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_matrix_sdk_ffi_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -5320,1600 +4162,1600 @@ private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { } @Suppress("UNUSED_PARAMETER") private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { - if (lib.uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message() != 1366.toShort()) { + 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_create_caption_edit() != 33992.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() != 50486.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() != 15808.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_init_platform() != 14462.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url() != 48529.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() != 7613.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions() != 30181.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink() != 4370.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_init_platform() != 11113.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid() != 32456.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid() != 54845.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() != 64531.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_log_event() != 55646.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() != 8284.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver() != 34206.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 52982.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink() != 13776.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 1141.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() != 46473.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message() != 11794.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html() != 37203.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html() != 47401.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote() != 8938.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote() != 56994.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown() != 58385.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown() != 53788.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() != 20152.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() != 33485.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() != 57839.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() != 33472.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() != 7233.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() != 43356.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() != 49710.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit() != 57776.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() != 1447.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_log_event() != 28696.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() != 65010.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url() != 42271.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 4038.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions() != 40493.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() != 29703.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver() != 16495.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() != 13856.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() != 6216.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send() != 50179.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions() != 23475.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version() != 8075.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_account_data() != 50433.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts() != 39919.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_account_url() != 42373.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login() != 22858.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() != 29688.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() != 1406.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() != 35296.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() != 19696.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url() != 27867.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() != 19766.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo() != 18126.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish() != 56350.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 50226.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() != 633.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() != 39890.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth() != 17052.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches() != 55711.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_account_data() != 23790.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 52700.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_account_url() != 53991.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt() != 19710.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() != 46726.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() != 20658.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url() != 26042.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 45990.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo() != 5412.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_device_id() != 44340.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 30527.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_display_name() != 56259.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() != 27747.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() != 30834.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches() != 61351.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 12931.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt() != 16219.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config() != 15595.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() != 7894.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room() != 5137.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 20472.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy() != 46953.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_device_id() != 63337.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size() != 12661.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_display_name() != 20054.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content() != 40308.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() != 53800.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file() != 20094.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() != 30956.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy() != 19264.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_encryption() != 13362.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail() != 52601.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config() != 53942.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings() != 49769.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room() != 3705.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 60062.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy() != 16387.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() != 43545.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size() != 54634.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 22399.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content() != 30321.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room() != 30376.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file() != 41198.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias() != 7674.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy() != 62158.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id() != 36348.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail() != 23704.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 55934.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings() != 625.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes() != 30209.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 3999.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 32541.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 43351.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room() != 63699.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details() != 63487.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias() != 48007.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user() != 14588.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id() != 58119.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users() != 49620.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 64657.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported() != 34863.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes() != 47046.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported() != 17934.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 46254.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available() != 23322.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_homeserver() != 26707.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id() != 64032.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details() != 63281.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias() != 18521.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user() != 30519.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_knock() != 48652.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users() != 57288.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login() != 33276.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported() != 48327.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email() != 11789.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported() != 48577.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 32591.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available() != 53090.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id() != 28397.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler() != 48299.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias() != 16138.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler() != 4124.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_knock() != 40592.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_notification_client() != 37308.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login() != 48373.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event() != 13906.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email() != 22630.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event() != 15699.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 63441.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores() != 18852.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_logout() != 54411.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler() != 47103.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler() != 59558.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() != 29033.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler() != 37543.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions() != 32820.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_notification_client() != 17687.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known() != 61934.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event() != 40713.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() != 3551.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event() != 46899.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_restore_session() != 56125.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores() != 53467.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with() != 20927.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler() != 46860.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists() != 20359.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() != 12536.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search() != 39855.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions() != 12909.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_rooms() != 29558.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known() != 52054.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_search_users() != 42927.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() != 16053.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_server() != 63276.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_restore_session() != 56243.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with() != 21462.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists() != 5713.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data() != 18256.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search() != 4257.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate() != 46437.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_rooms() != 57092.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name() != 15292.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_search_users() != 23484.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy() != 48457.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_server() != 11140.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy() != 24080.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() != 25767.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy() != 2414.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_session() != 47980.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() != 41975.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data() != 56242.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate() != 37720.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate() != 377.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() != 4957.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name() != 47937.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy() != 57486.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy() != 27881.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users() != 23285.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy() != 45052.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config() != 47047.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() != 51438.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info() != 41103.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate() != 38853.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status() != 57403.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() != 55440.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates() != 33603.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_space_service() != 33556.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_sync_service() != 52812.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() != 11891.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room() != 56986.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users() != 10184.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user() != 8489.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config() != 11612.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar() != 64486.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info() != 3308.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() != 51195.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status() != 39397.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() != 19369.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates() != 53470.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_sync_service() != 47464.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name() != 57725.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room() != 40498.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates() != 14763.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user() != 2582.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups() != 44502.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar() != 14839.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing() != 37167.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() != 19621.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy() != 11959.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 50450.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 56018.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_user_id() != 11375.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name() != 52727.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings() != 34715.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() != 15952.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh() != 43839.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() != 49975.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates() != 47525.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path() != 42046.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification() != 2334.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() != 34214.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock() != 42214.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates() != 60910.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite() != 3856.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups() != 19978.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url() != 28347.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing() != 41588.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store() != 28117.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy() != 5278.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy() != 5659.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 21717.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config() != 58783.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() != 56336.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy() != 41183.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings() != 36533.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name() != 29096.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh() != 60164.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url() != 30022.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates() != 34380.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths() != 40778.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification() != 17095.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate() != 8576.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock() != 54805.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() != 39381.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite() != 47743.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store() != 55579.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url() != 27846.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 30452.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store() != 7770.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 23935.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy() != 56894.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config() != 41133.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username() != 45302.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy() != 7083.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server() != 45490.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name() != 27235.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state() != 51049.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url() != 11561.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener() != 14246.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths() != 52143.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key() != 58425.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate() != 35713.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery() != 18699.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() != 39928.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key() != 11864.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store() != 54280.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups() != 55446.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 64472.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery() != 64351.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 10698.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against() != 7561.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() != 31638.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device() != 27955.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username() != 9349.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recover() != 33712.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server() != 16984.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset() != 12902.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state() != 60707.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state() != 54051.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener() != 14813.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener() != 36612.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key() != 25462.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity() != 13780.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery() != 43697.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 20380.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key() != 30741.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() != 17575.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups() != 61920.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29114.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery() != 2033.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() != 59806.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against() != 50754.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() != 37503.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device() != 54322.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks() != 41585.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recover() != 14635.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate() != 56670.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset() != 48062.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan() != 60730.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state() != 28660.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version() != 36573.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener() != 17926.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts() != 63396.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity() != 47257.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login() != 46090.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 15954.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() != 33501.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() != 39850.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29580.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() != 30914.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type() != 43501.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() != 28614.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel() != 57622.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks() != 23168.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset() != 11997.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type() != 21421.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event() != 36106.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel() != 14034.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id() != 5876.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset() != 29457.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept() != 25656.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation() != 36877.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline() != 65054.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified() != 27675.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban() != 26242.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key() != 44140.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen() != 36036.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin() != 64915.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis() != 5211.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified() != 10595.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info() != 55450.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification() != 8452.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle() != 46057.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() != 64715.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields() != 12518.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type() != 38023.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave() != 54036.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() != 16913.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms() != 50920.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id() != 3965.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate() != 59689.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() != 31754.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() != 53560.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 47425.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path() != 16357.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications() != 55817.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() != 12883.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room() != 22250.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() != 23306.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() != 46370.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() != 62692.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() != 24557.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 52873.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules() != 31603.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications() != 64372.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode() != 44201.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room() != 26581.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules() != 22761.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() != 37323.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings() != 44589.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() != 21251.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules() != 23908.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules() != 60025.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode() != 13690.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode() != 36211.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled() != 42573.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules() != 17884.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled() != 24945.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings() != 55295.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled() != 4073.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules() != 19849.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled() != 17837.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode() != 18228.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode() != 12358.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled() != 12210.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled() != 17088.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled() != 533.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule() != 49373.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled() != 13304.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode() != 29804.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled() != 49857.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate() != 39042.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode() != 35399.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled() != 34082.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled() != 16823.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled() != 63495.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule() != 465.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode() != 21942.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode() != 9426.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled() != 22017.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate() != 57636.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room() != 54475.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled() != 11988.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send() != 2180.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled() != 31650.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate() != 59049.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode() != 4135.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan() != 35786.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled() != 56594.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate() != 27889.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room() != 47580.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() != 55947.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() != 30173.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() != 52906.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count() != 61905.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept() != 60529.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants() != 41533.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline() != 20051.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases() != 28555.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban() != 23767.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes() != 44206.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen() != 20986.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url() != 34637.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count() != 10052.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_ban_user() != 35046.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants() != 61411.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias() != 19786.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases() != 30946.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft() != 59182.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes() != 56335.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage() != 13838.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url() != 4697.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_decline_call() != 36115.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_ban_user() != 54282.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key() != 18081.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias() != 5795.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_display_name() != 64194.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft() != 12270.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_edit() != 61956.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage() != 14531.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption() != 14669.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_decline_call() != 12323.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue() != 23914.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key() != 57692.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 9101.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_display_name() != 45762.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_edit() != 6689.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption() != 16452.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels() != 47640.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue() != 32996.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility() != 412.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 35766.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() != 33588.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() != 37784.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_heroes() != 22313.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_forget() != 10622.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_id() != 61990.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels() != 33125.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend() != 39984.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility() != 49289.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user() != 62239.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() != 1287.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id() != 41133.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_heroes() != 38402.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count() != 1023.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_id() != 34667.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_inviter() != 18103.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend() != 24786.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_direct() != 10462.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user() != 45929.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted() != 63995.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id() != 27806.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_public() != 57746.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count() != 44865.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled() != 36591.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_inviter() != 7247.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_space() != 16919.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_direct() != 61932.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_join() != 9240.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted() != 37204.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count() != 55835.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_public() != 31529.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_kick_user() != 28600.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled() != 5651.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state() != 16843.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_is_space() != 19377.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_latest_event() != 39083.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_join() != 65464.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_leave() != 63688.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count() != 55525.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft() != 62856.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_kick_user() != 64949.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event() != 12703.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state() != 9465.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked() != 24981.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_latest_event() != 57709.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read() != 57806.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_leave() != 3346.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink() != 36705.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft() != 61910.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink() != 47781.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event() != 47103.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member() != 48980.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked() != 1608.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url() != 29492.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read() != 38075.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name() != 33206.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink() != 30684.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info() != 64964.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink() != 10281.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_members() != 42691.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member() != 58977.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync() != 3255.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url() != 44092.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 45951.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name() != 26431.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info() != 36075.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_members() != 13926.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room() != 22093.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync() != 8950.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_preview_room() != 60431.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 65038.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory() != 13924.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() != 27925.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_raw_name() != 15453.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 32346.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_redact() != 45810.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room() != 21931.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar() != 7230.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_preview_room() != 20509.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory() != 16926.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory() != 2302.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 16529.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_raw_name() != 65346.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 6449.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_redact() != 56590.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar() != 3551.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string() != 37832.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory() != 26389.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_room_info() != 41146.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 27264.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() != 27585.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 372.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() != 32610.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_send_raw() != 20486.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string() != 35772.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite() != 64403.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_room_info() != 62185.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority() != 48070.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() != 42915.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 52127.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() != 36351.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_send_raw() != 63831.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite() != 1289.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag() != 2381.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority() != 44950.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share() != 11488.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 33828.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share() != 19983.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() != 55986.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events() != 62256.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 40525.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes() != 8526.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag() != 38235.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests() != 30649.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share() != 43479.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares() != 57037.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share() != 19603.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates() != 48209.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events() != 21456.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates() != 17661.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes() != 49969.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications() != 38524.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests() != 43535.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_successor_room() != 27360.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares() != 48977.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user() != 47787.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates() != 32254.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_timeline() != 51477.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates() != 36773.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration() != 35159.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications() != 12198.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_topic() != 59745.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_successor_room() != 17951.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice() != 28642.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user() != 58040.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_unban_user() != 1803.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_timeline() != 51168.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias() != 25065.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration() != 46904.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility() != 26248.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_topic() != 33844.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules() != 49303.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice() != 26086.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users() != 52057.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_unban_user() != 25834.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility() != 64724.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias() != 35023.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar() != 19069.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility() != 29249.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend() != 33485.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules() != 62193.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page() != 34221.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users() != 46007.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages() != 2923.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility() != 46267.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page() != 29305.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar() != 43932.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results() != 30207.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend() != 13926.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search() != 24438.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len() != 59145.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters() != 36097.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk() != 47532.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with() != 21746.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban() != 52576.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() != 21585.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite() != 55467.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 62491.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick() != 8759.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() != 47748.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin() != 64005.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page() != 61352.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other() != 10630.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter() != 61202.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own() != 10164.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller() != 36258.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message() != 27531.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream() != 56632.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state() != 17089.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms() != 49704.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification() != 59279.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 60695.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban() != 12687.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() != 64650.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite() != 26290.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms() != 5528.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick() != 3923.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator() != 16821.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin() != 20659.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len() != 39835.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other() != 54198.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk() != 23186.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own() != 59218.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions() != 8867.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message() != 45517.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban() != 7183.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state() != 40995.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite() != 57708.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification() != 35381.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick() != 461.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels() != 48829.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin() != 52852.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values() != 62886.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other() != 60699.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page() != 31168.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own() != 32905.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages() != 59827.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message() != 2424.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page() != 14719.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state() != 33539.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results() != 21645.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification() != 64150.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search() != 38611.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban() != 57457.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters() != 19021.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite() != 41275.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with() != 25653.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick() != 51066.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() != 2181.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin() != 4609.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 50761.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other() != 52543.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() != 47488.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own() != 2983.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page() != 4391.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message() != 48291.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter() != 8696.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state() != 14792.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller() != 21030.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification() != 26319.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream() != 22467.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels() != 16221.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms() != 4638.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values() != 38774.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 40756.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() != 18179.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() != 41751.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 50237.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms() != 1302.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator() != 48386.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave() != 21886.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications() != 57541.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details() != 46321.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count() != 60202.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel() != 62384.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() != 27272.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join() != 1903.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() != 42918.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel() != 7014.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 16635.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join() != 57901.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() != 54424.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort() != 11570.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave() != 52262.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend() != 28691.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details() != 16335.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request() != 53466.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() != 19277.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request() != 37982.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() != 53516.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification() != 27140.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request() != 56039.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification() != 32994.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request() != 22948.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification() != 64345.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification() != 26553.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification() != 4777.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification() != 32557.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification() != 26149.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification() != 9058.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate() != 42324.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification() != 20402.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification() != 16328.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification() != 11869.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description() != 21346.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate() != 65112.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() != 46075.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification() != 56151.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description() != 45746.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() != 54870.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave() != 64951.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() != 25368.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms() != 40216.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() != 14784.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() != 6614.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 26327.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 65022.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space() != 31295.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() != 63772.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces() != 62969.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 15348.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child() != 18724.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 52629.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 31589.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space() != 7949.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space() != 64688.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space() != 14438.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces() != 1160.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child() != 40037.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 25459.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space() != 57139.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_span_exit() != 47924.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space() != 22535.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_span_is_none() != 33327.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() != 14788.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size() != 52005.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() != 8077.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit() != 18671.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size() != 61803.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase() != 58378.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit() != 23095.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size() != 65399.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase() != 45337.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained() != 16295.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size() != 41218.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish() != 64706.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained() != 19368.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() != 10889.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() != 5808.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() != 39986.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() != 42766.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() != 16010.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_state() != 56378.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_state() != 61806.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop() != 40415.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop() != 42435.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish() != 29725.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish() != 22814.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() != 17911.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() != 56326.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode() != 48885.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode() != 16958.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos() != 21315.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos() != 18892.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() != 12353.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() != 9124.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished() != 17040.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished() != 29008.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis() != 57596.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event() != 52917.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info() != 797.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies() != 10634.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle() != 279.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener() != 18746.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields() != 46064.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content() != 21811.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel() != 5666.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll() != 37925.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join() != 22211.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_edit() != 42189.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort() != 2406.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll() != 32659.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend() != 50142.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event() != 54068.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener() != 38550.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members() != 37994.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content() != 54719.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id() != 33999.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll() != 33924.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id() != 18266.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_edit() != 46968.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() != 54225.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll() != 2766.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read() != 20604.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event() != 22240.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards() != 36829.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members() != 22294.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards() != 30268.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id() != 40008.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event() != 41687.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id() != 31074.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event() != 48707.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() != 11426.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption() != 21112.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read() != 58804.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send() != 9553.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards() != 53026.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 36723.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards() != 35094.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 4740.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event() != 40498.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event() != 42154.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 29043.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption() != 39219.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 39080.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send() != 24846.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 52753.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 37532.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 19448.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 11149.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 31845.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 52974.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 21302.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() != 41701.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response() != 41951.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 6077.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 13555.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 25065.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 21275.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 33769.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type() != 12922.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 27990.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() != 18142.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 42673.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id() != 56465.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 18514.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() != 50929.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() != 64895.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event() != 6106.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event() != 46788.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual() != 50960.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual() != 58215.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug() != 38094.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug() != 59080.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id() != 39945.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id() != 32877.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications() != 33024.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel() != 23182.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count() != 35997.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join() != 30455.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() != 35655.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event() != 49553.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation() != 2948.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies() != 47977.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified() != 61954.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event() != 52000.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key() != 4041.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id() != 55998.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin() != 62925.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_span_enter() != 15935.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified() != 41686.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_span_exit() != 2919.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification() != 3578.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_span_is_none() != 59307.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run() != 7519.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run() != 61502.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv() != 2662.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv() != 10867.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send() != 18689.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send() != 27865.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() != 27991.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() != 40475.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() != 10564.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() != 55735.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() != 11983.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() != 60091.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() != 32675.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() != 37564.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 53698.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new() != 604.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_span_new() != 8957.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() != 17142.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span() != 63835.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() != 18137.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new() != 51363.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 2135.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() != 53805.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_span_new() != 47713.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() != 25498.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span() != 51316.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change() != 16189.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change() != 13017.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update() != 12849.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error() != 38563.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update() != 41052.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain() != 43233.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call() != 13016.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain() != 4452.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error() != 26350.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call() != 6068.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain() != 43954.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change() != 45931.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain() != 53223.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() != 41998.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update() != 13538.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change() != 54581.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update() != 28731.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error() != 601.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update() != 2320.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update() != 56104.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update() != 35830.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification() != 39259.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call() != 57311.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update() != 43998.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call() != 47519.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update() != 56068.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call() != 10077.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update() != 27773.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call() != 34519.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() != 34195.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change() != 14770.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() != 33992.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change() != 51708.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change() != 52554.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update() != 65318.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update() != 30858.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() != 41133.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update() != 23453.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update() != 9758.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update() != 63807.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() != 64575.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update() != 62487.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change() != 58105.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call() != 6360.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update() != 41968.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call() != 13891.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call() != 44934.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call() != 17262.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update() != 12576.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call() != 15280.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update() != 23169.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call() != 61614.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update() != 24823.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update() != 62056.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update() != 36937.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 36696.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update() != 24843.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update() != 6069.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error() != 38224.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update() != 12283.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update() != 11544.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update() != 34444.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request() != 3417.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update() != 60435.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request() != 3733.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update() != 47433.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification() != 56833.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request() != 58189.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data() != 30840.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request() != 43661.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail() != 32164.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification() != 8006.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel() != 3367.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data() != 8698.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() != 37905.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail() != 45076.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel() != 36580.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() != 53036.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() != 39714.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() != 20303.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 4634.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification() != 38017.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() != 21212.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 21383.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 53990.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() != 7272.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()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update() != 53207.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd() != 61791.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 35518.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() != 38998.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd() != 3448.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } - if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() != 12846.toShort()) { + if (lib.uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() != 3738.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } } @@ -6922,14 +5764,17 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support // Async return type handlers internal const val UNIFFI_RUST_FUTURE_POLL_READY = 0.toByte() -internal const val UNIFFI_RUST_FUTURE_POLL_MAYBE_READY = 1.toByte() +internal const val UNIFFI_RUST_FUTURE_POLL_WAKE = 1.toByte() internal val uniffiContinuationHandleMap = UniffiHandleMap>() @@ -7028,12 +5873,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer// Magic number for the Rust proxy to call using the same mechanism as every other method, +object NoHandle// Magic number for the Rust proxy to call using the same mechanism as every other method, // to free the callback once it's dropped by Rust. internal const val IDX_CALLBACK_FREE = 0 // Callback return codes @@ -7455,21 +6311,18 @@ public object FfiConverterDuration: FfiConverterRustBuffer { } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -7494,13 +6347,13 @@ public object FfiConverterDuration: FfiConverterRustBuffer { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -7580,24 +6433,30 @@ public interface CheckCodeSenderInterface { open class CheckCodeSender: Disposable, AutoCloseable, CheckCodeSenderInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -7608,7 +6467,7 @@ open class CheckCodeSender: Disposable, AutoCloseable, CheckCodeSenderInterface 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() + cleanable?.clean() } } } @@ -7618,7 +6477,7 @@ open class CheckCodeSender: Disposable, AutoCloseable, CheckCodeSenderInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -7630,32 +6489,40 @@ open class CheckCodeSender: Disposable, AutoCloseable, CheckCodeSenderInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_checkcodesender(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_checkcodesender(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(handle, status) } } @@ -7673,15 +6540,15 @@ open class CheckCodeSender: Disposable, AutoCloseable, CheckCodeSenderInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `send`(`code`: kotlin.UByte) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( + uniffiHandle, FfiConverterUByte.lower(`code`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -7693,55 +6560,54 @@ open class CheckCodeSender: Disposable, AutoCloseable, CheckCodeSenderInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeCheckCodeSender: FfiConverter { - - override fun lower(value: CheckCodeSender): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeCheckCodeSender: FfiConverter { + override fun lower(value: CheckCodeSender): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): CheckCodeSender { - return CheckCodeSender(value) + override fun lift(value: Long): CheckCodeSender { + return CheckCodeSender(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): CheckCodeSender { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: CheckCodeSender) = 8UL override fun write(value: CheckCodeSender, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -7766,13 +6632,13 @@ public object FfiConverterTypeCheckCodeSender: FfiConverter - suspend fun `getRecentlyVisitedRooms`(): List /** @@ -8421,30 +7275,48 @@ public interface ClientInterface { */ fun `userIdServerName`(): kotlin.String + /** + * Adds a recently used emoji to the list and uploads the updated + * `io.element.recent_emoji` content to the global account data. + */ + suspend fun `addRecentEmoji`(`emoji`: kotlin.String) + + /** + * Gets the list of recently used emojis from the + * `io.element.recent_emoji` global account data. + */ + suspend fun `getRecentEmojis`(): List + companion object } open class Client: Disposable, AutoCloseable, ClientInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -8455,7 +7327,7 @@ open class Client: Disposable, AutoCloseable, ClientInterface 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() + cleanable?.clean() } } } @@ -8465,7 +7337,7 @@ open class Client: Disposable, AutoCloseable, ClientInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -8477,32 +7349,40 @@ open class Client: Disposable, AutoCloseable, ClientInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_client(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_client(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_client(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_client(handle, status) } } @@ -8514,15 +7394,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `abortOidcAuth`(`authorizationData`: OAuthAuthorizationData) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( + uniffiHandle, FfiConverterTypeOAuthAuthorizationData.lower(`authorizationData`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -8542,15 +7422,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `accountData`(`eventType`: kotlin.String) : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_account_data( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_account_data( + uniffiHandle, FfiConverterString.lower(`eventType`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -8563,15 +7443,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `accountUrl`(`action`: AccountManagementAction?) : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_account_url( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_account_url( + uniffiHandle, FfiConverterOptionalTypeAccountManagementAction.lower(`action`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -8580,32 +7460,6 @@ open class Client: Disposable, AutoCloseable, ClientInterface } - /** - * Adds a recently used emoji to the list and uploads the updated - * `io.element.recent_emoji` content to the global account data. - */ - @Throws(ClientException::class) - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `addRecentEmoji`(`emoji`: kotlin.String) { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( - thisPtr, - FfiConverterString.lower(`emoji`), - ) - }, - { 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, - ) - } - - /** * Find all sliding sync versions that are available. * @@ -8618,15 +7472,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `availableSlidingSyncVersions`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceTypeSlidingSyncVersion.lift(it) }, // Error FFI converter @@ -8643,15 +7497,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `avatarUrl`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_avatar_url( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_avatar_url( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -8671,15 +7525,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `awaitRoomRemoteEcho`(`roomId`: kotlin.String) : Room { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo( + uniffiHandle, FfiConverterString.lower(`roomId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoom.lift(it) }, // Error FFI converter @@ -8695,15 +7549,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `cachedAvatarUrl`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -8717,10 +7571,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * auth and if the account can actually be deactivated */override fun `canDeactivateAccount`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account( + it, + _status) } } ) @@ -8756,15 +7611,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `clearCaches`(`syncService`: SyncService?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_clear_caches( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_clear_caches( + uniffiHandle, FfiConverterOptionalTypeSyncService.lower(`syncService`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -8778,15 +7633,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `createRoom`(`request`: CreateRoomParameters) : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_create_room( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_create_room( + uniffiHandle, FfiConverterTypeCreateRoomParameters.lower(`request`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -8804,15 +7659,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `customLoginWithJwt`(`jwt`: kotlin.String, `initialDeviceName`: kotlin.String?, `deviceId`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt( + uniffiHandle, FfiConverterString.lower(`jwt`),FfiConverterOptionalString.lower(`initialDeviceName`),FfiConverterOptionalString.lower(`deviceId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -8838,15 +7693,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `deactivateAccount`(`authData`: AuthData?, `eraseData`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account( + uniffiHandle, FfiConverterOptionalTypeAuthData.lower(`authData`),FfiConverterBoolean.lower(`eraseData`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -8863,15 +7718,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `deletePusher`(`identifiers`: PusherIdentifiers) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher( + uniffiHandle, FfiConverterTypePusherIdentifiers.lower(`identifiers`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -8883,10 +7738,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Throws(ClientException::class)override fun `deviceId`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_device_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_device_id( + it, + _status) } } ) @@ -8898,15 +7754,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `displayName`() : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_display_name( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_display_name( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -8927,15 +7783,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `enableAllSendQueues`(`enable`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( + uniffiHandle, FfiConverterBoolean.lower(`enable`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -8950,10 +7806,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * queue. */override fun `enableSendQueueUploadProgress`(`enable`: kotlin.Boolean) = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( - it, FfiConverterBoolean.lower(`enable`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + it, + FfiConverterBoolean.lower(`enable`),_status) } } @@ -8961,10 +7818,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface override fun `encryption`(): Encryption { return FfiConverterTypeEncryption.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_encryption( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_encryption( + it, + _status) } } ) @@ -8979,15 +7837,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `fetchMediaPreviewConfig`() : MediaPreviewConfig? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeMediaPreviewConfig.lift(it) }, // Error FFI converter @@ -8998,10 +7856,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Throws(ClientException::class)override fun `getDmRoom`(`userId`: kotlin.String): Room? { return FfiConverterOptionalTypeRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -9017,15 +7876,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getInviteAvatarsDisplayPolicy`() : InviteAvatars? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeInviteAvatars.lift(it) }, // Error FFI converter @@ -9042,15 +7901,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getMaxMediaUploadSize`() : kotlin.ULong { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterULong.lift(it) }, // Error FFI converter @@ -9063,15 +7922,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getMediaContent`(`mediaSource`: MediaSource) : kotlin.ByteArray { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_media_content( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_media_content( + uniffiHandle, FfiConverterTypeMediaSource.lower(`mediaSource`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterByteArray.lift(it) }, // Error FFI converter @@ -9089,15 +7948,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getMediaFile`(`mediaSource`: MediaSource, `filename`: kotlin.String?, `mimeType`: kotlin.String, `useCache`: kotlin.Boolean, `tempDir`: kotlin.String?) : MediaFileHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_media_file( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_media_file( + uniffiHandle, FfiConverterTypeMediaSource.lower(`mediaSource`),FfiConverterOptionalString.lower(`filename`),FfiConverterString.lower(`mimeType`),FfiConverterBoolean.lower(`useCache`),FfiConverterOptionalString.lower(`tempDir`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeMediaFileHandle.lift(it) }, // Error FFI converter @@ -9114,15 +7973,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getMediaPreviewDisplayPolicy`() : MediaPreviews? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeMediaPreviews.lift(it) }, // Error FFI converter @@ -9135,15 +7994,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getMediaThumbnail`(`mediaSource`: MediaSource, `width`: kotlin.ULong, `height`: kotlin.ULong) : kotlin.ByteArray { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail( + uniffiHandle, FfiConverterTypeMediaSource.lower(`mediaSource`),FfiConverterULong.lower(`width`),FfiConverterULong.lower(`height`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterByteArray.lift(it) }, // Error FFI converter @@ -9155,15 +8014,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getNotificationSettings`() : NotificationSettings { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeNotificationSettings.lift(it) }, // Error FFI converter @@ -9176,15 +8035,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getProfile`(`userId`: kotlin.String) : UserProfile { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_profile( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_profile( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeUserProfile.lift(it) }, // Error FFI converter @@ -9193,44 +8052,19 @@ open class Client: Disposable, AutoCloseable, ClientInterface } - /** - * Gets the list of recently used emojis from the - * `io.element.recent_emoji` global account data. - */ - @Throws(ClientException::class) - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - override suspend fun `getRecentEmojis`() : List { - return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( - 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 - { FfiConverterSequenceTypeRecentEmoji.lift(it) }, - // Error FFI converter - ClientException.ErrorHandler, - ) - } - - @Throws(ClientException::class) @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRecentlyVisitedRooms`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceString.lift(it) }, // Error FFI converter @@ -9254,10 +8088,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface */ @Throws(ClientException::class)override fun `getRoom`(`roomId`: kotlin.String): Room? { return FfiConverterOptionalTypeRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_room( - it, FfiConverterString.lower(`roomId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_room( + it, + FfiConverterString.lower(`roomId`),_status) } } ) @@ -9272,15 +8107,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRoomPreviewFromRoomAlias`(`roomAlias`: kotlin.String) : RoomPreview { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias( + uniffiHandle, FfiConverterString.lower(`roomAlias`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomPreview.lift(it) }, // Error FFI converter @@ -9300,15 +8135,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRoomPreviewFromRoomId`(`roomId`: kotlin.String, `viaServers`: List) : RoomPreview { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id( + uniffiHandle, FfiConverterString.lower(`roomId`),FfiConverterSequenceString.lower(`viaServers`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomPreview.lift(it) }, // Error FFI converter @@ -9321,15 +8156,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getSessionVerificationController`() : SessionVerificationController { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeSessionVerificationController.lift(it) }, // Error FFI converter @@ -9345,15 +8180,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getStoreSizes`() : StoreSizes { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeStoreSizes.lift(it) }, // Error FFI converter @@ -9376,15 +8211,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getUrl`(`url`: kotlin.String) : kotlin.ByteArray { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_url( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_url( + uniffiHandle, FfiConverterString.lower(`url`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterByteArray.lift(it) }, // Error FFI converter @@ -9397,10 +8232,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * The homeserver this client is configured to use. */override fun `homeserver`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_homeserver( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_homeserver( + it, + _status) } } ) @@ -9414,15 +8250,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `homeserverLoginDetails`() : HomeserverLoginDetails { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeHomeserverLoginDetails.lift(it) }, // Error FFI converter @@ -9435,15 +8271,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `ignoreUser`(`userId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_ignore_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_ignore_user( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9457,15 +8293,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `ignoredUsers`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_ignored_users( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_ignored_users( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceString.lift(it) }, // Error FFI converter @@ -9481,15 +8317,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isLivekitRtcSupported`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -9505,15 +8341,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isReportRoomApiSupported`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -9535,15 +8371,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isRoomAliasAvailable`(`alias`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available( + uniffiHandle, FfiConverterString.lower(`alias`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -9563,15 +8399,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `joinRoomById`(`roomId`: kotlin.String) : Room { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id( + uniffiHandle, FfiConverterString.lower(`roomId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoom.lift(it) }, // Error FFI converter @@ -9592,15 +8428,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `joinRoomByIdOrAlias`(`roomIdOrAlias`: kotlin.String, `serverNames`: List) : Room { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias( + uniffiHandle, FfiConverterString.lower(`roomIdOrAlias`),FfiConverterSequenceString.lower(`serverNames`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoom.lift(it) }, // Error FFI converter @@ -9616,15 +8452,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `knock`(`roomIdOrAlias`: kotlin.String, `reason`: kotlin.String?, `serverNames`: List) : Room { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_knock( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_knock( + uniffiHandle, FfiConverterString.lower(`roomIdOrAlias`),FfiConverterOptionalString.lower(`reason`),FfiConverterSequenceString.lower(`serverNames`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoom.lift(it) }, // Error FFI converter @@ -9640,15 +8476,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `login`(`username`: kotlin.String, `password`: kotlin.String, `initialDeviceName`: kotlin.String?, `deviceId`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_login( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_login( + uniffiHandle, FfiConverterString.lower(`username`),FfiConverterString.lower(`password`),FfiConverterOptionalString.lower(`initialDeviceName`),FfiConverterOptionalString.lower(`deviceId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9665,15 +8501,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `loginWithEmail`(`email`: kotlin.String, `password`: kotlin.String, `initialDeviceName`: kotlin.String?, `deviceId`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_login_with_email( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_login_with_email( + uniffiHandle, FfiConverterString.lower(`email`),FfiConverterString.lower(`password`),FfiConverterOptionalString.lower(`initialDeviceName`),FfiConverterOptionalString.lower(`deviceId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9690,15 +8526,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `loginWithOidcCallback`(`callbackUrl`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback( + uniffiHandle, 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9715,15 +8551,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `logout`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_logout( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_logout( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9738,10 +8574,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * way of a QR code. */override fun `newGrantLoginWithQrCodeHandler`(): GrantLoginWithQrCodeHandler { return FfiConverterTypeGrantLoginWithQrCodeHandler.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler( + it, + _status) } } ) @@ -9759,10 +8596,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * the server. */override fun `newLoginWithQrCodeHandler`(`oidcConfiguration`: OidcConfiguration): LoginWithQrCodeHandler { return FfiConverterTypeLoginWithQrCodeHandler.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( - it, FfiConverterTypeOidcConfiguration.lower(`oidcConfiguration`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( + it, + FfiConverterTypeOidcConfiguration.lower(`oidcConfiguration`),_status) } } ) @@ -9774,15 +8612,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `notificationClient`(`processSetup`: NotificationProcessSetup) : NotificationClient { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_notification_client( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_notification_client( + uniffiHandle, FfiConverterTypeNotificationProcessSetup.lower(`processSetup`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeNotificationClient.lift(it) }, // Error FFI converter @@ -9799,10 +8637,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * they will see all values. */override fun `observeAccountDataEvent`(`eventType`: AccountDataEventType, `listener`: AccountDataListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event( - it, FfiConverterTypeAccountDataEventType.lower(`eventType`),FfiConverterTypeAccountDataListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event( + it, + FfiConverterTypeAccountDataEventType.lower(`eventType`),FfiConverterTypeAccountDataListener.lower(`listener`),_status) } } ) @@ -9819,10 +8658,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface */ @Throws(ClientException::class)override fun `observeRoomAccountDataEvent`(`roomId`: kotlin.String, `eventType`: RoomAccountDataEventType, `listener`: RoomAccountDataListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( - it, FfiConverterString.lower(`roomId`),FfiConverterTypeRoomAccountDataEventType.lower(`eventType`),FfiConverterTypeRoomAccountDataListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( + it, + FfiConverterString.lower(`roomId`),FfiConverterTypeRoomAccountDataEventType.lower(`eventType`),FfiConverterTypeRoomAccountDataListener.lower(`listener`),_status) } } ) @@ -9838,15 +8678,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `optimizeStores`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9872,15 +8712,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `registerNotificationHandler`(`listener`: SyncNotificationListener) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler( + uniffiHandle, FfiConverterTypeSyncNotificationListener.lower(`listener`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9894,15 +8734,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeAvatar`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9923,15 +8763,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `resetSupportedVersions`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9952,15 +8792,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `resetWellKnown`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -9978,15 +8818,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `resolveRoomAlias`(`roomAlias`: kotlin.String) : ResolvedRoomAlias? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias( + uniffiHandle, FfiConverterString.lower(`roomAlias`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeResolvedRoomAlias.lift(it) }, // Error FFI converter @@ -10007,15 +8847,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `restoreSession`(`session`: Session) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_restore_session( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_restore_session( + uniffiHandle, FfiConverterTypeSession.lower(`session`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10034,15 +8874,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `restoreSessionWith`(`session`: Session, `roomLoadSettings`: RoomLoadSettings) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with( + uniffiHandle, FfiConverterTypeSession.lower(`session`),FfiConverterTypeRoomLoadSettings.lower(`roomLoadSettings`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10059,15 +8899,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `roomAliasExists`(`roomAlias`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists( + uniffiHandle, FfiConverterString.lower(`roomAlias`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -10077,10 +8917,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface override fun `roomDirectorySearch`(): RoomDirectorySearch { return FfiConverterTypeRoomDirectorySearch.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search( + it, + _status) } } ) @@ -10089,10 +8930,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface override fun `rooms`(): List { return FfiConverterSequenceTypeRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_rooms( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_rooms( + it, + _status) } } ) @@ -10104,15 +8946,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `searchUsers`(`searchTerm`: kotlin.String, `limit`: kotlin.ULong) : SearchUsersResults { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_search_users( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_search_users( + uniffiHandle, FfiConverterString.lower(`searchTerm`),FfiConverterULong.lower(`limit`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeSearchUsersResults.lift(it) }, // Error FFI converter @@ -10135,10 +8977,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * name, then the homeserver has been discovered, and we know both. */override fun `server`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_server( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_server( + it, + _status) } } ) @@ -10156,15 +8999,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation).let { RustBufferServerVendorInfo.create(it.capacity.toULong(), it.len.toULong(), it.data) } }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeServerVendorInfo.lift(it) }, // Error FFI converter @@ -10175,10 +9018,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Throws(ClientException::class)override fun `session`(): Session { return FfiConverterTypeSession.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_session( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_session( + it, + _status) } } ) @@ -10195,15 +9039,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setAccountData`(`eventType`: kotlin.String, `content`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_account_data( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_account_data( + uniffiHandle, FfiConverterString.lower(`eventType`),FfiConverterString.lower(`content`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10219,10 +9063,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface */ @Throws(ClientException::class)override fun `setDelegate`(`delegate`: ClientDelegate?): TaskHandle? { return FfiConverterOptionalTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_delegate( - it, FfiConverterOptionalTypeClientDelegate.lower(`delegate`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_delegate( + it, + FfiConverterOptionalTypeClientDelegate.lower(`delegate`),_status) } } ) @@ -10234,15 +9079,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setDisplayName`(`name`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_display_name( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_display_name( + uniffiHandle, FfiConverterString.lower(`name`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10259,15 +9104,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setInviteAvatarsDisplayPolicy`(`policy`: InviteAvatars) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy( + uniffiHandle, FfiConverterTypeInviteAvatars.lower(`policy`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10284,15 +9129,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setMediaPreviewDisplayPolicy`(`policy`: MediaPreviews) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy( + uniffiHandle, FfiConverterTypeMediaPreviews.lower(`policy`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10309,15 +9154,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setMediaRetentionPolicy`(`policy`: MediaRetentionPolicy) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy( + uniffiHandle, FfiConverterTypeMediaRetentionPolicy.lower(`policy`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10334,15 +9179,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setPusher`(`identifiers`: PusherIdentifiers, `kind`: PusherKind, `appDisplayName`: kotlin.String, `deviceDisplayName`: kotlin.String, `profileTag`: kotlin.String?, `lang`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_pusher( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_pusher( + uniffiHandle, FfiConverterTypePusherIdentifiers.lower(`identifiers`),FfiConverterTypePusherKind.lower(`kind`),FfiConverterString.lower(`appDisplayName`),FfiConverterString.lower(`deviceDisplayName`),FfiConverterOptionalString.lower(`profileTag`),FfiConverterString.lower(`lang`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10360,15 +9205,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setUtdDelegate`(`utdDelegate`: UnableToDecryptDelegate) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate( + uniffiHandle, FfiConverterTypeUnableToDecryptDelegate.lower(`utdDelegate`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10382,10 +9227,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * The sliding sync version. */override fun `slidingSyncVersion`(): SlidingSyncVersion { return FfiConverterTypeSlidingSyncVersion.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( + it, + _status) } } ) @@ -10394,10 +9240,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface override fun `spaceService`(): SpaceService { return FfiConverterTypeSpaceService.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_space_service( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_space_service( + it, + _status) } } ) @@ -10412,15 +9259,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `startSsoLogin`(`redirectUrl`: kotlin.String, `idpId`: kotlin.String?) : SsoHandler { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( + uniffiHandle, FfiConverterString.lower(`redirectUrl`),FfiConverterOptionalString.lower(`idpId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeSsoHandler.lift(it) }, // Error FFI converter @@ -10430,10 +9277,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface override fun `subscribeToIgnoredUsers`(`listener`: IgnoredUsersListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users( - it, FfiConverterTypeIgnoredUsersListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users( + it, + FfiConverterTypeIgnoredUsersListener.lower(`listener`),_status) } } ) @@ -10448,15 +9296,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToMediaPreviewConfig`(`listener`: MediaPreviewConfigListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config( + uniffiHandle, FfiConverterTypeMediaPreviewConfigListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -10481,15 +9329,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToRoomInfo`(`roomId`: kotlin.String, `listener`: RoomInfoListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info( + uniffiHandle, FfiConverterString.lower(`roomId`),FfiConverterTypeRoomInfoListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -10506,10 +9354,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface * the enablement status. */override fun `subscribeToSendQueueStatus`(`listener`: SendQueueRoomErrorListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status( - it, FfiConverterTypeSendQueueRoomErrorListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status( + it, + FfiConverterTypeSendQueueRoomErrorListener.lower(`listener`),_status) } } ) @@ -10529,15 +9378,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToSendQueueUpdates`(`listener`: SendQueueRoomUpdateListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates( + uniffiHandle, FfiConverterTypeSendQueueRoomUpdateListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -10547,10 +9396,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface override fun `syncService`(): SyncServiceBuilder { return FfiConverterTypeSyncServiceBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_sync_service( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_sync_service( + it, + _status) } } ) @@ -10562,15 +9412,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `trackRecentlyVisitedRoom`(`room`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( + uniffiHandle, FfiConverterString.lower(`room`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10584,15 +9434,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `unignoreUser`(`userId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_unignore_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_unignore_user( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10606,15 +9456,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `uploadAvatar`(`mimeType`: kotlin.String, `data`: kotlin.ByteArray) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar( + uniffiHandle, FfiConverterString.lower(`mimeType`),FfiConverterByteArray.lower(`data`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -10628,15 +9478,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `uploadMedia`(`mimeType`: kotlin.String, `data`: kotlin.ByteArray, `progressWatcher`: ProgressWatcher?) : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_upload_media( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_upload_media( + uniffiHandle, FfiConverterString.lower(`mimeType`),FfiConverterByteArray.lower(`data`),FfiConverterOptionalTypeProgressWatcher.lower(`progressWatcher`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -10683,15 +9533,15 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") 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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( + uniffiHandle, 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) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeOAuthAuthorizationData.lift(it) }, // Error FFI converter @@ -10702,10 +9552,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface @Throws(ClientException::class)override fun `userId`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_user_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_user_id( + it, + _status) } } ) @@ -10718,10 +9569,11 @@ open class Client: Disposable, AutoCloseable, ClientInterface */ @Throws(ClientException::class)override fun `userIdServerName`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( + it, + _status) } } ) @@ -10729,57 +9581,107 @@ open class Client: Disposable, AutoCloseable, ClientInterface + /** + * Adds a recently used emoji to the list and uploads the updated + * `io.element.recent_emoji` content to the global account data. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `addRecentEmoji`(`emoji`: kotlin.String) { + return uniffiRustCallAsync( + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( + uniffiHandle, + FfiConverterString.lower(`emoji`), + ) + }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, + // lift function + { Unit }, + + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + + /** + * Gets the list of recently used emojis from the + * `io.element.recent_emoji` global account data. + */ + @Throws(ClientException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + override suspend fun `getRecentEmojis`() : List { + return uniffiRustCallAsync( + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( + uniffiHandle, + + ) + }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterSequenceTypeRecentEmoji.lift(it) }, + // Error FFI converter + ClientException.ErrorHandler, + ) + } + + + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeClient: FfiConverter { - - override fun lower(value: Client): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeClient: FfiConverter { + override fun lower(value: Client): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Client { - return Client(value) + override fun lift(value: Long): Client { + return Client(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Client { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Client) = 8UL override fun write(value: Client, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -10804,13 +9706,13 @@ public object FfiConverterTypeClient: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -10982,31 +9884,38 @@ public interface ClientBuilderInterface { open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } constructor() : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new( + _status) } ) - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -11017,7 +9926,7 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface 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() + cleanable?.clean() } } } @@ -11027,7 +9936,7 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -11039,41 +9948,50 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_clientbuilder(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_clientbuilder(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(handle, status) } } override fun `addRootCertificates`(`certificates`: List): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( - it, FfiConverterSequenceByteArray.lower(`certificates`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( + it, + FfiConverterSequenceByteArray.lower(`certificates`),_status) } } ) @@ -11085,10 +10003,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * Automatically create a backup version if no backup exists. */override fun `autoEnableBackups`(`autoEnableBackups`: kotlin.Boolean): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( - it, FfiConverterBoolean.lower(`autoEnableBackups`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( + it, + FfiConverterBoolean.lower(`autoEnableBackups`),_status) } } ) @@ -11097,10 +10016,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `autoEnableCrossSigning`(`autoEnableCrossSigning`: kotlin.Boolean): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( - it, FfiConverterBoolean.lower(`autoEnableCrossSigning`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( + it, + FfiConverterBoolean.lower(`autoEnableCrossSigning`),_status) } } ) @@ -11115,10 +10035,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * Take a look at the [`BackupDownloadStrategy`] enum for more options. */override fun `backupDownloadStrategy`(`backupDownloadStrategy`: BackupDownloadStrategy): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( - it, FfiConverterTypeBackupDownloadStrategy.lower(`backupDownloadStrategy`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( + it, + FfiConverterTypeBackupDownloadStrategy.lower(`backupDownloadStrategy`),_status) } } ) @@ -11130,15 +10051,15 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `build`() : Client { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeClient.lift(it) }, // Error FFI converter @@ -11148,10 +10069,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `crossProcessStoreLocksHolderName`(`holderName`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( - it, FfiConverterString.lower(`holderName`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( + it, + FfiConverterString.lower(`holderName`),_status) } } ) @@ -11163,10 +10085,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * Set the trust requirement to be used when decrypting events. */override fun `decryptionSettings`(`decryptionSettings`: DecryptionSettings): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( - it, FfiConverterTypeDecryptionSettings.lower(`decryptionSettings`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( + it, + FfiConverterTypeDecryptionSettings.lower(`decryptionSettings`),_status) } } ) @@ -11175,10 +10098,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `disableAutomaticTokenRefresh`(): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh( + it, + _status) } } ) @@ -11192,10 +10116,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * [`add_root_certificates`][ClientBuilder::add_root_certificates]. */override fun `disableBuiltInRootCertificates`(): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates( + it, + _status) } } ) @@ -11204,10 +10129,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `disableSslVerification`(): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( + it, + _status) } } ) @@ -11216,10 +10142,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `enableOidcRefreshLock`(): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( + it, + _status) } } ) @@ -11234,10 +10161,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * [MSC4268]: https://github.com/matrix-org/matrix-spec-proposals/pull/4268 */override fun `enableShareHistoryOnInvite`(`enableShareHistoryOnInvite`: kotlin.Boolean): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite( - it, FfiConverterBoolean.lower(`enableShareHistoryOnInvite`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite( + it, + FfiConverterBoolean.lower(`enableShareHistoryOnInvite`),_status) } } ) @@ -11246,10 +10174,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `homeserverUrl`(`url`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( - it, FfiConverterString.lower(`url`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( + it, + FfiConverterString.lower(`url`),_status) } } ) @@ -11261,10 +10190,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * Use in-memory session storage. */override fun `inMemoryStore`(): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( + it, + _status) } } ) @@ -11273,10 +10203,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `proxy`(`url`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( - it, FfiConverterString.lower(`url`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( + it, + FfiConverterString.lower(`url`),_status) } } ) @@ -11288,10 +10219,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * Add a default request config to this client. */override fun `requestConfig`(`config`: RequestConfig): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( - it, FfiConverterTypeRequestConfig.lower(`config`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( + it, + FfiConverterTypeRequestConfig.lower(`config`),_status) } } ) @@ -11304,10 +10236,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * an encrypted message. */override fun `roomKeyRecipientStrategy`(`strategy`: CollectStrategy): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( - it, FfiConverterTypeCollectStrategy.lower(`strategy`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( + it, + FfiConverterTypeCollectStrategy.lower(`strategy`),_status) } } ) @@ -11316,10 +10249,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `serverName`(`serverName`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( - it, FfiConverterString.lower(`serverName`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( + it, + FfiConverterString.lower(`serverName`),_status) } } ) @@ -11328,10 +10262,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `serverNameOrHomeserverUrl`(`serverNameOrUrl`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url( - it, FfiConverterString.lower(`serverNameOrUrl`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url( + it, + FfiConverterString.lower(`serverNameOrUrl`),_status) } } ) @@ -11348,10 +10283,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * valid to use the same path for both stores on a single session. */override fun `sessionPaths`(`dataPath`: kotlin.String, `cachePath`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( - it, FfiConverterString.lower(`dataPath`),FfiConverterString.lower(`cachePath`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( + it, + FfiConverterString.lower(`dataPath`),FfiConverterString.lower(`cachePath`),_status) } } ) @@ -11360,10 +10296,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `setSessionDelegate`(`sessionDelegate`: ClientSessionDelegate): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( - it, FfiConverterTypeClientSessionDelegate.lower(`sessionDelegate`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( + it, + FfiConverterTypeClientSessionDelegate.lower(`sessionDelegate`),_status) } } ) @@ -11372,10 +10309,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `slidingSyncVersionBuilder`(`versionBuilder`: SlidingSyncVersionBuilder): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( - it, FfiConverterTypeSlidingSyncVersionBuilder.lower(`versionBuilder`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( + it, + FfiConverterTypeSlidingSyncVersionBuilder.lower(`versionBuilder`),_status) } } ) @@ -11387,10 +10325,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * Use SQLite as the session storage. */override fun `sqliteStore`(`config`: SqliteStoreBuilder): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( - it, FfiConverterTypeSqliteStoreBuilder.lower(`config`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( + it, + FfiConverterTypeSqliteStoreBuilder.lower(`config`),_status) } } ) @@ -11408,10 +10347,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * `matrix_sdk::SqliteStoreConfig::with_low_memory_config`. */override fun `systemIsMemoryConstrained`(): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( + it, + _status) } } ) @@ -11424,10 +10364,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface * experimental support for MSC4306 (threads subscriptions) or not. */override fun `threadsEnabled`(`enabled`: kotlin.Boolean, `threadSubscriptions`: kotlin.Boolean): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( - it, FfiConverterBoolean.lower(`enabled`),FfiConverterBoolean.lower(`threadSubscriptions`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( + it, + FfiConverterBoolean.lower(`enabled`),FfiConverterBoolean.lower(`threadSubscriptions`),_status) } } ) @@ -11436,10 +10377,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `userAgent`(`userAgent`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( - it, FfiConverterString.lower(`userAgent`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( + it, + FfiConverterString.lower(`userAgent`),_status) } } ) @@ -11448,10 +10390,11 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface override fun `username`(`username`: kotlin.String): ClientBuilder { return FfiConverterTypeClientBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( - it, FfiConverterString.lower(`username`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( + it, + FfiConverterString.lower(`username`),_status) } } ) @@ -11461,55 +10404,54 @@ open class ClientBuilder: Disposable, AutoCloseable, ClientBuilderInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeClientBuilder: FfiConverter { - - override fun lower(value: ClientBuilder): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeClientBuilder: FfiConverter { + override fun lower(value: ClientBuilder): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ClientBuilder { - return ClientBuilder(value) + override fun lift(value: Long): ClientBuilder { + return ClientBuilder(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): ClientBuilder { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: ClientBuilder) = 8UL override fun write(value: ClientBuilder, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -11534,13 +10476,13 @@ public object FfiConverterTypeClientBuilder: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -11747,32 +10695,40 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_encryption(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_encryption(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_encryption(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_encryption(handle, status) } } @@ -11792,15 +10748,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `backupExistsOnServer`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -11810,10 +10766,11 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface override fun `backupState`(): BackupState { return FfiConverterTypeBackupState.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state( + it, + _status) } } ) @@ -11822,10 +10779,11 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface override fun `backupStateListener`(`listener`: BackupStateListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( - it, FfiConverterTypeBackupStateListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( + it, + FfiConverterTypeBackupStateListener.lower(`listener`),_status) } } ) @@ -11840,15 +10798,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `curve25519Key`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -11861,15 +10819,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `disableRecovery`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -11886,15 +10844,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `ed25519Key`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -11907,15 +10865,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `enableBackups`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -11929,15 +10887,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `enableRecovery`(`waitForBackupsToUpload`: kotlin.Boolean, `passphrase`: kotlin.String?, `progressListener`: EnableRecoveryProgressListener) : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( + uniffiHandle, FfiConverterBoolean.lower(`waitForBackupsToUpload`),FfiConverterOptionalString.lower(`passphrase`),FfiConverterTypeEnableRecoveryProgressListener.lower(`progressListener`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -11957,15 +10915,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `hasDevicesToVerifyAgainst`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -11978,15 +10936,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isLastDevice`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -11999,15 +10957,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `recover`(`recoveryKey`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_recover( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_recover( + uniffiHandle, FfiConverterString.lower(`recoveryKey`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -12021,15 +10979,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `recoverAndReset`(`oldRecoveryKey`: kotlin.String) : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset( + uniffiHandle, FfiConverterString.lower(`oldRecoveryKey`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -12039,10 +10997,11 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface override fun `recoveryState`(): RecoveryState { return FfiConverterTypeRecoveryState.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state( + it, + _status) } } ) @@ -12051,10 +11010,11 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface override fun `recoveryStateListener`(`listener`: RecoveryStateListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( - it, FfiConverterTypeRecoveryStateListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( + it, + FfiConverterTypeRecoveryStateListener.lower(`listener`),_status) } } ) @@ -12070,15 +11030,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `resetIdentity`() : IdentityResetHandle? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeIdentityResetHandle.lift(it) }, // Error FFI converter @@ -12091,15 +11051,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `resetRecoveryKey`() : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -12132,15 +11092,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `userIdentity`(`userId`: kotlin.String, `fallbackToServer`: kotlin.Boolean) : UserIdentity? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( + uniffiHandle, FfiConverterString.lower(`userId`),FfiConverterBoolean.lower(`fallbackToServer`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeUserIdentity.lift(it) }, // Error FFI converter @@ -12150,10 +11110,11 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface override fun `verificationState`(): VerificationState { return FfiConverterTypeVerificationState.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state( + it, + _status) } } ) @@ -12162,10 +11123,11 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface override fun `verificationStateListener`(`listener`: VerificationStateListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( - it, FfiConverterTypeVerificationStateListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( + it, + FfiConverterTypeVerificationStateListener.lower(`listener`),_status) } } ) @@ -12177,15 +11139,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `waitForBackupUploadSteadyState`(`progressListener`: BackupSteadyStateListener?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( + uniffiHandle, FfiConverterOptionalTypeBackupSteadyStateListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -12202,15 +11164,15 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `waitForE2eeInitializationTasks`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -12222,55 +11184,54 @@ open class Encryption: Disposable, AutoCloseable, EncryptionInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeEncryption: FfiConverter { - - override fun lower(value: Encryption): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeEncryption: FfiConverter { + override fun lower(value: Encryption): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Encryption { - return Encryption(value) + override fun lift(value: Long): Encryption { + return Encryption(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Encryption { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Encryption) = 8UL override fun write(value: Encryption, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -12295,13 +11256,13 @@ public object FfiConverterTypeEncryption: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -12412,24 +11373,30 @@ public interface GrantLoginWithQrCodeHandlerInterface { open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWithQrCodeHandlerInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -12440,7 +11407,7 @@ open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWit 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() + cleanable?.clean() } } } @@ -12450,7 +11417,7 @@ open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWit this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -12462,32 +11429,40 @@ open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWit 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler(handle, status) } } @@ -12515,15 +11490,15 @@ open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWit @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `generate`(`progressListener`: GrantGeneratedQrLoginProgressListener) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( + uniffiHandle, FfiConverterTypeGrantGeneratedQrLoginProgressListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -12558,15 +11533,15 @@ open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWit @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `scan`(`qrCodeData`: QrCodeData, `progressListener`: GrantQrLoginProgressListener) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( + uniffiHandle, FfiConverterTypeQrCodeData.lower(`qrCodeData`),FfiConverterTypeGrantQrLoginProgressListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -12578,55 +11553,54 @@ open class GrantLoginWithQrCodeHandler: Disposable, AutoCloseable, GrantLoginWit + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeGrantLoginWithQrCodeHandler: FfiConverter { - - override fun lower(value: GrantLoginWithQrCodeHandler): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeGrantLoginWithQrCodeHandler: FfiConverter { + override fun lower(value: GrantLoginWithQrCodeHandler): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): GrantLoginWithQrCodeHandler { - return GrantLoginWithQrCodeHandler(value) + override fun lift(value: Long): GrantLoginWithQrCodeHandler { + return GrantLoginWithQrCodeHandler(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): GrantLoginWithQrCodeHandler { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: GrantLoginWithQrCodeHandler) = 8UL override fun write(value: GrantLoginWithQrCodeHandler, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -12651,13 +11625,13 @@ public object FfiConverterTypeGrantLoginWithQrCodeHandler: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -12799,32 +11779,40 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails(handle, status) } } @@ -12833,10 +11821,11 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet * The sliding sync version. */override fun `slidingSyncVersion`(): SlidingSyncVersion { return FfiConverterTypeSlidingSyncVersion.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( + it, + _status) } } ) @@ -12849,10 +11838,11 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet * URL. */override fun `supportedOidcPrompts`(): List { return FfiConverterSequenceTypeOidcPrompt.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( + it, + _status) } } ) @@ -12864,10 +11854,11 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet * Whether the current homeserver supports login using OIDC. */override fun `supportsOidcLogin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( + it, + _status) } } ) @@ -12879,10 +11870,11 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet * Whether the current homeserver supports the password login flow. */override fun `supportsPasswordLogin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( + it, + _status) } } ) @@ -12894,10 +11886,11 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet * Whether the current homeserver supports login using legacy SSO. */override fun `supportsSsoLogin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + it, + _status) } } ) @@ -12909,10 +11902,11 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet * The URL of the currently configured homeserver. */override fun `url`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( + it, + _status) } } ) @@ -12922,55 +11916,54 @@ open class HomeserverLoginDetails: Disposable, AutoCloseable, HomeserverLoginDet + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeHomeserverLoginDetails: FfiConverter { - - override fun lower(value: HomeserverLoginDetails): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeHomeserverLoginDetails: FfiConverter { + override fun lower(value: HomeserverLoginDetails): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): HomeserverLoginDetails { - return HomeserverLoginDetails(value) + override fun lift(value: Long): HomeserverLoginDetails { + return HomeserverLoginDetails(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): HomeserverLoginDetails { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: HomeserverLoginDetails) = 8UL override fun write(value: HomeserverLoginDetails, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -12995,13 +11988,13 @@ public object FfiConverterTypeHomeserverLoginDetails: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -13131,32 +12130,40 @@ open class IdentityResetHandle: Disposable, AutoCloseable, IdentityResetHandleIn 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_identityresethandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_identityresethandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_identityresethandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_identityresethandle(handle, status) } } @@ -13166,10 +12173,11 @@ open class IdentityResetHandle: Disposable, AutoCloseable, IdentityResetHandleIn * process is using. */override fun `authType`(): CrossSigningResetAuthType { return FfiConverterTypeCrossSigningResetAuthType.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( + it, + _status) } } ) @@ -13180,15 +12188,15 @@ open class IdentityResetHandle: Disposable, AutoCloseable, IdentityResetHandleIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `cancel`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -13211,15 +12219,15 @@ open class IdentityResetHandle: Disposable, AutoCloseable, IdentityResetHandleIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `reset`(`auth`: AuthData?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( + uniffiHandle, FfiConverterOptionalTypeAuthData.lower(`auth`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -13231,55 +12239,54 @@ open class IdentityResetHandle: Disposable, AutoCloseable, IdentityResetHandleIn + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeIdentityResetHandle: FfiConverter { - - override fun lower(value: IdentityResetHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeIdentityResetHandle: FfiConverter { + override fun lower(value: IdentityResetHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): IdentityResetHandle { - return IdentityResetHandle(value) + override fun lift(value: Long): IdentityResetHandle { + return IdentityResetHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): IdentityResetHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: IdentityResetHandle) = 8UL override fun write(value: IdentityResetHandle, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -13304,13 +12311,13 @@ public object FfiConverterTypeIdentityResetHandle: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -13425,41 +12438,50 @@ open class InReplyToDetails: Disposable, AutoCloseable, InReplyToDetailsInterfac 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(handle, status) } } override fun `event`(): EmbeddedEventDetails { return FfiConverterTypeEmbeddedEventDetails.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( + it, + _status) } } ) @@ -13468,10 +12490,11 @@ open class InReplyToDetails: Disposable, AutoCloseable, InReplyToDetailsInterfac override fun `eventId`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( + it, + _status) } } ) @@ -13481,55 +12504,54 @@ open class InReplyToDetails: Disposable, AutoCloseable, InReplyToDetailsInterfac + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeInReplyToDetails: FfiConverter { - - override fun lower(value: InReplyToDetails): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeInReplyToDetails: FfiConverter { + override fun lower(value: InReplyToDetails): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): InReplyToDetails { - return InReplyToDetails(value) + override fun lift(value: Long): InReplyToDetails { + return InReplyToDetails(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): InReplyToDetails { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: InReplyToDetails) = 8UL override fun write(value: InReplyToDetails, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -13554,13 +12576,13 @@ public object FfiConverterTypeInReplyToDetails: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -13702,32 +12730,40 @@ open class KnockRequestActions: Disposable, AutoCloseable, KnockRequestActionsIn 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions(handle, status) } } @@ -13739,15 +12775,15 @@ open class KnockRequestActions: Disposable, AutoCloseable, KnockRequestActionsIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `accept`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -13765,15 +12801,15 @@ open class KnockRequestActions: Disposable, AutoCloseable, KnockRequestActionsIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `decline`(`reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( + uniffiHandle, FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -13791,15 +12827,15 @@ open class KnockRequestActions: Disposable, AutoCloseable, KnockRequestActionsIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `declineAndBan`(`reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( + uniffiHandle, FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -13819,15 +12855,15 @@ open class KnockRequestActions: Disposable, AutoCloseable, KnockRequestActionsIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `markAsSeen`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -13839,55 +12875,54 @@ open class KnockRequestActions: Disposable, AutoCloseable, KnockRequestActionsIn + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeKnockRequestActions: FfiConverter { - - override fun lower(value: KnockRequestActions): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeKnockRequestActions: FfiConverter { + override fun lower(value: KnockRequestActions): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): KnockRequestActions { - return KnockRequestActions(value) + override fun lift(value: Long): KnockRequestActions { + return KnockRequestActions(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): KnockRequestActions { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: KnockRequestActions) = 8UL override fun write(value: KnockRequestActions, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -13912,13 +12947,13 @@ public object FfiConverterTypeKnockRequestActions: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -14053,41 +13094,50 @@ open class LazyTimelineItemProvider: Disposable, AutoCloseable, LazyTimelineItem 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider(handle, status) } } override fun `containsOnlyEmojis`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + it, + _status) } } ) @@ -14099,10 +13149,11 @@ open class LazyTimelineItemProvider: Disposable, AutoCloseable, LazyTimelineItem * Returns some debug information for this event timeline item. */override fun `debugInfo`(): EventTimelineItemDebugInfo { return FfiConverterTypeEventTimelineItemDebugInfo.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + it, + _status) } } ) @@ -14115,10 +13166,11 @@ open class LazyTimelineItemProvider: Disposable, AutoCloseable, LazyTimelineItem * remote echoes. */override fun `getSendHandle`(): SendHandle? { return FfiConverterOptionalTypeSendHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + it, + _status) } } ) @@ -14130,10 +13182,11 @@ open class LazyTimelineItemProvider: Disposable, AutoCloseable, LazyTimelineItem * Returns the shields for this event timeline item. */override fun `getShields`(`strict`: kotlin.Boolean): ShieldState? { return FfiConverterOptionalTypeShieldState.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( - it, FfiConverterBoolean.lower(`strict`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + it, + FfiConverterBoolean.lower(`strict`),_status) } } ) @@ -14143,55 +13196,54 @@ open class LazyTimelineItemProvider: Disposable, AutoCloseable, LazyTimelineItem + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeLazyTimelineItemProvider: FfiConverter { - - override fun lower(value: LazyTimelineItemProvider): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeLazyTimelineItemProvider: FfiConverter { + override fun lower(value: LazyTimelineItemProvider): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): LazyTimelineItemProvider { - return LazyTimelineItemProvider(value) + override fun lift(value: Long): LazyTimelineItemProvider { + return LazyTimelineItemProvider(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): LazyTimelineItemProvider { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: LazyTimelineItemProvider) = 8UL override fun write(value: LazyTimelineItemProvider, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -14216,13 +13268,13 @@ public object FfiConverterTypeLazyTimelineItemProvider: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -14360,32 +13418,40 @@ open class LeaveSpaceHandle: Disposable, AutoCloseable, LeaveSpaceHandleInterfac 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(handle, status) } } @@ -14397,15 +13463,15 @@ open class LeaveSpaceHandle: Disposable, AutoCloseable, LeaveSpaceHandleInterfac @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `leave`(`roomIds`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( + uniffiHandle, FfiConverterSequenceString.lower(`roomIds`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -14420,10 +13486,11 @@ open class LeaveSpaceHandle: Disposable, AutoCloseable, LeaveSpaceHandleInterfac * include leave specific information. */override fun `rooms`(): List { return FfiConverterSequenceTypeLeaveSpaceRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( + it, + _status) } } ) @@ -14433,55 +13500,54 @@ open class LeaveSpaceHandle: Disposable, AutoCloseable, LeaveSpaceHandleInterfac + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeLeaveSpaceHandle: FfiConverter { - - override fun lower(value: LeaveSpaceHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeLeaveSpaceHandle: FfiConverter { + override fun lower(value: LeaveSpaceHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): LeaveSpaceHandle { - return LeaveSpaceHandle(value) + override fun lift(value: Long): LeaveSpaceHandle { + return LeaveSpaceHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): LeaveSpaceHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: LeaveSpaceHandle) = 8UL override fun write(value: LeaveSpaceHandle, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -14506,13 +13572,13 @@ public object FfiConverterTypeLeaveSpaceHandle: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -14677,32 +13749,40 @@ open class LoginWithQrCodeHandler: Disposable, AutoCloseable, LoginWithQrCodeHan 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler(handle, status) } } @@ -14731,15 +13811,15 @@ open class LoginWithQrCodeHandler: Disposable, AutoCloseable, LoginWithQrCodeHan @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `generate`(`progressListener`: GeneratedQrLoginProgressListener) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( + uniffiHandle, FfiConverterTypeGeneratedQrLoginProgressListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -14777,15 +13857,15 @@ open class LoginWithQrCodeHandler: Disposable, AutoCloseable, LoginWithQrCodeHan @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `scan`(`qrCodeData`: QrCodeData, `progressListener`: QrLoginProgressListener) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( + uniffiHandle, FfiConverterTypeQrCodeData.lower(`qrCodeData`),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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -14797,55 +13877,54 @@ open class LoginWithQrCodeHandler: Disposable, AutoCloseable, LoginWithQrCodeHan + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeLoginWithQrCodeHandler: FfiConverter { - - override fun lower(value: LoginWithQrCodeHandler): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeLoginWithQrCodeHandler: FfiConverter { + override fun lower(value: LoginWithQrCodeHandler): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): LoginWithQrCodeHandler { - return LoginWithQrCodeHandler(value) + override fun lift(value: Long): LoginWithQrCodeHandler { + return LoginWithQrCodeHandler(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): LoginWithQrCodeHandler { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: LoginWithQrCodeHandler) = 8UL override fun write(value: LoginWithQrCodeHandler, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -14870,13 +13949,13 @@ public object FfiConverterTypeLoginWithQrCodeHandler: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -15002,32 +14087,40 @@ open class MediaFileHandle: Disposable, AutoCloseable, MediaFileHandleInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(handle, status) } } @@ -15037,10 +14130,11 @@ open class MediaFileHandle: Disposable, AutoCloseable, MediaFileHandleInterface */ @Throws(ClientException::class)override fun `path`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + it, + _status) } } ) @@ -15050,10 +14144,11 @@ open class MediaFileHandle: Disposable, AutoCloseable, MediaFileHandleInterface @Throws(ClientException::class)override fun `persist`(`path`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( - it, FfiConverterString.lower(`path`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( + it, + FfiConverterString.lower(`path`),_status) } } ) @@ -15063,55 +14158,54 @@ open class MediaFileHandle: Disposable, AutoCloseable, MediaFileHandleInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeMediaFileHandle: FfiConverter { - - override fun lower(value: MediaFileHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMediaFileHandle: FfiConverter { + override fun lower(value: MediaFileHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MediaFileHandle { - return MediaFileHandle(value) + override fun lift(value: Long): MediaFileHandle { + return MediaFileHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MediaFileHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MediaFileHandle) = 8UL override fun write(value: MediaFileHandle, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -15136,13 +14230,13 @@ public object FfiConverterTypeMediaFileHandle: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -15257,41 +14357,50 @@ open class MediaSource: Disposable, AutoCloseable, MediaSourceInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_mediasource(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_mediasource(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_mediasource(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_mediasource(handle, status) } } override fun `toJson`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( + it, + _status) } } ) @@ -15300,10 +14409,11 @@ open class MediaSource: Disposable, AutoCloseable, MediaSourceInterface override fun `url`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_mediasource_url( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_mediasource_url( + it, + _status) } } ) @@ -15313,12 +14423,16 @@ open class MediaSource: Disposable, AutoCloseable, MediaSourceInterface + + + companion object { @Throws(ClientException::class) fun `fromJson`(`json`: kotlin.String): MediaSource { return FfiConverterTypeMediaSource.lift( uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( + FfiConverterString.lower(`json`),_status) } ) @@ -15329,7 +14443,8 @@ open class MediaSource: Disposable, AutoCloseable, MediaSourceInterface @Throws(ClientException::class) fun `fromUrl`(`url`: kotlin.String): MediaSource { return FfiConverterTypeMediaSource.lift( uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( + FfiConverterString.lower(`url`),_status) } ) @@ -15341,50 +14456,43 @@ open class MediaSource: Disposable, AutoCloseable, MediaSourceInterface } + /** * @suppress */ -public object FfiConverterTypeMediaSource: FfiConverter { - - override fun lower(value: MediaSource): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeMediaSource: FfiConverter { + override fun lower(value: MediaSource): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): MediaSource { - return MediaSource(value) + override fun lift(value: Long): MediaSource { + return MediaSource(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): MediaSource { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: MediaSource) = 8UL override fun write(value: MediaSource, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -15409,13 +14517,13 @@ public object FfiConverterTypeMediaSource: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -15507,24 +14615,30 @@ public interface NotificationClientInterface { open class NotificationClient: Disposable, AutoCloseable, NotificationClientInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -15535,7 +14649,7 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte 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() + cleanable?.clean() } } } @@ -15545,7 +14659,7 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -15557,32 +14671,40 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_notificationclient(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_notificationclient(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_notificationclient(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_notificationclient(handle, status) } } @@ -15601,15 +14723,15 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getNotification`(`roomId`: kotlin.String, `eventId`: kotlin.String) : NotificationStatus { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( + uniffiHandle, FfiConverterString.lower(`roomId`),FfiConverterString.lower(`eventId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeNotificationStatus.lift(it) }, // Error FFI converter @@ -15631,15 +14753,15 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getNotifications`(`requests`: List) : Map { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( + uniffiHandle, FfiConverterSequenceTypeNotificationItemsRequest.lower(`requests`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterMapStringTypeBatchNotificationResult.lift(it) }, // Error FFI converter @@ -15656,10 +14778,11 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte */ @Throws(ClientException::class)override fun `getRoom`(`roomId`: kotlin.String): Room? { return FfiConverterOptionalTypeRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( - it, FfiConverterString.lower(`roomId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( + it, + FfiConverterString.lower(`roomId`),_status) } } ) @@ -15669,55 +14792,54 @@ open class NotificationClient: Disposable, AutoCloseable, NotificationClientInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeNotificationClient: FfiConverter { - - override fun lower(value: NotificationClient): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeNotificationClient: FfiConverter { + override fun lower(value: NotificationClient): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): NotificationClient { - return NotificationClient(value) + override fun lift(value: Long): NotificationClient { + return NotificationClient(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): NotificationClient { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: NotificationClient) = 8UL override fun write(value: NotificationClient, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -15742,13 +14864,13 @@ public object FfiConverterTypeNotificationClient: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -16000,32 +15128,40 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_notificationsettings(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_notificationsettings(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_notificationsettings(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_notificationsettings(handle, status) } } @@ -16038,15 +15174,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `canHomeserverPushEncryptedEventToDevice`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16063,15 +15199,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `canPushEncryptedEventToDevice`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16086,15 +15222,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `containsKeywordsRules`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16118,15 +15254,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getDefaultRoomNotificationMode`(`isEncrypted`: kotlin.Boolean, `isOneToOne`: kotlin.Boolean) : RoomNotificationMode { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode( + uniffiHandle, FfiConverterBoolean.lower(`isEncrypted`),FfiConverterBoolean.lower(`isOneToOne`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomNotificationMode.lift(it) }, // Error FFI converter @@ -16142,15 +15278,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRawPushRules`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -16173,15 +15309,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRoomNotificationSettings`(`roomId`: kotlin.String, `isEncrypted`: kotlin.Boolean, `isOneToOne`: kotlin.Boolean) : RoomNotificationSettings { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings( + uniffiHandle, FfiConverterString.lower(`roomId`),FfiConverterBoolean.lower(`isEncrypted`),FfiConverterBoolean.lower(`isOneToOne`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomNotificationSettings.lift(it) }, // Error FFI converter @@ -16196,15 +15332,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRoomsWithUserDefinedRules`(`enabled`: kotlin.Boolean?) : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules( + uniffiHandle, FfiConverterOptionalBoolean.lower(`enabled`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceString.lift(it) }, // Error FFI converter @@ -16220,15 +15356,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getUserDefinedRoomNotificationMode`(`roomId`: kotlin.String) : RoomNotificationMode? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode( + uniffiHandle, FfiConverterString.lower(`roomId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeRoomNotificationMode.lift(it) }, // Error FFI converter @@ -16244,15 +15380,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isCallEnabled`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16268,15 +15404,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isInviteForMeEnabled`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16292,15 +15428,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isRoomMentionEnabled`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16316,15 +15452,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isUserMentionEnabled`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -16340,15 +15476,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `restoreDefaultRoomNotificationMode`(`roomId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode( + uniffiHandle, FfiConverterString.lower(`roomId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16365,15 +15501,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setCallEnabled`(`enabled`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled( + uniffiHandle, FfiConverterBoolean.lower(`enabled`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16390,15 +15526,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setCustomPushRule`(`ruleId`: kotlin.String, `ruleKind`: RuleKind, `actions`: List, `conditions`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule( + uniffiHandle, FfiConverterString.lower(`ruleId`),FfiConverterTypeRuleKind.lower(`ruleKind`),FfiConverterSequenceTypeAction.lower(`actions`),FfiConverterSequenceTypePushCondition.lower(`conditions`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16422,15 +15558,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setDefaultRoomNotificationMode`(`isEncrypted`: kotlin.Boolean, `isOneToOne`: kotlin.Boolean, `mode`: RoomNotificationMode) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode( + uniffiHandle, FfiConverterBoolean.lower(`isEncrypted`),FfiConverterBoolean.lower(`isOneToOne`),FfiConverterTypeRoomNotificationMode.lower(`mode`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16441,10 +15577,11 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings override fun `setDelegate`(`delegate`: NotificationSettingsDelegate?) = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate( - it, FfiConverterOptionalTypeNotificationSettingsDelegate.lower(`delegate`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate( + it, + FfiConverterOptionalTypeNotificationSettingsDelegate.lower(`delegate`),_status) } } @@ -16458,15 +15595,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setInviteForMeEnabled`(`enabled`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled( + uniffiHandle, FfiConverterBoolean.lower(`enabled`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16483,15 +15620,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setRoomMentionEnabled`(`enabled`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled( + uniffiHandle, FfiConverterBoolean.lower(`enabled`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16508,15 +15645,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setRoomNotificationMode`(`roomId`: kotlin.String, `mode`: RoomNotificationMode) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode( + uniffiHandle, FfiConverterString.lower(`roomId`),FfiConverterTypeRoomNotificationMode.lower(`mode`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16533,15 +15670,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setUserMentionEnabled`(`enabled`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled( + uniffiHandle, FfiConverterBoolean.lower(`enabled`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16565,15 +15702,15 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `unmuteRoom`(`roomId`: kotlin.String, `isEncrypted`: kotlin.Boolean, `isOneToOne`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( + uniffiHandle, FfiConverterString.lower(`roomId`),FfiConverterBoolean.lower(`isEncrypted`),FfiConverterBoolean.lower(`isOneToOne`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -16585,55 +15722,54 @@ open class NotificationSettings: Disposable, AutoCloseable, NotificationSettings + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeNotificationSettings: FfiConverter { - - override fun lower(value: NotificationSettings): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeNotificationSettings: FfiConverter { + override fun lower(value: NotificationSettings): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): NotificationSettings { - return NotificationSettings(value) + override fun lift(value: Long): NotificationSettings { + return NotificationSettings(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): NotificationSettings { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: NotificationSettings) = 8UL override fun write(value: NotificationSettings, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -16658,13 +15794,13 @@ public object FfiConverterTypeNotificationSettings: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -16796,32 +15938,40 @@ open class QrCodeData: Disposable, AutoCloseable, QrCodeDataInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_qrcodedata(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_qrcodedata(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(handle, status) } } @@ -16834,10 +15984,11 @@ open class QrCodeData: Disposable, AutoCloseable, QrCodeDataInterface * will return `None`. */override fun `serverName`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( + it, + _status) } } ) @@ -16847,6 +15998,9 @@ open class QrCodeData: Disposable, AutoCloseable, QrCodeDataInterface + + + companion object { /** @@ -16857,7 +16011,8 @@ open class QrCodeData: Disposable, AutoCloseable, QrCodeDataInterface @Throws(QrCodeDecodeException::class) fun `fromBytes`(`bytes`: kotlin.ByteArray): QrCodeData { return FfiConverterTypeQrCodeData.lift( uniffiRustCallWithError(QrCodeDecodeException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( + FfiConverterByteArray.lower(`bytes`),_status) } ) @@ -16869,50 +16024,43 @@ open class QrCodeData: Disposable, AutoCloseable, QrCodeDataInterface } + /** * @suppress */ -public object FfiConverterTypeQrCodeData: FfiConverter { - - override fun lower(value: QrCodeData): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeQrCodeData: FfiConverter { + override fun lower(value: QrCodeData): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): QrCodeData { - return QrCodeData(value) + override fun lift(value: Long): QrCodeData { + return QrCodeData(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): QrCodeData { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: QrCodeData) = 8UL override fun write(value: QrCodeData, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -16937,13 +16085,13 @@ public object FfiConverterTypeQrCodeData: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -17574,24 +16722,30 @@ public interface RoomInterface { open class Room: Disposable, AutoCloseable, RoomInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -17602,7 +16756,7 @@ open class Room: Disposable, AutoCloseable, RoomInterface 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() + cleanable?.clean() } } } @@ -17612,7 +16766,7 @@ open class Room: Disposable, AutoCloseable, RoomInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -17624,41 +16778,50 @@ open class Room: Disposable, AutoCloseable, RoomInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_room(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_room(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_room(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_room(handle, status) } } override fun `activeMembersCount`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( + it, + _status) } } ) @@ -17677,10 +16840,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * The vector is ordered by oldest membership user to newest. */override fun `activeRoomCallParticipants`(): List { return FfiConverterSequenceString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( + it, + _status) } } ) @@ -17689,10 +16853,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `alternativeAliases`(): List { return FfiConverterSequenceString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( + it, + _status) } } ) @@ -17704,15 +16869,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `applyPowerLevelChanges`(`changes`: RoomPowerLevelChanges) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( + uniffiHandle, FfiConverterTypeRoomPowerLevelChanges.lower(`changes`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17723,10 +16888,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `avatarUrl`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( + it, + _status) } } ) @@ -17738,15 +16904,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `banUser`(`userId`: kotlin.String, `reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_ban_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_ban_user( + uniffiHandle, FfiConverterString.lower(`userId`),FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17757,10 +16923,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `canonicalAlias`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( + it, + _status) } } ) @@ -17775,15 +16942,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `clearComposerDraft`(`threadRoot`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft( + uniffiHandle, FfiConverterOptionalString.lower(`threadRoot`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17803,15 +16970,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `clearEventCacheStorage`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17833,15 +17000,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `declineCall`(`rtcNotificationEventId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_decline_call( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_decline_call( + uniffiHandle, FfiConverterString.lower(`rtcNotificationEventId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17864,15 +17031,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `discardRoomKey`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17888,10 +17055,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * members. */override fun `displayName`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_display_name( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_display_name( + it, + _status) } } ) @@ -17909,15 +17077,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `edit`(`eventId`: kotlin.String, `newContent`: RoomMessageEventContentWithoutRelation) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_edit( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_edit( + uniffiHandle, FfiConverterString.lower(`eventId`),FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(`newContent`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17934,15 +17102,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `enableEncryption`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -17956,10 +17124,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * Enable or disable the send queue for that particular room. */override fun `enableSendQueue`(`enable`: kotlin.Boolean) = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( - it, FfiConverterBoolean.lower(`enable`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( + it, + FfiConverterBoolean.lower(`enable`),_status) } } @@ -17967,10 +17136,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `encryptionState`(): EncryptionState { return FfiConverterTypeEncryptionState.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( + it, + _status) } } ) @@ -17990,15 +17160,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( + uniffiHandle, 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeThreadSubscription.lift(it) }, // Error FFI converter @@ -18018,15 +17188,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `forget`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_forget( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_forget( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18040,15 +17210,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getPowerLevels`() : RoomPowerLevels { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomPowerLevels.lift(it) }, // Error FFI converter @@ -18067,15 +17237,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getRoomVisibility`() : RoomVisibility { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomVisibility.lift(it) }, // Error FFI converter @@ -18089,10 +17259,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * "m.room" in this room. */override fun `hasActiveRoomCall`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call( + it, + _status) } } ) @@ -18104,10 +17275,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * Returns the room heroes for this room. */override fun `heroes`(): List { return FfiConverterSequenceTypeRoomHero.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_heroes( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_heroes( + it, + _status) } } ) @@ -18116,10 +17288,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `id`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_id( + it, + _status) } } ) @@ -18143,15 +17316,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `ignoreDeviceTrustAndResend`(`devices`: Map>, `sendHandle`: SendHandle) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend( + uniffiHandle, FfiConverterMapStringSequenceString.lower(`devices`),FfiConverterTypeSendHandle.lower(`sendHandle`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18172,15 +17345,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `ignoreUser`(`userId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_ignore_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_ignore_user( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18194,15 +17367,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `inviteUserById`(`userId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18213,10 +17386,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `invitedMembersCount`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count( + it, + _status) } } ) @@ -18231,15 +17405,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `inviter`() : RoomMember? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_inviter( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_inviter( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeRoomMember.lift(it) }, // Error FFI converter @@ -18251,15 +17425,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isDirect`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_is_direct( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_is_direct( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -18277,15 +17451,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isEncrypted`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -18300,10 +17474,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * Can return `None` if the join rule state event is missing. */override fun `isPublic`(): kotlin.Boolean? { return FfiConverterOptionalBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_is_public( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_is_public( + it, + _status) } } ) @@ -18316,10 +17491,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * not. */override fun `isSendQueueEnabled`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled( + it, + _status) } } ) @@ -18328,10 +17504,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `isSpace`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_is_space( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_is_space( + it, + _status) } } ) @@ -18348,15 +17525,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `join`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_join( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_join( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18367,10 +17544,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `joinedMembersCount`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count( + it, + _status) } } ) @@ -18382,15 +17560,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `kickUser`(`userId`: kotlin.String, `reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_kick_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_kick_user( + uniffiHandle, FfiConverterString.lower(`userId`),FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18404,15 +17582,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `latestEncryptionState`() : EncryptionState { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state( + uniffiHandle, ) }, - { 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 { RustBufferEncryptionState.create(it.capacity.toULong(), it.len.toULong(), it.data) } }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation).let { RustBufferEncryptionState.create(it.capacity.toULong(), it.len.toULong(), it.data) } }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeEncryptionState.lift(it) }, // Error FFI converter @@ -18424,15 +17602,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `latestEvent`() : EventTimelineItem? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_latest_event( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_latest_event( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeEventTimelineItem.lift(it) }, // Error FFI converter @@ -18450,15 +17628,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `leave`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_leave( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_leave( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18475,15 +17653,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `loadComposerDraft`(`threadRoot`: kotlin.String?) : ComposerDraft? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft( + uniffiHandle, FfiConverterOptionalString.lower(`threadRoot`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeComposerDraft.lift(it) }, // Error FFI converter @@ -18500,15 +17678,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `loadOrFetchEvent`(`eventId`: kotlin.String) : TimelineEvent { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTimelineEvent.lift(it) }, // Error FFI converter @@ -18532,15 +17710,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `markAsFullyReadUnchecked`(`eventId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18560,15 +17738,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `markAsRead`(`receiptType`: ReceiptType) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read( + uniffiHandle, FfiConverterTypeReceiptType.lower(`receiptType`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18582,15 +17760,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `matrixToEventPermalink`(`eventId`: kotlin.String) : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -18603,15 +17781,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `matrixToPermalink`() : kotlin.String { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterString.lift(it) }, // Error FFI converter @@ -18624,15 +17802,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `member`(`userId`: kotlin.String) : RoomMember { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_member( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_member( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomMember.lift(it) }, // Error FFI converter @@ -18645,15 +17823,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `memberAvatarUrl`(`userId`: kotlin.String) : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -18666,15 +17844,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `memberDisplayName`(`userId`: kotlin.String) : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_member_display_name( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_member_display_name( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -18697,15 +17875,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `memberWithSenderInfo`(`userId`: kotlin.String) : RoomMemberWithSenderInfo { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomMemberWithSenderInfo.lift(it) }, // Error FFI converter @@ -18718,15 +17896,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `members`() : RoomMembersIterator { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_members( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_members( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomMembersIterator.lift(it) }, // Error FFI converter @@ -18739,15 +17917,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `membersNoSync`() : RoomMembersIterator { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomMembersIterator.lift(it) }, // Error FFI converter @@ -18760,10 +17938,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * The room's current membership state. */override fun `membership`(): Membership { return FfiConverterTypeMembership.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_membership( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_membership( + it, + _status) } } ) @@ -18774,15 +17953,15 @@ 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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeLatestEventValue.lift(it) }, // Error FFI converter @@ -18792,10 +17971,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `ownUserId`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( + it, + _status) } } ) @@ -18818,10 +17998,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * [`m.room.create`]: https://spec.matrix.org/v1.14/client-server-api/#mroomcreate */override fun `predecessorRoom`(): PredecessorRoom? { return FfiConverterOptionalTypePredecessorRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( + it, + _status) } } ) @@ -18837,15 +18018,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `previewRoom`(`via`: List) : RoomPreview { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_preview_room( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_preview_room( + uniffiHandle, FfiConverterSequenceString.lower(`via`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomPreview.lift(it) }, // Error FFI converter @@ -18866,15 +18047,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `publishRoomAliasInRoomDirectory`(`alias`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory( + uniffiHandle, FfiConverterString.lower(`alias`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -18887,10 +18068,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * The raw name as present in the room state event. */override fun `rawName`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_raw_name( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_raw_name( + it, + _status) } } ) @@ -18912,15 +18094,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `redact`(`eventId`: kotlin.String, `reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_redact( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_redact( + uniffiHandle, FfiConverterString.lower(`eventId`),FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18937,15 +18119,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeAvatar`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -18967,15 +18149,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeRoomAliasFromRoomDirectory`(`alias`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory( + uniffiHandle, FfiConverterString.lower(`alias`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -19000,15 +18182,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `reportContent`(`eventId`: kotlin.String, `score`: kotlin.Int?, `reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_report_content( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_report_content( + uniffiHandle, FfiConverterString.lower(`eventId`),FfiConverterOptionalInt.lower(`score`),FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19034,15 +18216,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `reportRoom`(`reason`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_report_room( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_report_room( + uniffiHandle, FfiConverterString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19056,15 +18238,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `resetPowerLevels`() : RoomPowerLevels { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomPowerLevels.lift(it) }, // Error FFI converter @@ -19081,15 +18263,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `roomEventsDebugString`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceString.lift(it) }, // Error FFI converter @@ -19102,15 +18284,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `roomInfo`() : RoomInfo { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_room_info( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_room_info( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomInfo.lift(it) }, // Error FFI converter @@ -19127,15 +18309,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `saveComposerDraft`(`draft`: ComposerDraft, `threadRoot`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( + uniffiHandle, FfiConverterTypeComposerDraft.lower(`draft`),FfiConverterOptionalString.lower(`threadRoot`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19152,15 +18334,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sendLiveLocation`(`geoUri`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( + uniffiHandle, FfiConverterString.lower(`geoUri`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19183,15 +18365,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sendRaw`(`eventType`: kotlin.String, `content`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_send_raw( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_send_raw( + uniffiHandle, FfiConverterString.lower(`eventType`),FfiConverterString.lower(`content`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19205,15 +18387,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setIsFavourite`(`isFavourite`: kotlin.Boolean, `tagOrder`: kotlin.Double?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( + uniffiHandle, FfiConverterBoolean.lower(`isFavourite`),FfiConverterOptionalDouble.lower(`tagOrder`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19227,15 +18409,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setIsLowPriority`(`isLowPriority`: kotlin.Boolean, `tagOrder`: kotlin.Double?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( + uniffiHandle, FfiConverterBoolean.lower(`isLowPriority`),FfiConverterOptionalDouble.lower(`tagOrder`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19252,15 +18434,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setName`(`name`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_name( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_set_name( + uniffiHandle, FfiConverterString.lower(`name`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19287,15 +18469,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( + uniffiHandle, 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19312,15 +18494,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setTopic`(`topic`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_topic( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_set_topic( + uniffiHandle, FfiConverterString.lower(`topic`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19338,15 +18520,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `setUnreadFlag`(`newValue`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag( + uniffiHandle, FfiConverterBoolean.lower(`newValue`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19363,15 +18545,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `startLiveLocationShare`(`durationMillis`: kotlin.ULong) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share( + uniffiHandle, FfiConverterULong.lower(`durationMillis`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19388,15 +18570,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `stopLiveLocationShare`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19415,10 +18597,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface */ @Throws(ClientException::class)override fun `subscribeToCallDeclineEvents`(`rtcNotificationEventId`: kotlin.String, `listener`: CallDeclineListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events( - it, FfiConverterString.lower(`rtcNotificationEventId`),FfiConverterTypeCallDeclineListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events( + it, + FfiConverterString.lower(`rtcNotificationEventId`),FfiConverterTypeCallDeclineListener.lower(`listener`),_status) } } ) @@ -19430,15 +18613,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToIdentityStatusChanges`(`listener`: IdentityStatusChangeListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes( + uniffiHandle, FfiConverterTypeIdentityStatusChangeListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -19459,15 +18642,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToKnockRequests`(`listener`: KnockRequestsListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests( + uniffiHandle, FfiConverterTypeKnockRequestsListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -19484,10 +18667,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * subscribing, along with a [`TaskHandle`] to cancel the subscription. */override fun `subscribeToLiveLocationShares`(`listener`: LiveLocationShareListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares( - it, FfiConverterTypeLiveLocationShareListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares( + it, + FfiConverterTypeLiveLocationShareListener.lower(`listener`),_status) } } ) @@ -19496,10 +18680,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `subscribeToRoomInfoUpdates`(`listener`: RoomInfoListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( - it, FfiConverterTypeRoomInfoListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( + it, + FfiConverterTypeRoomInfoListener.lower(`listener`),_status) } } ) @@ -19518,15 +18703,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToSendQueueUpdates`(`listener`: SendQueueListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates( + uniffiHandle, FfiConverterTypeSendQueueListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -19536,10 +18721,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `subscribeToTypingNotifications`(`listener`: TypingNotificationsListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications( - it, FfiConverterTypeTypingNotificationsListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications( + it, + FfiConverterTypeTypingNotificationsListener.lower(`listener`),_status) } } ) @@ -19557,10 +18743,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface * [`m.room.tombstone`]: https://spec.matrix.org/v1.14/client-server-api/#mroomtombstone */override fun `successorRoom`(): SuccessorRoom? { return FfiConverterOptionalTypeSuccessorRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_successor_room( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_successor_room( + it, + _status) } } ) @@ -19572,15 +18759,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `suggestedRoleForUser`(`userId`: kotlin.String) : RoomMemberRole { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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 { RustBufferRoomMemberRole.create(it.capacity.toULong(), it.len.toULong(), it.data) } }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation).let { RustBufferRoomMemberRole.create(it.capacity.toULong(), it.len.toULong(), it.data) } }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeRoomMemberRole.lift(it) }, // Error FFI converter @@ -19597,15 +18784,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `timeline`() : Timeline { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_timeline( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_timeline( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTimeline.lift(it) }, // Error FFI converter @@ -19621,15 +18808,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `timelineWithConfiguration`(`configuration`: TimelineConfiguration) : Timeline { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration( + uniffiHandle, FfiConverterTypeTimelineConfiguration.lower(`configuration`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTimeline.lift(it) }, // Error FFI converter @@ -19639,10 +18826,11 @@ open class Room: Disposable, AutoCloseable, RoomInterface override fun `topic`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_topic( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_topic( + it, + _status) } } ) @@ -19654,15 +18842,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `typingNotice`(`isTyping`: kotlin.Boolean) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( + uniffiHandle, FfiConverterBoolean.lower(`isTyping`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19676,15 +18864,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `unbanUser`(`userId`: kotlin.String, `reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_unban_user( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_unban_user( + uniffiHandle, FfiConverterString.lower(`userId`),FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19703,15 +18891,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateCanonicalAlias`(`alias`: kotlin.String?, `altAliases`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias( + uniffiHandle, FfiConverterOptionalString.lower(`alias`),FfiConverterSequenceString.lower(`altAliases`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19728,15 +18916,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateHistoryVisibility`(`visibility`: RoomHistoryVisibility) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility( + uniffiHandle, FfiConverterTypeRoomHistoryVisibility.lower(`visibility`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19753,15 +18941,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateJoinRules`(`newRule`: JoinRule) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules( + uniffiHandle, FfiConverterTypeJoinRule.lower(`newRule`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19775,15 +18963,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updatePowerLevelsForUsers`(`updates`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users( + uniffiHandle, FfiConverterSequenceTypeUserPowerLevelUpdate.lower(`updates`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19800,15 +18988,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `updateRoomVisibility`(`visibility`: RoomVisibility) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility( + uniffiHandle, FfiConverterTypeRoomVisibility.lower(`visibility`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19837,15 +19025,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `uploadAvatar`(`mimeType`: kotlin.String, `data`: kotlin.ByteArray, `mediaInfo`: ImageInfo?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar( + uniffiHandle, FfiConverterString.lower(`mimeType`),FfiConverterByteArray.lower(`data`),FfiConverterOptionalTypeImageInfo.lower(`mediaInfo`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19871,15 +19059,15 @@ open class Room: Disposable, AutoCloseable, RoomInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `withdrawVerificationAndResend`(`userIds`: List, `sendHandle`: SendHandle) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend( + uniffiHandle, FfiConverterSequenceString.lower(`userIds`),FfiConverterTypeSendHandle.lower(`sendHandle`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -19891,55 +19079,54 @@ open class Room: Disposable, AutoCloseable, RoomInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoom: FfiConverter { - - override fun lower(value: Room): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoom: FfiConverter { + override fun lower(value: Room): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Room { - return Room(value) + override fun lift(value: Long): Room { + return Room(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Room { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Room) = 8UL override fun write(value: Room, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -19964,13 +19151,13 @@ public object FfiConverterTypeRoom: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -20082,24 +19269,30 @@ public interface RoomDirectorySearchInterface { open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -20110,7 +19303,7 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn 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() + cleanable?.clean() } } } @@ -20120,7 +19313,7 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -20132,32 +19325,40 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch(handle, status) } } @@ -20169,15 +19370,15 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `isAtLastPage`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -20193,15 +19394,15 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `loadedPages`() : kotlin.UInt { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( + uniffiHandle, ) }, - { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_u32(future, callback, continuation) }, - { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_u32(future, continuation) }, - { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_u32(future) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u32(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u32(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u32(future) }, // lift function { FfiConverterUInt.lift(it) }, // Error FFI converter @@ -20217,15 +19418,15 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `nextPage`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -20242,15 +19443,15 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `results`(`listener`: RoomDirectorySearchEntriesListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( + uniffiHandle, FfiConverterTypeRoomDirectorySearchEntriesListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -20275,15 +19476,15 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `search`(`filter`: kotlin.String?, `batchSize`: kotlin.UInt, `viaServerName`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + uniffiHandle, FfiConverterOptionalString.lower(`filter`),FfiConverterUInt.lower(`batchSize`),FfiConverterOptionalString.lower(`viaServerName`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -20295,55 +19496,54 @@ open class RoomDirectorySearch: Disposable, AutoCloseable, RoomDirectorySearchIn + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomDirectorySearch: FfiConverter { - - override fun lower(value: RoomDirectorySearch): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomDirectorySearch: FfiConverter { + override fun lower(value: RoomDirectorySearch): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomDirectorySearch { - return RoomDirectorySearch(value) + override fun lift(value: Long): RoomDirectorySearch { + return RoomDirectorySearch(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomDirectorySearch { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomDirectorySearch) = 8UL override fun write(value: RoomDirectorySearch, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -20368,13 +19568,13 @@ public object FfiConverterTypeRoomDirectorySearch: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -20493,41 +19699,50 @@ open class RoomList: Disposable, AutoCloseable, RoomListInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roomlist(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roomlist(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roomlist(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roomlist(handle, status) } } override fun `entriesWithDynamicAdapters`(`pageSize`: kotlin.UInt, `listener`: RoomListEntriesListener): RoomListEntriesWithDynamicAdaptersResult { return FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( - it, FfiConverterUInt.lower(`pageSize`),FfiConverterTypeRoomListEntriesListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + it, + FfiConverterUInt.lower(`pageSize`),FfiConverterTypeRoomListEntriesListener.lower(`listener`),_status) } } ) @@ -20536,10 +19751,11 @@ open class RoomList: Disposable, AutoCloseable, RoomListInterface override fun `entriesWithDynamicAdaptersWith`(`pageSize`: kotlin.UInt, `enableLatestEventSorter`: kotlin.Boolean, `listener`: RoomListEntriesListener): RoomListEntriesWithDynamicAdaptersResult { return FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( - it, FfiConverterUInt.lower(`pageSize`),FfiConverterBoolean.lower(`enableLatestEventSorter`),FfiConverterTypeRoomListEntriesListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + it, + FfiConverterUInt.lower(`pageSize`),FfiConverterBoolean.lower(`enableLatestEventSorter`),FfiConverterTypeRoomListEntriesListener.lower(`listener`),_status) } } ) @@ -20549,10 +19765,11 @@ open class RoomList: Disposable, AutoCloseable, RoomListInterface @Throws(RoomListException::class)override fun `loadingState`(`listener`: RoomListLoadingStateListener): RoomListLoadingStateResult { return FfiConverterTypeRoomListLoadingStateResult.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomListException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( - it, FfiConverterTypeRoomListLoadingStateListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( + it, + FfiConverterTypeRoomListLoadingStateListener.lower(`listener`),_status) } } ) @@ -20562,10 +19779,11 @@ open class RoomList: Disposable, AutoCloseable, RoomListInterface @Throws(RoomListException::class)override fun `room`(`roomId`: kotlin.String): Room { return FfiConverterTypeRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomListException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlist_room( - it, FfiConverterString.lower(`roomId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlist_room( + it, + FfiConverterString.lower(`roomId`),_status) } } ) @@ -20575,55 +19793,54 @@ open class RoomList: Disposable, AutoCloseable, RoomListInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomList: FfiConverter { - - override fun lower(value: RoomList): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomList: FfiConverter { + override fun lower(value: RoomList): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomList { - return RoomList(value) + override fun lift(value: Long): RoomList { + return RoomList(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomList { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomList) = 8UL override fun write(value: RoomList, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -20648,13 +19865,13 @@ public object FfiConverterTypeRoomList: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -20721,24 +19938,30 @@ public interface RoomListDynamicEntriesControllerInterface { open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomListDynamicEntriesControllerInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -20749,7 +19972,7 @@ open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomList 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() + cleanable?.clean() } } } @@ -20759,7 +19982,7 @@ open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomList this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -20771,41 +19994,50 @@ open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomList 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller(handle, status) } } override fun `addOnePage`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + it, + _status) } } @@ -20813,10 +20045,11 @@ open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomList override fun `resetToOnePage`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + it, + _status) } } @@ -20824,10 +20057,11 @@ open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomList override fun `setFilter`(`kind`: RoomListEntriesDynamicFilterKind): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( - it, FfiConverterTypeRoomListEntriesDynamicFilterKind.lower(`kind`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + it, + FfiConverterTypeRoomListEntriesDynamicFilterKind.lower(`kind`),_status) } } ) @@ -20837,55 +20071,54 @@ open class RoomListDynamicEntriesController: Disposable, AutoCloseable, RoomList + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomListDynamicEntriesController: FfiConverter { - - override fun lower(value: RoomListDynamicEntriesController): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomListDynamicEntriesController: FfiConverter { + override fun lower(value: RoomListDynamicEntriesController): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomListDynamicEntriesController { - return RoomListDynamicEntriesController(value) + override fun lift(value: Long): RoomListDynamicEntriesController { + return RoomListDynamicEntriesController(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomListDynamicEntriesController { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomListDynamicEntriesController) = 8UL override fun write(value: RoomListDynamicEntriesController, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -20910,13 +20143,13 @@ public object FfiConverterTypeRoomListDynamicEntriesController: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -21031,41 +20270,50 @@ open class RoomListEntriesWithDynamicAdaptersResult: Disposable, AutoCloseable, 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult(handle, status) } } override fun `controller`(): RoomListDynamicEntriesController { return FfiConverterTypeRoomListDynamicEntriesController.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + it, + _status) } } ) @@ -21074,10 +20322,11 @@ open class RoomListEntriesWithDynamicAdaptersResult: Disposable, AutoCloseable, override fun `entriesStream`(): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + it, + _status) } } ) @@ -21087,55 +20336,54 @@ open class RoomListEntriesWithDynamicAdaptersResult: Disposable, AutoCloseable, + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult: FfiConverter { - - override fun lower(value: RoomListEntriesWithDynamicAdaptersResult): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult: FfiConverter { + override fun lower(value: RoomListEntriesWithDynamicAdaptersResult): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomListEntriesWithDynamicAdaptersResult { - return RoomListEntriesWithDynamicAdaptersResult(value) + override fun lift(value: Long): RoomListEntriesWithDynamicAdaptersResult { + return RoomListEntriesWithDynamicAdaptersResult(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomListEntriesWithDynamicAdaptersResult { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomListEntriesWithDynamicAdaptersResult) = 8UL override fun write(value: RoomListEntriesWithDynamicAdaptersResult, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21160,13 +20408,13 @@ public object FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult: FfiConve // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -21237,24 +20485,30 @@ public interface RoomListServiceInterface { open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -21265,7 +20519,7 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface 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() + cleanable?.clean() } } } @@ -21275,7 +20529,7 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -21287,32 +20541,40 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roomlistservice(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roomlistservice(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(handle, status) } } @@ -21321,15 +20583,15 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `allRooms`() : RoomList { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeRoomList.lift(it) }, // Error FFI converter @@ -21340,10 +20602,11 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface @Throws(RoomListException::class)override fun `room`(`roomId`: kotlin.String): Room { return FfiConverterTypeRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomListException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( - it, FfiConverterString.lower(`roomId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( + it, + FfiConverterString.lower(`roomId`),_status) } } ) @@ -21352,10 +20615,11 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface override fun `state`(`listener`: RoomListServiceStateListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( - it, FfiConverterTypeRoomListServiceStateListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( + it, + FfiConverterTypeRoomListServiceStateListener.lower(`listener`),_status) } } ) @@ -21367,15 +20631,15 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToRooms`(`roomIds`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( + uniffiHandle, FfiConverterSequenceString.lower(`roomIds`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -21386,10 +20650,11 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface override fun `syncIndicator`(`delayBeforeShowingInMs`: kotlin.UInt, `delayBeforeHidingInMs`: kotlin.UInt, `listener`: RoomListServiceSyncIndicatorListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( - it, FfiConverterUInt.lower(`delayBeforeShowingInMs`),FfiConverterUInt.lower(`delayBeforeHidingInMs`),FfiConverterTypeRoomListServiceSyncIndicatorListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( + it, + FfiConverterUInt.lower(`delayBeforeShowingInMs`),FfiConverterUInt.lower(`delayBeforeHidingInMs`),FfiConverterTypeRoomListServiceSyncIndicatorListener.lower(`listener`),_status) } } ) @@ -21399,55 +20664,54 @@ open class RoomListService: Disposable, AutoCloseable, RoomListServiceInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomListService: FfiConverter { - - override fun lower(value: RoomListService): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomListService: FfiConverter { + override fun lower(value: RoomListService): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomListService { - return RoomListService(value) + override fun lift(value: Long): RoomListService { + return RoomListService(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomListService { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomListService) = 8UL override fun write(value: RoomListService, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21472,13 +20736,13 @@ public object FfiConverterTypeRoomListService: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -21593,41 +20863,50 @@ open class RoomMembersIterator: Disposable, AutoCloseable, RoomMembersIteratorIn 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator(handle, status) } } override fun `len`(): kotlin.UInt { return FfiConverterUInt.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( + it, + _status) } } ) @@ -21636,10 +20915,11 @@ open class RoomMembersIterator: Disposable, AutoCloseable, RoomMembersIteratorIn override fun `nextChunk`(`chunkSize`: kotlin.UInt): List? { return FfiConverterOptionalSequenceTypeRoomMember.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( - it, FfiConverterUInt.lower(`chunkSize`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( + it, + FfiConverterUInt.lower(`chunkSize`),_status) } } ) @@ -21649,55 +20929,54 @@ open class RoomMembersIterator: Disposable, AutoCloseable, RoomMembersIteratorIn + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomMembersIterator: FfiConverter { - - override fun lower(value: RoomMembersIterator): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomMembersIterator: FfiConverter { + override fun lower(value: RoomMembersIterator): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomMembersIterator { - return RoomMembersIterator(value) + override fun lift(value: Long): RoomMembersIterator { + return RoomMembersIterator(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomMembersIterator { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomMembersIterator) = 8UL override fun write(value: RoomMembersIterator, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21722,13 +21001,13 @@ public object FfiConverterTypeRoomMembersIterator: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -21841,41 +21126,50 @@ open class RoomMessageEventContentWithoutRelation: Disposable, AutoCloseable, Ro 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation(handle, status) } } override fun `withMentions`(`mentions`: Mentions): RoomMessageEventContentWithoutRelation { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( - it, FfiConverterTypeMentions.lower(`mentions`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + it, + FfiConverterTypeMentions.lower(`mentions`),_status) } } ) @@ -21885,55 +21179,54 @@ open class RoomMessageEventContentWithoutRelation: Disposable, AutoCloseable, Ro + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomMessageEventContentWithoutRelation: FfiConverter { - - override fun lower(value: RoomMessageEventContentWithoutRelation): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomMessageEventContentWithoutRelation: FfiConverter { + override fun lower(value: RoomMessageEventContentWithoutRelation): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomMessageEventContentWithoutRelation { - return RoomMessageEventContentWithoutRelation(value) + override fun lift(value: Long): RoomMessageEventContentWithoutRelation { + return RoomMessageEventContentWithoutRelation(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomMessageEventContentWithoutRelation { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomMessageEventContentWithoutRelation) = 8UL override fun write(value: RoomMessageEventContentWithoutRelation, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -21958,13 +21251,13 @@ public object FfiConverterTypeRoomMessageEventContentWithoutRelation: FfiConvert // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -22156,24 +21449,30 @@ public interface RoomPowerLevelsInterface { open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -22184,7 +21483,7 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface 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() + cleanable?.clean() } } } @@ -22194,7 +21493,7 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -22206,32 +21505,40 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(handle, status) } } @@ -22240,10 +21547,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * Returns true if the current user is able to ban in the room. */override fun `canOwnUserBan`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( + it, + _status) } } ) @@ -22255,10 +21563,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * Returns true if the current user is able to invite in the room. */override fun `canOwnUserInvite`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( + it, + _status) } } ) @@ -22270,10 +21579,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * Returns true if the current user is able to kick in the room. */override fun `canOwnUserKick`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( + it, + _status) } } ) @@ -22286,10 +21596,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * room. */override fun `canOwnUserPinUnpin`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( + it, + _status) } } ) @@ -22302,10 +21613,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * other users in the room. */override fun `canOwnUserRedactOther`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( + it, + _status) } } ) @@ -22318,10 +21630,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * the room. */override fun `canOwnUserRedactOwn`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + it, + _status) } } ) @@ -22334,10 +21647,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * in the room. */override fun `canOwnUserSendMessage`(`message`: MessageLikeEventType): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( - it, FfiConverterTypeMessageLikeEventType.lower(`message`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( + it, + FfiConverterTypeMessageLikeEventType.lower(`message`),_status) } } ) @@ -22350,10 +21664,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * type in the room. */override fun `canOwnUserSendState`(`stateEvent`: StateEventType): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( - it, FfiConverterTypeStateEventType.lower(`stateEvent`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( + it, + FfiConverterTypeStateEventType.lower(`stateEvent`),_status) } } ) @@ -22366,10 +21681,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * the room. */override fun `canOwnUserTriggerRoomNotification`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( + it, + _status) } } ) @@ -22385,10 +21701,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserBan`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22404,10 +21721,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserInvite`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22423,10 +21741,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserKick`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22442,10 +21761,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserPinUnpin`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22461,10 +21781,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserRedactOther`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22480,10 +21801,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserRedactOwn`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22499,10 +21821,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserSendMessage`(`userId`: kotlin.String, `message`: MessageLikeEventType): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( - it, FfiConverterString.lower(`userId`),FfiConverterTypeMessageLikeEventType.lower(`message`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( + it, + FfiConverterString.lower(`userId`),FfiConverterTypeMessageLikeEventType.lower(`message`),_status) } } ) @@ -22518,10 +21841,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserSendState`(`userId`: kotlin.String, `stateEvent`: StateEventType): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( - it, FfiConverterString.lower(`userId`),FfiConverterTypeStateEventType.lower(`stateEvent`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( + it, + FfiConverterString.lower(`userId`),FfiConverterTypeStateEventType.lower(`stateEvent`),_status) } } ) @@ -22537,10 +21861,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface */ @Throws(ClientException::class)override fun `canUserTriggerRoomNotification`(`userId`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( - it, FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( + it, + FfiConverterString.lower(`userId`),_status) } } ) @@ -22553,10 +21878,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface * and their power level. */override fun `userPowerLevels`(): Map { return FfiConverterMapStringLong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( + it, + _status) } } ) @@ -22565,10 +21891,11 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface override fun `values`(): RoomPowerLevelsValues { return FfiConverterTypeRoomPowerLevelsValues.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( + it, + _status) } } ) @@ -22578,55 +21905,54 @@ open class RoomPowerLevels: Disposable, AutoCloseable, RoomPowerLevelsInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomPowerLevels: FfiConverter { - - override fun lower(value: RoomPowerLevels): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomPowerLevels: FfiConverter { + override fun lower(value: RoomPowerLevels): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomPowerLevels { - return RoomPowerLevels(value) + override fun lift(value: Long): RoomPowerLevels { + return RoomPowerLevels(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomPowerLevels { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomPowerLevels) = 8UL override fun write(value: RoomPowerLevels, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -22651,13 +21977,13 @@ public object FfiConverterTypeRoomPowerLevels: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -22807,32 +22139,40 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_roompreview(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_roompreview(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_roompreview(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_roompreview(handle, status) } } @@ -22844,15 +22184,15 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `forget`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompreview_forget( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompreview_forget( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -22866,10 +22206,11 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface * Returns the room info the preview contains. */override fun `info`(): RoomPreviewInfo { return FfiConverterTypeRoomPreviewInfo.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompreview_info( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompreview_info( + it, + _status) } } ) @@ -22883,15 +22224,15 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `inviter`() : RoomMember? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeRoomMember.lift(it) }, // Error FFI converter @@ -22913,15 +22254,15 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `leave`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompreview_leave( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompreview_leave( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -22937,15 +22278,15 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `ownMembershipDetails`() : RoomMemberWithSenderInfo? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalTypeRoomMemberWithSenderInfo.lift(it) }, // Error FFI converter @@ -22956,55 +22297,54 @@ open class RoomPreview: Disposable, AutoCloseable, RoomPreviewInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeRoomPreview: FfiConverter { - - override fun lower(value: RoomPreview): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeRoomPreview: FfiConverter { + override fun lower(value: RoomPreview): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): RoomPreview { - return RoomPreview(value) + override fun lift(value: Long): RoomPreview { + return RoomPreview(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): RoomPreview { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: RoomPreview) = 8UL override fun write(value: RoomPreview, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -23029,13 +22369,13 @@ public object FfiConverterTypeRoomPreview: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -23110,24 +22450,30 @@ public interface SendAttachmentJoinHandleInterface { open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJoinHandleInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -23138,7 +22484,7 @@ open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJo 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() + cleanable?.clean() } } } @@ -23148,7 +22494,7 @@ open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJo this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -23160,32 +22506,40 @@ open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJo 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle(handle, status) } } @@ -23196,10 +22550,11 @@ open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJo * A subsequent call to [`Self::join`] will return immediately. */override fun `cancel`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( + it, + _status) } } @@ -23215,15 +22570,15 @@ open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJo @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `join`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -23235,55 +22590,54 @@ open class SendAttachmentJoinHandle: Disposable, AutoCloseable, SendAttachmentJo + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSendAttachmentJoinHandle: FfiConverter { - - override fun lower(value: SendAttachmentJoinHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSendAttachmentJoinHandle: FfiConverter { + override fun lower(value: SendAttachmentJoinHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SendAttachmentJoinHandle { - return SendAttachmentJoinHandle(value) + override fun lift(value: Long): SendAttachmentJoinHandle { + return SendAttachmentJoinHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SendAttachmentJoinHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SendAttachmentJoinHandle) = 8UL override fun write(value: SendAttachmentJoinHandle, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -23308,13 +22662,13 @@ public object FfiConverterTypeSendAttachmentJoinHandle: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -23439,32 +22799,40 @@ open class SendGalleryJoinHandle: Disposable, AutoCloseable, SendGalleryJoinHand 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle(handle, status) } } @@ -23475,10 +22843,11 @@ open class SendGalleryJoinHandle: Disposable, AutoCloseable, SendGalleryJoinHand * A subsequent call to [`Self::join`] will return immediately. */override fun `cancel`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( + it, + _status) } } @@ -23494,15 +22863,15 @@ open class SendGalleryJoinHandle: Disposable, AutoCloseable, SendGalleryJoinHand @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `join`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -23514,55 +22883,54 @@ open class SendGalleryJoinHandle: Disposable, AutoCloseable, SendGalleryJoinHand + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSendGalleryJoinHandle: FfiConverter { - - override fun lower(value: SendGalleryJoinHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSendGalleryJoinHandle: FfiConverter { + override fun lower(value: SendGalleryJoinHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SendGalleryJoinHandle { - return SendGalleryJoinHandle(value) + override fun lift(value: Long): SendGalleryJoinHandle { + return SendGalleryJoinHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SendGalleryJoinHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SendGalleryJoinHandle) = 8UL override fun write(value: SendGalleryJoinHandle, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -23587,13 +22955,13 @@ public object FfiConverterTypeSendGalleryJoinHandle: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -23738,32 +23112,40 @@ open class SendHandle: Disposable, AutoCloseable, SendHandleInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_sendhandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_sendhandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_sendhandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_sendhandle(handle, status) } } @@ -23782,15 +23164,15 @@ open class SendHandle: Disposable, AutoCloseable, SendHandleInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `abort`() : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -23817,15 +23199,15 @@ open class SendHandle: Disposable, AutoCloseable, SendHandleInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `tryResend`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -23837,55 +23219,54 @@ open class SendHandle: Disposable, AutoCloseable, SendHandleInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSendHandle: FfiConverter { - - override fun lower(value: SendHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSendHandle: FfiConverter { + override fun lower(value: SendHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SendHandle { - return SendHandle(value) + override fun lift(value: Long): SendHandle { + return SendHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SendHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SendHandle) = 8UL override fun write(value: SendHandle, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -23910,13 +23291,13 @@ public object FfiConverterTypeSendHandle: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -24023,24 +23404,30 @@ public interface SessionVerificationControllerInterface { open class SessionVerificationController: Disposable, AutoCloseable, SessionVerificationControllerInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -24051,7 +23438,7 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri 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() + cleanable?.clean() } } } @@ -24061,7 +23448,7 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -24073,32 +23460,40 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller(handle, status) } } @@ -24110,15 +23505,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `acceptVerificationRequest`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24138,15 +23533,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `acknowledgeVerificationRequest`(`senderId`: kotlin.String, `flowId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request( + uniffiHandle, FfiConverterString.lower(`senderId`),FfiConverterString.lower(`flowId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24163,15 +23558,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `approveVerification`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24188,15 +23583,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `cancelVerification`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24213,15 +23608,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `declineVerification`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24238,15 +23633,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `requestDeviceVerification`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24263,15 +23658,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `requestUserVerification`(`userId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification( + uniffiHandle, FfiConverterString.lower(`userId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24282,10 +23677,11 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri override fun `setDelegate`(`delegate`: SessionVerificationControllerDelegate?) = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate( - it, FfiConverterOptionalTypeSessionVerificationControllerDelegate.lower(`delegate`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate( + it, + FfiConverterOptionalTypeSessionVerificationControllerDelegate.lower(`delegate`),_status) } } @@ -24300,15 +23696,15 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `startSasVerification`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24320,55 +23716,54 @@ open class SessionVerificationController: Disposable, AutoCloseable, SessionVeri + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSessionVerificationController: FfiConverter { - - override fun lower(value: SessionVerificationController): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSessionVerificationController: FfiConverter { + override fun lower(value: SessionVerificationController): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SessionVerificationController { - return SessionVerificationController(value) + override fun lift(value: Long): SessionVerificationController { + return SessionVerificationController(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SessionVerificationController { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SessionVerificationController) = 8UL override fun write(value: SessionVerificationController, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -24393,13 +23788,13 @@ public object FfiConverterTypeSessionVerificationController: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -24514,41 +23915,50 @@ open class SessionVerificationEmoji: Disposable, AutoCloseable, SessionVerificat 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji(handle, status) } } override fun `description`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( + it, + _status) } } ) @@ -24557,10 +23967,11 @@ open class SessionVerificationEmoji: Disposable, AutoCloseable, SessionVerificat override fun `symbol`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( + it, + _status) } } ) @@ -24570,55 +23981,54 @@ open class SessionVerificationEmoji: Disposable, AutoCloseable, SessionVerificat + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSessionVerificationEmoji: FfiConverter { - - override fun lower(value: SessionVerificationEmoji): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSessionVerificationEmoji: FfiConverter { + override fun lower(value: SessionVerificationEmoji): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SessionVerificationEmoji { - return SessionVerificationEmoji(value) + override fun lift(value: Long): SessionVerificationEmoji { + return SessionVerificationEmoji(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SessionVerificationEmoji { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SessionVerificationEmoji) = 8UL override fun write(value: SessionVerificationEmoji, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -24643,13 +24053,13 @@ public object FfiConverterTypeSessionVerificationEmoji: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -24818,32 +24234,40 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(handle, status) } } @@ -24856,15 +24280,15 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -24878,10 +24302,11 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface * Returns if the room list is currently paginating or not. */override fun `paginationState`(): SpaceRoomListPaginationState { return FfiConverterTypeSpaceRoomListPaginationState.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + it, + _status) } } ) @@ -24893,10 +24318,11 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface * Return the current list of rooms. */override fun `rooms`(): List { return FfiConverterSequenceTypeSpaceRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + it, + _status) } } ) @@ -24908,10 +24334,11 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface * Returns the space of the room list if known. */override fun `space`(): SpaceRoom? { return FfiConverterOptionalTypeSpaceRoom.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space( + it, + _status) } } ) @@ -24923,10 +24350,11 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface * Subscribe to pagination updates. */override fun `subscribeToPaginationStateUpdates`(`listener`: SpaceRoomListPaginationStateListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( - it, FfiConverterTypeSpaceRoomListPaginationStateListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + it, + FfiConverterTypeSpaceRoomListPaginationStateListener.lower(`listener`),_status) } } ) @@ -24938,10 +24366,11 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface * Subscribes to room list updates. */override fun `subscribeToRoomUpdate`(`listener`: SpaceRoomListEntriesListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( - it, FfiConverterTypeSpaceRoomListEntriesListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + it, + FfiConverterTypeSpaceRoomListEntriesListener.lower(`listener`),_status) } } ) @@ -24953,10 +24382,11 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface * Subscribe to space updates. */override fun `subscribeToSpaceUpdates`(`listener`: SpaceRoomListSpaceListener): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates( - it, FfiConverterTypeSpaceRoomListSpaceListener.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates( + it, + FfiConverterTypeSpaceRoomListSpaceListener.lower(`listener`),_status) } } ) @@ -24966,55 +24396,54 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSpaceRoomList: FfiConverter { - - override fun lower(value: SpaceRoomList): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSpaceRoomList: FfiConverter { + override fun lower(value: SpaceRoomList): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SpaceRoomList { - return SpaceRoomList(value) + override fun lift(value: Long): SpaceRoomList { + return SpaceRoomList(UniffiWithHandle, value) } 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())) + return lift(buf.getLong()) } override fun allocationSize(value: SpaceRoomList) = 8UL 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -25039,13 +24468,13 @@ public object FfiConverterTypeSpaceRoomList: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -25217,32 +24652,40 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_spaceservice(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_spaceservice(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_spaceservice(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_spaceservice(handle, status) } } @@ -25251,15 +24694,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addChildToSpace`(`childId`: kotlin.String, `spaceId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( + uniffiHandle, FfiConverterString.lower(`childId`),FfiConverterString.lower(`spaceId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -25279,15 +24722,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `editableSpaces`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceTypeSpaceRoom.lift(it) }, // Error FFI converter @@ -25303,15 +24746,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `joinedParentsOfChild`(`childId`: kotlin.String) : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child( + uniffiHandle, FfiConverterString.lower(`childId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceTypeSpaceRoom.lift(it) }, // Error FFI converter @@ -25328,15 +24771,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `joinedSpaces`() : List { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterSequenceTypeSpaceRoom.lift(it) }, // Error FFI converter @@ -25358,15 +24801,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `leaveSpace`(`spaceId`: kotlin.String) : LeaveSpaceHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space( + uniffiHandle, 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeLeaveSpaceHandle.lift(it) }, // Error FFI converter @@ -25379,15 +24822,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `removeChildFromSpace`(`childId`: kotlin.String, `spaceId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space( + uniffiHandle, FfiConverterString.lower(`childId`),FfiConverterString.lower(`spaceId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -25404,15 +24847,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( + uniffiHandle, 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeSpaceRoomList.lift(it) }, // Error FFI converter @@ -25428,15 +24871,15 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( + uniffiHandle, 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -25447,55 +24890,54 @@ open class SpaceService: Disposable, AutoCloseable, SpaceServiceInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSpaceService: FfiConverter { - - override fun lower(value: SpaceService): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSpaceService: FfiConverter { + override fun lower(value: SpaceService): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SpaceService { - return SpaceService(value) + override fun lift(value: Long): SpaceService { + return SpaceService(UniffiWithHandle, value) } 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())) + return lift(buf.getLong()) } override fun allocationSize(value: SpaceService) = 8UL 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -25520,13 +24962,13 @@ public object FfiConverterTypeSpaceService: FfiConverter // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -25593,20 +25035,26 @@ public interface SpanInterface { open class Span: Disposable, AutoCloseable, SpanInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } /** * Create a span originating at the given callsite (file, line and column). @@ -25635,15 +25083,16 @@ open class Span: Disposable, AutoCloseable, SpanInterface * on that thread. */ constructor(`file`: kotlin.String, `line`: kotlin.UInt?, `level`: LogLevel, `target`: kotlin.String, `name`: kotlin.String, `bridgeTraceId`: kotlin.String?) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_new( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_span_new( + FfiConverterString.lower(`file`),FfiConverterOptionalUInt.lower(`line`),FfiConverterTypeLogLevel.lower(`level`),FfiConverterString.lower(`target`),FfiConverterString.lower(`name`),FfiConverterOptionalString.lower(`bridgeTraceId`),_status) } ) - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -25654,7 +25103,7 @@ open class Span: Disposable, AutoCloseable, SpanInterface 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() + cleanable?.clean() } } } @@ -25664,7 +25113,7 @@ open class Span: Disposable, AutoCloseable, SpanInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -25676,41 +25125,50 @@ open class Span: Disposable, AutoCloseable, SpanInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_span(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_span(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_span(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_span(handle, status) } } override fun `enter`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_enter( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_span_enter( + it, + _status) } } @@ -25718,10 +25176,11 @@ open class Span: Disposable, AutoCloseable, SpanInterface override fun `exit`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_exit( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_span_exit( + it, + _status) } } @@ -25729,10 +25188,11 @@ open class Span: Disposable, AutoCloseable, SpanInterface override fun `isNone`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_span_is_none( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_span_is_none( + it, + _status) } } ) @@ -25742,11 +25202,15 @@ open class Span: Disposable, AutoCloseable, SpanInterface + + + companion object { fun `current`(): Span { return FfiConverterTypeSpan.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_current( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_span_current( + _status) } ) @@ -25762,7 +25226,8 @@ open class Span: Disposable, AutoCloseable, SpanInterface */ fun `newBridgeSpan`(`target`: kotlin.String, `parentTraceId`: kotlin.String?): Span { return FfiConverterTypeSpan.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( + FfiConverterString.lower(`target`),FfiConverterOptionalString.lower(`parentTraceId`),_status) } ) @@ -25774,50 +25239,43 @@ open class Span: Disposable, AutoCloseable, SpanInterface } + /** * @suppress */ -public object FfiConverterTypeSpan: FfiConverter { - - override fun lower(value: Span): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSpan: FfiConverter { + override fun lower(value: Span): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Span { - return Span(value) + override fun lift(value: Long): Span { + return Span(UniffiWithHandle, value) } 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())) + return lift(buf.getLong()) } override fun allocationSize(value: Span) = 8UL 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -25842,13 +25300,13 @@ public object FfiConverterTypeSpan: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -25967,20 +25425,26 @@ public interface SqliteStoreBuilderInterface { open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } /** * Construct a [`SqliteStoreBuilder`] and set the paths that the client @@ -25991,15 +25455,16 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte * same path for both stores on a single session. */ constructor(`dataPath`: kotlin.String, `cachePath`: kotlin.String) : - this( + this(UniffiWithHandle, uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new( + FfiConverterString.lower(`dataPath`),FfiConverterString.lower(`cachePath`),_status) } ) - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -26010,7 +25475,7 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte 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() + cleanable?.clean() } } } @@ -26020,7 +25485,7 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -26032,32 +25497,40 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder(handle, status) } } @@ -26076,10 +25549,11 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte * See [`SqliteStoreConfig::cache_size`] to learn more. */override fun `cacheSize`(`cacheSize`: kotlin.UInt?): SqliteStoreBuilder { return FfiConverterTypeSqliteStoreBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( - it, FfiConverterOptionalUInt.lower(`cacheSize`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( + it, + FfiConverterOptionalUInt.lower(`cacheSize`),_status) } } ) @@ -26096,10 +25570,11 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte * See [`SqliteStoreConfig::journal_size_limit`] to learn more. */override fun `journalSizeLimit`(`limit`: kotlin.UInt?): SqliteStoreBuilder { return FfiConverterTypeSqliteStoreBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( - it, FfiConverterOptionalUInt.lower(`limit`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( + it, + FfiConverterOptionalUInt.lower(`limit`),_status) } } ) @@ -26111,10 +25586,11 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte * Set the passphrase for the stores. */override fun `passphrase`(`passphrase`: kotlin.String?): SqliteStoreBuilder { return FfiConverterTypeSqliteStoreBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( - it, FfiConverterOptionalString.lower(`passphrase`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( + it, + FfiConverterOptionalString.lower(`passphrase`),_status) } } ) @@ -26133,10 +25609,11 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte * See [`SqliteStoreConfig::pool_max_size`] to learn more. */override fun `poolMaxSize`(`poolMaxSize`: kotlin.UInt?): SqliteStoreBuilder { return FfiConverterTypeSqliteStoreBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( - it, FfiConverterOptionalUInt.lower(`poolMaxSize`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( + it, + FfiConverterOptionalUInt.lower(`poolMaxSize`),_status) } } ) @@ -26153,10 +25630,11 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte * [`SqliteStoreConfig::with_low_memory_config`]. */override fun `systemIsMemoryConstrained`(): SqliteStoreBuilder { return FfiConverterTypeSqliteStoreBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( + it, + _status) } } ) @@ -26166,55 +25644,54 @@ open class SqliteStoreBuilder: Disposable, AutoCloseable, SqliteStoreBuilderInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSqliteStoreBuilder: FfiConverter { - - override fun lower(value: SqliteStoreBuilder): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSqliteStoreBuilder: FfiConverter { + override fun lower(value: SqliteStoreBuilder): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SqliteStoreBuilder { - return SqliteStoreBuilder(value) + override fun lift(value: Long): SqliteStoreBuilder { + return SqliteStoreBuilder(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): SqliteStoreBuilder { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: SqliteStoreBuilder) = 8UL override fun write(value: SqliteStoreBuilder, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -26239,13 +25716,13 @@ public object FfiConverterTypeSqliteStoreBuilder: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -26374,32 +25857,40 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_ssohandler(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_ssohandler(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_ssohandler(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_ssohandler(handle, status) } } @@ -26411,15 +25902,15 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `finish`(`callbackUrl`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( + uniffiHandle, 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -26435,10 +25926,11 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface * the callback URL. */override fun `url`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( + it, + _status) } } ) @@ -26448,55 +25940,54 @@ open class SsoHandler: Disposable, AutoCloseable, SsoHandlerInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSsoHandler: FfiConverter { - - override fun lower(value: SsoHandler): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSsoHandler: FfiConverter { + override fun lower(value: SsoHandler): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SsoHandler { - return SsoHandler(value) + override fun lift(value: Long): SsoHandler { + return SsoHandler(UniffiWithHandle, value) } 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())) + return lift(buf.getLong()) } override fun allocationSize(value: SsoHandler) = 8UL 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -26521,13 +26012,13 @@ public object FfiConverterTypeSsoHandler: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -26605,24 +26096,30 @@ public interface SyncServiceInterface { open class SyncService: Disposable, AutoCloseable, SyncServiceInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -26633,7 +26130,7 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface 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() + cleanable?.clean() } } } @@ -26643,7 +26140,7 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -26655,32 +26152,40 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_syncservice(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_syncservice(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_syncservice(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_syncservice(handle, status) } } @@ -26695,15 +26200,15 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -26714,10 +26219,11 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface override fun `roomListService`(): RoomListService { return FfiConverterTypeRoomListService.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( + it, + _status) } } ) @@ -26728,15 +26234,15 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservice_start( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -26747,10 +26253,11 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface override fun `state`(`listener`: SyncServiceStateObserver): TaskHandle { return FfiConverterTypeTaskHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservice_state( - it, FfiConverterTypeSyncServiceStateObserver.lower(`listener`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservice_state( + it, + FfiConverterTypeSyncServiceStateObserver.lower(`listener`),_status) } } ) @@ -26761,15 +26268,15 @@ 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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -26781,55 +26288,54 @@ open class SyncService: Disposable, AutoCloseable, SyncServiceInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSyncService: FfiConverter { - - override fun lower(value: SyncService): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSyncService: FfiConverter { + override fun lower(value: SyncService): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SyncService { - return SyncService(value) + override fun lift(value: Long): SyncService { + return SyncService(UniffiWithHandle, value) } 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())) + return lift(buf.getLong()) } override fun allocationSize(value: SyncService) = 8UL 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -26854,13 +26360,13 @@ public object FfiConverterTypeSyncService: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -26932,24 +26438,30 @@ public interface SyncServiceBuilderInterface { open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -26960,7 +26472,7 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte 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() + cleanable?.clean() } } } @@ -26970,7 +26482,7 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -26982,32 +26494,40 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(handle, status) } } @@ -27016,15 +26536,15 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte @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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeSyncService.lift(it) }, // Error FFI converter @@ -27034,10 +26554,11 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte override fun `withCrossProcessLock`(): SyncServiceBuilder { return FfiConverterTypeSyncServiceBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( + it, + _status) } } ) @@ -27049,10 +26570,11 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte * Enable the "offline" mode for the [`SyncService`]. */override fun `withOfflineMode`(): SyncServiceBuilder { return FfiConverterTypeSyncServiceBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( + it, + _status) } } ) @@ -27061,10 +26583,11 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte override fun `withSharePos`(`enable`: kotlin.Boolean): SyncServiceBuilder { return FfiConverterTypeSyncServiceBuilder.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( - it, FfiConverterBoolean.lower(`enable`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( + it, + FfiConverterBoolean.lower(`enable`),_status) } } ) @@ -27074,55 +26597,54 @@ open class SyncServiceBuilder: Disposable, AutoCloseable, SyncServiceBuilderInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeSyncServiceBuilder: FfiConverter { - - override fun lower(value: SyncServiceBuilder): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeSyncServiceBuilder: FfiConverter { + override fun lower(value: SyncServiceBuilder): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): SyncServiceBuilder { - return SyncServiceBuilder(value) + override fun lift(value: Long): SyncServiceBuilder { + return SyncServiceBuilder(UniffiWithHandle, value) } 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())) + return lift(buf.getLong()) } override fun allocationSize(value: SyncServiceBuilder) = 8UL 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -27147,13 +26669,13 @@ public object FfiConverterTypeSyncServiceBuilder: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -27283,41 +26811,50 @@ open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_taskhandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_taskhandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_taskhandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_taskhandle(handle, status) } } override fun `cancel`() = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( + it, + _status) } } @@ -27328,10 +26865,11 @@ open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface * Check whether the handle is finished. */override fun `isFinished`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( + it, + _status) } } ) @@ -27341,55 +26879,54 @@ open class TaskHandle: Disposable, AutoCloseable, TaskHandleInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeTaskHandle: FfiConverter { - - override fun lower(value: TaskHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTaskHandle: FfiConverter { + override fun lower(value: TaskHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TaskHandle { - return TaskHandle(value) + override fun lift(value: Long): TaskHandle { + return TaskHandle(UniffiWithHandle, 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())) + return lift(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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -27414,13 +26951,13 @@ public object FfiConverterTypeTaskHandle: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -27485,24 +27022,30 @@ public interface ThreadSummaryInterface { open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -27513,7 +27056,7 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface 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() + cleanable?.clean() } } } @@ -27523,7 +27066,7 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -27535,41 +27078,50 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_threadsummary(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_threadsummary(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_threadsummary(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_threadsummary(handle, status) } } override fun `latestEvent`(): EmbeddedEventDetails { return FfiConverterTypeEmbeddedEventDetails.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + it, + _status) } } ) @@ -27578,10 +27130,11 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface override fun `numReplies`(): kotlin.ULong { return FfiConverterULong.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + it, + _status) } } ) @@ -27591,55 +27144,54 @@ open class ThreadSummary: Disposable, AutoCloseable, ThreadSummaryInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeThreadSummary: FfiConverter { - - override fun lower(value: ThreadSummary): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeThreadSummary: FfiConverter { + override fun lower(value: ThreadSummary): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): ThreadSummary { - return ThreadSummary(value) + override fun lift(value: Long): ThreadSummary { + return ThreadSummary(UniffiWithHandle, 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())) + return lift(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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -27664,13 +27216,13 @@ public object FfiConverterTypeThreadSummary: FfiConverter): SendGalleryJoinHandle - 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?, `repliedToEventId`: kotlin.String?) @@ -27895,30 +27445,38 @@ public interface TimelineInterface { */ suspend fun `unpinEvent`(`eventId`: kotlin.String): kotlin.Boolean + fun `sendGallery`(`params`: GalleryUploadParameters, `itemInfos`: List): SendGalleryJoinHandle + companion object } open class Timeline: Disposable, AutoCloseable, TimelineInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -27929,7 +27487,7 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface 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() + cleanable?.clean() } } } @@ -27939,7 +27497,7 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -27951,32 +27509,40 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_timeline(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_timeline(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_timeline(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_timeline(handle, status) } } @@ -27984,15 +27550,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `addListener`(`listener`: TimelineListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( + uniffiHandle, FfiConverterTypeTimelineListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -28002,10 +27568,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface override fun `createMessageContent`(`msgType`: MessageType): RoomMessageEventContentWithoutRelation? { return FfiConverterOptionalTypeRoomMessageEventContentWithoutRelation.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content( - it, FfiConverterTypeMessageType.lower(`msgType`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content( + it, + FfiConverterTypeMessageType.lower(`msgType`),_status) } } ) @@ -28017,15 +27584,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `createPoll`(`question`: kotlin.String, `answers`: List, `maxSelections`: kotlin.UByte, `pollKind`: PollKind) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll( + uniffiHandle, FfiConverterString.lower(`question`),FfiConverterSequenceString.lower(`answers`),FfiConverterUByte.lower(`maxSelections`),FfiConverterTypePollKind.lower(`pollKind`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28049,15 +27616,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `edit`(`eventOrTransactionId`: EventOrTransactionId, `newContent`: EditedContent) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_edit( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_edit( + uniffiHandle, FfiConverterTypeEventOrTransactionId.lower(`eventOrTransactionId`),FfiConverterTypeEditedContent.lower(`newContent`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28071,15 +27638,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `endPoll`(`pollStartEventId`: kotlin.String, `text`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll( + uniffiHandle, FfiConverterString.lower(`pollStartEventId`),FfiConverterString.lower(`text`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28093,15 +27660,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `fetchDetailsForEvent`(`eventId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28114,15 +27681,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `fetchMembers`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28146,15 +27713,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `getEventTimelineItemByEventId`(`eventId`: kotlin.String) : EventTimelineItem { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterTypeEventTimelineItem.lift(it) }, // Error FFI converter @@ -28169,15 +27736,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `latestEventId`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -28196,15 +27763,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `loadReplyDetails`(`eventIdStr`: kotlin.String) : InReplyToDetails { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details( + uniffiHandle, FfiConverterString.lower(`eventIdStr`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeInReplyToDetails.lift(it) }, // Error FFI converter @@ -28234,15 +27801,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `markAsRead`(`receiptType`: ReceiptType) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read( + uniffiHandle, FfiConverterTypeReceiptType.lower(`receiptType`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28261,15 +27828,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `paginateBackwards`(`numEvents`: kotlin.UShort) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards( + uniffiHandle, FfiConverterUShort.lower(`numEvents`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -28287,15 +27854,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `paginateForwards`(`numEvents`: kotlin.UShort) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards( + uniffiHandle, FfiConverterUShort.lower(`numEvents`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -28315,15 +27882,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `pinEvent`(`eventId`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -28347,15 +27914,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `redactEvent`(`eventOrTransactionId`: EventOrTransactionId, `reason`: kotlin.String?) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event( + uniffiHandle, FfiConverterTypeEventOrTransactionId.lower(`eventOrTransactionId`),FfiConverterOptionalString.lower(`reason`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28366,10 +27933,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface override fun `retryDecryption`(`sessionIds`: List) = - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( - it, FfiConverterSequenceString.lower(`sessionIds`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( + it, + FfiConverterSequenceString.lower(`sessionIds`),_status) } } @@ -28387,15 +27955,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `send`(`msg`: RoomMessageEventContentWithoutRelation) : SendHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send( + uniffiHandle, FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(`msg`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeSendHandle.lift(it) }, // Error FFI converter @@ -28406,10 +27974,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Throws(RoomException::class)override fun `sendAudio`(`params`: UploadParameters, `audioInfo`: AudioInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( + it, + FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),_status) } } ) @@ -28419,23 +27988,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @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`),_status) -} - } - ) - } - - - - @Throws(RoomException::class)override fun `sendGallery`(`params`: GalleryUploadParameters, `itemInfos`: List): SendGalleryJoinHandle { - return FfiConverterTypeSendGalleryJoinHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( - it, FfiConverterTypeGalleryUploadParameters.lower(`params`),FfiConverterSequenceTypeGalleryItemInfo.lower(`itemInfos`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( + it, + FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeFileInfo.lower(`fileInfo`),_status) } } ) @@ -28445,10 +28002,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Throws(RoomException::class)override fun `sendImage`(`params`: UploadParameters, `thumbnailSource`: UploadSource?, `imageInfo`: ImageInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalTypeUploadSource.lower(`thumbnailSource`),FfiConverterTypeImageInfo.lower(`imageInfo`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( + it, + FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalTypeUploadSource.lower(`thumbnailSource`),FfiConverterTypeImageInfo.lower(`imageInfo`),_status) } } ) @@ -28460,15 +28018,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") 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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( + uniffiHandle, 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) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28482,15 +28040,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sendPollResponse`(`pollStartEventId`: kotlin.String, `answers`: List) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response( + uniffiHandle, FfiConverterString.lower(`pollStartEventId`),FfiConverterSequenceString.lower(`answers`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28504,15 +28062,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `sendReadReceipt`(`receiptType`: ReceiptType, `eventId`: kotlin.String) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt( + uniffiHandle, FfiConverterTypeReceiptType.lower(`receiptType`),FfiConverterString.lower(`eventId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28533,15 +28091,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") 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, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( + uniffiHandle, FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(`msg`),FfiConverterString.lower(`eventId`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -28553,10 +28111,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Throws(RoomException::class)override fun `sendVideo`(`params`: UploadParameters, `thumbnailSource`: UploadSource?, `videoInfo`: VideoInfo): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalTypeUploadSource.lower(`thumbnailSource`),FfiConverterTypeVideoInfo.lower(`videoInfo`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( + it, + FfiConverterTypeUploadParameters.lower(`params`),FfiConverterOptionalTypeUploadSource.lower(`thumbnailSource`),FfiConverterTypeVideoInfo.lower(`videoInfo`),_status) } } ) @@ -28566,10 +28125,11 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Throws(RoomException::class)override fun `sendVoiceMessage`(`params`: UploadParameters, `audioInfo`: AudioInfo, `waveform`: List): SendAttachmentJoinHandle { return FfiConverterTypeSendAttachmentJoinHandle.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(RoomException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( - it, FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),FfiConverterSequenceFloat.lower(`waveform`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( + it, + FfiConverterTypeUploadParameters.lower(`params`),FfiConverterTypeAudioInfo.lower(`audioInfo`),FfiConverterSequenceFloat.lower(`waveform`),_status) } } ) @@ -28581,15 +28141,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `subscribeToBackPaginationStatus`(`listener`: PaginationStatusListener) : TaskHandle { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( + uniffiHandle, FfiConverterTypePaginationStatusListener.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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_u64(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_u64(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_u64(future) }, // lift function { FfiConverterTypeTaskHandle.lift(it) }, // Error FFI converter @@ -28617,15 +28177,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `toggleReaction`(`itemId`: EventOrTransactionId, `key`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction( + uniffiHandle, FfiConverterTypeEventOrTransactionId.lower(`itemId`),FfiConverterString.lower(`key`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -28645,15 +28205,15 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `unpinEvent`(`eventId`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( + uniffiHandle, FfiConverterString.lower(`eventId`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -28662,57 +28222,70 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface } + @Throws(RoomException::class)override fun `sendGallery`(`params`: GalleryUploadParameters, `itemInfos`: List): SendGalleryJoinHandle { + return FfiConverterTypeSendGalleryJoinHandle.lift( + callWithHandle { + uniffiRustCallWithError(RoomException) { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( + it, + FfiConverterTypeGalleryUploadParameters.lower(`params`),FfiConverterSequenceTypeGalleryItemInfo.lower(`itemInfos`),_status) +} + } + ) + } + + + + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeTimeline: FfiConverter { - - override fun lower(value: Timeline): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTimeline: FfiConverter { + override fun lower(value: Timeline): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): Timeline { - return Timeline(value) + override fun lift(value: Long): Timeline { + return Timeline(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): Timeline { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: Timeline) = 8UL override fun write(value: Timeline, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -28737,13 +28310,13 @@ public object FfiConverterTypeTimeline: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -28818,24 +28391,30 @@ public interface TimelineEventInterface { open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -28846,7 +28425,7 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface 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() + cleanable?.clean() } } } @@ -28856,7 +28435,7 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -28868,41 +28447,50 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_timelineevent(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_timelineevent(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_timelineevent(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_timelineevent(handle, status) } } override fun `eventId`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + it, + _status) } } ) @@ -28912,10 +28500,11 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface @Throws(ClientException::class)override fun `eventType`(): TimelineEventType { return FfiConverterTypeTimelineEventType.lift( - callWithPointer { + callWithHandle { uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( + it, + _status) } } ) @@ -28924,10 +28513,11 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface override fun `senderId`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( + it, + _status) } } ) @@ -28940,10 +28530,11 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface * thread. */override fun `threadRootEventId`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( + it, + _status) } } ) @@ -28952,10 +28543,11 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface override fun `timestamp`(): Timestamp { return FfiConverterTypeTimestamp.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( + it, + _status) } } ) @@ -28965,55 +28557,54 @@ open class TimelineEvent: Disposable, AutoCloseable, TimelineEventInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeTimelineEvent: FfiConverter { - - override fun lower(value: TimelineEvent): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTimelineEvent: FfiConverter { + override fun lower(value: TimelineEvent): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TimelineEvent { - return TimelineEvent(value) + override fun lift(value: Long): TimelineEvent { + return TimelineEvent(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TimelineEvent { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TimelineEvent) = 8UL override fun write(value: TimelineEvent, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29038,13 +28629,13 @@ public object FfiConverterTypeTimelineEvent: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -29155,43 +28752,55 @@ open class TimelineEventTypeFilter: Disposable, AutoCloseable, TimelineEventType 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(handle, status) } } + + + companion object { fun `exclude`(`eventTypes`: List): TimelineEventTypeFilter { return FfiConverterTypeTimelineEventTypeFilter.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude( + FfiConverterSequenceTypeFilterTimelineEventType.lower(`eventTypes`),_status) } ) @@ -29201,7 +28810,8 @@ open class TimelineEventTypeFilter: Disposable, AutoCloseable, TimelineEventType fun `include`(`eventTypes`: List): TimelineEventTypeFilter { return FfiConverterTypeTimelineEventTypeFilter.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( + UniffiLib.uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( + FfiConverterSequenceTypeFilterTimelineEventType.lower(`eventTypes`),_status) } ) @@ -29213,50 +28823,43 @@ open class TimelineEventTypeFilter: Disposable, AutoCloseable, TimelineEventType } + /** * @suppress */ -public object FfiConverterTypeTimelineEventTypeFilter: FfiConverter { - - override fun lower(value: TimelineEventTypeFilter): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTimelineEventTypeFilter: FfiConverter { + override fun lower(value: TimelineEventTypeFilter): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TimelineEventTypeFilter { - return TimelineEventTypeFilter(value) + override fun lift(value: Long): TimelineEventTypeFilter { + return TimelineEventTypeFilter(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TimelineEventTypeFilter { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TimelineEventTypeFilter) = 8UL override fun write(value: TimelineEventTypeFilter, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29281,13 +28884,13 @@ public object FfiConverterTypeTimelineEventTypeFilter: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -29409,41 +29018,50 @@ open class TimelineItem: Disposable, AutoCloseable, TimelineItemInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_timelineitem(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_timelineitem(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_timelineitem(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_timelineitem(handle, status) } } override fun `asEvent`(): EventTimelineItem? { return FfiConverterOptionalTypeEventTimelineItem.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( + it, + _status) } } ) @@ -29452,10 +29070,11 @@ open class TimelineItem: Disposable, AutoCloseable, TimelineItemInterface override fun `asVirtual`(): VirtualTimelineItem? { return FfiConverterOptionalTypeVirtualTimelineItem.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( + it, + _status) } } ) @@ -29464,10 +29083,11 @@ open class TimelineItem: Disposable, AutoCloseable, TimelineItemInterface override fun `fmtDebug`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( + it, + _status) } } ) @@ -29479,10 +29099,11 @@ open class TimelineItem: Disposable, AutoCloseable, TimelineItemInterface * An opaque unique identifier for this timeline item. */override fun `uniqueId`(): TimelineUniqueId { return FfiConverterTypeTimelineUniqueId.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( + it, + _status) } } ) @@ -29492,55 +29113,54 @@ open class TimelineItem: Disposable, AutoCloseable, TimelineItemInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeTimelineItem: FfiConverter { - - override fun lower(value: TimelineItem): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeTimelineItem: FfiConverter { + override fun lower(value: TimelineItem): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): TimelineItem { - return TimelineItem(value) + override fun lift(value: Long): TimelineItem { + return TimelineItem(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): TimelineItem { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: TimelineItem) = 8UL override fun write(value: TimelineItem, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29565,13 +29185,13 @@ public object FfiConverterTypeTimelineItem: FfiConverter // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -29638,24 +29258,30 @@ public interface UnreadNotificationsCountInterface { open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificationsCountInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -29666,7 +29292,7 @@ open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificati 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() + cleanable?.clean() } } } @@ -29676,7 +29302,7 @@ open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificati this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -29688,41 +29314,50 @@ open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificati 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount(handle, status) } } override fun `hasNotifications`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( + it, + _status) } } ) @@ -29731,10 +29366,11 @@ open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificati override fun `highlightCount`(): kotlin.UInt { return FfiConverterUInt.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( + it, + _status) } } ) @@ -29743,10 +29379,11 @@ open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificati override fun `notificationCount`(): kotlin.UInt { return FfiConverterUInt.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + it, + _status) } } ) @@ -29756,55 +29393,54 @@ open class UnreadNotificationsCount: Disposable, AutoCloseable, UnreadNotificati + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeUnreadNotificationsCount: FfiConverter { - - override fun lower(value: UnreadNotificationsCount): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeUnreadNotificationsCount: FfiConverter { + override fun lower(value: UnreadNotificationsCount): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): UnreadNotificationsCount { - return UnreadNotificationsCount(value) + override fun lift(value: Long): UnreadNotificationsCount { + return UnreadNotificationsCount(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): UnreadNotificationsCount { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: UnreadNotificationsCount) = 8UL override fun write(value: UnreadNotificationsCount, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -29829,13 +29465,13 @@ public object FfiConverterTypeUnreadNotificationsCount: FfiConverter callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -30010,32 +29652,40 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_useridentity(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_useridentity(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_useridentity(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_useridentity(handle, status) } } @@ -30044,10 +29694,11 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface * Was this identity previously verified, and is no longer? */override fun `hasVerificationViolation`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( + it, + _status) } } ) @@ -30062,10 +29713,11 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface * be verified as well for the identity to be considered to be verified. */override fun `isVerified`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( + it, + _status) } } ) @@ -30082,10 +29734,11 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface * Returns None if the master key does not actually contain any keys. */override fun `masterKey`(): kotlin.String? { return FfiConverterOptionalString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( + it, + _status) } } ) @@ -30113,15 +29766,15 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `pin`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -30138,10 +29791,11 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface * [`UserIdentity::withdraw_verification()`]. */override fun `wasPreviouslyVerified`(): kotlin.Boolean { return FfiConverterBoolean.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( - it, _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( + it, + _status) } } ) @@ -30160,15 +29814,15 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `withdrawVerification`() { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( + uniffiHandle, ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -30180,55 +29834,54 @@ open class UserIdentity: Disposable, AutoCloseable, UserIdentityInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeUserIdentity: FfiConverter { - - override fun lower(value: UserIdentity): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeUserIdentity: FfiConverter { + override fun lower(value: UserIdentity): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): UserIdentity { - return UserIdentity(value) + override fun lift(value: Long): UserIdentity { + return UserIdentity(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): UserIdentity { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: UserIdentity) = 8UL override fun write(value: UserIdentity, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -30253,13 +29906,13 @@ public object FfiConverterTypeUserIdentity: FfiConverter // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -30330,24 +29983,30 @@ public interface WidgetDriverInterface { open class WidgetDriver: Disposable, AutoCloseable, WidgetDriverInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -30358,7 +30017,7 @@ open class WidgetDriver: Disposable, AutoCloseable, WidgetDriverInterface 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() + cleanable?.clean() } } } @@ -30368,7 +30027,7 @@ open class WidgetDriver: Disposable, AutoCloseable, WidgetDriverInterface this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -30380,32 +30039,40 @@ open class WidgetDriver: Disposable, AutoCloseable, WidgetDriverInterface 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_widgetdriver(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_widgetdriver(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(handle, status) } } @@ -30413,15 +30080,15 @@ open class WidgetDriver: Disposable, AutoCloseable, WidgetDriverInterface @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `run`(`room`: Room, `capabilitiesProvider`: WidgetCapabilitiesProvider) { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( + uniffiHandle, FfiConverterTypeRoom.lower(`room`),FfiConverterTypeWidgetCapabilitiesProvider.lower(`capabilitiesProvider`), ) }, - { 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.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) }, // lift function { Unit }, @@ -30433,55 +30100,54 @@ open class WidgetDriver: Disposable, AutoCloseable, WidgetDriverInterface + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeWidgetDriver: FfiConverter { - - override fun lower(value: WidgetDriver): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeWidgetDriver: FfiConverter { + override fun lower(value: WidgetDriver): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): WidgetDriver { - return WidgetDriver(value) + override fun lift(value: Long): WidgetDriver { + return WidgetDriver(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): WidgetDriver { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: WidgetDriver) = 8UL override fun write(value: WidgetDriver, 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))) + buf.putLong(lower(value)) } } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -30506,13 +30172,13 @@ public object FfiConverterTypeWidgetDriver: FfiConverter // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -30596,24 +30262,30 @@ public interface WidgetDriverHandleInterface { open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -30624,7 +30296,7 @@ open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInte 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() + cleanable?.clean() } } } @@ -30634,7 +30306,7 @@ open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInte this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -30646,32 +30318,40 @@ open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInte 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle(handle, status) } } @@ -30686,15 +30366,15 @@ open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `recv`() : kotlin.String? { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( + uniffiHandle, ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, // lift function { FfiConverterOptionalString.lift(it) }, // Error FFI converter @@ -30710,15 +30390,15 @@ open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInte @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") override suspend fun `send`(`msg`: kotlin.String) : kotlin.Boolean { return uniffiRustCallAsync( - callWithPointer { thisPtr -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send( - thisPtr, + callWithHandle { uniffiHandle -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send( + uniffiHandle, FfiConverterString.lower(`msg`), ) }, - { 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) }, + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_i8(future) }, // lift function { FfiConverterBoolean.lift(it) }, // Error FFI converter @@ -30729,36 +30409,38 @@ open class WidgetDriverHandle: Disposable, AutoCloseable, WidgetDriverHandleInte + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeWidgetDriverHandle: FfiConverter { - - override fun lower(value: WidgetDriverHandle): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeWidgetDriverHandle: FfiConverter { + override fun lower(value: WidgetDriverHandle): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): WidgetDriverHandle { - return WidgetDriverHandle(value) + override fun lift(value: Long): WidgetDriverHandle { + return WidgetDriverHandle(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): WidgetDriverHandle { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: WidgetDriverHandle) = 8UL override fun write(value: WidgetDriverHandle, 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))) + buf.putLong(lower(value)) } } @@ -30777,12 +30459,18 @@ data class AbstractProgress ( /** * How many units were already transferred. */ - var `current`: kotlin.ULong, + var `current`: kotlin.ULong + , /** * How many units there are in total. */ var `total`: kotlin.ULong -) { + +){ + + + + companion object } @@ -30812,10 +30500,17 @@ public object FfiConverterTypeAbstractProgress: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -31077,19 +30804,23 @@ data class ConditionalPushRule ( * Actions to determine if and how a notification is delivered for events * matching this rule. */ - var `actions`: List, + var `actions`: List + , /** * Whether this is a default rule, or has been set explicitly. */ - var `default`: kotlin.Boolean, + var `default`: kotlin.Boolean + , /** * Whether the push rule is enabled or not. */ - var `enabled`: kotlin.Boolean, + var `enabled`: kotlin.Boolean + , /** * The ID of this rule. */ - var `ruleId`: kotlin.String, + var `ruleId`: kotlin.String + , /** * The conditions that must hold true for an event in order for a rule to * be applied to an event. @@ -31097,7 +30828,12 @@ data class ConditionalPushRule ( * A rule with no conditions always matches. */ var `conditions`: List -) { + +){ + + + + companion object } @@ -31136,19 +30872,35 @@ public object FfiConverterTypeConditionalPushRule: FfiConverterRustBuffer? = null, - var `avatar`: kotlin.String? = null, - var `powerLevelContentOverride`: PowerLevels? = null, - var `joinRuleOverride`: JoinRule? = null, - var `historyVisibilityOverride`: RoomHistoryVisibility? = null, - var `canonicalAlias`: kotlin.String? = null -) { + var `name`: kotlin.String? + , + var `topic`: kotlin.String? = null + , + var `isEncrypted`: kotlin.Boolean + , + var `isDirect`: kotlin.Boolean = false + , + var `visibility`: RoomVisibility + , + var `preset`: RoomPreset + , + var `invite`: List? = null + , + var `avatar`: kotlin.String? = null + , + var `powerLevelContentOverride`: PowerLevels? = null + , + var `joinRuleOverride`: JoinRule? = null + , + var `historyVisibilityOverride`: RoomHistoryVisibility? = null + , + var `canonicalAlias`: kotlin.String? = null + +){ + + + + companion object } @@ -31208,9 +30960,15 @@ public object FfiConverterTypeCreateRoomParameters: FfiConverterRustBuffer, - var `origin`: EventItemOrigin?, - var `canBeRepliedTo`: kotlin.Boolean, + var `isRemote`: kotlin.Boolean + , + var `eventOrTransactionId`: EventOrTransactionId + , + var `sender`: kotlin.String + , + var `senderProfile`: ProfileDetails + , + var `isOwn`: kotlin.Boolean + , + var `isEditable`: kotlin.Boolean + , + var `content`: TimelineItemContent + , + var `timestamp`: Timestamp + , + var `localSendState`: EventSendState? + , + var `localCreatedAt`: kotlin.ULong? + , + var `readReceipts`: Map + , + var `origin`: EventItemOrigin? + , + var `canBeRepliedTo`: kotlin.Boolean + , var `lazyProvider`: LazyTimelineItemProvider -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -31344,10 +31120,17 @@ public object FfiConverterTypeEventTimelineItem: FfiConverterRustBuffer -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -31571,20 +31384,28 @@ data class GalleryUploadParameters ( /** * Optional non-formatted caption, for clients that support it. */ - var `caption`: kotlin.String?, + var `caption`: kotlin.String? + , /** * Optional HTML-formatted caption, for clients that support it. */ - var `formattedCaption`: FormattedBody?, + var `formattedCaption`: FormattedBody? + , /** * Optional intentional mentions to be sent with the gallery. */ - var `mentions`: Mentions?, + var `mentions`: Mentions? + , /** * Optional Event ID to reply to. */ var `inReplyTo`: kotlin.String? -) { + +){ + + + + companion object } @@ -31620,10 +31441,17 @@ public object FfiConverterTypeGalleryUploadParameters: FfiConverterRustBuffer { data class ImageInfo ( - var `height`: kotlin.ULong?, - var `width`: kotlin.ULong?, - var `mimetype`: kotlin.String?, - var `size`: kotlin.ULong?, - var `thumbnailInfo`: ThumbnailInfo?, - var `thumbnailSource`: MediaSource?, - var `blurhash`: kotlin.String?, + var `height`: kotlin.ULong? + , + var `width`: kotlin.ULong? + , + var `mimetype`: kotlin.String? + , + var `size`: kotlin.ULong? + , + var `thumbnailInfo`: ThumbnailInfo? + , + var `thumbnailSource`: MediaSource? + , + var `blurhash`: kotlin.String? + , var `isAnimated`: kotlin.Boolean? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -31801,12 +31647,21 @@ data class ImageMessageContent ( /** * The computed filename, for use in a client. */ - var `filename`: kotlin.String, - var `caption`: kotlin.String?, - var `formattedCaption`: FormattedBody?, - var `source`: MediaSource, + var `filename`: kotlin.String + , + var `caption`: kotlin.String? + , + var `formattedCaption`: FormattedBody? + , + var `source`: MediaSource + , var `info`: ImageInfo? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -31863,41 +31718,54 @@ data class KnockRequest ( /** * The event id of the event that contains the `knock` membership change. */ - var `eventId`: kotlin.String, + var `eventId`: kotlin.String + , /** * The user id of the user who's requesting to join the room. */ - var `userId`: kotlin.String, + var `userId`: kotlin.String + , /** * The room id of the room whose access was requested. */ - var `roomId`: kotlin.String, + var `roomId`: kotlin.String + , /** * The optional display name of the user who's requesting to join the room. */ - var `displayName`: kotlin.String?, + var `displayName`: kotlin.String? + , /** * The optional avatar url of the user who's requesting to join the room. */ - var `avatarUrl`: kotlin.String?, + var `avatarUrl`: kotlin.String? + , /** * An optional reason why the user wants join the room. */ - var `reason`: kotlin.String?, + var `reason`: kotlin.String? + , /** * The timestamp when this request was created. */ - var `timestamp`: kotlin.ULong?, + var `timestamp`: kotlin.ULong? + , /** * Whether the knock request has been marked as `seen` so it can be * filtered by the client. */ - var `isSeen`: kotlin.Boolean, + var `isSeen`: kotlin.Boolean + , /** * A set of actions to perform for this knock request. */ var `actions`: KnockRequestActions -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -31967,13 +31835,19 @@ data class LastLocation ( /** * The most recent location content of the user. */ - var `location`: LocationContent, + var `location`: LocationContent + , /** * A timestamp in milliseconds since Unix Epoch on that day in local * time. */ var `ts`: kotlin.ULong -) { + +){ + + + + companion object } @@ -32010,13 +31884,19 @@ data class LeaveSpaceRoom ( /** * The underlying [`SpaceRoom`] */ - var `spaceRoom`: SpaceRoom, + var `spaceRoom`: SpaceRoom + , /** * Whether the user is the last admin in the room. This helps clients * better inform the user about the consequences of leaving the room. */ var `isLastAdmin`: kotlin.Boolean -) { + +){ + + + + companion object } @@ -32052,16 +31932,23 @@ data class LiveLocationShare ( /** * The user's last known location. */ - var `lastLocation`: LastLocation, + var `lastLocation`: LastLocation + , /** * The live status of the live location share. */ - var `isLive`: kotlin.Boolean, + var `isLive`: kotlin.Boolean + , /** * The user ID of the person sharing their live location. */ var `userId`: kotlin.String -) { + +){ + + + + companion object } @@ -32094,12 +31981,21 @@ public object FfiConverterTypeLiveLocationShare: FfiConverterRustBuffer -) { + +){ + + + + companion object } @@ -32183,12 +32085,18 @@ 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? -) { + +){ + + + + companion object } @@ -32227,13 +32135,19 @@ data class MediaUploadProgress ( * thumbnail share the same index. Will always be 0 for non-gallery * media uploads. */ - var `index`: kotlin.ULong, + var `index`: kotlin.ULong + , /** * The current combined upload progress for both the file and, * if it exists, its thumbnail. */ var `progress`: AbstractProgress -) { + +){ + + + + companion object } @@ -32263,9 +32177,15 @@ public object FfiConverterTypeMediaUploadProgress: FfiConverterRustBuffer, + var `userIds`: List + , var `room`: kotlin.Boolean -) { + +){ + + + + companion object } @@ -32295,11 +32215,19 @@ public object FfiConverterTypeMentions: FfiConverterRustBuffer { data class MessageContent ( - var `msgType`: MessageType, - var `body`: kotlin.String, - var `isEdited`: kotlin.Boolean, + var `msgType`: MessageType + , + var `body`: kotlin.String + , + var `isEdited`: kotlin.Boolean + , var `mentions`: Mentions? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -32351,21 +32279,30 @@ public object FfiConverterTypeMessageContent: FfiConverterRustBuffer, + var `kind`: MsgLikeKind + , + var `reactions`: List + , /** * The event this message is replying to, if any. */ - var `inReplyTo`: InReplyToDetails?, + var `inReplyTo`: InReplyToDetails? + , /** * Event ID of the thread root, if this is a message in a thread. */ - var `threadRoot`: kotlin.String?, + var `threadRoot`: kotlin.String? + , /** * Details about the thread this message is the root of. */ var `threadSummary`: ThreadSummary? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -32416,9 +32353,15 @@ public object FfiConverterTypeMsgLikeContent: FfiConverterRustBuffer? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -32525,9 +32479,15 @@ public object FfiConverterTypeNotificationItem: FfiConverterRustBuffer -) { + +){ + + + + companion object } @@ -32558,7 +32518,12 @@ public object FfiConverterTypeNotificationItemsRequest: FfiConverterRustBuffer -) { + +){ + + + + companion object } @@ -32766,7 +32762,12 @@ data class OidcCrossSigningResetInfo ( * The URL where the user can approve the reset of the cross-signing keys. */ var `approvalUrl`: kotlin.String -) { + +){ + + + + companion object } @@ -32801,22 +32802,30 @@ data class PassPhrase ( * * Must be `m.pbkdf2`. */ - var `algorithm`: KeyDerivationAlgorithm, + var `algorithm`: KeyDerivationAlgorithm + , /** * The salt used in PBKDF2. */ - var `salt`: kotlin.String, + var `salt`: kotlin.String + , /** * The number of iterations to use in PBKDF2. */ - var `iterations`: kotlin.ULong, + var `iterations`: kotlin.ULong + , /** * The number of bits to generate for the key. * * Defaults to 256 */ var `bits`: kotlin.ULong -) { + +){ + + + + companion object } @@ -32859,24 +32868,33 @@ data class PatternedPushRule ( * Actions to determine if and how a notification is delivered for events * matching this rule. */ - var `actions`: List, + var `actions`: List + , /** * Whether this is a default rule, or has been set explicitly. */ - var `default`: kotlin.Boolean, + var `default`: kotlin.Boolean + , /** * Whether the push rule is enabled or not. */ - var `enabled`: kotlin.Boolean, + var `enabled`: kotlin.Boolean + , /** * The ID of this rule. */ - var `ruleId`: kotlin.String, + var `ruleId`: kotlin.String + , /** * The glob-style pattern to match against. */ var `pattern`: kotlin.String -) { + +){ + + + + companion object } @@ -32915,9 +32933,15 @@ public object FfiConverterTypePatternedPushRule: FfiConverterRustBuffer { data class PollData ( - var `question`: kotlin.String, - var `answers`: List, - var `maxSelections`: kotlin.UByte, + var `question`: kotlin.String + , + var `answers`: List + , + var `maxSelections`: kotlin.UByte + , var `pollKind`: PollKind -) { + +){ + + + + companion object } @@ -32987,17 +33019,31 @@ public object FfiConverterTypePollData: FfiConverterRustBuffer { data class PowerLevels ( - var `usersDefault`: kotlin.Int?, - var `eventsDefault`: kotlin.Int?, - var `stateDefault`: kotlin.Int?, - var `ban`: kotlin.Int?, - var `kick`: kotlin.Int?, - var `redact`: kotlin.Int?, - var `invite`: kotlin.Int?, - var `notifications`: NotificationPowerLevels?, - var `users`: Map, + var `usersDefault`: kotlin.Int? + , + var `eventsDefault`: kotlin.Int? + , + var `stateDefault`: kotlin.Int? + , + var `ban`: kotlin.Int? + , + var `kick`: kotlin.Int? + , + var `redact`: kotlin.Int? + , + var `invite`: kotlin.Int? + , + var `notifications`: NotificationPowerLevels? + , + var `users`: Map + , var `events`: Map -) { + +){ + + + + companion object } @@ -33065,7 +33111,12 @@ data class PredecessorRoom ( * The ID of the replacement room. */ var `roomId`: kotlin.String -) { + +){ + + + + companion object } @@ -33092,9 +33143,15 @@ public object FfiConverterTypePredecessorRoom: FfiConverterRustBuffer -) { + +){ + + + + companion object } @@ -33156,9 +33219,15 @@ public object FfiConverterTypeReaction: FfiConverterRustBuffer { data class ReactionSenderData ( - var `senderId`: kotlin.String, + var `senderId`: kotlin.String + , var `timestamp`: Timestamp -) { + +){ + + + + companion object } @@ -33189,7 +33258,12 @@ public object FfiConverterTypeReactionSenderData: FfiConverterRustBuffer -) { + +){ + + + + companion object } @@ -33353,15 +33447,27 @@ public object FfiConverterTypeResolvedRoomAlias: FfiConverterRustBuffer { data class RoomInfo ( - var `id`: kotlin.String, - var `encryptionState`: EncryptionState, - var `creators`: List?, + var `id`: kotlin.String + , + var `encryptionState`: EncryptionState + , + var `creators`: List? + , /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. */ - var `displayName`: kotlin.String?, + var `displayName`: kotlin.String? + , /** * Room name as defined by the room state event only. */ - var `rawName`: kotlin.String?, - var `topic`: kotlin.String?, - var `avatarUrl`: kotlin.String?, - var `isDirect`: kotlin.Boolean, + var `rawName`: kotlin.String? + , + var `topic`: kotlin.String? + , + var `avatarUrl`: kotlin.String? + , + var `isDirect`: kotlin.Boolean + , /** * Whether the room is public or not, based on the join rules. * * Can be `None` if the join rules state event is not available for this * room. */ - var `isPublic`: kotlin.Boolean?, - var `isSpace`: kotlin.Boolean, + var `isPublic`: kotlin.Boolean? + , + var `isSpace`: kotlin.Boolean + , /** * If present, it means the room has been archived/upgraded. */ - var `successorRoom`: SuccessorRoom?, - var `isFavourite`: kotlin.Boolean, - var `canonicalAlias`: kotlin.String?, - var `alternativeAliases`: List, - var `membership`: Membership, + var `successorRoom`: SuccessorRoom? + , + var `isFavourite`: kotlin.Boolean + , + var `canonicalAlias`: kotlin.String? + , + var `alternativeAliases`: List + , + var `membership`: Membership + , /** * Member who invited the current user to a room that's in the invited * state. @@ -33495,63 +33623,87 @@ data class RoomInfo ( * Can be missing if the room membership invite event is missing from the * store. */ - var `inviter`: RoomMember?, - var `heroes`: List, - var `activeMembersCount`: kotlin.ULong, - var `invitedMembersCount`: kotlin.ULong, - var `joinedMembersCount`: kotlin.ULong, - var `highlightCount`: kotlin.ULong, - var `notificationCount`: kotlin.ULong, - var `cachedUserDefinedNotificationMode`: RoomNotificationMode?, - var `hasRoomCall`: kotlin.Boolean, - var `activeRoomCallParticipants`: List, + var `inviter`: RoomMember? + , + var `heroes`: List + , + var `activeMembersCount`: kotlin.ULong + , + var `invitedMembersCount`: kotlin.ULong + , + var `joinedMembersCount`: kotlin.ULong + , + var `highlightCount`: kotlin.ULong + , + var `notificationCount`: kotlin.ULong + , + var `cachedUserDefinedNotificationMode`: RoomNotificationMode? + , + var `hasRoomCall`: kotlin.Boolean + , + var `activeRoomCallParticipants`: List + , /** * Whether this room has been explicitly marked as unread */ - var `isMarkedUnread`: kotlin.Boolean, + var `isMarkedUnread`: kotlin.Boolean + , /** * "Interesting" messages received in that room, independently of the * notification settings. */ - var `numUnreadMessages`: kotlin.ULong, + var `numUnreadMessages`: kotlin.ULong + , /** * Events that will notify the user, according to their * notification settings. */ - var `numUnreadNotifications`: kotlin.ULong, + var `numUnreadNotifications`: kotlin.ULong + , /** * Events causing mentions/highlights for the user, according to their * notification settings. */ - var `numUnreadMentions`: kotlin.ULong, + var `numUnreadMentions`: kotlin.ULong + , /** * The currently pinned event ids. */ - var `pinnedEventIds`: List, + var `pinnedEventIds`: List + , /** * The join rule for this room, if known. */ - var `joinRule`: JoinRule?, + var `joinRule`: JoinRule? + , /** * The history visibility for this room, if known. */ - var `historyVisibility`: RoomHistoryVisibility, + var `historyVisibility`: RoomHistoryVisibility + , /** * This room's current power levels. * * 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?, + var `roomVersion`: kotlin.String? + , /** * Whether creators are privileged over every other user (have infinite * power level). */ var `privilegedCreatorsRole`: kotlin.Boolean -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -33722,9 +33874,15 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer { data class RoomListLoadingStateResult ( - var `state`: RoomListLoadingState, + var `state`: RoomListLoadingState + , var `stateStream`: TaskHandle -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -33763,16 +33921,29 @@ public object FfiConverterTypeRoomListLoadingStateResult: FfiConverterRustBuffer data class RoomMember ( - var `userId`: kotlin.String, - var `displayName`: kotlin.String?, - var `avatarUrl`: kotlin.String?, - var `membership`: MembershipState, - var `isNameAmbiguous`: kotlin.Boolean, - var `powerLevel`: PowerLevel, - var `isIgnored`: kotlin.Boolean, - var `suggestedRoleForPowerLevel`: RoomMemberRole, + var `userId`: kotlin.String + , + var `displayName`: kotlin.String? + , + var `avatarUrl`: kotlin.String? + , + var `membership`: MembershipState + , + var `isNameAmbiguous`: kotlin.Boolean + , + var `powerLevel`: PowerLevel + , + var `isIgnored`: kotlin.Boolean + , + var `suggestedRoleForPowerLevel`: RoomMemberRole + , var `membershipChangeReason`: kotlin.String? -) { + +){ + + + + companion object } @@ -33830,13 +34001,19 @@ data class RoomMemberWithSenderInfo ( /** * The room member. */ - var `roomMember`: RoomMember, + var `roomMember`: RoomMember + , /** * The info of the sender of the event `room_member` is based on, if * available. */ var `senderInfo`: RoomMember? -) { + +){ + + + + companion object } @@ -33872,12 +34049,18 @@ data class RoomNotificationSettings ( /** * The room notification mode */ - var `mode`: RoomNotificationMode, + var `mode`: RoomNotificationMode + , /** * Whether the mode is the default one */ var `isDefault`: kotlin.Boolean -) { + +){ + + + + companion object } @@ -33914,48 +34097,63 @@ data class RoomPowerLevelsValues ( /** * The level required to ban a user. */ - var `ban`: kotlin.Long, + var `ban`: kotlin.Long + , /** * The level required to invite a user. */ - var `invite`: kotlin.Long, + var `invite`: kotlin.Long + , /** * The level required to kick a user. */ - var `kick`: kotlin.Long, + var `kick`: kotlin.Long + , /** * The level required to redact an event. */ - var `redact`: kotlin.Long, + var `redact`: kotlin.Long + , /** * The default level required to send message events. */ - var `eventsDefault`: kotlin.Long, + var `eventsDefault`: kotlin.Long + , /** * The default level required to send state events. */ - var `stateDefault`: kotlin.Long, + var `stateDefault`: kotlin.Long + , /** * The default power level for every user in the room. */ - var `usersDefault`: kotlin.Long, + var `usersDefault`: kotlin.Long + , /** * The level required to change the room's name. */ - var `roomName`: kotlin.Long, + var `roomName`: kotlin.Long + , /** * The level required to change the room's avatar. */ - var `roomAvatar`: kotlin.Long, + var `roomAvatar`: kotlin.Long + , /** * The level required to change the room's topic. */ - var `roomTopic`: kotlin.Long, + var `roomTopic`: kotlin.Long + , /** * The level required to change the space's children. */ var `spaceChild`: kotlin.Long -) { + +){ + + + + companion object } @@ -34018,56 +34216,73 @@ data class RoomPreviewInfo ( /** * The room id for this room. */ - var `roomId`: kotlin.String, + var `roomId`: kotlin.String + , /** * The canonical alias for the room. */ - var `canonicalAlias`: kotlin.String?, + var `canonicalAlias`: kotlin.String? + , /** * The room's name, if set. */ - var `name`: kotlin.String?, + var `name`: kotlin.String? + , /** * The room's topic, if set. */ - var `topic`: kotlin.String?, + var `topic`: kotlin.String? + , /** * The MXC URI to the room's avatar, if set. */ - var `avatarUrl`: kotlin.String?, + var `avatarUrl`: kotlin.String? + , /** * The number of joined members. */ - var `numJoinedMembers`: kotlin.ULong, + var `numJoinedMembers`: kotlin.ULong + , /** * The number of active members, if known (joined + invited). */ - var `numActiveMembers`: kotlin.ULong?, + var `numActiveMembers`: kotlin.ULong? + , /** * The room type (space, custom) or nothing, if it's a regular room. */ - var `roomType`: RoomType, + var `roomType`: RoomType + , /** * Is the history world-readable for this room? */ - var `isHistoryWorldReadable`: kotlin.Boolean?, + var `isHistoryWorldReadable`: kotlin.Boolean? + , /** * The membership state for the current user, if known. */ - var `membership`: Membership?, + var `membership`: Membership? + , /** * The join rule for this room (private, public, knock, etc.). */ - var `joinRule`: JoinRule?, + var `joinRule`: JoinRule? + , /** * Whether the room is direct or not, if known. */ - var `isDirect`: kotlin.Boolean?, + var `isDirect`: kotlin.Boolean? + , /** * Room heroes. */ var `heroes`: List? -) { + +){ + + + + companion object } @@ -34137,29 +34352,38 @@ data class Ruleset ( * These rules configure behavior for (unencrypted) messages that match * certain patterns. */ - var `content`: List, + var `content`: List + , /** * These user-configured rules are given the highest priority. * * This field is named `override_` instead of `override` because the latter * is a reserved keyword in Rust. */ - var `override`: List, + var `override`: List + , /** * These rules change the behavior of all messages for a given room. */ - var `room`: List, + var `room`: List + , /** * These rules configure notification behavior for messages from a specific * Matrix user ID. */ - var `sender`: List, + var `sender`: List + , /** * These rules are identical to override rules, but have a lower priority * than `content`, `room` and `sender` rules. */ var `underride`: List -) { + +){ + + + + companion object } @@ -34198,9 +34422,15 @@ public object FfiConverterTypeRuleset: FfiConverterRustBuffer { data class SearchUsersResults ( - var `results`: List, + var `results`: List + , var `limited`: kotlin.Boolean -) { + +){ + + + + companion object } @@ -34236,12 +34466,18 @@ data class SecretStorageV1AesHmacSha2Properties ( /** * The 16-byte initialization vector, encoded as base64. */ - var `iv`: kotlin.String?, + var `iv`: kotlin.String? + , /** * The MAC, encoded as base64. */ var `mac`: kotlin.String? -) { + +){ + + + + companion object } @@ -34274,35 +34510,46 @@ data class Session ( /** * The access token used for this session. */ - var `accessToken`: kotlin.String, + var `accessToken`: kotlin.String + , /** * The token used for [refreshing the access token], if any. * * [refreshing the access token]: https://spec.matrix.org/v1.3/client-server-api/#refreshing-access-tokens */ - var `refreshToken`: kotlin.String?, + var `refreshToken`: kotlin.String? + , /** * The user the access token was issued for. */ - var `userId`: kotlin.String, + var `userId`: kotlin.String + , /** * The ID of the client device. */ - var `deviceId`: kotlin.String, + var `deviceId`: kotlin.String + , /** * The URL for the homeserver used for this session. */ - var `homeserverUrl`: kotlin.String, + var `homeserverUrl`: kotlin.String + , /** * Additional data for this session if OpenID Connect was used for * authentication. */ - var `oidcData`: kotlin.String?, + var `oidcData`: kotlin.String? + , /** * The sliding sync version used for this session. */ var `slidingSyncVersion`: SlidingSyncVersion -) { + +){ + + + + companion object } @@ -34350,15 +34597,24 @@ public object FfiConverterTypeSession: FfiConverterRustBuffer { * Details about the incoming verification request */ data class SessionVerificationRequestDetails ( - var `senderProfile`: UserProfile, - var `flowId`: kotlin.String, - var `deviceId`: kotlin.String, - var `deviceDisplayName`: kotlin.String?, + var `senderProfile`: UserProfile + , + var `flowId`: kotlin.String + , + var `deviceId`: kotlin.String + , + var `deviceDisplayName`: kotlin.String? + , /** * First time this device was seen in milliseconds since epoch. */ var `firstSeenTimestamp`: Timestamp -) { + +){ + + + + companion object } @@ -34406,22 +34662,30 @@ data class SimplePushRule ( * Actions to determine if and how a notification is delivered for events * matching this rule. */ - var `actions`: List, + var `actions`: List + , /** * Whether this is a default rule, or has been set explicitly. */ - var `default`: kotlin.Boolean, + var `default`: kotlin.Boolean + , /** * Whether the push rule is enabled or not. */ - var `enabled`: kotlin.Boolean, + var `enabled`: kotlin.Boolean + , /** * The ID of this rule. * * This is generally the Matrix ID of the entity that it applies to. */ var `ruleId`: kotlin.String -) { + +){ + + + + companion object } @@ -34464,72 +34728,92 @@ data class SpaceRoom ( /** * The ID of the room. */ - var `roomId`: kotlin.String, + var `roomId`: kotlin.String + , /** * The canonical alias of the room, if any. */ - var `canonicalAlias`: kotlin.String?, + var `canonicalAlias`: kotlin.String? + , /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. */ - var `displayName`: kotlin.String, + var `displayName`: kotlin.String + , /** * Room name as defined by the room state event only. */ - var `rawName`: kotlin.String?, + var `rawName`: kotlin.String? + , /** * The topic of the room, if any. */ - var `topic`: kotlin.String?, + var `topic`: kotlin.String? + , /** * The URL for the room's avatar, if one is set. */ - var `avatarUrl`: kotlin.String?, + var `avatarUrl`: kotlin.String? + , /** * The type of room from `m.room.create`, if any. */ - var `roomType`: RoomType, + var `roomType`: RoomType + , /** * The number of members joined to the room. */ - var `numJoinedMembers`: kotlin.ULong, + var `numJoinedMembers`: kotlin.ULong + , /** * The join rule of the room. */ - var `joinRule`: JoinRule?, + var `joinRule`: JoinRule? + , /** * Whether the room may be viewed by users without joining. */ - var `worldReadable`: kotlin.Boolean?, + var `worldReadable`: kotlin.Boolean? + , /** * Whether guest users may join the room and participate in it. */ - var `guestCanJoin`: kotlin.Boolean, + var `guestCanJoin`: kotlin.Boolean + , /** * Whether this room is a direct room. * * Only set if the room is known to the client otherwise we * assume DMs shouldn't be exposed publicly in spaces. */ - var `isDirect`: kotlin.Boolean?, + var `isDirect`: kotlin.Boolean? + , /** * The number of children room this has, if a space. */ - var `childrenCount`: kotlin.ULong, + var `childrenCount`: kotlin.ULong + , /** * Whether this room is joined, left etc. */ - var `state`: Membership?, + var `state`: Membership? + , /** * A list of room members considered to be heroes. */ - var `heroes`: List?, + var `heroes`: List? + , /** * The via parameters of the room. */ var `via`: List -) { + +){ + + + + companion object } @@ -34608,20 +34892,28 @@ data class StoreSizes ( /** * The size of the CryptoStore. */ - var `cryptoStore`: kotlin.ULong?, + var `cryptoStore`: kotlin.ULong? + , /** * The size of the StateStore. */ - var `stateStore`: kotlin.ULong?, + var `stateStore`: kotlin.ULong? + , /** * The size of the EventCacheStore. */ - var `eventCacheStore`: kotlin.ULong?, + var `eventCacheStore`: kotlin.ULong? + , /** * The size of the MediaStore. */ var `mediaStore`: kotlin.ULong? -) { + +){ + + + + companion object } @@ -34669,12 +34961,18 @@ data class SuccessorRoom ( /** * The ID of the replacement room. */ - var `roomId`: kotlin.String, + var `roomId`: kotlin.String + , /** * The message explaining why the room has been tombstoned. */ var `reason`: kotlin.String? -) { + +){ + + + + companion object } @@ -34711,7 +35009,12 @@ data class TagInfo ( * Value to use for lexicographically ordering rooms with this tag. */ var `order`: kotlin.Double? -) { + +){ + + + + companion object } @@ -34738,9 +35041,15 @@ public object FfiConverterTypeTagInfo: FfiConverterRustBuffer { data class TextMessageContent ( - var `body`: kotlin.String, + var `body`: kotlin.String + , var `formatted`: FormattedBody? -) { + +){ + + + + companion object } @@ -34778,7 +35087,12 @@ data class ThreadSubscription ( * mention) or if it was manually requested by the user. */ var `automatic`: kotlin.Boolean -) { + +){ + + + + companion object } @@ -34805,11 +35119,19 @@ public object FfiConverterTypeThreadSubscription: FfiConverterRustBuffer, + var `traceLogPacks`: List + , /** * Additional targets that the FFI client would like to use. * @@ -34977,16 +35316,23 @@ data class TracingConfiguration ( * [`crate::tracing::Span`]. These targets will use the global log level by * default. */ - var `extraTargets`: List, + var `extraTargets`: List + , /** * Whether to log to stdout, or in the logcat on Android. */ - var `writeToStdoutOrSystem`: kotlin.Boolean, + var `writeToStdoutOrSystem`: kotlin.Boolean + , /** * If set, configures rotated log files where to write additional logs. */ var `writeToFiles`: TracingFileConfiguration? -) { + +){ + + + + companion object } @@ -35031,15 +35377,18 @@ data class TracingFileConfiguration ( /** * Base location for all the log files. */ - var `path`: kotlin.String, + var `path`: kotlin.String + , /** * Prefix for the log files' names. */ - var `filePrefix`: kotlin.String, + var `filePrefix`: kotlin.String + , /** * Optional suffix for the log file's names. */ - var `fileSuffix`: kotlin.String?, + var `fileSuffix`: kotlin.String? + , /** * Maximum number of rotated files. * @@ -35047,7 +35396,12 @@ data class TracingFileConfiguration ( * unlimited. */ var `maxFiles`: kotlin.ULong? -) { + +){ + + + + companion object } @@ -35083,9 +35437,15 @@ public object FfiConverterTypeTracingFileConfiguration: FfiConverterRustBuffer -) { + +){ + + + + companion object } @@ -35261,24 +35638,33 @@ data class UploadParameters ( /** * Source from which to upload data */ - var `source`: UploadSource, + var `source`: UploadSource + , /** * Optional non-formatted caption, for clients that support it. */ - var `caption`: kotlin.String?, + var `caption`: kotlin.String? + , /** * Optional HTML-formatted caption, for clients that support it. */ - var `formattedCaption`: FormattedBody?, + var `formattedCaption`: FormattedBody? + , /** * Optional intentional mentions to be sent with the media. */ - var `mentions`: Mentions?, + var `mentions`: Mentions? + , /** * Optional Event ID to reply to. */ var `inReplyTo`: kotlin.String? -) { + +){ + + + + companion object } @@ -35323,12 +35709,18 @@ data class UserPowerLevelUpdate ( /** * The user ID of the user to update. */ - var `userId`: kotlin.String, + var `userId`: kotlin.String + , /** * The power level to assign to the user. */ var `powerLevel`: kotlin.Long -) { + +){ + + + + companion object } @@ -35358,10 +35750,17 @@ public object FfiConverterTypeUserPowerLevelUpdate: FfiConverterRustBuffer { */ data class UserTagName ( var `name`: kotlin.String -) { + +){ + + + + companion object } @@ -35425,15 +35829,27 @@ public object FfiConverterTypeUserTagName: FfiConverterRustBuffer { data class VideoInfo ( - var `duration`: java.time.Duration?, - var `height`: kotlin.ULong?, - var `width`: kotlin.ULong?, - var `mimetype`: kotlin.String?, - var `size`: kotlin.ULong?, - var `thumbnailInfo`: ThumbnailInfo?, - var `thumbnailSource`: MediaSource?, + var `duration`: java.time.Duration? + , + var `height`: kotlin.ULong? + , + var `width`: kotlin.ULong? + , + var `mimetype`: kotlin.String? + , + var `size`: kotlin.ULong? + , + var `thumbnailInfo`: ThumbnailInfo? + , + var `thumbnailSource`: MediaSource? + , var `blurhash`: kotlin.String? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -35499,12 +35915,21 @@ data class VideoMessageContent ( /** * The computed filename, for use in a client. */ - var `filename`: kotlin.String, - var `caption`: kotlin.String?, - var `formattedCaption`: FormattedBody?, - var `source`: MediaSource, + var `filename`: kotlin.String + , + var `caption`: kotlin.String? + , + var `formattedCaption`: FormattedBody? + , + var `source`: MediaSource + , var `info`: VideoInfo? -) : Disposable { + +): Disposable{ + + + + @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here override fun destroy() { @@ -35561,11 +35986,13 @@ data class WidgetCapabilities ( /** * Types of the messages that a widget wants to be able to fetch. */ - var `read`: List, + var `read`: List + , /** * Types of the messages that a widget wants to be able to send. */ - var `send`: List, + var `send`: List + , /** * If this capability is requested by the widget, it can not operate * separately from the Matrix client. @@ -35573,16 +36000,23 @@ data class WidgetCapabilities ( * This means clients should not offer to open the widget in a separate * browser/tab/webview that is not connected to the postmessage widget-api. */ - var `requiresClient`: kotlin.Boolean, + var `requiresClient`: kotlin.Boolean + , /** * This allows the widget to ask the client to update delayed events. */ - var `updateDelayedEvent`: kotlin.Boolean, + var `updateDelayedEvent`: kotlin.Boolean + , /** * This allows the widget to send events with a delay. */ var `sendDelayedEvent`: kotlin.Boolean -) { + +){ + + + + companion object } @@ -35621,9 +36055,15 @@ public object FfiConverterTypeWidgetCapabilities: FfiConverterRustBuffer>) : AccountDataEvent() { + val `map`: Map>) : AccountDataEvent() + + { + + companion object } @@ -35743,7 +36194,11 @@ sealed class AccountDataEvent { /** * The base URL for the identity server for client-server connections. */ - val `baseUrl`: kotlin.String?) : AccountDataEvent() { + val `baseUrl`: kotlin.String?) : AccountDataEvent() + + { + + companion object } @@ -35755,7 +36210,11 @@ sealed class AccountDataEvent { * The map of users to ignore. This is a mapping of user ID to empty * object. */ - val `ignoredUsers`: Map) : AccountDataEvent() { + val `ignoredUsers`: Map) : AccountDataEvent() + + { + + companion object } @@ -35766,7 +36225,11 @@ sealed class AccountDataEvent { /** * The global ruleset. */ - val `global`: Ruleset) : AccountDataEvent() { + val `global`: org.matrix.rustcomponents.sdk.Ruleset) : AccountDataEvent() + + { + + companion object } @@ -35777,7 +36240,11 @@ sealed class AccountDataEvent { /** * The ID of the default key. */ - val `keyId`: kotlin.String) : AccountDataEvent() { + val `keyId`: kotlin.String) : AccountDataEvent() + + { + + companion object } @@ -35798,16 +36265,25 @@ sealed class AccountDataEvent { * * Currently, only `m.secret_storage.v1.aes-hmac-sha2` is supported. */ - val `algorithm`: SecretStorageEncryptionAlgorithm, + val `algorithm`: org.matrix.rustcomponents.sdk.SecretStorageEncryptionAlgorithm, /** * The passphrase from which to generate the key. */ - val `passphrase`: PassPhrase?) : AccountDataEvent() { + val `passphrase`: org.matrix.rustcomponents.sdk.PassPhrase?) : AccountDataEvent() + + { + + companion object } + + + + + companion object } @@ -35972,12 +36448,21 @@ sealed class AccountDataEventType { * m.secret_storage.key.* */ data class SecretStorageKey( - val `keyId`: kotlin.String) : AccountDataEventType() { + val `keyId`: kotlin.String) : AccountDataEventType() + + { + + companion object } + + + + + companion object } @@ -36083,12 +36568,20 @@ sealed class AccountManagementAction { data class SessionView( - val `deviceId`: kotlin.String) : AccountManagementAction() { + val `deviceId`: kotlin.String) : AccountManagementAction() + + { + + companion object } data class SessionEnd( - val `deviceId`: kotlin.String) : AccountManagementAction() { + val `deviceId`: kotlin.String) : AccountManagementAction() + + { + + companion object } @@ -36100,6 +36593,11 @@ sealed class AccountManagementAction { + + + + + companion object } @@ -36215,12 +36713,21 @@ sealed class Action { * Sets an entry in the 'tweaks' dictionary sent to the push gateway. */ data class SetTweak( - val `value`: Tweak) : Action() { + val `value`: org.matrix.rustcomponents.sdk.Tweak) : Action() + + { + + companion object } + + + + + companion object } @@ -36283,7 +36790,11 @@ sealed class AllowRule { * in. */ data class RoomMembership( - val `roomId`: kotlin.String) : AllowRule() { + val `roomId`: kotlin.String) : AllowRule() + + { + + companion object } @@ -36292,12 +36803,21 @@ sealed class AllowRule { * as a `String`. */ data class Custom( - val `json`: kotlin.String) : AllowRule() { + val `json`: kotlin.String) : AllowRule() + + { + + companion object } + + + + + companion object } @@ -36359,6 +36879,10 @@ enum class AssetType { SENDER, PIN; + + + + companion object } @@ -36390,12 +36914,21 @@ sealed class AuthData { * Password-based authentication (`m.login.password`). */ data class Password( - val `passwordDetails`: AuthDataPasswordDetails) : AuthData() { + val `passwordDetails`: org.matrix.rustcomponents.sdk.AuthDataPasswordDetails) : AuthData() + + { + + companion object } + + + + + companion object } @@ -36447,6 +36980,10 @@ enum class BackupState { ENABLED, DOWNLOADING, DISABLING; + + + + companion object } @@ -36479,7 +37016,11 @@ sealed class BackupUploadState { data class Uploading( val `backedUpCount`: kotlin.UInt, - val `totalCount`: kotlin.UInt) : BackupUploadState() { + val `totalCount`: kotlin.UInt) : BackupUploadState() + + { + + companion object } @@ -36491,6 +37032,11 @@ sealed class BackupUploadState { + + + + + companion object } @@ -36574,7 +37120,11 @@ sealed class BatchNotificationResult: Disposable { * We have more detailed information about the notification. */ data class Ok( - val `status`: NotificationStatus) : BatchNotificationResult() { + val `status`: org.matrix.rustcomponents.sdk.NotificationStatus) : BatchNotificationResult() + + { + + companion object } @@ -36585,7 +37135,11 @@ sealed class BatchNotificationResult: Disposable { /** * The error message observed while handling a specific notification. */ - val `message`: kotlin.String) : BatchNotificationResult() { + val `message`: kotlin.String) : BatchNotificationResult() + + { + + companion object } @@ -36611,6 +37165,11 @@ sealed class BatchNotificationResult: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -36794,6 +37353,9 @@ sealed class ClientException: kotlin.Exception() { } + + + companion object ErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): ClientException = FfiConverterTypeClientError.lift(error_buf) } @@ -36888,6 +37450,10 @@ enum class ComparisonOperator { * Less or equal */ LE; + + + + companion object } @@ -36931,7 +37497,11 @@ sealed class ComposerDraftType { /** * The ID of the event being replied to. */ - val `eventId`: kotlin.String) : ComposerDraftType() { + val `eventId`: kotlin.String) : ComposerDraftType() + + { + + companion object } @@ -36942,12 +37512,21 @@ sealed class ComposerDraftType { /** * The ID of the event being edited. */ - val `eventId`: kotlin.String) : ComposerDraftType() { + val `eventId`: kotlin.String) : ComposerDraftType() + + { + + companion object } + + + + + companion object } @@ -37024,12 +37603,21 @@ sealed class CrossSigningResetAuthType { data class Oidc( - val `info`: OidcCrossSigningResetInfo) : CrossSigningResetAuthType() { + val `info`: org.matrix.rustcomponents.sdk.OidcCrossSigningResetInfo) : CrossSigningResetAuthType() + + { + + companion object } + + + + + companion object } @@ -37091,6 +37679,10 @@ enum class DateDividerMode { DAILY, MONTHLY; + + + + companion object } @@ -37122,28 +37714,44 @@ public object FfiConverterTypeDateDividerMode: FfiConverterRustBuffer{ sealed class EventOrTransactionId { data class EventId( - val `eventId`: kotlin.String) : EventOrTransactionId() { + val `eventId`: kotlin.String) : EventOrTransactionId() + + { + + companion object } data class TransactionId( - val `transactionId`: kotlin.String) : EventOrTransactionId() { + val `transactionId`: kotlin.String) : EventOrTransactionId() + + { + + companion object } + + + + + companion object } @@ -38970,7 +39685,11 @@ sealed class EventSendState { * The progress of the sending operation, if the event involves a media * upload. */ - val `progress`: MediaUploadProgress?) : EventSendState() { + val `progress`: org.matrix.rustcomponents.sdk.MediaUploadProgress?) : EventSendState() + + { + + companion object } @@ -38982,7 +39701,7 @@ sealed class EventSendState { /** * The error reason, with information for the user. */ - val `error`: QueueWedgeError, + val `error`: org.matrix.rustcomponents.sdk.QueueWedgeError, /** * Whether the error is considered recoverable or not. * @@ -38990,7 +39709,11 @@ sealed class EventSendState { * while an unrecoverable error will be parked, until the user * decides to cancel sending it. */ - val `isRecoverable`: kotlin.Boolean) : EventSendState() { + val `isRecoverable`: kotlin.Boolean) : EventSendState() + + { + + companion object } @@ -38998,12 +39721,21 @@ sealed class EventSendState { * The local event has been sent successfully to the server. */ data class Sent( - val `eventId`: kotlin.String) : EventSendState() { + val `eventId`: kotlin.String) : EventSendState() + + { + + companion object } + + + + + companion object } @@ -39081,17 +39813,30 @@ public object FfiConverterTypeEventSendState : FfiConverterRustBuffer { override fun lift(error_buf: RustBuffer.ByValue): FocusEventException = FfiConverterTypeFocusEventError.lift(error_buf) } @@ -39257,36 +40005,52 @@ public object FfiConverterTypeFocusEventError : FfiConverterRustBuffer { override fun lift(error_buf: RustBuffer.ByValue): HumanQrLoginException = FfiConverterTypeHumanQrLoginError.lift(error_buf) } @@ -40650,6 +41503,10 @@ enum class InviteAvatars { * Never show avatars in invite requests. */ OFF; + + + + companion object } @@ -40713,7 +41570,11 @@ sealed class JoinRule { * conditions described in a set of [`AllowRule`]s. */ data class Restricted( - val `rules`: List) : JoinRule() { + val `rules`: List) : JoinRule() + + { + + companion object } @@ -40723,7 +41584,11 @@ sealed class JoinRule { * an invite to the room. */ data class KnockRestricted( - val `rules`: List) : JoinRule() { + val `rules`: List) : JoinRule() + + { + + companion object } @@ -40734,12 +41599,21 @@ sealed class JoinRule { /** * The string representation for this custom rule. */ - val `repr`: kotlin.String) : JoinRule() { + val `repr`: kotlin.String) : JoinRule() + + { + + companion object } + + + + + companion object } @@ -40867,7 +41741,11 @@ sealed class JsonValue { * Represents a boolean. */ data class Bool( - val `value`: kotlin.Boolean) : JsonValue() { + val `value`: kotlin.Boolean) : JsonValue() + + { + + companion object } @@ -40875,7 +41753,11 @@ sealed class JsonValue { * Represents an integer. */ data class Integer( - val `value`: kotlin.Long) : JsonValue() { + val `value`: kotlin.Long) : JsonValue() + + { + + companion object } @@ -40883,12 +41765,21 @@ sealed class JsonValue { * Represents a string. */ data class String( - val `value`: kotlin.String) : JsonValue() { + val `value`: kotlin.String) : JsonValue() + + { + + companion object } + + + + + companion object } @@ -40981,6 +41872,10 @@ enum class KeyDerivationAlgorithm { * PBKDF2 */ PBKFD2; + + + + companion object } @@ -41015,20 +41910,28 @@ sealed class LatestEventValue: Disposable { data class Remote( - val `timestamp`: Timestamp, + val `timestamp`: org.matrix.rustcomponents.sdk.Timestamp, val `sender`: kotlin.String, val `isOwn`: kotlin.Boolean, - val `profile`: ProfileDetails, - val `content`: TimelineItemContent) : LatestEventValue() { + val `profile`: org.matrix.rustcomponents.sdk.ProfileDetails, + val `content`: org.matrix.rustcomponents.sdk.TimelineItemContent) : LatestEventValue() + + { + + companion object } data class Local( - val `timestamp`: Timestamp, + val `timestamp`: org.matrix.rustcomponents.sdk.Timestamp, val `sender`: kotlin.String, - val `profile`: ProfileDetails, - val `content`: TimelineItemContent, - val `isSending`: kotlin.Boolean) : LatestEventValue() { + val `profile`: org.matrix.rustcomponents.sdk.ProfileDetails, + val `content`: org.matrix.rustcomponents.sdk.TimelineItemContent, + val `isSending`: kotlin.Boolean) : LatestEventValue() + + { + + companion object } @@ -41064,6 +41967,11 @@ sealed class LatestEventValue: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -41163,6 +42071,10 @@ enum class LogLevel { INFO, DEBUG, TRACE; + + + + companion object } @@ -41194,34 +42106,59 @@ public object FfiConverterTypeLogLevel: FfiConverterRustBuffer { sealed class MatrixId { data class Room( - val `id`: kotlin.String) : MatrixId() { + val `id`: kotlin.String) : MatrixId() + + { + + companion object } data class RoomAlias( - val `alias`: kotlin.String) : MatrixId() { + val `alias`: kotlin.String) : MatrixId() + + { + + companion object } data class User( - val `id`: kotlin.String) : MatrixId() { + val `id`: kotlin.String) : MatrixId() + + { + + companion object } data class EventOnRoomId( val `roomId`: kotlin.String, - val `eventId`: kotlin.String) : MatrixId() { + val `eventId`: kotlin.String) : MatrixId() + + { + + companion object } data class EventOnRoomAlias( val `alias`: kotlin.String, - val `eventId`: kotlin.String) : MatrixId() { + val `eventId`: kotlin.String) : MatrixId() + + { + + companion object } + + + + + companion object } @@ -41396,6 +42333,10 @@ enum class MediaPreviews { * Never show media previews in the timeline. */ OFF; + + + + companion object } @@ -41429,6 +42370,10 @@ enum class Membership { LEFT, KNOCKED, BANNED; + + + + companion object } @@ -41474,6 +42419,10 @@ enum class MembershipChange { KNOCK_RETRACTED, KNOCK_DENIED, NOT_IMPLEMENTED; + + + + companion object } @@ -41535,12 +42484,21 @@ sealed class MembershipState { * A custom membership state value. */ data class Custom( - val `value`: kotlin.String) : MembershipState() { + val `value`: kotlin.String) : MembershipState() + + { + + companion object } + + + + + companion object } @@ -41643,12 +42601,21 @@ sealed class MessageFormat { data class Unknown( - val `format`: kotlin.String) : MessageFormat() { + val `format`: kotlin.String) : MessageFormat() + + { + + companion object } + + + + + companion object } @@ -41710,11 +42677,15 @@ sealed class MessageLikeEventContent: Disposable { data class RtcNotification( - val `notificationType`: RtcNotificationType, + val `notificationType`: org.matrix.rustcomponents.sdk.RtcNotificationType, /** * The timestamp at which this notification is considered invalid. */ - val `expirationTs`: Timestamp) : MessageLikeEventContent() { + val `expirationTs`: org.matrix.rustcomponents.sdk.Timestamp) : MessageLikeEventContent() + + { + + companion object } @@ -41746,12 +42717,20 @@ sealed class MessageLikeEventContent: Disposable { data class Poll( - val `question`: kotlin.String) : MessageLikeEventContent() { + val `question`: kotlin.String) : MessageLikeEventContent() + + { + + companion object } data class ReactionContent( - val `relatedEventId`: kotlin.String) : MessageLikeEventContent() { + val `relatedEventId`: kotlin.String) : MessageLikeEventContent() + + { + + companion object } @@ -41759,14 +42738,22 @@ sealed class MessageLikeEventContent: Disposable { data class RoomMessage( - val `messageType`: MessageType, - val `inReplyToEventId`: kotlin.String?) : MessageLikeEventContent() { + val `messageType`: org.matrix.rustcomponents.sdk.MessageType, + val `inReplyToEventId`: kotlin.String?) : MessageLikeEventContent() + + { + + companion object } data class RoomRedaction( val `redactedEventId`: kotlin.String?, - val `reason`: kotlin.String?) : MessageLikeEventContent() { + val `reason`: kotlin.String?) : MessageLikeEventContent() + + { + + companion object } @@ -41845,6 +42832,11 @@ sealed class MessageLikeEventContent: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -42170,12 +43162,21 @@ sealed class MessageLikeEventType { data class Other( - val v1: kotlin.String) : MessageLikeEventType() { + val v1: kotlin.String) : MessageLikeEventType() + + { + + companion object } + + + + + companion object } @@ -42473,53 +43474,93 @@ public object FfiConverterTypeMessageLikeEventType : FfiConverterRustBuffer, + val `answers`: List, val `votes`: Map>, - val `endTime`: Timestamp?, - val `hasBeenEdited`: kotlin.Boolean) : MsgLikeKind() { + val `endTime`: org.matrix.rustcomponents.sdk.Timestamp?, + val `hasBeenEdited`: kotlin.Boolean) : MsgLikeKind() + + { + + companion object } @@ -42825,7 +43883,11 @@ sealed class MsgLikeKind: Disposable { * An `m.room.encrypted` event that could not be decrypted. */ data class UnableToDecrypt( - val `msg`: EncryptedMessage) : MsgLikeKind() { + val `msg`: org.matrix.rustcomponents.sdk.EncryptedMessage) : MsgLikeKind() + + { + + companion object } @@ -42833,7 +43895,11 @@ sealed class MsgLikeKind: Disposable { * A custom message like event. */ data class Other( - val `eventType`: MessageLikeEventType) : MsgLikeKind() { + val `eventType`: org.matrix.rustcomponents.sdk.MessageLikeEventType) : MsgLikeKind() + + { + + companion object } @@ -42890,6 +43956,11 @@ sealed class MsgLikeKind: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -43029,12 +44100,20 @@ public object FfiConverterTypeMsgLikeKind : FfiConverterRustBuffer{ sealed class NotificationEvent: Disposable { data class Timeline( - val `event`: TimelineEvent) : NotificationEvent() { + val `event`: org.matrix.rustcomponents.sdk.TimelineEvent) : NotificationEvent() + + { + + companion object } data class Invite( - val `sender`: kotlin.String) : NotificationEvent() { + val `sender`: kotlin.String) : NotificationEvent() + + { + + companion object } @@ -43060,6 +44139,11 @@ sealed class NotificationEvent: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -43122,7 +44206,11 @@ sealed class NotificationProcessSetup: Disposable { data class SingleProcess( - val `syncService`: SyncService) : NotificationProcessSetup() { + val `syncService`: org.matrix.rustcomponents.sdk.SyncService) : NotificationProcessSetup() + + { + + companion object } @@ -43143,6 +44231,11 @@ sealed class NotificationProcessSetup: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -43277,6 +44370,9 @@ sealed class NotificationSettingsException: kotlin.Exception() { } + + + companion object ErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): NotificationSettingsException = FfiConverterTypeNotificationSettingsError.lift(error_buf) } @@ -43404,7 +44500,11 @@ sealed class NotificationStatus: Disposable { * The event has been found and was not filtered out. */ data class Event( - val `item`: NotificationItem) : NotificationStatus() { + val `item`: org.matrix.rustcomponents.sdk.NotificationItem) : NotificationStatus() + + { + + companion object } @@ -43441,6 +44541,11 @@ sealed class NotificationStatus: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -43603,12 +44708,21 @@ sealed class OidcPrompt { * An unknown value. */ data class Unknown( - val `value`: kotlin.String) : OidcPrompt() { + val `value`: kotlin.String) : OidcPrompt() + + { + + companion object } + + + + + companion object } @@ -43698,7 +44812,11 @@ sealed class OtherState { data class RoomAvatar( - val `url`: kotlin.String?) : OtherState() { + val `url`: kotlin.String?) : OtherState() + + { + + companion object } @@ -43706,7 +44824,11 @@ sealed class OtherState { data class RoomCreate( - val `federate`: kotlin.Boolean?) : OtherState() { + val `federate`: kotlin.Boolean?) : OtherState() + + { + + companion object } @@ -43717,28 +44839,48 @@ sealed class OtherState { data class RoomHistoryVisibility( - val `historyVisibility`: HistoryVisibility?) : OtherState() { + val `historyVisibility`: org.matrix.rustcomponents.sdk.HistoryVisibility?) : OtherState() + + { + + companion object } data class RoomJoinRules( - val `joinRule`: JoinRule?) : OtherState() { + val `joinRule`: org.matrix.rustcomponents.sdk.JoinRule?) : OtherState() + + { + + companion object } data class RoomName( - val `name`: kotlin.String?) : OtherState() { + val `name`: kotlin.String?) : OtherState() + + { + + companion object } data class RoomPinnedEvents( - val `change`: RoomPinnedEventsChange) : OtherState() { + val `change`: uniffi.matrix_sdk_ui.RoomPinnedEventsChange) : OtherState() + + { + + companion object } data class RoomPowerLevels( val `users`: Map, - val `previous`: Map?) : OtherState() { + val `previous`: Map?) : OtherState() + + { + + companion object } @@ -43746,7 +44888,11 @@ sealed class OtherState { data class RoomThirdPartyInvite( - val `displayName`: kotlin.String?) : OtherState() { + val `displayName`: kotlin.String?) : OtherState() + + { + + companion object } @@ -43754,7 +44900,11 @@ sealed class OtherState { data class RoomTopic( - val `topic`: kotlin.String?) : OtherState() { + val `topic`: kotlin.String?) : OtherState() + + { + + companion object } @@ -43765,12 +44915,21 @@ sealed class OtherState { data class Custom( - val `eventType`: kotlin.String) : OtherState() { + val `eventType`: kotlin.String) : OtherState() + + { + + companion object } + + + + + companion object } @@ -44188,6 +45347,10 @@ enum class PollKind { DISCLOSED, UNDISCLOSED; + + + + companion object } @@ -44227,12 +45390,21 @@ sealed class PowerLevel { * The user has the given power level. */ data class Value( - val `value`: kotlin.Long) : PowerLevel() { + val `value`: kotlin.Long) : PowerLevel() + + { + + companion object } + + + + + companion object } @@ -44296,17 +45468,30 @@ sealed class ProfileDetails { data class Ready( val `displayName`: kotlin.String?, val `displayNameAmbiguous`: kotlin.Boolean, - val `avatarUrl`: kotlin.String?) : ProfileDetails() { + val `avatarUrl`: kotlin.String?) : ProfileDetails() + + { + + companion object } data class Error( - val `message`: kotlin.String) : ProfileDetails() { + val `message`: kotlin.String) : ProfileDetails() + + { + + companion object } + + + + + companion object } @@ -44399,6 +45584,10 @@ enum class PublicRoomJoinRule { RESTRICTED, KNOCK_RESTRICTED, INVITE; + + + + companion object } @@ -44442,7 +45631,11 @@ sealed class PushCondition { * Patterns with no special glob characters should be treated as having * asterisks prepended and appended when testing the condition. */ - val `pattern`: kotlin.String) : PushCondition() { + val `pattern`: kotlin.String) : PushCondition() + + { + + companion object } @@ -44457,8 +45650,12 @@ sealed class PushCondition { * Matches the current number of members in the room. */ data class RoomMemberCount( - val `prefix`: ComparisonOperator, - val `count`: kotlin.ULong) : PushCondition() { + val `prefix`: org.matrix.rustcomponents.sdk.ComparisonOperator, + val `count`: kotlin.ULong) : PushCondition() + + { + + companion object } @@ -44475,7 +45672,11 @@ sealed class PushCondition { * Fields must be specified under the `notifications` property in the * power level event's `content`. */ - val `key`: kotlin.String) : PushCondition() { + val `key`: kotlin.String) : PushCondition() + + { + + companion object } @@ -44492,7 +45693,11 @@ sealed class PushCondition { /** * The value to match against. */ - val `value`: JsonValue) : PushCondition() { + val `value`: org.matrix.rustcomponents.sdk.JsonValue) : PushCondition() + + { + + companion object } @@ -44509,12 +45714,21 @@ sealed class PushCondition { /** * The value to match against. */ - val `value`: JsonValue) : PushCondition() { + val `value`: org.matrix.rustcomponents.sdk.JsonValue) : PushCondition() + + { + + companion object } + + + + + companion object } @@ -44643,6 +45857,10 @@ public object FfiConverterTypePushCondition : FfiConverterRustBuffer { sealed class PusherKind { data class Http( - val `data`: HttpPusherData) : PusherKind() { + val `data`: org.matrix.rustcomponents.sdk.HttpPusherData) : PusherKind() + + { + + companion object } @@ -44680,6 +45902,11 @@ sealed class PusherKind { + + + + + companion object } @@ -44803,7 +46030,11 @@ sealed class QrLoginProgress { * be 2 characters long, preserving the leading zero if the * first digit is a zero. */ - val `checkCodeString`: kotlin.String) : QrLoginProgress() { + val `checkCodeString`: kotlin.String) : QrLoginProgress() + + { + + companion object } @@ -44812,7 +46043,11 @@ sealed class QrLoginProgress { * to give us an access token. */ data class WaitingForToken( - val `userCode`: kotlin.String) : QrLoginProgress() { + val `userCode`: kotlin.String) : QrLoginProgress() + + { + + companion object } @@ -44830,6 +46065,11 @@ sealed class QrLoginProgress { + + + + + companion object } @@ -44942,7 +46182,11 @@ sealed class QueueWedgeError { /** * The insecure devices as a Map of userID to deviceID. */ - val `userDeviceMap`: Map>) : QueueWedgeError() { + val `userDeviceMap`: Map>) : QueueWedgeError() + + { + + companion object } @@ -44954,7 +46198,11 @@ sealed class QueueWedgeError { /** * The users that are expected to be verified but are not. */ - val `users`: List) : QueueWedgeError() { + val `users`: List) : QueueWedgeError() + + { + + companion object } @@ -44975,7 +46223,11 @@ sealed class QueueWedgeError { * Some mime type couldn't be parsed. */ data class InvalidMimeType( - val `mimeType`: kotlin.String) : QueueWedgeError() { + val `mimeType`: kotlin.String) : QueueWedgeError() + + { + + companion object } @@ -44983,12 +46235,21 @@ sealed class QueueWedgeError { * Other errors. */ data class GenericApiError( - val `msg`: kotlin.String) : QueueWedgeError() { + val `msg`: kotlin.String) : QueueWedgeError() + + { + + companion object } + + + + + companion object } @@ -45106,6 +46367,10 @@ enum class ReceiptType { READ, READ_PRIVATE, FULLY_READ; + + + + companion object } @@ -45180,6 +46445,9 @@ sealed class RecoveryException: kotlin.Exception() { } + + + companion object ErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): RecoveryException = FfiConverterTypeRecoveryError.lift(error_buf) } @@ -45268,6 +46536,10 @@ enum class RecoveryState { ENABLED, DISABLED, INCOMPLETE; + + + + companion object } @@ -45305,7 +46577,11 @@ sealed class RoomAccountDataEvent { /** * The event the user's read marker is located at in the room. */ - val `eventId`: kotlin.String) : RoomAccountDataEvent() { + val `eventId`: kotlin.String) : RoomAccountDataEvent() + + { + + companion object } @@ -45316,7 +46592,11 @@ sealed class RoomAccountDataEvent { /** * The current unread state. */ - val `unread`: kotlin.Boolean) : RoomAccountDataEvent() { + val `unread`: kotlin.Boolean) : RoomAccountDataEvent() + + { + + companion object } @@ -45324,7 +46604,11 @@ sealed class RoomAccountDataEvent { * m.tag */ data class Tag( - val `tags`: Map) : RoomAccountDataEvent() { + val `tags`: Map) : RoomAccountDataEvent() + + { + + companion object } @@ -45335,12 +46619,21 @@ sealed class RoomAccountDataEvent { /** * The current unread state. */ - val `unread`: kotlin.Boolean) : RoomAccountDataEvent() { + val `unread`: kotlin.Boolean) : RoomAccountDataEvent() + + { + + companion object } + + + + + companion object } @@ -45449,6 +46742,10 @@ enum class RoomAccountDataEventType { * com.famedly.marked_unread */ UNSTABLE_MARKED_UNREAD; + + + + companion object } @@ -45477,7 +46774,11 @@ public object FfiConverterTypeRoomAccountDataEventType: FfiConverterRustBuffer) : RoomDirectorySearchEntryUpdate() { + val `values`: List) : RoomDirectorySearchEntryUpdate() + + { + + companion object } @@ -45485,12 +46786,20 @@ sealed class RoomDirectorySearchEntryUpdate { data class PushFront( - val `value`: RoomDescription) : RoomDirectorySearchEntryUpdate() { + val `value`: org.matrix.rustcomponents.sdk.RoomDescription) : RoomDirectorySearchEntryUpdate() + + { + + companion object } data class PushBack( - val `value`: RoomDescription) : RoomDirectorySearchEntryUpdate() { + val `value`: org.matrix.rustcomponents.sdk.RoomDescription) : RoomDirectorySearchEntryUpdate() + + { + + companion object } @@ -45502,33 +46811,58 @@ sealed class RoomDirectorySearchEntryUpdate { data class Insert( val `index`: kotlin.UInt, - val `value`: RoomDescription) : RoomDirectorySearchEntryUpdate() { + val `value`: org.matrix.rustcomponents.sdk.RoomDescription) : RoomDirectorySearchEntryUpdate() + + { + + companion object } data class Set( val `index`: kotlin.UInt, - val `value`: RoomDescription) : RoomDirectorySearchEntryUpdate() { + val `value`: org.matrix.rustcomponents.sdk.RoomDescription) : RoomDirectorySearchEntryUpdate() + + { + + companion object } data class Remove( - val `index`: kotlin.UInt) : RoomDirectorySearchEntryUpdate() { + val `index`: kotlin.UInt) : RoomDirectorySearchEntryUpdate() + + { + + companion object } data class Truncate( - val `length`: kotlin.UInt) : RoomDirectorySearchEntryUpdate() { + val `length`: kotlin.UInt) : RoomDirectorySearchEntryUpdate() + + { + + companion object } data class Reset( - val `values`: List) : RoomDirectorySearchEntryUpdate() { + val `values`: List) : RoomDirectorySearchEntryUpdate() + + { + + companion object } + + + + + companion object } @@ -45840,12 +47174,21 @@ sealed class RoomHistoryVisibility { * A custom visibility value. */ data class Custom( - val `value`: kotlin.String) : RoomHistoryVisibility() { + val `value`: kotlin.String) : RoomHistoryVisibility() + + { + + companion object } + + + + + companion object } @@ -45934,12 +47277,20 @@ public object FfiConverterTypeRoomHistoryVisibility : FfiConverterRustBuffer) : RoomListEntriesDynamicFilterKind() { + val `filters`: List) : RoomListEntriesDynamicFilterKind() + + { + + companion object } data class Any( - val `filters`: List) : RoomListEntriesDynamicFilterKind() { + val `filters`: List) : RoomListEntriesDynamicFilterKind() + + { + + companion object } @@ -45971,7 +47322,11 @@ sealed class RoomListEntriesDynamicFilterKind { data class Category( - val `expect`: RoomListFilterCategory) : RoomListEntriesDynamicFilterKind() { + val `expect`: org.matrix.rustcomponents.sdk.RoomListFilterCategory) : RoomListEntriesDynamicFilterKind() + + { + + companion object } @@ -45979,12 +47334,20 @@ sealed class RoomListEntriesDynamicFilterKind { data class NormalizedMatchRoomName( - val `pattern`: kotlin.String) : RoomListEntriesDynamicFilterKind() { + val `pattern`: kotlin.String) : RoomListEntriesDynamicFilterKind() + + { + + companion object } data class FuzzyMatchRoomName( - val `pattern`: kotlin.String) : RoomListEntriesDynamicFilterKind() { + val `pattern`: kotlin.String) : RoomListEntriesDynamicFilterKind() + + { + + companion object } @@ -45993,6 +47356,11 @@ sealed class RoomListEntriesDynamicFilterKind { + + + + + companion object } @@ -46218,7 +47586,11 @@ public object FfiConverterTypeRoomListEntriesDynamicFilterKind : FfiConverterRus sealed class RoomListEntriesUpdate: Disposable { data class Append( - val `values`: List) : RoomListEntriesUpdate() { + val `values`: List) : RoomListEntriesUpdate() + + { + + companion object } @@ -46226,12 +47598,20 @@ sealed class RoomListEntriesUpdate: Disposable { data class PushFront( - val `value`: Room) : RoomListEntriesUpdate() { + val `value`: org.matrix.rustcomponents.sdk.Room) : RoomListEntriesUpdate() + + { + + companion object } data class PushBack( - val `value`: Room) : RoomListEntriesUpdate() { + val `value`: org.matrix.rustcomponents.sdk.Room) : RoomListEntriesUpdate() + + { + + companion object } @@ -46243,28 +47623,48 @@ sealed class RoomListEntriesUpdate: Disposable { data class Insert( val `index`: kotlin.UInt, - val `value`: Room) : RoomListEntriesUpdate() { + val `value`: org.matrix.rustcomponents.sdk.Room) : RoomListEntriesUpdate() + + { + + companion object } data class Set( val `index`: kotlin.UInt, - val `value`: Room) : RoomListEntriesUpdate() { + val `value`: org.matrix.rustcomponents.sdk.Room) : RoomListEntriesUpdate() + + { + + companion object } data class Remove( - val `index`: kotlin.UInt) : RoomListEntriesUpdate() { + val `index`: kotlin.UInt) : RoomListEntriesUpdate() + + { + + companion object } data class Truncate( - val `length`: kotlin.UInt) : RoomListEntriesUpdate() { + val `length`: kotlin.UInt) : RoomListEntriesUpdate() + + { + + companion object } data class Reset( - val `values`: List) : RoomListEntriesUpdate() { + val `values`: List) : RoomListEntriesUpdate() + + { + + companion object } @@ -46340,6 +47740,11 @@ sealed class RoomListEntriesUpdate: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -46586,6 +47991,9 @@ sealed class RoomListException: kotlin.Exception() { } + + + companion object ErrorHandler : UniffiRustCallStatusErrorHandler { override fun lift(error_buf: RustBuffer.ByValue): RoomListException = FfiConverterTypeRoomListError.lift(error_buf) } @@ -46714,6 +48122,10 @@ enum class RoomListFilterCategory { GROUP, PEOPLE; + + + + companion object } @@ -46745,12 +48157,21 @@ sealed class RoomListLoadingState { data class Loaded( - val `maximumNumberOfRooms`: kotlin.UInt?) : RoomListLoadingState() { + val `maximumNumberOfRooms`: kotlin.UInt?) : RoomListLoadingState() + + { + + companion object } + + + + + companion object } @@ -46812,6 +48233,10 @@ enum class RoomListServiceState { RUNNING, ERROR, TERMINATED; + + + + companion object } @@ -46842,6 +48267,10 @@ enum class RoomListServiceSyncIndicator { SHOW, HIDE; + + + + companion object } @@ -46891,12 +48320,21 @@ sealed class RoomLoadSettings { * [`RoomLoadSettings`]. */ data class One( - val `roomId`: kotlin.String) : RoomLoadSettings() { + val `roomId`: kotlin.String) : RoomLoadSettings() + + { + + companion object } + + + + + companion object } @@ -46964,6 +48402,10 @@ enum class RoomMessageEventMessageType { VIDEO, VERIFICATION_REQUEST, OTHER; + + + + companion object } @@ -47007,6 +48449,10 @@ enum class RoomNotificationMode { * Do not receive any notifications. */ MUTE; + + + + companion object } @@ -47050,6 +48496,10 @@ enum class RoomPreset { * as the creator. */ TRUSTED_PRIVATE_CHAT; + + + + companion object } @@ -47087,7 +48537,11 @@ sealed class RoomSendQueueUpdate: Disposable { /** * Transaction id used to identify this event. */ - val `transactionId`: kotlin.String) : RoomSendQueueUpdate() { + val `transactionId`: kotlin.String) : RoomSendQueueUpdate() + + { + + companion object } @@ -47099,7 +48553,11 @@ sealed class RoomSendQueueUpdate: Disposable { /** * Transaction id used to identify this event. */ - val `transactionId`: kotlin.String) : RoomSendQueueUpdate() { + val `transactionId`: kotlin.String) : RoomSendQueueUpdate() + + { + + companion object } @@ -47110,7 +48568,11 @@ sealed class RoomSendQueueUpdate: Disposable { /** * Transaction id used to identify this event. */ - val `transactionId`: kotlin.String) : RoomSendQueueUpdate() { + val `transactionId`: kotlin.String) : RoomSendQueueUpdate() + + { + + companion object } @@ -47128,7 +48590,7 @@ sealed class RoomSendQueueUpdate: Disposable { /** * Error received while sending the event. */ - val `error`: QueueWedgeError, + val `error`: org.matrix.rustcomponents.sdk.QueueWedgeError, /** * Whether the error is considered recoverable or not. * @@ -47136,7 +48598,11 @@ sealed class RoomSendQueueUpdate: Disposable { * while an unrecoverable error will be parked, until the user * decides to cancel sending it. */ - val `isRecoverable`: kotlin.Boolean) : RoomSendQueueUpdate() { + val `isRecoverable`: kotlin.Boolean) : RoomSendQueueUpdate() + + { + + companion object } @@ -47147,7 +48613,11 @@ sealed class RoomSendQueueUpdate: Disposable { /** * Transaction id used to identify this event. */ - val `transactionId`: kotlin.String) : RoomSendQueueUpdate() { + val `transactionId`: kotlin.String) : RoomSendQueueUpdate() + + { + + companion object } @@ -47163,7 +48633,11 @@ sealed class RoomSendQueueUpdate: Disposable { /** * Received event id from the send response. */ - val `eventId`: kotlin.String) : RoomSendQueueUpdate() { + val `eventId`: kotlin.String) : RoomSendQueueUpdate() + + { + + companion object } @@ -47179,7 +48653,7 @@ sealed class RoomSendQueueUpdate: Disposable { /** * The final media source for the file if it has finished uploading. */ - val `file`: MediaSource?, + val `file`: org.matrix.rustcomponents.sdk.MediaSource?, /** * The index of the media within the transaction. A file and its * thumbnail share the same index. Will always be 0 for non-gallery @@ -47191,7 +48665,11 @@ sealed class RoomSendQueueUpdate: Disposable { * thumbnail. For gallery uploads, the progress is reported per indexed * gallery item. */ - val `progress`: AbstractProgress) : RoomSendQueueUpdate() { + val `progress`: org.matrix.rustcomponents.sdk.AbstractProgress) : RoomSendQueueUpdate() + + { + + companion object } @@ -47258,6 +48736,11 @@ sealed class RoomSendQueueUpdate: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -47428,12 +48911,21 @@ sealed class RoomType { * It's a custom implementation. */ data class Custom( - val `value`: kotlin.String) : RoomType() { + val `value`: kotlin.String) : RoomType() + + { + + companion object } + + + + + companion object } @@ -47515,12 +49007,21 @@ sealed class RoomVisibility { * A custom value that's not present in the spec. */ data class Custom( - val `value`: kotlin.String) : RoomVisibility() { + val `value`: kotlin.String) : RoomVisibility() + + { + + companion object } + + + + + companion object } @@ -47589,6 +49090,10 @@ enum class RtcNotificationType { RING, NOTIFICATION; + + + + companion object } @@ -47647,12 +49152,21 @@ sealed class RuleKind { data class Custom( - val `value`: kotlin.String) : RuleKind() { + val `value`: kotlin.String) : RuleKind() + + { + + companion object } + + + + + companion object } @@ -47761,12 +49275,21 @@ sealed class SecretStorageEncryptionAlgorithm { * authenticated using HMAC-SHA-256. */ data class V1AesHmacSha2( - val `properties`: SecretStorageV1AesHmacSha2Properties) : SecretStorageEncryptionAlgorithm() { + val `properties`: org.matrix.rustcomponents.sdk.SecretStorageV1AesHmacSha2Properties) : SecretStorageEncryptionAlgorithm() + + { + + companion object } + + + + + companion object } @@ -47811,13 +49334,21 @@ public object FfiConverterTypeSecretStorageEncryptionAlgorithm : FfiConverterRus sealed class SessionVerificationData: Disposable { data class Emojis( - val `emojis`: List, - val `indices`: kotlin.ByteArray) : SessionVerificationData() { + val `emojis`: List, + val `indices`: kotlin.ByteArray) : SessionVerificationData() + + { + + companion object } data class Decimals( - val `values`: List) : SessionVerificationData() { + val `values`: List) : SessionVerificationData() + + { + + companion object } @@ -47844,6 +49375,11 @@ sealed class SessionVerificationData: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -47914,8 +49450,12 @@ sealed class ShieldState { * presented. */ data class Red( - val `code`: ShieldStateCode, - val `message`: kotlin.String) : ShieldState() { + val `code`: uniffi.matrix_sdk_common.ShieldStateCode, + val `message`: kotlin.String) : ShieldState() + + { + + companion object } @@ -47924,8 +49464,12 @@ sealed class ShieldState { * presented. */ data class Grey( - val `code`: ShieldStateCode, - val `message`: kotlin.String) : ShieldState() { + val `code`: uniffi.matrix_sdk_common.ShieldStateCode, + val `message`: kotlin.String) : ShieldState() + + { + + companion object } @@ -47937,6 +49481,11 @@ sealed class ShieldState { + + + + + companion object } @@ -48015,6 +49564,10 @@ enum class SlidingSyncVersion { NONE, NATIVE; + + + + companion object } @@ -48046,6 +49599,10 @@ enum class SlidingSyncVersionBuilder { NONE, NATIVE, DISCOVER_NATIVE; + + + + companion object } @@ -48074,7 +49631,11 @@ public object FfiConverterTypeSlidingSyncVersionBuilder: FfiConverterRustBuffer< sealed class SpaceListUpdate { data class Append( - val `values`: List) : SpaceListUpdate() { + val `values`: List) : SpaceListUpdate() + + { + + companion object } @@ -48082,12 +49643,20 @@ sealed class SpaceListUpdate { data class PushFront( - val `value`: SpaceRoom) : SpaceListUpdate() { + val `value`: org.matrix.rustcomponents.sdk.SpaceRoom) : SpaceListUpdate() + + { + + companion object } data class PushBack( - val `value`: SpaceRoom) : SpaceListUpdate() { + val `value`: org.matrix.rustcomponents.sdk.SpaceRoom) : SpaceListUpdate() + + { + + companion object } @@ -48099,33 +49668,58 @@ sealed class SpaceListUpdate { data class Insert( val `index`: kotlin.UInt, - val `value`: SpaceRoom) : SpaceListUpdate() { + val `value`: org.matrix.rustcomponents.sdk.SpaceRoom) : SpaceListUpdate() + + { + + companion object } data class Set( val `index`: kotlin.UInt, - val `value`: SpaceRoom) : SpaceListUpdate() { + val `value`: org.matrix.rustcomponents.sdk.SpaceRoom) : SpaceListUpdate() + + { + + companion object } data class Remove( - val `index`: kotlin.UInt) : SpaceListUpdate() { + val `index`: kotlin.UInt) : SpaceListUpdate() + + { + + companion object } data class Truncate( - val `length`: kotlin.UInt) : SpaceListUpdate() { + val `length`: kotlin.UInt) : SpaceListUpdate() + + { + + companion object } data class Reset( - val `values`: List) : SpaceListUpdate() { + val `values`: List) : SpaceListUpdate() + + { + + companion object } + + + + + companion object } @@ -48404,7 +49998,11 @@ sealed class StateEventContent { data class RoomMemberContent( val `userId`: kotlin.String, - val `membershipState`: MembershipState) : StateEventContent() { + val `membershipState`: org.matrix.rustcomponents.sdk.MembershipState) : StateEventContent() + + { + + companion object } @@ -48427,7 +50025,11 @@ sealed class StateEventContent { data class RoomTopic( - val `topic`: kotlin.String) : StateEventContent() { + val `topic`: kotlin.String) : StateEventContent() + + { + + companion object } @@ -48439,6 +50041,11 @@ sealed class StateEventContent { + + + + + companion object } @@ -48732,6 +50339,10 @@ enum class StateEventType { ROOM_TOPIC, SPACE_CHILD, SPACE_PARENT; + + + + companion object } @@ -48821,6 +50432,10 @@ enum class SyncServiceState { TERMINATED, ERROR, OFFLINE; + + + + companion object } @@ -48874,12 +50489,21 @@ sealed class TagName { * `u.*`: User-defined tag */ data class User( - val `name`: UserTagName) : TagName() { + val `name`: org.matrix.rustcomponents.sdk.UserTagName) : TagName() + + { + + companion object } + + + + + companion object } @@ -48957,7 +50581,11 @@ public object FfiConverterTypeTagName : FfiConverterRustBuffer{ sealed class TimelineDiff: Disposable { data class Append( - val `values`: List) : TimelineDiff() { + val `values`: List) : TimelineDiff() + + { + + companion object } @@ -48965,12 +50593,20 @@ sealed class TimelineDiff: Disposable { data class PushFront( - val `value`: TimelineItem) : TimelineDiff() { + val `value`: org.matrix.rustcomponents.sdk.TimelineItem) : TimelineDiff() + + { + + companion object } data class PushBack( - val `value`: TimelineItem) : TimelineDiff() { + val `value`: org.matrix.rustcomponents.sdk.TimelineItem) : TimelineDiff() + + { + + companion object } @@ -48982,28 +50618,48 @@ sealed class TimelineDiff: Disposable { data class Insert( val `index`: kotlin.UInt, - val `value`: TimelineItem) : TimelineDiff() { + val `value`: org.matrix.rustcomponents.sdk.TimelineItem) : TimelineDiff() + + { + + companion object } data class Set( val `index`: kotlin.UInt, - val `value`: TimelineItem) : TimelineDiff() { + val `value`: org.matrix.rustcomponents.sdk.TimelineItem) : TimelineDiff() + + { + + companion object } data class Remove( - val `index`: kotlin.UInt) : TimelineDiff() { + val `index`: kotlin.UInt) : TimelineDiff() + + { + + companion object } data class Truncate( - val `length`: kotlin.UInt) : TimelineDiff() { + val `length`: kotlin.UInt) : TimelineDiff() + + { + + companion object } data class Reset( - val `values`: List) : TimelineDiff() { + val `values`: List) : TimelineDiff() + + { + + companion object } @@ -49079,6 +50735,11 @@ sealed class TimelineDiff: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -49267,12 +50928,20 @@ public object FfiConverterTypeTimelineDiff : FfiConverterRustBuffer) : TimelineFilter() { + val `types`: List) : TimelineFilter() + + { + + companion object } @@ -49378,7 +51056,11 @@ sealed class TimelineFilter: Disposable { * Show only events which match this filter. */ data class EventTypeFilter( - val `filter`: TimelineEventTypeFilter) : TimelineFilter() { + val `filter`: org.matrix.rustcomponents.sdk.TimelineEventTypeFilter) : TimelineFilter() + + { + + companion object } @@ -49406,6 +51088,11 @@ sealed class TimelineFilter: Disposable { }.let { /* this makes the `when` an expression, which ensures it is exhaustive */ } } + + + + + companion object } @@ -49479,7 +51166,11 @@ sealed class TimelineFocus { /** * Whether to hide in-thread replies from the live timeline. */ - val `hideThreadedEvents`: kotlin.Boolean) : TimelineFocus() { + val `hideThreadedEvents`: kotlin.Boolean) : TimelineFocus() + + { + + companion object } @@ -49496,7 +51187,11 @@ sealed class TimelineFocus { /** * Whether to hide in-thread replies from the live timeline. */ - val `hideThreadedEvents`: kotlin.Boolean) : TimelineFocus() { + val `hideThreadedEvents`: kotlin.Boolean) : TimelineFocus() + + { + + companion object } @@ -49504,18 +51199,31 @@ sealed class TimelineFocus { /** * The thread root event ID to focus on. */ - val `rootEventId`: kotlin.String) : TimelineFocus() { + val `rootEventId`: kotlin.String) : TimelineFocus() + + { + + companion object } data class PinnedEvents( val `maxEventsToLoad`: kotlin.UShort, - val `maxConcurrentRequests`: kotlin.UShort) : TimelineFocus() { + val `maxConcurrentRequests`: kotlin.UShort) : TimelineFocus() + + { + + companion object } + + + + + companion object } @@ -49614,7 +51322,11 @@ public object FfiConverterTypeTimelineFocus : FfiConverterRustBuffer - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - FfiConverterTypeMessageContent.lower(`message`),_status) -} - ) - } - - - /** - * Create a caption edit. - * - * If no `formatted_caption` is provided, then it's assumed the `caption` - * represents valid Markdown that can be used as the formatted caption. - */ fun `createCaptionEdit`(`caption`: kotlin.String?, `formattedCaption`: FormattedBody?, `mentions`: Mentions?): EditedContent { - return FfiConverterTypeEditedContent.lift( + fun `sdkGitSha`(): kotlin.String { + return FfiConverterString.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( - FfiConverterOptionalString.lower(`caption`),FfiConverterOptionalTypeFormattedBody.lower(`formattedCaption`),FfiConverterOptionalTypeMentions.lower(`mentions`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( + + _status) } ) } @@ -56817,56 +58901,9 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong fun `genTransactionId`(): kotlin.String { return FfiConverterString.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( - _status) -} - ) - } + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( - - /** - * Create the actual url that can be used to setup the WebView or IFrame - * that contains the widget. - * - * # Arguments - * * `widget_settings` - The widget settings to generate the url for. - * * `room` - A Matrix room which is used to query the logged in username - * * `props` - Properties from the client that can be used by a widget to adapt - * to the client. e.g. language, font-scale... - */ - @Throws(ParseException::class) - @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") - suspend fun `generateWebviewUrl`(`widgetSettings`: WidgetSettings, `room`: Room, `props`: ClientProperties) : kotlin.String { - return uniffiRustCallAsync( - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(FfiConverterTypeWidgetSettings.lower(`widgetSettings`),FfiConverterTypeRoom.lower(`room`),FfiConverterTypeClientProperties.lower(`props`),), - { 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 - { FfiConverterString.lift(it) }, - // Error FFI converter - ParseException.ErrorHandler, - ) - } - - /** - * The Capabilities required to run a element call widget. - * - * This is intended to be used in combination with: `acquire_capabilities` of - * the `CapabilitiesProvider`. - * - * `acquire_capabilities` can simply return the `WidgetCapabilities` from this - * function. Even if there are non intersecting permissions to what the widget - * requested. - * - * Editing and extending the capabilities from this function is also possible, - * but should only be done as temporal workarounds until this function is - * adjusted - */ fun `getElementCallRequiredPermissions`(`ownUserId`: kotlin.String, `ownDeviceId`: kotlin.String): WidgetCapabilities { - return FfiConverterTypeWidgetCapabilities.lift( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( - FfiConverterString.lower(`ownUserId`),FfiConverterString.lower(`ownDeviceId`),_status) + _status) } ) } @@ -56883,12 +58920,44 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong @Throws(ClientException::class) fun `initPlatform`(`config`: TracingConfiguration, `useLightweightTokioRuntime`: kotlin.Boolean) = uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_init_platform( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_init_platform( + FfiConverterTypeTracingConfiguration.lower(`config`),FfiConverterBoolean.lower(`useLightweightTokioRuntime`),_status) } + /** + * Updates the tracing subscriber with a new file writer based on the provided + * configuration. + * + * This method will throw if `init_platform` hasn't been called, or if it was + * called with `write_to_files` set to `None`. + */ + @Throws(ClientException::class) fun `reloadTracingFileWriter`(`configuration`: TracingFileConfiguration) + = + uniffiRustCallWithError(ClientException) { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + + FfiConverterTypeTracingFileConfiguration.lower(`configuration`),_status) +} + + + + /** + * Generates a `matrix.to` permalink to the given room alias. + */ + @Throws(ClientException::class) fun `matrixToRoomAliasPermalink`(`roomAlias`: kotlin.String): kotlin.String { + return FfiConverterString.lift( + uniffiRustCallWithError(ClientException) { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + + FfiConverterString.lower(`roomAlias`),_status) +} + ) + } + + /** * Verifies the passed `String` matches the expected room alias format: * @@ -56898,7 +58967,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong */ fun `isRoomAliasFormatValid`(`alias`: kotlin.String): kotlin.Boolean { return FfiConverterBoolean.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( + FfiConverterString.lower(`alias`),_status) } ) @@ -56906,58 +58976,75 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong /** - * Log an event. - * - * The target should be something like a module path, and can be referenced in - * the filter string given to `init_platform`. `level` and `target` for a - * callsite are fixed at the first `log_event` call for that callsite and can - * not be changed afterwards, i.e. the level and target passed for second and - * following `log_event`s with the same callsite will be ignored. - * - * This function leaks a little bit of memory for each unique (file + line + - * level + target) 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. - */ fun `logEvent`(`file`: kotlin.String, `line`: kotlin.UInt?, `level`: LogLevel, `target`: kotlin.String, `message`: kotlin.String) - = + * Transforms a Room's display name into a valid room alias name. + */ fun `roomAliasNameFromRoomDisplayName`(`roomName`: kotlin.String): kotlin.String { + return FfiConverterString.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_log_event( - FfiConverterString.lower(`file`),FfiConverterOptionalUInt.lower(`line`),FfiConverterTypeLogLevel.lower(`level`),FfiConverterString.lower(`target`),FfiConverterString.lower(`message`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + + FfiConverterString.lower(`roomName`),_status) } + ) + } + + + /** + * Generates a `matrix.to` permalink to the given userID. + */ + @Throws(ClientException::class) fun `matrixToUserPermalink`(`userId`: kotlin.String): kotlin.String { + return FfiConverterString.lift( + uniffiRustCallWithError(ClientException) { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( + FfiConverterString.lower(`userId`),_status) +} + ) + } - @Throws(ParseException::class) fun `makeWidgetDriver`(`settings`: WidgetSettings): WidgetDriverAndHandle { - return FfiConverterTypeWidgetDriverAndHandle.lift( - uniffiRustCallWithError(ParseException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( - FfiConverterTypeWidgetSettings.lower(`settings`),_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.uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( + + FfiConverterTypeRoomMemberRole.lower(`role`),_status) } ) } /** - * Generates a `matrix.to` permalink to the given room alias. + * 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 `matrixToRoomAliasPermalink`(`roomAlias`: kotlin.String): kotlin.String { - return FfiConverterString.lift( + @Throws(ClientException::class) fun `suggestedRoleForPowerLevel`(`powerLevel`: PowerLevel): RoomMemberRole { + return FfiConverterTypeRoomMemberRole.lift( uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( - FfiConverterString.lower(`roomAlias`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + + FfiConverterTypePowerLevel.lower(`powerLevel`),_status) } ) } /** - * Generates a `matrix.to` permalink to the given userID. + * Creates a [`RoomMessageEventContentWithoutRelation`] given a + * [`MessageContent`] value. */ - @Throws(ClientException::class) fun `matrixToUserPermalink`(`userId`: kotlin.String): kotlin.String { - return FfiConverterString.lift( + @Throws(ClientException::class) fun `contentWithoutRelationFromMessage`(`message`: MessageContent): RoomMessageEventContentWithoutRelation { + return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( - FfiConverterString.lower(`userId`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( + + FfiConverterTypeMessageContent.lower(`message`),_status) } ) } @@ -56965,7 +59052,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong fun `messageEventContentFromHtml`(`body`: kotlin.String, `htmlBody`: kotlin.String): RoomMessageEventContentWithoutRelation { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html( + FfiConverterString.lower(`body`),FfiConverterString.lower(`htmlBody`),_status) } ) @@ -56974,7 +59062,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong fun `messageEventContentFromHtmlAsEmote`(`body`: kotlin.String, `htmlBody`: kotlin.String): RoomMessageEventContentWithoutRelation { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote( + FfiConverterString.lower(`body`),FfiConverterString.lower(`htmlBody`),_status) } ) @@ -56983,7 +59072,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong fun `messageEventContentFromMarkdown`(`md`: kotlin.String): RoomMessageEventContentWithoutRelation { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown( + FfiConverterString.lower(`md`),_status) } ) @@ -56992,7 +59082,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong fun `messageEventContentFromMarkdownAsEmote`(`md`: kotlin.String): RoomMessageEventContentWithoutRelation { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown_as_emote( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown_as_emote( + FfiConverterString.lower(`md`),_status) } ) @@ -57002,7 +59093,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong @Throws(ClientException::class) fun `messageEventContentNew`(`msgtype`: MessageType): RoomMessageEventContentWithoutRelation { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( + FfiConverterTypeMessageType.lower(`msgtype`),_status) } ) @@ -57010,106 +59102,139 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong /** - * `WidgetSettings` are usually created from a state event. - * (currently unimplemented) - * - * In some cases the client wants to create custom `WidgetSettings` - * for specific rooms based on other conditions. - * This function returns a `WidgetSettings` object which can be used - * to setup a widget using `run_client_widget_api` - * and to generate the correct url for the widget. - * - * # Arguments - * - * * `props` - A struct containing the configuration parameters for a element - * call widget. - */ - @Throws(ParseException::class) fun `newVirtualElementCallWidget`(`props`: VirtualElementCallWidgetProperties, `config`: VirtualElementCallWidgetConfig): WidgetSettings { - return FfiConverterTypeWidgetSettings.lift( - uniffiRustCallWithError(ParseException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( - FfiConverterTypeVirtualElementCallWidgetProperties.lower(`props`),FfiConverterTypeVirtualElementCallWidgetConfig.lower(`config`),_status) + * Parse a matrix entity from a given URI, be it either + * a `matrix.to` link or a `matrix:` URI + */ fun `parseMatrixEntityFrom`(`uri`: kotlin.String): MatrixEntity? { + return FfiConverterOptionalTypeMatrixEntity.lift( + uniffiRustCall() { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( + + FfiConverterString.lower(`uri`),_status) } ) } /** - * Parse a matrix entity from a given URI, be it either - * a `matrix.to` link or a `matrix:` URI - */ fun `parseMatrixEntityFrom`(`uri`: kotlin.String): MatrixEntity? { - return FfiConverterOptionalTypeMatrixEntity.lift( + * Create a caption edit. + * + * If no `formatted_caption` is provided, then it's assumed the `caption` + * represents valid Markdown that can be used as the formatted caption. + */ fun `createCaptionEdit`(`caption`: kotlin.String?, `formattedCaption`: FormattedBody?, `mentions`: Mentions?): EditedContent { + return FfiConverterTypeEditedContent.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( - FfiConverterString.lower(`uri`),_status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + + FfiConverterOptionalString.lower(`caption`),FfiConverterOptionalTypeFormattedBody.lower(`formattedCaption`),FfiConverterOptionalTypeMentions.lower(`mentions`),_status) } ) } /** - * Updates the tracing subscriber with a new file writer based on the provided - * configuration. + * Log an event. * - * This method will throw if `init_platform` hasn't been called, or if it was - * called with `write_to_files` set to `None`. - */ - @Throws(ClientException::class) fun `reloadTracingFileWriter`(`configuration`: TracingFileConfiguration) + * The target should be something like a module path, and can be referenced in + * the filter string given to `init_platform`. `level` and `target` for a + * callsite are fixed at the first `log_event` call for that callsite and can + * not be changed afterwards, i.e. the level and target passed for second and + * following `log_event`s with the same callsite will be ignored. + * + * This function leaks a little bit of memory for each unique (file + line + + * level + target) 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. + */ fun `logEvent`(`file`: kotlin.String, `line`: kotlin.UInt?, `level`: LogLevel, `target`: kotlin.String, `message`: kotlin.String) = - uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( - FfiConverterTypeTracingFileConfiguration.lower(`configuration`),_status) + uniffiRustCall() { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_log_event( + + FfiConverterString.lower(`file`),FfiConverterOptionalUInt.lower(`line`),FfiConverterTypeLogLevel.lower(`level`),FfiConverterString.lower(`target`),FfiConverterString.lower(`message`),_status) } /** - * Transforms a Room's display name into a valid room alias name. - */ fun `roomAliasNameFromRoomDisplayName`(`roomName`: kotlin.String): kotlin.String { - return FfiConverterString.lift( - uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( - FfiConverterString.lower(`roomName`),_status) -} + * Create the actual url that can be used to setup the WebView or IFrame + * that contains the widget. + * + * # Arguments + * * `widget_settings` - The widget settings to generate the url for. + * * `room` - A Matrix room which is used to query the logged in username + * * `props` - Properties from the client that can be used by a widget to adapt + * to the client. e.g. language, font-scale... + */ + @Throws(ParseException::class) + @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE") + suspend fun `generateWebviewUrl`(`widgetSettings`: WidgetSettings, `room`: Room, `props`: ClientProperties) : kotlin.String { + return uniffiRustCallAsync( + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(FfiConverterTypeWidgetSettings.lower(`widgetSettings`),FfiConverterTypeRoom.lower(`room`),FfiConverterTypeClientProperties.lower(`props`),), + { future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) }, + { future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) }, + { future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) }, + // lift function + { FfiConverterString.lift(it) }, + // Error FFI converter + ParseException.ErrorHandler, ) } - - fun `sdkGitSha`(): kotlin.String { - return FfiConverterString.lift( + + /** + * The Capabilities required to run a element call widget. + * + * This is intended to be used in combination with: `acquire_capabilities` of + * the `CapabilitiesProvider`. + * + * `acquire_capabilities` can simply return the `WidgetCapabilities` from this + * function. Even if there are non intersecting permissions to what the widget + * requested. + * + * Editing and extending the capabilities from this function is also possible, + * but should only be done as temporal workarounds until this function is + * adjusted + */ fun `getElementCallRequiredPermissions`(`ownUserId`: kotlin.String, `ownDeviceId`: kotlin.String): WidgetCapabilities { + return FfiConverterTypeWidgetCapabilities.lift( uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( - _status) + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + + FfiConverterString.lower(`ownUserId`),FfiConverterString.lower(`ownDeviceId`),_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) + @Throws(ParseException::class) fun `makeWidgetDriver`(`settings`: WidgetSettings): WidgetDriverAndHandle { + return FfiConverterTypeWidgetDriverAndHandle.lift( + uniffiRustCallWithError(ParseException) { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + + FfiConverterTypeWidgetSettings.lower(`settings`),_status) } ) } /** - * Get the suggested role for the given power level. + * `WidgetSettings` are usually created from a state event. + * (currently unimplemented) * - * Returns an error if the value of the power level is out of range for numbers - * accepted in canonical JSON. + * In some cases the client wants to create custom `WidgetSettings` + * for specific rooms based on other conditions. + * This function returns a `WidgetSettings` object which can be used + * to setup a widget using `run_client_widget_api` + * and to generate the correct url for the widget. + * + * # Arguments + * + * * `props` - A struct containing the configuration parameters for a element + * call widget. */ - @Throws(ClientException::class) fun `suggestedRoleForPowerLevel`(`powerLevel`: PowerLevel): RoomMemberRole { - return FfiConverterTypeRoomMemberRole.lift( - uniffiRustCallWithError(ClientException) { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - FfiConverterTypePowerLevel.lower(`powerLevel`),_status) + @Throws(ParseException::class) fun `newVirtualElementCallWidget`(`props`: VirtualElementCallWidgetProperties, `config`: VirtualElementCallWidgetConfig): WidgetSettings { + return FfiConverterTypeWidgetSettings.lift( + uniffiRustCallWithError(ParseException) { _status -> + UniffiLib.uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( + + FfiConverterTypeVirtualElementCallWidgetProperties.lower(`props`),FfiConverterTypeVirtualElementCallWidgetConfig.lower(`config`),_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 266404c..7cdb6c7 100644 --- a/android/src/main/java/uniffi/matrix_sdk/matrix_sdk.kt +++ b/android/src/main/java/uniffi/matrix_sdk/matrix_sdk.kt @@ -59,7 +59,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_matrix_sdk_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_matrix_sdk_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -75,51 +75,17 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_matrix_sdk_rustbuffer_free(buf, status) + UniffiLib.ffi_matrix_sdk_rustbuffer_free(buf, status) } } @Suppress("TooGenericExceptionThrown") fun asByteBuffer() = - this.data?.getByteBuffer(0, this.len.toLong())?.also { + this.data?.getByteBuffer(0, this.len)?.also { it.order(ByteOrder.BIG_ENDIAN) } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -316,8 +282,9 @@ internal inline fun uniffiTraitInterfaceCall( try { writeReturn(makeCall()) } catch(e: kotlin.Exception) { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } @@ -334,28 +301,41 @@ internal inline fun uniffiTraitInterfaceCallWithError( callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) } else { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -378,534 +358,421 @@ private fun findLibraryName(componentName: String): String { return "matrix_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url( -): Short -fun ffi_matrix_sdk_uniffi_contract_version( -): Int +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "matrix_sdk")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url( + ): Short + external fun ffi_matrix_sdk_uniffi_contract_version( + ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "matrix_sdk" - // For large crates we prevent `MethodTooLargeException` (see #2340) - // N.B. the name of the extension is very misleading, since it is - // rather `InterfaceTooLargeException`, caused by too many methods - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - // Loading of library with integrity check done. - lib - } - - // The Cleaner for the whole library - internal val CLEANER: UniffiCleaner by lazy { - UniffiCleaner.create() - } +internal object UniffiLib { + + // The Cleaner for the whole library + internal val CLEANER: UniffiCleaner by lazy { + UniffiCleaner.create() } + - // FFI functions - fun uniffi_matrix_sdk_fn_clone_oauthauthorizationdata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun uniffi_matrix_sdk_fn_free_oauthauthorizationdata(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun ffi_matrix_sdk_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Float -fun ffi_matrix_sdk_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Double -fun ffi_matrix_sdk_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_matrix_sdk_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_cancel_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_free_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Unit + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "matrix_sdk")) + + } + external fun uniffi_matrix_sdk_fn_clone_oauthauthorizationdata(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun uniffi_matrix_sdk_fn_free_oauthauthorizationdata(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit + external fun uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url(`ptr`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + external fun ffi_matrix_sdk_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Float + external fun ffi_matrix_sdk_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Double + external fun ffi_matrix_sdk_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_cancel_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_free_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_matrix_sdk_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -914,7 +781,7 @@ private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { } @Suppress("UNUSED_PARAMETER") private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { - if (lib.uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() != 25566.toShort()) { + if (lib.uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() != 47865.toShort()) { throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project") } } @@ -923,7 +790,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support @@ -989,12 +859,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer +object NoHandle /** * The cleaner interface for Object finalization code to run. * This is the entry point to any implementation that we're using. @@ -1187,21 +1068,18 @@ public object FfiConverterString: FfiConverter { } -// This template implements a class for working with a Rust struct via a Pointer/Arc +// This template implements a class for working with a Rust struct via a handle // 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 +// * Each instance holds an opaque handle to the underlying Rust struct. +// Method calls need to read this handle 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 +// * When an instance is no longer needed, its handle should be passed to a // special destructor function provided by the Rust FFI, which will drop the // underlying Rust struct. // @@ -1226,13 +1104,13 @@ public object FfiConverterString: FfiConverter { // 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 +// If we try to implement this with mutual exclusion on access to the handle, 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 A starts a method call, reads the value of the handle, but is interrupted +// before it can pass the handle 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 +// * Thread A resumes, passing the already-read handle value to Rust and triggering // a use-after-free. // // One possible solution would be to use a `ReadWriteLock`, with each method call taking @@ -1304,24 +1182,30 @@ public interface OAuthAuthorizationDataInterface { open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorizationDataInterface { - constructor(pointer: Pointer) { - this.pointer = pointer - this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(pointer)) + @Suppress("UNUSED_PARAMETER") + /** + * @suppress + */ + constructor(withHandle: UniffiWithHandle, handle: Long) { + this.handle = handle + this.cleanable = UniffiLib.CLEANER.register(this, UniffiCleanAction(handle)) } /** + * @suppress + * * 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)) + constructor(noHandle: NoHandle) { + this.handle = 0 + this.cleanable = null } - protected val pointer: Pointer? - protected val cleanable: UniffiCleaner.Cleanable + protected val handle: Long + protected val cleanable: UniffiCleaner.Cleanable? private val wasDestroyed = AtomicBoolean(false) private val callCounter = AtomicLong(1) @@ -1332,7 +1216,7 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization 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() + cleanable?.clean() } } } @@ -1342,7 +1226,7 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization this.destroy() } - internal inline fun callWithPointer(block: (ptr: Pointer) -> R): R { + internal inline fun callWithHandle(block: (handle: Long) -> 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 { @@ -1354,32 +1238,40 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization 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. + // Now we can safely do the method call without the handle being freed concurrently. try { - return block(this.uniffiClonePointer()) + return block(this.uniffiCloneHandle()) } finally { // This decrement always matches the increment we performed above. if (this.callCounter.decrementAndGet() == 0L) { - cleanable.clean() + 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 { + private class UniffiCleanAction(private val handle: Long) : Runnable { override fun run() { - pointer?.let { ptr -> - uniffiRustCall { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_fn_free_oauthauthorizationdata(ptr, status) - } + if (handle == 0.toLong()) { + // Fake object created with `NoHandle`, don't try to free. + return; + } + uniffiRustCall { status -> + UniffiLib.uniffi_matrix_sdk_fn_free_oauthauthorizationdata(handle, status) } } } - fun uniffiClonePointer(): Pointer { + /** + * @suppress + */ + fun uniffiCloneHandle(): Long { + if (handle == 0.toLong()) { + throw InternalException("uniffiCloneHandle() called on NoHandle object"); + } return uniffiRustCall() { status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_fn_clone_oauthauthorizationdata(pointer!!, status) + UniffiLib.uniffi_matrix_sdk_fn_clone_oauthauthorizationdata(handle, status) } } @@ -1388,10 +1280,11 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization * The login URL to use for authorization. */override fun `loginUrl`(): kotlin.String { return FfiConverterString.lift( - callWithPointer { + callWithHandle { uniffiRustCall() { _status -> - UniffiLib.INSTANCE.uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url( - it, _status) + UniffiLib.uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url( + it, + _status) } } ) @@ -1401,36 +1294,38 @@ open class OAuthAuthorizationData: Disposable, AutoCloseable, OAuthAuthorization + + + + /** + * @suppress + */ companion object } + /** * @suppress */ -public object FfiConverterTypeOAuthAuthorizationData: FfiConverter { - - override fun lower(value: OAuthAuthorizationData): Pointer { - return value.uniffiClonePointer() +public object FfiConverterTypeOAuthAuthorizationData: FfiConverter { + override fun lower(value: OAuthAuthorizationData): Long { + return value.uniffiCloneHandle() } - override fun lift(value: Pointer): OAuthAuthorizationData { - return OAuthAuthorizationData(value) + override fun lift(value: Long): OAuthAuthorizationData { + return OAuthAuthorizationData(UniffiWithHandle, value) } override fun read(buf: ByteBuffer): OAuthAuthorizationData { - // The Rust code always writes pointers as 8 bytes, and will - // fail to compile if they don't fit. - return lift(Pointer(buf.getLong())) + return lift(buf.getLong()) } override fun allocationSize(value: OAuthAuthorizationData) = 8UL override fun write(value: OAuthAuthorizationData, 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))) + buf.putLong(lower(value)) } } @@ -1445,48 +1340,63 @@ data class RoomPowerLevelChanges ( /** * The level required to ban a user. */ - var `ban`: kotlin.Long? = null, + var `ban`: kotlin.Long? = null + , /** * The level required to invite a user. */ - var `invite`: kotlin.Long? = null, + var `invite`: kotlin.Long? = null + , /** * The level required to kick a user. */ - var `kick`: kotlin.Long? = null, + var `kick`: kotlin.Long? = null + , /** * The level required to redact an event. */ - var `redact`: kotlin.Long? = null, + var `redact`: kotlin.Long? = null + , /** * The default level required to send message events. */ - var `eventsDefault`: kotlin.Long? = null, + var `eventsDefault`: kotlin.Long? = null + , /** * The default level required to send state events. */ - var `stateDefault`: kotlin.Long? = null, + var `stateDefault`: kotlin.Long? = null + , /** * The default power level for every user in the room. */ - var `usersDefault`: kotlin.Long? = null, + var `usersDefault`: kotlin.Long? = null + , /** * The level required to change the room's name. */ - var `roomName`: kotlin.Long? = null, + var `roomName`: kotlin.Long? = null + , /** * The level required to change the room's avatar. */ - var `roomAvatar`: kotlin.Long? = null, + var `roomAvatar`: kotlin.Long? = null + , /** * The level required to change the room's topic. */ - var `roomTopic`: kotlin.Long? = null, + var `roomTopic`: kotlin.Long? = null + , /** * The level required to change the space's children. */ - var `spaceChild`: kotlin.Long? = null -) { + var `spaceChild`: kotlin.Long? = null + +){ + + + + companion object } @@ -1549,12 +1459,18 @@ data class ServerVendorInfo ( /** * The server name. */ - var `serverName`: kotlin.String, + var `serverName`: kotlin.String + , /** * The server version. */ var `version`: kotlin.String -) { + +){ + + + + companion object } @@ -1600,59 +1516,73 @@ data class VirtualElementCallWidgetConfig ( * If the user wants to start a call or join an existing one. * Controls if the lobby is skipped or not. */ - var `intent`: Intent?, + var `intent`: Intent? + , /** * Skip the lobby when joining a call. */ - var `skipLobby`: kotlin.Boolean? = null, + var `skipLobby`: kotlin.Boolean? = null + , /** * Whether the branding header of Element call should be shown or if a * mobile header navbar should be render. * * Default: [`HeaderStyle::Standard`] */ - var `header`: HeaderStyle? = null, + var `header`: HeaderStyle? = null + , /** * Whether the branding header of Element call should be hidden. * * Default: `true` */ - var `hideHeader`: kotlin.Boolean? = null, + var `hideHeader`: kotlin.Boolean? = null + , /** * If set, the lobby will be skipped and the widget will join the * call on the `io.element.join` action. * * Default: `false` */ - var `preload`: kotlin.Boolean? = null, + var `preload`: kotlin.Boolean? = null + , /** * Whether element call should prompt the user to open in the browser or * the app. * * Default: `false` */ - var `appPrompt`: kotlin.Boolean? = null, + var `appPrompt`: kotlin.Boolean? = null + , /** * Make it not possible to get to the calls list in the webview. * * Default: `true` */ - var `confineToRoom`: kotlin.Boolean? = null, + var `confineToRoom`: kotlin.Boolean? = null + , /** * Do not show the screenshare button. */ - var `hideScreensharing`: kotlin.Boolean? = null, + var `hideScreensharing`: kotlin.Boolean? = null + , /** * Make the audio devices be controlled by the os instead of the * element-call webview. */ - var `controlledAudioDevices`: kotlin.Boolean? = null, + var `controlledAudioDevices`: kotlin.Boolean? = null + , /** * Whether and what type of notification Element Call should send, when * starting a call. */ - var `sendNotificationType`: NotificationType? = null -) { + var `sendNotificationType`: NotificationType? = null + +){ + + + + companion object } @@ -1718,11 +1648,13 @@ data class VirtualElementCallWidgetProperties ( * * E.g. , , */ - var `elementCallUrl`: kotlin.String, + var `elementCallUrl`: kotlin.String + , /** * The widget id. */ - var `widgetId`: kotlin.String, + var `widgetId`: kotlin.String + , /** * The url that is used as the target for the PostMessages sent * by the widget (to the client). @@ -1738,53 +1670,67 @@ data class VirtualElementCallWidgetProperties ( * Defaults to `element_call_url` for the non-iframe (dedicated webview) * usecase. */ - var `parentUrl`: kotlin.String? = null, + var `parentUrl`: kotlin.String? = null + , /** * The font scale which will be used inside element call. * * Default: `1` */ - var `fontScale`: kotlin.Double? = null, + var `fontScale`: kotlin.Double? = null + , /** * The font to use, to adapt to the system font. */ - var `font`: kotlin.String? = null, + var `font`: kotlin.String? = null + , /** * The encryption system to use. * * Use `EncryptionSystem::Unencrypted` to disable encryption. */ - var `encryption`: EncryptionSystem, + var `encryption`: EncryptionSystem + , /** * Can be used to pass a PostHog id to element call. */ - var `posthogUserId`: kotlin.String? = null, + var `posthogUserId`: kotlin.String? = null + , /** * The host of the posthog api. * This is only used by the embedded package of Element Call. */ - var `posthogApiHost`: kotlin.String? = null, + var `posthogApiHost`: kotlin.String? = null + , /** * The key for the posthog api. * This is only used by the embedded package of Element Call. */ - var `posthogApiKey`: kotlin.String? = null, + var `posthogApiKey`: kotlin.String? = null + , /** * The url to use for submitting rageshakes. * This is only used by the embedded package of Element Call. */ - var `rageshakeSubmitUrl`: kotlin.String? = null, + var `rageshakeSubmitUrl`: kotlin.String? = null + , /** * Sentry [DSN](https://docs.sentry.io/concepts/key-terms/dsn-explainer/) * This is only used by the embedded package of Element Call. */ - var `sentryDsn`: kotlin.String? = null, + var `sentryDsn`: kotlin.String? = null + , /** * Sentry [environment](https://docs.sentry.io/concepts/key-terms/key-terms/) * This is only used by the embedded package of Element Call. */ - var `sentryEnvironment`: kotlin.String? = null -) { + var `sentryEnvironment`: kotlin.String? = null + +){ + + + + companion object } @@ -1873,6 +1819,10 @@ enum class BackupDownloadStrategy { * This is the default option. */ MANUAL; + + + + companion object } @@ -1927,12 +1877,21 @@ sealed class EncryptionSystem { /** * The secret/password which is used in the url. */ - val `secret`: kotlin.String) : EncryptionSystem() { + val `secret`: kotlin.String) : EncryptionSystem() + + { + + companion object } + + + + + companion object } @@ -2014,6 +1973,10 @@ enum class HeaderStyle { * No Header (useful for webapps). */ NONE; + + + + companion object } @@ -2064,6 +2027,10 @@ enum class Intent { * The user wants to start a call in a "Direct Message" (DM) room. */ START_CALL_DM; + + + + companion object } @@ -2103,6 +2070,10 @@ enum class NotificationType { * The receiving client should ring with an audible sound. */ RING; + + + + companion object } @@ -2151,6 +2122,10 @@ enum class PaginatorState { * The paginator is… paginating one direction or another. */ PAGINATING; + + + + companion object } @@ -2362,6 +2337,10 @@ enum class RoomMemberRole { * The member is a regular user. */ USER; + + + + companion object } @@ -2400,7 +2379,11 @@ sealed class RoomPaginationStatus { * Have we hit the start of the timeline, i.e. back-paginating wouldn't * have any effect? */ - val `hitTimelineStart`: kotlin.Boolean) : RoomPaginationStatus() { + val `hitTimelineStart`: kotlin.Boolean) : RoomPaginationStatus() + + { + + companion object } @@ -2412,6 +2395,11 @@ sealed class RoomPaginationStatus { + + + + + companion object } diff --git a/android/src/main/java/uniffi/matrix_sdk_base/matrix_sdk_base.kt b/android/src/main/java/uniffi/matrix_sdk_base/matrix_sdk_base.kt index 8055fce..9c09f3c 100644 --- a/android/src/main/java/uniffi/matrix_sdk_base/matrix_sdk_base.kt +++ b/android/src/main/java/uniffi/matrix_sdk_base/matrix_sdk_base.kt @@ -58,7 +58,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_matrix_sdk_base_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_matrix_sdk_base_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -74,51 +74,17 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_matrix_sdk_base_rustbuffer_free(buf, status) + UniffiLib.ffi_matrix_sdk_base_rustbuffer_free(buf, status) } } @Suppress("TooGenericExceptionThrown") fun asByteBuffer() = - this.data?.getByteBuffer(0, this.len.toLong())?.also { + this.data?.getByteBuffer(0, this.len)?.also { it.order(ByteOrder.BIG_ENDIAN) } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -315,8 +281,9 @@ internal inline fun uniffiTraitInterfaceCall( try { writeReturn(makeCall()) } catch(e: kotlin.Exception) { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } @@ -333,28 +300,41 @@ internal inline fun uniffiTraitInterfaceCallWithError( callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) } else { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -377,518 +357,408 @@ private fun findLibraryName(componentName: String): String { return "matrix_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun ffi_matrix_sdk_base_uniffi_contract_version( -): Int +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_base")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun ffi_matrix_sdk_base_uniffi_contract_version( + ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "matrix_sdk_base" - // For large crates we prevent `MethodTooLargeException` (see #2340) - // N.B. the name of the extension is very misleading, since it is - // rather `InterfaceTooLargeException`, caused by too many methods - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - // Loading of library with integrity check done. - lib - } +internal object UniffiLib { + + + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_base")) } + external fun ffi_matrix_sdk_base_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_base_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_base_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + external fun ffi_matrix_sdk_base_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_base_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_base_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_base_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_base_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_base_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_base_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_base_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_base_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_base_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Float + external fun ffi_matrix_sdk_base_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Double + external fun ffi_matrix_sdk_base_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_base_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_cancel_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_free_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_base_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit - // FFI functions - fun ffi_matrix_sdk_base_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_base_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_base_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun ffi_matrix_sdk_base_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_base_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_base_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_base_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_base_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_base_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_base_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_base_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_base_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_base_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Float -fun ffi_matrix_sdk_base_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Double -fun ffi_matrix_sdk_base_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_matrix_sdk_base_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_base_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_cancel_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_free_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_base_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Unit - + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_matrix_sdk_base_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -903,7 +773,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support @@ -969,12 +842,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer +object NoHandle /** * @suppress @@ -1121,7 +1005,8 @@ data class MediaRetentionPolicy ( * * Defaults to 400 MiB. */ - var `maxCacheSize`: kotlin.ULong?, + var `maxCacheSize`: kotlin.ULong? + , /** * The maximum authorized size of a single media content, in bytes. * @@ -1139,7 +1024,8 @@ data class MediaRetentionPolicy ( * * Defaults to 20 MiB. */ - var `maxFileSize`: kotlin.ULong?, + var `maxFileSize`: kotlin.ULong? + , /** * The duration after which unaccessed media content is considered * expired. @@ -1149,7 +1035,8 @@ data class MediaRetentionPolicy ( * * Defaults to 60 days. */ - var `lastAccessExpiry`: java.time.Duration?, + var `lastAccessExpiry`: java.time.Duration? + , /** * The duration between two automatic media cache cleanups. * @@ -1161,7 +1048,12 @@ data class MediaRetentionPolicy ( * Defaults to running cleanups daily. */ var `cleanupFrequency`: java.time.Duration? -) { + +){ + + + + companion object } @@ -1215,6 +1107,10 @@ enum class EncryptionState { * `/sync` did not provide all data needed to decide. */ UNKNOWN; + + + + companion object } diff --git a/android/src/main/java/uniffi/matrix_sdk_common/matrix_sdk_common.kt b/android/src/main/java/uniffi/matrix_sdk_common/matrix_sdk_common.kt index 6badcb9..12f411b 100644 --- a/android/src/main/java/uniffi/matrix_sdk_common/matrix_sdk_common.kt +++ b/android/src/main/java/uniffi/matrix_sdk_common/matrix_sdk_common.kt @@ -58,7 +58,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_matrix_sdk_common_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_matrix_sdk_common_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -74,51 +74,17 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_matrix_sdk_common_rustbuffer_free(buf, status) + UniffiLib.ffi_matrix_sdk_common_rustbuffer_free(buf, status) } } @Suppress("TooGenericExceptionThrown") fun asByteBuffer() = - this.data?.getByteBuffer(0, this.len.toLong())?.also { + this.data?.getByteBuffer(0, this.len)?.also { it.order(ByteOrder.BIG_ENDIAN) } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -315,8 +281,9 @@ internal inline fun uniffiTraitInterfaceCall( try { writeReturn(makeCall()) } catch(e: kotlin.Exception) { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } @@ -333,28 +300,41 @@ internal inline fun uniffiTraitInterfaceCallWithError( callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) } else { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -377,518 +357,408 @@ private fun findLibraryName(componentName: String): String { return "matrix_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun ffi_matrix_sdk_common_uniffi_contract_version( -): Int +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_common")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun ffi_matrix_sdk_common_uniffi_contract_version( + ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "matrix_sdk_common" - // For large crates we prevent `MethodTooLargeException` (see #2340) - // N.B. the name of the extension is very misleading, since it is - // rather `InterfaceTooLargeException`, caused by too many methods - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - // Loading of library with integrity check done. - lib - } +internal object UniffiLib { + + + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_common")) } + external fun ffi_matrix_sdk_common_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_common_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_common_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + external fun ffi_matrix_sdk_common_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_common_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_common_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_common_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_common_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_common_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_common_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_common_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_common_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_common_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Float + external fun ffi_matrix_sdk_common_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Double + external fun ffi_matrix_sdk_common_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_common_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_cancel_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_free_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_common_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit - // FFI functions - fun ffi_matrix_sdk_common_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_common_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_common_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun ffi_matrix_sdk_common_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_common_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_common_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_common_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_common_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_common_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_common_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_common_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_common_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_common_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Float -fun ffi_matrix_sdk_common_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Double -fun ffi_matrix_sdk_common_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_matrix_sdk_common_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_common_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_cancel_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_free_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_common_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Unit - + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_matrix_sdk_common_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -903,7 +773,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support @@ -969,12 +842,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer +object NoHandle /** * @suppress @@ -1070,6 +954,10 @@ enum class ShieldStateCode { * that established the Megolm session. */ MISMATCHED_SENDER; + + + + companion object } diff --git a/android/src/main/java/uniffi/matrix_sdk_crypto/matrix_sdk_crypto.kt b/android/src/main/java/uniffi/matrix_sdk_crypto/matrix_sdk_crypto.kt index a2360b0..567e08a 100644 --- a/android/src/main/java/uniffi/matrix_sdk_crypto/matrix_sdk_crypto.kt +++ b/android/src/main/java/uniffi/matrix_sdk_crypto/matrix_sdk_crypto.kt @@ -58,7 +58,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_matrix_sdk_crypto_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_matrix_sdk_crypto_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -74,51 +74,17 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_matrix_sdk_crypto_rustbuffer_free(buf, status) + UniffiLib.ffi_matrix_sdk_crypto_rustbuffer_free(buf, status) } } @Suppress("TooGenericExceptionThrown") fun asByteBuffer() = - this.data?.getByteBuffer(0, this.len.toLong())?.also { + this.data?.getByteBuffer(0, this.len)?.also { it.order(ByteOrder.BIG_ENDIAN) } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -315,8 +281,9 @@ internal inline fun uniffiTraitInterfaceCall( try { writeReturn(makeCall()) } catch(e: kotlin.Exception) { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } @@ -333,28 +300,41 @@ internal inline fun uniffiTraitInterfaceCallWithError( callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) } else { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -377,518 +357,408 @@ private fun findLibraryName(componentName: String): String { return "matrix_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun ffi_matrix_sdk_crypto_uniffi_contract_version( -): Int +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_crypto")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun ffi_matrix_sdk_crypto_uniffi_contract_version( + ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "matrix_sdk_crypto" - // For large crates we prevent `MethodTooLargeException` (see #2340) - // N.B. the name of the extension is very misleading, since it is - // rather `InterfaceTooLargeException`, caused by too many methods - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - // Loading of library with integrity check done. - lib - } +internal object UniffiLib { + + + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_crypto")) } + external fun ffi_matrix_sdk_crypto_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_crypto_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_crypto_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + external fun ffi_matrix_sdk_crypto_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_crypto_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_crypto_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_crypto_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_crypto_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_crypto_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_crypto_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_crypto_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_crypto_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_crypto_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Float + external fun ffi_matrix_sdk_crypto_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Double + external fun ffi_matrix_sdk_crypto_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_crypto_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_cancel_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_free_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_crypto_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit - // FFI functions - fun ffi_matrix_sdk_crypto_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_crypto_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_crypto_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun ffi_matrix_sdk_crypto_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_crypto_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_crypto_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_crypto_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_crypto_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_crypto_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_crypto_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_crypto_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_crypto_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_crypto_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Float -fun ffi_matrix_sdk_crypto_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Double -fun ffi_matrix_sdk_crypto_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_matrix_sdk_crypto_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_crypto_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_cancel_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_free_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_crypto_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Unit - + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_matrix_sdk_crypto_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -903,7 +773,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support @@ -969,12 +842,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer +object NoHandle /** * @suppress @@ -1045,7 +929,12 @@ data class DecryptionSettings ( * [`MegolmError::SenderIdentityNotTrusted`] will be returned. */ var `senderDeviceTrustRequirement`: TrustRequirement -) { + +){ + + + + companion object } @@ -1115,6 +1004,10 @@ enum class CollectStrategy { * - It is the current own device of the user. */ ONLY_TRUSTED_DEVICES; + + + + companion object } @@ -1171,6 +1064,10 @@ enum class IdentityState { * [`UserIdentity::withdraw_verification`] to make it pinned. */ VERIFICATION_VIOLATION; + + + + companion object } @@ -1218,6 +1115,10 @@ enum class LocalTrust { * The trust state is unset. */ UNSET; + + + + companion object } @@ -1377,6 +1278,10 @@ enum class SignatureState { * signature is trusted. */ VALID_AND_TRUSTED; + + + + companion object } @@ -1422,6 +1327,10 @@ enum class TrustRequirement { * Only decrypt events from cross-signed devices. */ CROSS_SIGNED; + + + + companion object } @@ -1535,6 +1444,10 @@ enum class UtdCause { * Expected message to user: "You need to verify this device". */ HISTORICAL_MESSAGE_AND_DEVICE_IS_UNVERIFIED; + + + + companion object } 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 76b5097..0ee5b7b 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 @@ -58,7 +58,7 @@ open class RustBuffer : Structure() { companion object { internal fun alloc(size: ULong = 0UL) = uniffiRustCall() { status -> // Note: need to convert the size to a `Long` value to make this work with JVM. - UniffiLib.INSTANCE.ffi_matrix_sdk_ui_rustbuffer_alloc(size.toLong(), status) + UniffiLib.ffi_matrix_sdk_ui_rustbuffer_alloc(size.toLong(), status) }.also { if(it.data == null) { throw RuntimeException("RustBuffer.alloc() returned null data pointer (size=${size})") @@ -74,51 +74,17 @@ open class RustBuffer : Structure() { } internal fun free(buf: RustBuffer.ByValue) = uniffiRustCall() { status -> - UniffiLib.INSTANCE.ffi_matrix_sdk_ui_rustbuffer_free(buf, status) + UniffiLib.ffi_matrix_sdk_ui_rustbuffer_free(buf, status) } } @Suppress("TooGenericExceptionThrown") fun asByteBuffer() = - this.data?.getByteBuffer(0, this.len.toLong())?.also { + this.data?.getByteBuffer(0, this.len)?.also { it.order(ByteOrder.BIG_ENDIAN) } } -/** - * The equivalent of the `*mut RustBuffer` type. - * Required for callbacks taking in an out pointer. - * - * Size is the sum of all values in the struct. - * - * @suppress - */ -class RustBufferByReference : ByReference(16) { - /** - * Set the pointed-to `RustBuffer` to the given value. - */ - fun setValue(value: RustBuffer.ByValue) { - // NOTE: The offsets are as they are in the C-like struct. - val pointer = getPointer() - pointer.setLong(0, value.capacity) - pointer.setLong(8, value.len) - pointer.setPointer(16, value.data) - } - - /** - * Get a `RustBuffer.ByValue` from this reference. - */ - fun getValue(): RustBuffer.ByValue { - val pointer = getPointer() - val value = RustBuffer.ByValue() - value.writeField("capacity", pointer.getLong(0)) - value.writeField("len", pointer.getLong(8)) - value.writeField("data", pointer.getLong(16)) - - return value - } -} - // This is a helper for safely passing byte references into the rust code. // It's not actually used at the moment, because there aren't many things that you // can take a direct pointer to in the JVM, and if we're going to copy something @@ -315,8 +281,9 @@ internal inline fun uniffiTraitInterfaceCall( try { writeReturn(makeCall()) } catch(e: kotlin.Exception) { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } @@ -333,28 +300,41 @@ internal inline fun uniffiTraitInterfaceCallWithError( callStatus.code = UNIFFI_CALL_ERROR callStatus.error_buf = lowerError(e) } else { + val err = try { e.stackTraceToString() } catch(_: Throwable) { "" } callStatus.code = UNIFFI_CALL_UNEXPECTED_ERROR - callStatus.error_buf = FfiConverterString.lower(e.toString()) + callStatus.error_buf = FfiConverterString.lower(err) } } } +// Initial value and increment amount for handles. +// These ensure that Kotlin-generated handles always have the lowest bit set +private const val UNIFFI_HANDLEMAP_INITIAL = 1.toLong() +private const val UNIFFI_HANDLEMAP_DELTA = 2.toLong() + // Map handles to objects // // This is used pass an opaque 64-bit handle representing a foreign object to the Rust code. internal class UniffiHandleMap { private val map = ConcurrentHashMap() - private val counter = java.util.concurrent.atomic.AtomicLong(0) + // Start + private val counter = java.util.concurrent.atomic.AtomicLong(UNIFFI_HANDLEMAP_INITIAL) val size: Int get() = map.size // Insert a new object into the handle map and get a handle for it fun insert(obj: T): Long { - val handle = counter.getAndAdd(1) + val handle = counter.getAndAdd(UNIFFI_HANDLEMAP_DELTA) map.put(handle, obj) return handle } + // Clone a handle, creating a new one + fun clone(handle: Long): Long { + val obj = map.get(handle) ?: throw InternalException("UniffiHandleMap.clone: Invalid handle") + return insert(obj) + } + // Get an object from the handle map fun get(handle: Long): T { return map.get(handle) ?: throw InternalException("UniffiHandleMap.get: Invalid handle") @@ -377,518 +357,408 @@ private fun findLibraryName(componentName: String): String { return "matrix_sdk_ffi" } -private inline fun loadIndirect( - componentName: String -): Lib { - return Native.load(findLibraryName(componentName), Lib::class.java) -} - // Define FFI callback types internal interface UniffiRustFutureContinuationCallback : com.sun.jna.Callback { fun callback(`data`: Long,`pollResult`: Byte,) } -internal interface UniffiForeignFutureFree : com.sun.jna.Callback { +internal interface UniffiForeignFutureDroppedCallback : com.sun.jna.Callback { fun callback(`handle`: Long,) } internal interface UniffiCallbackInterfaceFree : com.sun.jna.Callback { fun callback(`handle`: Long,) } +internal interface UniffiCallbackInterfaceClone : com.sun.jna.Callback { + fun callback(`handle`: Long,) + : Long +} @Structure.FieldOrder("handle", "free") -internal open class UniffiForeignFuture( +internal open class UniffiForeignFutureDroppedCallbackStruct( @JvmField internal var `handle`: Long = 0.toLong(), - @JvmField internal var `free`: UniffiForeignFutureFree? = null, + @JvmField internal var `free`: UniffiForeignFutureDroppedCallback? = null, ) : Structure() { class UniffiByValue( `handle`: Long = 0.toLong(), - `free`: UniffiForeignFutureFree? = null, - ): UniffiForeignFuture(`handle`,`free`,), Structure.ByValue + `free`: UniffiForeignFutureDroppedCallback? = null, + ): UniffiForeignFutureDroppedCallbackStruct(`handle`,`free`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFuture) { + internal fun uniffiSetValue(other: UniffiForeignFutureDroppedCallbackStruct) { `handle` = other.`handle` `free` = other.`free` } } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU8( +internal open class UniffiForeignFutureResultU8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI8( +internal open class UniffiForeignFutureResultI8( @JvmField internal var `returnValue`: Byte = 0.toByte(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Byte = 0.toByte(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI8(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI8(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI8) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI8) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI8 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI8.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI8.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU16( +internal open class UniffiForeignFutureResultU16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI16( +internal open class UniffiForeignFutureResultI16( @JvmField internal var `returnValue`: Short = 0.toShort(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Short = 0.toShort(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI16(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI16(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI16) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI16) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI16 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI16.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI16.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU32( +internal open class UniffiForeignFutureResultU32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI32( +internal open class UniffiForeignFutureResultI32( @JvmField internal var `returnValue`: Int = 0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Int = 0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructU64( +internal open class UniffiForeignFutureResultU64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructU64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultU64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructU64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultU64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteU64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructU64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultU64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructI64( +internal open class UniffiForeignFutureResultI64( @JvmField internal var `returnValue`: Long = 0.toLong(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Long = 0.toLong(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructI64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultI64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructI64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultI64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteI64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructI64.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultI64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF32( +internal open class UniffiForeignFutureResultF32( @JvmField internal var `returnValue`: Float = 0.0f, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Float = 0.0f, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF32(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF32(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF32) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF32) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF32 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF32.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF32.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructF64( +internal open class UniffiForeignFutureResultF64( @JvmField internal var `returnValue`: Double = 0.0, @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: Double = 0.0, `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructF64(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultF64(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructF64) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultF64) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteF64 : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructF64.UniffiByValue,) -} -@Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructPointer( - @JvmField internal var `returnValue`: Pointer = Pointer.NULL, - @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), -) : Structure() { - class UniffiByValue( - `returnValue`: Pointer = Pointer.NULL, - `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructPointer(`returnValue`,`callStatus`,), Structure.ByValue - - internal fun uniffiSetValue(other: UniffiForeignFutureStructPointer) { - `returnValue` = other.`returnValue` - `callStatus` = other.`callStatus` - } - -} -internal interface UniffiForeignFutureCompletePointer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructPointer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultF64.UniffiByValue,) } @Structure.FieldOrder("returnValue", "callStatus") -internal open class UniffiForeignFutureStructRustBuffer( +internal open class UniffiForeignFutureResultRustBuffer( @JvmField internal var `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `returnValue`: RustBuffer.ByValue = RustBuffer.ByValue(), `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultRustBuffer(`returnValue`,`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructRustBuffer) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultRustBuffer) { `returnValue` = other.`returnValue` `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteRustBuffer : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructRustBuffer.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultRustBuffer.UniffiByValue,) } @Structure.FieldOrder("callStatus") -internal open class UniffiForeignFutureStructVoid( +internal open class UniffiForeignFutureResultVoid( @JvmField internal var `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), ) : Structure() { class UniffiByValue( `callStatus`: UniffiRustCallStatus.ByValue = UniffiRustCallStatus.ByValue(), - ): UniffiForeignFutureStructVoid(`callStatus`,), Structure.ByValue + ): UniffiForeignFutureResultVoid(`callStatus`,), Structure.ByValue - internal fun uniffiSetValue(other: UniffiForeignFutureStructVoid) { + internal fun uniffiSetValue(other: UniffiForeignFutureResultVoid) { `callStatus` = other.`callStatus` } } internal interface UniffiForeignFutureCompleteVoid : com.sun.jna.Callback { - fun callback(`callbackData`: Long,`result`: UniffiForeignFutureStructVoid.UniffiByValue,) + fun callback(`callbackData`: Long,`result`: UniffiForeignFutureResultVoid.UniffiByValue,) } - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - +// A JNA Library to expose the extern-C FFI definitions. +// This is an implementation detail which will be called internally by the public API. // For large crates we prevent `MethodTooLargeException` (see #2340) -// N.B. the name of the extension is very misleading, since it is -// rather `InterfaceTooLargeException`, caused by too many methods +// N.B. the name of the extension is very misleading, since it is +// rather `InterfaceTooLargeException`, caused by too many methods // in the interface for large crates. // // By splitting the otherwise huge interface into two parts -// * UniffiLib -// * IntegrityCheckingUniffiLib (this) +// * UniffiLib (this) +// * IntegrityCheckingUniffiLib +// And all checksum methods are put into `IntegrityCheckingUniffiLib` // we allow for ~2x as many methods in the UniffiLib interface. -// -// The `ffi_uniffi_contract_version` method and all checksum methods are put -// into `IntegrityCheckingUniffiLib` and these methods are called only once, -// when the library is loaded. -internal interface IntegrityCheckingUniffiLib : Library { - // Integrity check functions only - fun ffi_matrix_sdk_ui_uniffi_contract_version( -): Int +// +// Note: above all written when we used JNA's `loadIndirect` etc. +// We now use JNA's "direct mapping" - unclear if same considerations apply exactly. +internal object IntegrityCheckingUniffiLib { + init { + Native.register(IntegrityCheckingUniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_ui")) + uniffiCheckContractApiVersion(this) + uniffiCheckApiChecksums(this) + } + external fun ffi_matrix_sdk_ui_uniffi_contract_version( + ): Int + } -// A JNA Library to expose the extern-C FFI definitions. -// This is an implementation detail which will be called internally by the public API. -internal interface UniffiLib : Library { - companion object { - internal val INSTANCE: UniffiLib by lazy { - val componentName = "matrix_sdk_ui" - // For large crates we prevent `MethodTooLargeException` (see #2340) - // N.B. the name of the extension is very misleading, since it is - // rather `InterfaceTooLargeException`, caused by too many methods - // in the interface for large crates. - // - // By splitting the otherwise huge interface into two parts - // * UniffiLib (this) - // * IntegrityCheckingUniffiLib - // And all checksum methods are put into `IntegrityCheckingUniffiLib` - // we allow for ~2x as many methods in the UniffiLib interface. - // - // Thus we first load the library with `loadIndirect` as `IntegrityCheckingUniffiLib` - // so that we can (optionally!) call `uniffiCheckApiChecksums`... - loadIndirect(componentName) - .also { lib: IntegrityCheckingUniffiLib -> - uniffiCheckContractApiVersion(lib) - uniffiCheckApiChecksums(lib) - } - // ... and then we load the library as `UniffiLib` - // N.B. we cannot use `loadIndirect` once and then try to cast it to `UniffiLib` - // => results in `java.lang.ClassCastException: com.sun.proxy.$Proxy cannot be cast to ...` - // error. So we must call `loadIndirect` twice. For crates large enough - // to trigger this issue, the performance impact is negligible, running on - // a macOS M1 machine the `loadIndirect` call takes ~50ms. - val lib = loadIndirect(componentName) - // No need to check the contract version and checksums, since - // we already did that with `IntegrityCheckingUniffiLib` above. - // Loading of library with integrity check done. - lib - } +internal object UniffiLib { + + + init { + Native.register(UniffiLib::class.java, findLibraryName(componentName = "matrix_sdk_ui")) } + external fun ffi_matrix_sdk_ui_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_ui_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_ui_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, + ): Unit + external fun ffi_matrix_sdk_ui_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_ui_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_u8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_ui_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_i8(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Byte + external fun ffi_matrix_sdk_ui_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_u16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_ui_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_i16(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Short + external fun ffi_matrix_sdk_ui_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_u32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_ui_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_i32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Int + external fun ffi_matrix_sdk_ui_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_u64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_ui_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_i64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Long + external fun ffi_matrix_sdk_ui_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_f32(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Float + external fun ffi_matrix_sdk_ui_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_f64(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Double + external fun ffi_matrix_sdk_ui_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_rust_buffer(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): RustBuffer.ByValue + external fun ffi_matrix_sdk_ui_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_cancel_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_free_void(`handle`: Long, + ): Unit + external fun ffi_matrix_sdk_ui_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, + ): Unit - // FFI functions - fun ffi_matrix_sdk_ui_rustbuffer_alloc(`size`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_ui_rustbuffer_from_bytes(`bytes`: ForeignBytes.ByValue,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_ui_rustbuffer_free(`buf`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus, -): Unit -fun ffi_matrix_sdk_ui_rustbuffer_reserve(`buf`: RustBuffer.ByValue,`additional`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_ui_rust_future_poll_u8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_u8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_u8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_ui_rust_future_poll_i8(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_i8(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_i8(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Byte -fun ffi_matrix_sdk_ui_rust_future_poll_u16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_u16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_u16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_ui_rust_future_poll_i16(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_i16(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_i16(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Short -fun ffi_matrix_sdk_ui_rust_future_poll_u32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_u32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_u32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_ui_rust_future_poll_i32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_i32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_i32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Int -fun ffi_matrix_sdk_ui_rust_future_poll_u64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_u64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_u64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_ui_rust_future_poll_i64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_i64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_i64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Long -fun ffi_matrix_sdk_ui_rust_future_poll_f32(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_f32(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_f32(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Float -fun ffi_matrix_sdk_ui_rust_future_poll_f64(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_f64(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_f64(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Double -fun ffi_matrix_sdk_ui_rust_future_poll_pointer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_pointer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_pointer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Pointer -fun ffi_matrix_sdk_ui_rust_future_poll_rust_buffer(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_rust_buffer(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_rust_buffer(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): RustBuffer.ByValue -fun ffi_matrix_sdk_ui_rust_future_poll_void(`handle`: Long,`callback`: UniffiRustFutureContinuationCallback,`callbackData`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_cancel_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_free_void(`handle`: Long, -): Unit -fun ffi_matrix_sdk_ui_rust_future_complete_void(`handle`: Long,uniffi_out_err: UniffiRustCallStatus, -): Unit - + } private fun uniffiCheckContractApiVersion(lib: IntegrityCheckingUniffiLib) { // Get the bindings contract version from our ComponentInterface - val bindings_contract_version = 29 + val bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib val scaffolding_contract_version = lib.ffi_matrix_sdk_ui_uniffi_contract_version() if (bindings_contract_version != scaffolding_contract_version) { @@ -903,7 +773,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) { * @suppress */ public fun uniffiEnsureInitialized() { - UniffiLib.INSTANCE + IntegrityCheckingUniffiLib + // UniffiLib() initialized as objects are used, but we still need to explicitly + // reference it so initialization across crates works as expected. + UniffiLib } // Async support @@ -969,12 +842,23 @@ inline fun T.use(block: (T) -> R) = } } +/** + * Placeholder object used to signal that we're constructing an interface with a FFI handle. + * + * This is the first argument for interface constructors that input a raw handle. It exists is that + * so we can avoid signature conflicts when an interface has a regular constructor than inputs a + * Long. + * + * @suppress + * */ +object UniffiWithHandle + /** * Used to instantiate an interface without an actual pointer, for fakes in tests, mostly. * * @suppress * */ -object NoPointer +object NoHandle /** * @suppress @@ -1080,6 +964,10 @@ enum class EventItemOrigin { * The event came from a cache. */ CACHE; + + + + companion object } @@ -1123,6 +1011,10 @@ enum class RoomPinnedEventsChange { * Some change other than only adding or only removing ids happened. */ CHANGED; + + + + companion object } @@ -1151,7 +1043,11 @@ public object FfiConverterTypeRoomPinnedEventsChange: FfiConverterRustBuffer callInvoker, @@ -556,42 +542,11 @@ static void cleanup() { rsLambda = nullptr; } } // namespace uniffi::matrix_sdk::cb::rustfuturecontinuationcallback - // Implementation of callback function calling from JS to Rust - // ForeignFutureFree, passed from Rust to JS as part of async callbacks. -namespace uniffi::matrix_sdk { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureFree rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureFree func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk - // Implementation of free callback function CallbackInterfaceFree + // Implementation of callback function calling from Rust to JS + // ForeignFutureDroppedCallback // Callback function: -// uniffi::matrix_sdk::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk::cb::foreignfuturedroppedcallback::UniffiForeignFutureDroppedCallback // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -604,7 +559,7 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk::st::foreignfuture::foreignfuture::free { +namespace uniffi::matrix_sdk::cb::foreignfuturedroppedcallback { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -632,7 +587,7 @@ static void body(jsi::Runtime &rt, auto uniffiResult = cb.call(rt, js_handle); } catch (const jsi::JSError &error) { - std::cout << "Error in callback UniffiCallbackInterfaceFree: " + std::cout << "Error in callback UniffiForeignFutureDroppedCallback: " << error.what() << std::endl; throw error; } @@ -657,8 +612,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk::st::foreignfuture::foreignfuture::free +[[maybe_unused]] static UniffiForeignFutureDroppedCallback +makeCallbackFunction( // uniffi::matrix_sdk::cb::foreignfuturedroppedcallback jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -698,30 +653,34 @@ static void cleanup() { // out, then the pointer will no longer be left dangling. rsLambda = nullptr; } -} // namespace uniffi::matrix_sdk::st::foreignfuture::foreignfuture::free +} // namespace uniffi::matrix_sdk::cb::foreignfuturedroppedcallback + // Implementation of free callback function CallbackInterfaceFree + namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFuture fromJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &jsValue) { +template <> struct Bridging { + static UniffiForeignFutureDroppedCallbackStruct + 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 UniffiForeignFuture"); + throw jsi::JSError( + rt, + "Expected an object for UniffiForeignFutureDroppedCallbackStruct"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFuture rsObject; + UniffiForeignFutureDroppedCallbackStruct rsObject; // Create the vtable from the js callbacks. rsObject.handle = uniffi_jsi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "handle")); - rsObject.free = uniffi::matrix_sdk::st::foreignfuture::foreignfuture::free:: + rsObject.free = uniffi::matrix_sdk::cb::foreignfuturedroppedcallback:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "free")); return rsObject; @@ -733,21 +692,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU8 +template <> struct Bridging { + static UniffiForeignFutureResultU8 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 UniffiForeignFutureStructU8"); + "Expected an object for UniffiForeignFutureResultU8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU8 rsObject; + UniffiForeignFutureResultU8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -787,7 +746,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -798,21 +757,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI8 +template <> struct Bridging { + static UniffiForeignFutureResultI8 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 UniffiForeignFutureStructI8"); + "Expected an object for UniffiForeignFutureResultI8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI8 rsObject; + UniffiForeignFutureResultI8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -852,7 +811,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -863,21 +822,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU16 +template <> struct Bridging { + static UniffiForeignFutureResultU16 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 UniffiForeignFutureStructU16"); + "Expected an object for UniffiForeignFutureResultU16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU16 rsObject; + UniffiForeignFutureResultU16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -918,7 +877,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -929,21 +888,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI16 +template <> struct Bridging { + static UniffiForeignFutureResultI16 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 UniffiForeignFutureStructI16"); + "Expected an object for UniffiForeignFutureResultI16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI16 rsObject; + UniffiForeignFutureResultI16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -984,7 +943,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -995,21 +954,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU32 +template <> struct Bridging { + static UniffiForeignFutureResultU32 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 UniffiForeignFutureStructU32"); + "Expected an object for UniffiForeignFutureResultU32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU32 rsObject; + UniffiForeignFutureResultU32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1050,7 +1009,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1061,21 +1020,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI32 +template <> struct Bridging { + static UniffiForeignFutureResultI32 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 UniffiForeignFutureStructI32"); + "Expected an object for UniffiForeignFutureResultI32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI32 rsObject; + UniffiForeignFutureResultI32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1116,7 +1075,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1127,21 +1086,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU64 +template <> struct Bridging { + static UniffiForeignFutureResultU64 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 UniffiForeignFutureStructU64"); + "Expected an object for UniffiForeignFutureResultU64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU64 rsObject; + UniffiForeignFutureResultU64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1182,7 +1141,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1193,21 +1152,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI64 +template <> struct Bridging { + static UniffiForeignFutureResultI64 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 UniffiForeignFutureStructI64"); + "Expected an object for UniffiForeignFutureResultI64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI64 rsObject; + UniffiForeignFutureResultI64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1248,7 +1207,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1259,21 +1218,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF32 +template <> struct Bridging { + static UniffiForeignFutureResultF32 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 UniffiForeignFutureStructF32"); + "Expected an object for UniffiForeignFutureResultF32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF32 rsObject; + UniffiForeignFutureResultF32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1314,7 +1273,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1325,21 +1284,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF64 +template <> struct Bridging { + static UniffiForeignFutureResultF64 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 UniffiForeignFutureStructF64"); + "Expected an object for UniffiForeignFutureResultF64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF64 rsObject; + UniffiForeignFutureResultF64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1380,73 +1339,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( - rt, callInvoker, args[1])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk -namespace uniffi::matrix_sdk { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static UniffiForeignFutureStructPointer - 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 UniffiForeignFutureStructPointer"); - } - - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiForeignFutureStructPointer rsObject; - - // Create the vtable from the js callbacks. - rsObject.return_value = uniffi_jsi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); - rsObject.call_status = uniffi::matrix_sdk::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "callStatus")); - - return rsObject; - } -}; - -} // namespace uniffi::matrix_sdk - // Implementation of callback function calling from JS to Rust - // ForeignFutureCompletePointer, passed from Rust to JS as part of async - // callbacks. -namespace uniffi::matrix_sdk { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureCompletePointer rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureCompletePointer func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1457,21 +1350,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructRustBuffer +template <> struct Bridging { + static UniffiForeignFutureResultRustBuffer 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 UniffiForeignFutureStructRustBuffer"); + rt, "Expected an object for UniffiForeignFutureResultRustBuffer"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructRustBuffer rsObject; + UniffiForeignFutureResultRustBuffer rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi::matrix_sdk::Bridging::fromJs( @@ -1514,7 +1407,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk::Bridging< - UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, + UniffiForeignFutureResultRustBuffer>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1525,21 +1418,21 @@ namespace uniffi::matrix_sdk { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructVoid +template <> struct Bridging { + static UniffiForeignFutureResultVoid 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 UniffiForeignFutureStructVoid"); + rt, "Expected an object for UniffiForeignFutureResultVoid"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructVoid rsObject; + UniffiForeignFutureResultVoid rsObject; // Create the vtable from the js callbacks. rsObject.call_status = uniffi::matrix_sdk::Bridging::fromJs( @@ -1578,7 +1471,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk::Bridging::fromJs( + uniffi::matrix_sdk::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1753,8 +1646,9 @@ void NativeMatrixSdk::set(jsi::Runtime &rt, const jsi::PropNameID &name, NativeMatrixSdk::~NativeMatrixSdk() { // Cleanup for callback function RustFutureContinuationCallback uniffi::matrix_sdk::cb::rustfuturecontinuationcallback::cleanup(); + // Cleanup for callback function ForeignFutureDroppedCallback + uniffi::matrix_sdk::cb::foreignfuturedroppedcallback::cleanup(); // Cleanup for "free" callback function CallbackInterfaceFree - uniffi::matrix_sdk::st::foreignfuture::foreignfuture::free::cleanup(); } // Utility functions for serialization/deserialization of strings. @@ -1785,9 +1679,8 @@ jsi::Value NativeMatrixSdk:: 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_fn_free_oauthauthorizationdata(pointer, &status); + uniffi_matrix_sdk_fn_free_oauthauthorizationdata(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -1803,11 +1696,14 @@ NativeMatrixSdk::cpp_uniffi_matrix_sdk_fn_clone_oauthauthorizationdata( RustCallStatus status = uniffi::matrix_sdk::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_fn_clone_oauthauthorizationdata( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdk::cpp_uniffi_matrix_sdk_fn_free_oauthauthorizationdata( @@ -1816,7 +1712,9 @@ NativeMatrixSdk::cpp_uniffi_matrix_sdk_fn_free_oauthauthorizationdata( RustCallStatus status = uniffi::matrix_sdk::Bridging::rustSuccess(rt); uniffi_matrix_sdk_fn_free_oauthauthorizationdata( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -1829,7 +1727,9 @@ jsi::Value NativeMatrixSdk:: RustCallStatus status = uniffi::matrix_sdk::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); diff --git a/cpp/generated/matrix_sdk_base.cpp b/cpp/generated/matrix_sdk_base.cpp index 4e63a53..e19877e 100644 --- a/cpp/generated/matrix_sdk_base.cpp +++ b/cpp/generated/matrix_sdk_base.cpp @@ -17,89 +17,84 @@ namespace jsi = facebook::jsi; extern "C" { typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result); -typedef void (*UniffiForeignFutureFree)(uint64_t handle); +typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle); typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle); -typedef struct UniffiForeignFuture { +typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle); +typedef struct UniffiForeignFutureDroppedCallbackStruct { uint64_t handle; - UniffiForeignFutureFree free; -} UniffiForeignFuture; -typedef struct UniffiForeignFutureStructU8 { + UniffiForeignFutureDroppedCallback free; +} UniffiForeignFutureDroppedCallbackStruct; +typedef struct UniffiForeignFutureResultU8 { uint8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU8; +} UniffiForeignFutureResultU8; typedef void (*UniffiForeignFutureCompleteU8)( - uint64_t callback_data, UniffiForeignFutureStructU8 result); -typedef struct UniffiForeignFutureStructI8 { + uint64_t callback_data, UniffiForeignFutureResultU8 result); +typedef struct UniffiForeignFutureResultI8 { int8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI8; +} UniffiForeignFutureResultI8; typedef void (*UniffiForeignFutureCompleteI8)( - uint64_t callback_data, UniffiForeignFutureStructI8 result); -typedef struct UniffiForeignFutureStructU16 { + uint64_t callback_data, UniffiForeignFutureResultI8 result); +typedef struct UniffiForeignFutureResultU16 { uint16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU16; +} UniffiForeignFutureResultU16; typedef void (*UniffiForeignFutureCompleteU16)( - uint64_t callback_data, UniffiForeignFutureStructU16 result); -typedef struct UniffiForeignFutureStructI16 { + uint64_t callback_data, UniffiForeignFutureResultU16 result); +typedef struct UniffiForeignFutureResultI16 { int16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI16; +} UniffiForeignFutureResultI16; typedef void (*UniffiForeignFutureCompleteI16)( - uint64_t callback_data, UniffiForeignFutureStructI16 result); -typedef struct UniffiForeignFutureStructU32 { + uint64_t callback_data, UniffiForeignFutureResultI16 result); +typedef struct UniffiForeignFutureResultU32 { uint32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU32; +} UniffiForeignFutureResultU32; typedef void (*UniffiForeignFutureCompleteU32)( - uint64_t callback_data, UniffiForeignFutureStructU32 result); -typedef struct UniffiForeignFutureStructI32 { + uint64_t callback_data, UniffiForeignFutureResultU32 result); +typedef struct UniffiForeignFutureResultI32 { int32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI32; +} UniffiForeignFutureResultI32; typedef void (*UniffiForeignFutureCompleteI32)( - uint64_t callback_data, UniffiForeignFutureStructI32 result); -typedef struct UniffiForeignFutureStructU64 { + uint64_t callback_data, UniffiForeignFutureResultI32 result); +typedef struct UniffiForeignFutureResultU64 { uint64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU64; +} UniffiForeignFutureResultU64; typedef void (*UniffiForeignFutureCompleteU64)( - uint64_t callback_data, UniffiForeignFutureStructU64 result); -typedef struct UniffiForeignFutureStructI64 { + uint64_t callback_data, UniffiForeignFutureResultU64 result); +typedef struct UniffiForeignFutureResultI64 { int64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI64; +} UniffiForeignFutureResultI64; typedef void (*UniffiForeignFutureCompleteI64)( - uint64_t callback_data, UniffiForeignFutureStructI64 result); -typedef struct UniffiForeignFutureStructF32 { + uint64_t callback_data, UniffiForeignFutureResultI64 result); +typedef struct UniffiForeignFutureResultF32 { float return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF32; +} UniffiForeignFutureResultF32; typedef void (*UniffiForeignFutureCompleteF32)( - uint64_t callback_data, UniffiForeignFutureStructF32 result); -typedef struct UniffiForeignFutureStructF64 { + uint64_t callback_data, UniffiForeignFutureResultF32 result); +typedef struct UniffiForeignFutureResultF64 { double return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF64; +} UniffiForeignFutureResultF64; typedef void (*UniffiForeignFutureCompleteF64)( - uint64_t callback_data, UniffiForeignFutureStructF64 result); -typedef struct UniffiForeignFutureStructPointer { - void *return_value; - RustCallStatus call_status; -} UniffiForeignFutureStructPointer; -typedef void (*UniffiForeignFutureCompletePointer)( - uint64_t callback_data, UniffiForeignFutureStructPointer result); -typedef struct UniffiForeignFutureStructRustBuffer { + uint64_t callback_data, UniffiForeignFutureResultF64 result); +typedef struct UniffiForeignFutureResultRustBuffer { RustBuffer return_value; RustCallStatus call_status; -} UniffiForeignFutureStructRustBuffer; +} UniffiForeignFutureResultRustBuffer; typedef void (*UniffiForeignFutureCompleteRustBuffer)( - uint64_t callback_data, UniffiForeignFutureStructRustBuffer result); -typedef struct UniffiForeignFutureStructVoid { + uint64_t callback_data, UniffiForeignFutureResultRustBuffer result); +typedef struct UniffiForeignFutureResultVoid { RustCallStatus call_status; -} UniffiForeignFutureStructVoid; +} UniffiForeignFutureResultVoid; typedef void (*UniffiForeignFutureCompleteVoid)( - uint64_t callback_data, UniffiForeignFutureStructVoid result); + uint64_t callback_data, UniffiForeignFutureResultVoid result); RustBuffer ffi_matrix_sdk_base_rustbuffer_alloc(uint64_t size, RustCallStatus *uniffi_out_err); RustBuffer @@ -200,15 +195,6 @@ void ffi_matrix_sdk_base_rust_future_free_f64( /*handle*/ uint64_t handle); double ffi_matrix_sdk_base_rust_future_complete_f64( /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); -void ffi_matrix_sdk_base_rust_future_poll_pointer( - /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, - /*handle*/ uint64_t callback_data); -void ffi_matrix_sdk_base_rust_future_cancel_pointer( - /*handle*/ uint64_t handle); -void ffi_matrix_sdk_base_rust_future_free_pointer( - /*handle*/ uint64_t handle); -void *ffi_matrix_sdk_base_rust_future_complete_pointer( - /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void ffi_matrix_sdk_base_rust_future_poll_rust_buffer( /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, /*handle*/ uint64_t callback_data); @@ -507,7 +493,7 @@ static void callback(uint64_t rs_data, int8_t rs_pollResult) { rsLambda(rs_data, rs_pollResult); } -static UniffiRustFutureContinuationCallback +[[maybe_unused]] static UniffiRustFutureContinuationCallback makeCallbackFunction( // uniffi::matrix_sdk_base::cb::rustfuturecontinuationcallback jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -551,42 +537,11 @@ static void cleanup() { rsLambda = nullptr; } } // namespace uniffi::matrix_sdk_base::cb::rustfuturecontinuationcallback - // Implementation of callback function calling from JS to Rust - // ForeignFutureFree, passed from Rust to JS as part of async callbacks. -namespace uniffi::matrix_sdk_base { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureFree rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureFree func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_base - // Implementation of free callback function CallbackInterfaceFree + // Implementation of callback function calling from Rust to JS + // ForeignFutureDroppedCallback // Callback function: -// uniffi::matrix_sdk_base::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_base::cb::foreignfuturedroppedcallback::UniffiForeignFutureDroppedCallback // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -599,7 +554,7 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk_base::st::foreignfuture::foreignfuture::free { +namespace uniffi::matrix_sdk_base::cb::foreignfuturedroppedcallback { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -627,7 +582,7 @@ static void body(jsi::Runtime &rt, auto uniffiResult = cb.call(rt, js_handle); } catch (const jsi::JSError &error) { - std::cout << "Error in callback UniffiCallbackInterfaceFree: " + std::cout << "Error in callback UniffiForeignFutureDroppedCallback: " << error.what() << std::endl; throw error; } @@ -652,8 +607,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_base::st::foreignfuture::foreignfuture::free +[[maybe_unused]] static UniffiForeignFutureDroppedCallback +makeCallbackFunction( // uniffi::matrix_sdk_base::cb::foreignfuturedroppedcallback jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -693,32 +648,35 @@ static void cleanup() { // out, then the pointer will no longer be left dangling. rsLambda = nullptr; } -} // namespace uniffi::matrix_sdk_base::st::foreignfuture::foreignfuture::free +} // namespace uniffi::matrix_sdk_base::cb::foreignfuturedroppedcallback + // Implementation of free callback function CallbackInterfaceFree + namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFuture fromJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &jsValue) { +template <> struct Bridging { + static UniffiForeignFutureDroppedCallbackStruct + 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 UniffiForeignFuture"); + throw jsi::JSError( + rt, + "Expected an object for UniffiForeignFutureDroppedCallbackStruct"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFuture rsObject; + UniffiForeignFutureDroppedCallbackStruct rsObject; // Create the vtable from the js callbacks. rsObject.handle = uniffi_jsi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "handle")); - rsObject.free = uniffi::matrix_sdk_base::st::foreignfuture::foreignfuture:: - free::makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "free")); + rsObject.free = uniffi::matrix_sdk_base::cb::foreignfuturedroppedcallback:: + makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "free")); return rsObject; } @@ -729,21 +687,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU8 +template <> struct Bridging { + static UniffiForeignFutureResultU8 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 UniffiForeignFutureStructU8"); + "Expected an object for UniffiForeignFutureResultU8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU8 rsObject; + UniffiForeignFutureResultU8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -784,7 +742,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -795,21 +753,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI8 +template <> struct Bridging { + static UniffiForeignFutureResultI8 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 UniffiForeignFutureStructI8"); + "Expected an object for UniffiForeignFutureResultI8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI8 rsObject; + UniffiForeignFutureResultI8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -850,7 +808,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -861,21 +819,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU16 +template <> struct Bridging { + static UniffiForeignFutureResultU16 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 UniffiForeignFutureStructU16"); + "Expected an object for UniffiForeignFutureResultU16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU16 rsObject; + UniffiForeignFutureResultU16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -918,7 +876,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -929,21 +887,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI16 +template <> struct Bridging { + static UniffiForeignFutureResultI16 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 UniffiForeignFutureStructI16"); + "Expected an object for UniffiForeignFutureResultI16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI16 rsObject; + UniffiForeignFutureResultI16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -986,7 +944,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -997,21 +955,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU32 +template <> struct Bridging { + static UniffiForeignFutureResultU32 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 UniffiForeignFutureStructU32"); + "Expected an object for UniffiForeignFutureResultU32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU32 rsObject; + UniffiForeignFutureResultU32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1054,7 +1012,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1065,21 +1023,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI32 +template <> struct Bridging { + static UniffiForeignFutureResultI32 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 UniffiForeignFutureStructI32"); + "Expected an object for UniffiForeignFutureResultI32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI32 rsObject; + UniffiForeignFutureResultI32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1122,7 +1080,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1133,21 +1091,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU64 +template <> struct Bridging { + static UniffiForeignFutureResultU64 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 UniffiForeignFutureStructU64"); + "Expected an object for UniffiForeignFutureResultU64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU64 rsObject; + UniffiForeignFutureResultU64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1190,7 +1148,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1201,21 +1159,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI64 +template <> struct Bridging { + static UniffiForeignFutureResultI64 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 UniffiForeignFutureStructI64"); + "Expected an object for UniffiForeignFutureResultI64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI64 rsObject; + UniffiForeignFutureResultI64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1258,7 +1216,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1269,21 +1227,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF32 +template <> struct Bridging { + static UniffiForeignFutureResultF32 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 UniffiForeignFutureStructF32"); + "Expected an object for UniffiForeignFutureResultF32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF32 rsObject; + UniffiForeignFutureResultF32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1326,7 +1284,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1337,21 +1295,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF64 +template <> struct Bridging { + static UniffiForeignFutureResultF64 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 UniffiForeignFutureStructF64"); + "Expected an object for UniffiForeignFutureResultF64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF64 rsObject; + UniffiForeignFutureResultF64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1394,7 +1352,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging::fromJs( + uniffi::matrix_sdk_base::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1405,89 +1363,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructPointer - 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 UniffiForeignFutureStructPointer"); - } - - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiForeignFutureStructPointer rsObject; - - // Create the vtable from the js callbacks. - rsObject.return_value = uniffi_jsi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); - rsObject.call_status = - uniffi::matrix_sdk_base::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "callStatus")); - - return rsObject; - } -}; - -} // namespace uniffi::matrix_sdk_base - // Implementation of callback function calling from JS to Rust - // ForeignFutureCompletePointer, passed from Rust to JS as part of async - // callbacks. -namespace uniffi::matrix_sdk_base { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureCompletePointer rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureCompletePointer func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_base::Bridging< - UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, - args[1])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_base -namespace uniffi::matrix_sdk_base { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static UniffiForeignFutureStructRustBuffer +template <> struct Bridging { + static UniffiForeignFutureResultRustBuffer 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 UniffiForeignFutureStructRustBuffer"); + rt, "Expected an object for UniffiForeignFutureResultRustBuffer"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructRustBuffer rsObject; + UniffiForeignFutureResultRustBuffer rsObject; // Create the vtable from the js callbacks. rsObject.return_value = @@ -1532,7 +1422,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_base::Bridging< - UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, + UniffiForeignFutureResultRustBuffer>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1543,21 +1433,21 @@ namespace uniffi::matrix_sdk_base { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructVoid +template <> struct Bridging { + static UniffiForeignFutureResultVoid 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 UniffiForeignFutureStructVoid"); + rt, "Expected an object for UniffiForeignFutureResultVoid"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructVoid rsObject; + UniffiForeignFutureResultVoid rsObject; // Create the vtable from the js callbacks. rsObject.call_status = @@ -1598,7 +1488,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_base::Bridging< - UniffiForeignFutureStructVoid>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultVoid>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1714,8 +1604,9 @@ void NativeMatrixSdkBase::set(jsi::Runtime &rt, const jsi::PropNameID &name, NativeMatrixSdkBase::~NativeMatrixSdkBase() { // Cleanup for callback function RustFutureContinuationCallback uniffi::matrix_sdk_base::cb::rustfuturecontinuationcallback::cleanup(); + // Cleanup for callback function ForeignFutureDroppedCallback + uniffi::matrix_sdk_base::cb::foreignfuturedroppedcallback::cleanup(); // Cleanup for "free" callback function CallbackInterfaceFree - uniffi::matrix_sdk_base::st::foreignfuture::foreignfuture::free::cleanup(); } // Utility functions for serialization/deserialization of strings. diff --git a/cpp/generated/matrix_sdk_common.cpp b/cpp/generated/matrix_sdk_common.cpp index 9ef9192..d0a0b72 100644 --- a/cpp/generated/matrix_sdk_common.cpp +++ b/cpp/generated/matrix_sdk_common.cpp @@ -17,89 +17,84 @@ namespace jsi = facebook::jsi; extern "C" { typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result); -typedef void (*UniffiForeignFutureFree)(uint64_t handle); +typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle); typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle); -typedef struct UniffiForeignFuture { +typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle); +typedef struct UniffiForeignFutureDroppedCallbackStruct { uint64_t handle; - UniffiForeignFutureFree free; -} UniffiForeignFuture; -typedef struct UniffiForeignFutureStructU8 { + UniffiForeignFutureDroppedCallback free; +} UniffiForeignFutureDroppedCallbackStruct; +typedef struct UniffiForeignFutureResultU8 { uint8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU8; +} UniffiForeignFutureResultU8; typedef void (*UniffiForeignFutureCompleteU8)( - uint64_t callback_data, UniffiForeignFutureStructU8 result); -typedef struct UniffiForeignFutureStructI8 { + uint64_t callback_data, UniffiForeignFutureResultU8 result); +typedef struct UniffiForeignFutureResultI8 { int8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI8; +} UniffiForeignFutureResultI8; typedef void (*UniffiForeignFutureCompleteI8)( - uint64_t callback_data, UniffiForeignFutureStructI8 result); -typedef struct UniffiForeignFutureStructU16 { + uint64_t callback_data, UniffiForeignFutureResultI8 result); +typedef struct UniffiForeignFutureResultU16 { uint16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU16; +} UniffiForeignFutureResultU16; typedef void (*UniffiForeignFutureCompleteU16)( - uint64_t callback_data, UniffiForeignFutureStructU16 result); -typedef struct UniffiForeignFutureStructI16 { + uint64_t callback_data, UniffiForeignFutureResultU16 result); +typedef struct UniffiForeignFutureResultI16 { int16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI16; +} UniffiForeignFutureResultI16; typedef void (*UniffiForeignFutureCompleteI16)( - uint64_t callback_data, UniffiForeignFutureStructI16 result); -typedef struct UniffiForeignFutureStructU32 { + uint64_t callback_data, UniffiForeignFutureResultI16 result); +typedef struct UniffiForeignFutureResultU32 { uint32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU32; +} UniffiForeignFutureResultU32; typedef void (*UniffiForeignFutureCompleteU32)( - uint64_t callback_data, UniffiForeignFutureStructU32 result); -typedef struct UniffiForeignFutureStructI32 { + uint64_t callback_data, UniffiForeignFutureResultU32 result); +typedef struct UniffiForeignFutureResultI32 { int32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI32; +} UniffiForeignFutureResultI32; typedef void (*UniffiForeignFutureCompleteI32)( - uint64_t callback_data, UniffiForeignFutureStructI32 result); -typedef struct UniffiForeignFutureStructU64 { + uint64_t callback_data, UniffiForeignFutureResultI32 result); +typedef struct UniffiForeignFutureResultU64 { uint64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU64; +} UniffiForeignFutureResultU64; typedef void (*UniffiForeignFutureCompleteU64)( - uint64_t callback_data, UniffiForeignFutureStructU64 result); -typedef struct UniffiForeignFutureStructI64 { + uint64_t callback_data, UniffiForeignFutureResultU64 result); +typedef struct UniffiForeignFutureResultI64 { int64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI64; +} UniffiForeignFutureResultI64; typedef void (*UniffiForeignFutureCompleteI64)( - uint64_t callback_data, UniffiForeignFutureStructI64 result); -typedef struct UniffiForeignFutureStructF32 { + uint64_t callback_data, UniffiForeignFutureResultI64 result); +typedef struct UniffiForeignFutureResultF32 { float return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF32; +} UniffiForeignFutureResultF32; typedef void (*UniffiForeignFutureCompleteF32)( - uint64_t callback_data, UniffiForeignFutureStructF32 result); -typedef struct UniffiForeignFutureStructF64 { + uint64_t callback_data, UniffiForeignFutureResultF32 result); +typedef struct UniffiForeignFutureResultF64 { double return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF64; +} UniffiForeignFutureResultF64; typedef void (*UniffiForeignFutureCompleteF64)( - uint64_t callback_data, UniffiForeignFutureStructF64 result); -typedef struct UniffiForeignFutureStructPointer { - void *return_value; - RustCallStatus call_status; -} UniffiForeignFutureStructPointer; -typedef void (*UniffiForeignFutureCompletePointer)( - uint64_t callback_data, UniffiForeignFutureStructPointer result); -typedef struct UniffiForeignFutureStructRustBuffer { + uint64_t callback_data, UniffiForeignFutureResultF64 result); +typedef struct UniffiForeignFutureResultRustBuffer { RustBuffer return_value; RustCallStatus call_status; -} UniffiForeignFutureStructRustBuffer; +} UniffiForeignFutureResultRustBuffer; typedef void (*UniffiForeignFutureCompleteRustBuffer)( - uint64_t callback_data, UniffiForeignFutureStructRustBuffer result); -typedef struct UniffiForeignFutureStructVoid { + uint64_t callback_data, UniffiForeignFutureResultRustBuffer result); +typedef struct UniffiForeignFutureResultVoid { RustCallStatus call_status; -} UniffiForeignFutureStructVoid; +} UniffiForeignFutureResultVoid; typedef void (*UniffiForeignFutureCompleteVoid)( - uint64_t callback_data, UniffiForeignFutureStructVoid result); + uint64_t callback_data, UniffiForeignFutureResultVoid result); RustBuffer ffi_matrix_sdk_common_rustbuffer_alloc(uint64_t size, RustCallStatus *uniffi_out_err); @@ -201,15 +196,6 @@ void ffi_matrix_sdk_common_rust_future_free_f64( /*handle*/ uint64_t handle); double ffi_matrix_sdk_common_rust_future_complete_f64( /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); -void ffi_matrix_sdk_common_rust_future_poll_pointer( - /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, - /*handle*/ uint64_t callback_data); -void ffi_matrix_sdk_common_rust_future_cancel_pointer( - /*handle*/ uint64_t handle); -void ffi_matrix_sdk_common_rust_future_free_pointer( - /*handle*/ uint64_t handle); -void *ffi_matrix_sdk_common_rust_future_complete_pointer( - /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void ffi_matrix_sdk_common_rust_future_poll_rust_buffer( /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, /*handle*/ uint64_t callback_data); @@ -508,7 +494,7 @@ static void callback(uint64_t rs_data, int8_t rs_pollResult) { rsLambda(rs_data, rs_pollResult); } -static UniffiRustFutureContinuationCallback +[[maybe_unused]] static UniffiRustFutureContinuationCallback makeCallbackFunction( // uniffi::matrix_sdk_common::cb::rustfuturecontinuationcallback jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -552,42 +538,11 @@ static void cleanup() { rsLambda = nullptr; } } // namespace uniffi::matrix_sdk_common::cb::rustfuturecontinuationcallback - // Implementation of callback function calling from JS to Rust - // ForeignFutureFree, passed from Rust to JS as part of async callbacks. -namespace uniffi::matrix_sdk_common { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureFree rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureFree func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_common - // Implementation of free callback function CallbackInterfaceFree + // Implementation of callback function calling from Rust to JS + // ForeignFutureDroppedCallback // Callback function: -// uniffi::matrix_sdk_common::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_common::cb::foreignfuturedroppedcallback::UniffiForeignFutureDroppedCallback // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -600,7 +555,7 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk_common::st::foreignfuture::foreignfuture::free { +namespace uniffi::matrix_sdk_common::cb::foreignfuturedroppedcallback { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -628,7 +583,7 @@ static void body(jsi::Runtime &rt, auto uniffiResult = cb.call(rt, js_handle); } catch (const jsi::JSError &error) { - std::cout << "Error in callback UniffiCallbackInterfaceFree: " + std::cout << "Error in callback UniffiForeignFutureDroppedCallback: " << error.what() << std::endl; throw error; } @@ -653,8 +608,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_common::st::foreignfuture::foreignfuture::free +[[maybe_unused]] static UniffiForeignFutureDroppedCallback +makeCallbackFunction( // uniffi::matrix_sdk_common::cb::foreignfuturedroppedcallback jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -694,31 +649,35 @@ static void cleanup() { // out, then the pointer will no longer be left dangling. rsLambda = nullptr; } -} // namespace uniffi::matrix_sdk_common::st::foreignfuture::foreignfuture::free +} // namespace uniffi::matrix_sdk_common::cb::foreignfuturedroppedcallback + // Implementation of free callback function CallbackInterfaceFree + namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFuture fromJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &jsValue) { +template <> struct Bridging { + static UniffiForeignFutureDroppedCallbackStruct + 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 UniffiForeignFuture"); + throw jsi::JSError( + rt, + "Expected an object for UniffiForeignFutureDroppedCallbackStruct"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFuture rsObject; + UniffiForeignFutureDroppedCallbackStruct rsObject; // Create the vtable from the js callbacks. rsObject.handle = uniffi_jsi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "handle")); - rsObject.free = uniffi::matrix_sdk_common::st::foreignfuture:: - foreignfuture::free::makeCallbackFunction( + rsObject.free = uniffi::matrix_sdk_common::cb:: + foreignfuturedroppedcallback::makeCallbackFunction( rt, callInvoker, jsObject.getProperty(rt, "free")); return rsObject; @@ -730,21 +689,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU8 +template <> struct Bridging { + static UniffiForeignFutureResultU8 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 UniffiForeignFutureStructU8"); + "Expected an object for UniffiForeignFutureResultU8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU8 rsObject; + UniffiForeignFutureResultU8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -786,7 +745,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructU8>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU8>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -796,21 +755,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI8 +template <> struct Bridging { + static UniffiForeignFutureResultI8 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 UniffiForeignFutureStructI8"); + "Expected an object for UniffiForeignFutureResultI8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI8 rsObject; + UniffiForeignFutureResultI8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -852,7 +811,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructI8>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI8>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -862,21 +821,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU16 +template <> struct Bridging { + static UniffiForeignFutureResultU16 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 UniffiForeignFutureStructU16"); + "Expected an object for UniffiForeignFutureResultU16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU16 rsObject; + UniffiForeignFutureResultU16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -919,7 +878,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructU16>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU16>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -929,21 +888,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI16 +template <> struct Bridging { + static UniffiForeignFutureResultI16 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 UniffiForeignFutureStructI16"); + "Expected an object for UniffiForeignFutureResultI16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI16 rsObject; + UniffiForeignFutureResultI16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -986,7 +945,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructI16>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI16>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -996,21 +955,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU32 +template <> struct Bridging { + static UniffiForeignFutureResultU32 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 UniffiForeignFutureStructU32"); + "Expected an object for UniffiForeignFutureResultU32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU32 rsObject; + UniffiForeignFutureResultU32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1053,7 +1012,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructU32>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU32>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1063,21 +1022,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI32 +template <> struct Bridging { + static UniffiForeignFutureResultI32 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 UniffiForeignFutureStructI32"); + "Expected an object for UniffiForeignFutureResultI32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI32 rsObject; + UniffiForeignFutureResultI32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1120,7 +1079,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructI32>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI32>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1130,21 +1089,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU64 +template <> struct Bridging { + static UniffiForeignFutureResultU64 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 UniffiForeignFutureStructU64"); + "Expected an object for UniffiForeignFutureResultU64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU64 rsObject; + UniffiForeignFutureResultU64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1187,7 +1146,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructU64>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU64>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1197,21 +1156,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI64 +template <> struct Bridging { + static UniffiForeignFutureResultI64 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 UniffiForeignFutureStructI64"); + "Expected an object for UniffiForeignFutureResultI64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI64 rsObject; + UniffiForeignFutureResultI64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1254,7 +1213,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructI64>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI64>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1264,21 +1223,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF32 +template <> struct Bridging { + static UniffiForeignFutureResultF32 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 UniffiForeignFutureStructF32"); + "Expected an object for UniffiForeignFutureResultF32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF32 rsObject; + UniffiForeignFutureResultF32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1321,7 +1280,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructF32>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultF32>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1331,21 +1290,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF64 +template <> struct Bridging { + static UniffiForeignFutureResultF64 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 UniffiForeignFutureStructF64"); + "Expected an object for UniffiForeignFutureResultF64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF64 rsObject; + UniffiForeignFutureResultF64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1388,75 +1347,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructF64>::fromJs(rt, callInvoker, args[1])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_common -namespace uniffi::matrix_sdk_common { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static UniffiForeignFutureStructPointer - 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 UniffiForeignFutureStructPointer"); - } - - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiForeignFutureStructPointer rsObject; - - // Create the vtable from the js callbacks. - rsObject.return_value = uniffi_jsi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); - rsObject.call_status = - uniffi::matrix_sdk_common::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "callStatus")); - - return rsObject; - } -}; - -} // namespace uniffi::matrix_sdk_common - // Implementation of callback function calling from JS to Rust - // ForeignFutureCompletePointer, passed from Rust to JS as part of async - // callbacks. -namespace uniffi::matrix_sdk_common { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureCompletePointer rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureCompletePointer func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, - args[1])); + UniffiForeignFutureResultF64>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1466,21 +1357,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructRustBuffer +template <> struct Bridging { + static UniffiForeignFutureResultRustBuffer 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 UniffiForeignFutureStructRustBuffer"); + rt, "Expected an object for UniffiForeignFutureResultRustBuffer"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructRustBuffer rsObject; + UniffiForeignFutureResultRustBuffer rsObject; // Create the vtable from the js callbacks. rsObject.return_value = @@ -1525,7 +1416,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, + UniffiForeignFutureResultRustBuffer>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1536,21 +1427,21 @@ namespace uniffi::matrix_sdk_common { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructVoid +template <> struct Bridging { + static UniffiForeignFutureResultVoid 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 UniffiForeignFutureStructVoid"); + rt, "Expected an object for UniffiForeignFutureResultVoid"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructVoid rsObject; + UniffiForeignFutureResultVoid rsObject; // Create the vtable from the js callbacks. rsObject.call_status = @@ -1591,7 +1482,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_common::Bridging< - UniffiForeignFutureStructVoid>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultVoid>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1707,8 +1598,9 @@ void NativeMatrixSdkCommon::set(jsi::Runtime &rt, const jsi::PropNameID &name, NativeMatrixSdkCommon::~NativeMatrixSdkCommon() { // Cleanup for callback function RustFutureContinuationCallback uniffi::matrix_sdk_common::cb::rustfuturecontinuationcallback::cleanup(); + // Cleanup for callback function ForeignFutureDroppedCallback + uniffi::matrix_sdk_common::cb::foreignfuturedroppedcallback::cleanup(); // Cleanup for "free" callback function CallbackInterfaceFree - uniffi::matrix_sdk_common::st::foreignfuture::foreignfuture::free::cleanup(); } // Utility functions for serialization/deserialization of strings. diff --git a/cpp/generated/matrix_sdk_crypto.cpp b/cpp/generated/matrix_sdk_crypto.cpp index e6b81f2..25ea635 100644 --- a/cpp/generated/matrix_sdk_crypto.cpp +++ b/cpp/generated/matrix_sdk_crypto.cpp @@ -17,89 +17,84 @@ namespace jsi = facebook::jsi; extern "C" { typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result); -typedef void (*UniffiForeignFutureFree)(uint64_t handle); +typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle); typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle); -typedef struct UniffiForeignFuture { +typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle); +typedef struct UniffiForeignFutureDroppedCallbackStruct { uint64_t handle; - UniffiForeignFutureFree free; -} UniffiForeignFuture; -typedef struct UniffiForeignFutureStructU8 { + UniffiForeignFutureDroppedCallback free; +} UniffiForeignFutureDroppedCallbackStruct; +typedef struct UniffiForeignFutureResultU8 { uint8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU8; +} UniffiForeignFutureResultU8; typedef void (*UniffiForeignFutureCompleteU8)( - uint64_t callback_data, UniffiForeignFutureStructU8 result); -typedef struct UniffiForeignFutureStructI8 { + uint64_t callback_data, UniffiForeignFutureResultU8 result); +typedef struct UniffiForeignFutureResultI8 { int8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI8; +} UniffiForeignFutureResultI8; typedef void (*UniffiForeignFutureCompleteI8)( - uint64_t callback_data, UniffiForeignFutureStructI8 result); -typedef struct UniffiForeignFutureStructU16 { + uint64_t callback_data, UniffiForeignFutureResultI8 result); +typedef struct UniffiForeignFutureResultU16 { uint16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU16; +} UniffiForeignFutureResultU16; typedef void (*UniffiForeignFutureCompleteU16)( - uint64_t callback_data, UniffiForeignFutureStructU16 result); -typedef struct UniffiForeignFutureStructI16 { + uint64_t callback_data, UniffiForeignFutureResultU16 result); +typedef struct UniffiForeignFutureResultI16 { int16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI16; +} UniffiForeignFutureResultI16; typedef void (*UniffiForeignFutureCompleteI16)( - uint64_t callback_data, UniffiForeignFutureStructI16 result); -typedef struct UniffiForeignFutureStructU32 { + uint64_t callback_data, UniffiForeignFutureResultI16 result); +typedef struct UniffiForeignFutureResultU32 { uint32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU32; +} UniffiForeignFutureResultU32; typedef void (*UniffiForeignFutureCompleteU32)( - uint64_t callback_data, UniffiForeignFutureStructU32 result); -typedef struct UniffiForeignFutureStructI32 { + uint64_t callback_data, UniffiForeignFutureResultU32 result); +typedef struct UniffiForeignFutureResultI32 { int32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI32; +} UniffiForeignFutureResultI32; typedef void (*UniffiForeignFutureCompleteI32)( - uint64_t callback_data, UniffiForeignFutureStructI32 result); -typedef struct UniffiForeignFutureStructU64 { + uint64_t callback_data, UniffiForeignFutureResultI32 result); +typedef struct UniffiForeignFutureResultU64 { uint64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU64; +} UniffiForeignFutureResultU64; typedef void (*UniffiForeignFutureCompleteU64)( - uint64_t callback_data, UniffiForeignFutureStructU64 result); -typedef struct UniffiForeignFutureStructI64 { + uint64_t callback_data, UniffiForeignFutureResultU64 result); +typedef struct UniffiForeignFutureResultI64 { int64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI64; +} UniffiForeignFutureResultI64; typedef void (*UniffiForeignFutureCompleteI64)( - uint64_t callback_data, UniffiForeignFutureStructI64 result); -typedef struct UniffiForeignFutureStructF32 { + uint64_t callback_data, UniffiForeignFutureResultI64 result); +typedef struct UniffiForeignFutureResultF32 { float return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF32; +} UniffiForeignFutureResultF32; typedef void (*UniffiForeignFutureCompleteF32)( - uint64_t callback_data, UniffiForeignFutureStructF32 result); -typedef struct UniffiForeignFutureStructF64 { + uint64_t callback_data, UniffiForeignFutureResultF32 result); +typedef struct UniffiForeignFutureResultF64 { double return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF64; +} UniffiForeignFutureResultF64; typedef void (*UniffiForeignFutureCompleteF64)( - uint64_t callback_data, UniffiForeignFutureStructF64 result); -typedef struct UniffiForeignFutureStructPointer { - void *return_value; - RustCallStatus call_status; -} UniffiForeignFutureStructPointer; -typedef void (*UniffiForeignFutureCompletePointer)( - uint64_t callback_data, UniffiForeignFutureStructPointer result); -typedef struct UniffiForeignFutureStructRustBuffer { + uint64_t callback_data, UniffiForeignFutureResultF64 result); +typedef struct UniffiForeignFutureResultRustBuffer { RustBuffer return_value; RustCallStatus call_status; -} UniffiForeignFutureStructRustBuffer; +} UniffiForeignFutureResultRustBuffer; typedef void (*UniffiForeignFutureCompleteRustBuffer)( - uint64_t callback_data, UniffiForeignFutureStructRustBuffer result); -typedef struct UniffiForeignFutureStructVoid { + uint64_t callback_data, UniffiForeignFutureResultRustBuffer result); +typedef struct UniffiForeignFutureResultVoid { RustCallStatus call_status; -} UniffiForeignFutureStructVoid; +} UniffiForeignFutureResultVoid; typedef void (*UniffiForeignFutureCompleteVoid)( - uint64_t callback_data, UniffiForeignFutureStructVoid result); + uint64_t callback_data, UniffiForeignFutureResultVoid result); RustBuffer ffi_matrix_sdk_crypto_rustbuffer_alloc(uint64_t size, RustCallStatus *uniffi_out_err); @@ -201,15 +196,6 @@ void ffi_matrix_sdk_crypto_rust_future_free_f64( /*handle*/ uint64_t handle); double ffi_matrix_sdk_crypto_rust_future_complete_f64( /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); -void ffi_matrix_sdk_crypto_rust_future_poll_pointer( - /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, - /*handle*/ uint64_t callback_data); -void ffi_matrix_sdk_crypto_rust_future_cancel_pointer( - /*handle*/ uint64_t handle); -void ffi_matrix_sdk_crypto_rust_future_free_pointer( - /*handle*/ uint64_t handle); -void *ffi_matrix_sdk_crypto_rust_future_complete_pointer( - /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void ffi_matrix_sdk_crypto_rust_future_poll_rust_buffer( /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, /*handle*/ uint64_t callback_data); @@ -508,7 +494,7 @@ static void callback(uint64_t rs_data, int8_t rs_pollResult) { rsLambda(rs_data, rs_pollResult); } -static UniffiRustFutureContinuationCallback +[[maybe_unused]] static UniffiRustFutureContinuationCallback makeCallbackFunction( // uniffi::matrix_sdk_crypto::cb::rustfuturecontinuationcallback jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -552,42 +538,11 @@ static void cleanup() { rsLambda = nullptr; } } // namespace uniffi::matrix_sdk_crypto::cb::rustfuturecontinuationcallback - // Implementation of callback function calling from JS to Rust - // ForeignFutureFree, passed from Rust to JS as part of async callbacks. -namespace uniffi::matrix_sdk_crypto { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureFree rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureFree func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_crypto - // Implementation of free callback function CallbackInterfaceFree + // Implementation of callback function calling from Rust to JS + // ForeignFutureDroppedCallback // Callback function: -// uniffi::matrix_sdk_crypto::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_crypto::cb::foreignfuturedroppedcallback::UniffiForeignFutureDroppedCallback // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -600,7 +555,7 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk_crypto::st::foreignfuture::foreignfuture::free { +namespace uniffi::matrix_sdk_crypto::cb::foreignfuturedroppedcallback { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -628,7 +583,7 @@ static void body(jsi::Runtime &rt, auto uniffiResult = cb.call(rt, js_handle); } catch (const jsi::JSError &error) { - std::cout << "Error in callback UniffiCallbackInterfaceFree: " + std::cout << "Error in callback UniffiForeignFutureDroppedCallback: " << error.what() << std::endl; throw error; } @@ -653,8 +608,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_crypto::st::foreignfuture::foreignfuture::free +[[maybe_unused]] static UniffiForeignFutureDroppedCallback +makeCallbackFunction( // uniffi::matrix_sdk_crypto::cb::foreignfuturedroppedcallback jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -694,31 +649,35 @@ static void cleanup() { // out, then the pointer will no longer be left dangling. rsLambda = nullptr; } -} // namespace uniffi::matrix_sdk_crypto::st::foreignfuture::foreignfuture::free +} // namespace uniffi::matrix_sdk_crypto::cb::foreignfuturedroppedcallback + // Implementation of free callback function CallbackInterfaceFree + namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFuture fromJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &jsValue) { +template <> struct Bridging { + static UniffiForeignFutureDroppedCallbackStruct + 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 UniffiForeignFuture"); + throw jsi::JSError( + rt, + "Expected an object for UniffiForeignFutureDroppedCallbackStruct"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFuture rsObject; + UniffiForeignFutureDroppedCallbackStruct rsObject; // Create the vtable from the js callbacks. rsObject.handle = uniffi_jsi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "handle")); - rsObject.free = uniffi::matrix_sdk_crypto::st::foreignfuture:: - foreignfuture::free::makeCallbackFunction( + rsObject.free = uniffi::matrix_sdk_crypto::cb:: + foreignfuturedroppedcallback::makeCallbackFunction( rt, callInvoker, jsObject.getProperty(rt, "free")); return rsObject; @@ -730,21 +689,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU8 +template <> struct Bridging { + static UniffiForeignFutureResultU8 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 UniffiForeignFutureStructU8"); + "Expected an object for UniffiForeignFutureResultU8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU8 rsObject; + UniffiForeignFutureResultU8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -786,7 +745,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructU8>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU8>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -796,21 +755,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI8 +template <> struct Bridging { + static UniffiForeignFutureResultI8 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 UniffiForeignFutureStructI8"); + "Expected an object for UniffiForeignFutureResultI8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI8 rsObject; + UniffiForeignFutureResultI8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -852,7 +811,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructI8>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI8>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -862,21 +821,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU16 +template <> struct Bridging { + static UniffiForeignFutureResultU16 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 UniffiForeignFutureStructU16"); + "Expected an object for UniffiForeignFutureResultU16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU16 rsObject; + UniffiForeignFutureResultU16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -919,7 +878,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructU16>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU16>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -929,21 +888,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI16 +template <> struct Bridging { + static UniffiForeignFutureResultI16 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 UniffiForeignFutureStructI16"); + "Expected an object for UniffiForeignFutureResultI16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI16 rsObject; + UniffiForeignFutureResultI16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -986,7 +945,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructI16>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI16>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -996,21 +955,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU32 +template <> struct Bridging { + static UniffiForeignFutureResultU32 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 UniffiForeignFutureStructU32"); + "Expected an object for UniffiForeignFutureResultU32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU32 rsObject; + UniffiForeignFutureResultU32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1053,7 +1012,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructU32>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU32>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1063,21 +1022,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI32 +template <> struct Bridging { + static UniffiForeignFutureResultI32 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 UniffiForeignFutureStructI32"); + "Expected an object for UniffiForeignFutureResultI32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI32 rsObject; + UniffiForeignFutureResultI32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1120,7 +1079,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructI32>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI32>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1130,21 +1089,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU64 +template <> struct Bridging { + static UniffiForeignFutureResultU64 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 UniffiForeignFutureStructU64"); + "Expected an object for UniffiForeignFutureResultU64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU64 rsObject; + UniffiForeignFutureResultU64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1187,7 +1146,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructU64>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultU64>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1197,21 +1156,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI64 +template <> struct Bridging { + static UniffiForeignFutureResultI64 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 UniffiForeignFutureStructI64"); + "Expected an object for UniffiForeignFutureResultI64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI64 rsObject; + UniffiForeignFutureResultI64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1254,7 +1213,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructI64>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultI64>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1264,21 +1223,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF32 +template <> struct Bridging { + static UniffiForeignFutureResultF32 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 UniffiForeignFutureStructF32"); + "Expected an object for UniffiForeignFutureResultF32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF32 rsObject; + UniffiForeignFutureResultF32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1321,7 +1280,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructF32>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultF32>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1331,21 +1290,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF64 +template <> struct Bridging { + static UniffiForeignFutureResultF64 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 UniffiForeignFutureStructF64"); + "Expected an object for UniffiForeignFutureResultF64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF64 rsObject; + UniffiForeignFutureResultF64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1388,75 +1347,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructF64>::fromJs(rt, callInvoker, args[1])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_crypto -namespace uniffi::matrix_sdk_crypto { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static UniffiForeignFutureStructPointer - 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 UniffiForeignFutureStructPointer"); - } - - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiForeignFutureStructPointer rsObject; - - // Create the vtable from the js callbacks. - rsObject.return_value = uniffi_jsi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); - rsObject.call_status = - uniffi::matrix_sdk_crypto::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "callStatus")); - - return rsObject; - } -}; - -} // namespace uniffi::matrix_sdk_crypto - // Implementation of callback function calling from JS to Rust - // ForeignFutureCompletePointer, passed from Rust to JS as part of async - // callbacks. -namespace uniffi::matrix_sdk_crypto { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureCompletePointer rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureCompletePointer func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, - args[1])); + UniffiForeignFutureResultF64>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1466,21 +1357,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructRustBuffer +template <> struct Bridging { + static UniffiForeignFutureResultRustBuffer 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 UniffiForeignFutureStructRustBuffer"); + rt, "Expected an object for UniffiForeignFutureResultRustBuffer"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructRustBuffer rsObject; + UniffiForeignFutureResultRustBuffer rsObject; // Create the vtable from the js callbacks. rsObject.return_value = @@ -1525,7 +1416,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, + UniffiForeignFutureResultRustBuffer>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1536,21 +1427,21 @@ namespace uniffi::matrix_sdk_crypto { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructVoid +template <> struct Bridging { + static UniffiForeignFutureResultVoid 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 UniffiForeignFutureStructVoid"); + rt, "Expected an object for UniffiForeignFutureResultVoid"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructVoid rsObject; + UniffiForeignFutureResultVoid rsObject; // Create the vtable from the js callbacks. rsObject.call_status = @@ -1591,7 +1482,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_crypto::Bridging< - UniffiForeignFutureStructVoid>::fromJs(rt, callInvoker, args[1])); + UniffiForeignFutureResultVoid>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); } @@ -1707,8 +1598,9 @@ void NativeMatrixSdkCrypto::set(jsi::Runtime &rt, const jsi::PropNameID &name, NativeMatrixSdkCrypto::~NativeMatrixSdkCrypto() { // Cleanup for callback function RustFutureContinuationCallback uniffi::matrix_sdk_crypto::cb::rustfuturecontinuationcallback::cleanup(); + // Cleanup for callback function ForeignFutureDroppedCallback + uniffi::matrix_sdk_crypto::cb::foreignfuturedroppedcallback::cleanup(); // Cleanup for "free" callback function CallbackInterfaceFree - uniffi::matrix_sdk_crypto::st::foreignfuture::foreignfuture::free::cleanup(); } // Utility functions for serialization/deserialization of strings. diff --git a/cpp/generated/matrix_sdk_ffi.cpp b/cpp/generated/matrix_sdk_ffi.cpp index 39f684a..cb82adc 100644 --- a/cpp/generated/matrix_sdk_ffi.cpp +++ b/cpp/generated/matrix_sdk_ffi.cpp @@ -17,101 +17,87 @@ namespace jsi = facebook::jsi; extern "C" { typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result); -typedef void (*UniffiForeignFutureFree)(uint64_t handle); +typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle); typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle); -typedef struct UniffiForeignFuture { +typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle); +typedef struct UniffiForeignFutureDroppedCallbackStruct { uint64_t handle; - UniffiForeignFutureFree free; -} UniffiForeignFuture; -typedef struct UniffiForeignFutureStructU8 { + UniffiForeignFutureDroppedCallback free; +} UniffiForeignFutureDroppedCallbackStruct; +typedef struct UniffiForeignFutureResultU8 { uint8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU8; +} UniffiForeignFutureResultU8; typedef void (*UniffiForeignFutureCompleteU8)( - uint64_t callback_data, UniffiForeignFutureStructU8 result); -typedef struct UniffiForeignFutureStructI8 { + uint64_t callback_data, UniffiForeignFutureResultU8 result); +typedef struct UniffiForeignFutureResultI8 { int8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI8; +} UniffiForeignFutureResultI8; typedef void (*UniffiForeignFutureCompleteI8)( - uint64_t callback_data, UniffiForeignFutureStructI8 result); -typedef struct UniffiForeignFutureStructU16 { + uint64_t callback_data, UniffiForeignFutureResultI8 result); +typedef struct UniffiForeignFutureResultU16 { uint16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU16; +} UniffiForeignFutureResultU16; typedef void (*UniffiForeignFutureCompleteU16)( - uint64_t callback_data, UniffiForeignFutureStructU16 result); -typedef struct UniffiForeignFutureStructI16 { + uint64_t callback_data, UniffiForeignFutureResultU16 result); +typedef struct UniffiForeignFutureResultI16 { int16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI16; +} UniffiForeignFutureResultI16; typedef void (*UniffiForeignFutureCompleteI16)( - uint64_t callback_data, UniffiForeignFutureStructI16 result); -typedef struct UniffiForeignFutureStructU32 { + uint64_t callback_data, UniffiForeignFutureResultI16 result); +typedef struct UniffiForeignFutureResultU32 { uint32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU32; +} UniffiForeignFutureResultU32; typedef void (*UniffiForeignFutureCompleteU32)( - uint64_t callback_data, UniffiForeignFutureStructU32 result); -typedef struct UniffiForeignFutureStructI32 { + uint64_t callback_data, UniffiForeignFutureResultU32 result); +typedef struct UniffiForeignFutureResultI32 { int32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI32; +} UniffiForeignFutureResultI32; typedef void (*UniffiForeignFutureCompleteI32)( - uint64_t callback_data, UniffiForeignFutureStructI32 result); -typedef struct UniffiForeignFutureStructU64 { + uint64_t callback_data, UniffiForeignFutureResultI32 result); +typedef struct UniffiForeignFutureResultU64 { uint64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU64; +} UniffiForeignFutureResultU64; typedef void (*UniffiForeignFutureCompleteU64)( - uint64_t callback_data, UniffiForeignFutureStructU64 result); -typedef struct UniffiForeignFutureStructI64 { + uint64_t callback_data, UniffiForeignFutureResultU64 result); +typedef struct UniffiForeignFutureResultI64 { int64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI64; +} UniffiForeignFutureResultI64; typedef void (*UniffiForeignFutureCompleteI64)( - uint64_t callback_data, UniffiForeignFutureStructI64 result); -typedef struct UniffiForeignFutureStructF32 { + uint64_t callback_data, UniffiForeignFutureResultI64 result); +typedef struct UniffiForeignFutureResultF32 { float return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF32; +} UniffiForeignFutureResultF32; typedef void (*UniffiForeignFutureCompleteF32)( - uint64_t callback_data, UniffiForeignFutureStructF32 result); -typedef struct UniffiForeignFutureStructF64 { + uint64_t callback_data, UniffiForeignFutureResultF32 result); +typedef struct UniffiForeignFutureResultF64 { double return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF64; +} UniffiForeignFutureResultF64; typedef void (*UniffiForeignFutureCompleteF64)( - uint64_t callback_data, UniffiForeignFutureStructF64 result); -typedef struct UniffiForeignFutureStructPointer { - void *return_value; - RustCallStatus call_status; -} UniffiForeignFutureStructPointer; -typedef void (*UniffiForeignFutureCompletePointer)( - uint64_t callback_data, UniffiForeignFutureStructPointer result); -typedef struct UniffiForeignFutureStructRustBuffer { + uint64_t callback_data, UniffiForeignFutureResultF64 result); +typedef struct UniffiForeignFutureResultRustBuffer { RustBuffer return_value; RustCallStatus call_status; -} UniffiForeignFutureStructRustBuffer; +} UniffiForeignFutureResultRustBuffer; typedef void (*UniffiForeignFutureCompleteRustBuffer)( - uint64_t callback_data, UniffiForeignFutureStructRustBuffer result); -typedef struct UniffiForeignFutureStructVoid { + uint64_t callback_data, UniffiForeignFutureResultRustBuffer result); +typedef struct UniffiForeignFutureResultVoid { RustCallStatus call_status; -} UniffiForeignFutureStructVoid; +} UniffiForeignFutureResultVoid; typedef void (*UniffiForeignFutureCompleteVoid)( - uint64_t callback_data, UniffiForeignFutureStructVoid result); + uint64_t callback_data, UniffiForeignFutureResultVoid result); typedef void (*UniffiCallbackInterfaceAccountDataListenerMethod0)( uint64_t uniffi_handle, RustBuffer event, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceBackupStateListenerMethod0)( - uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, - RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceBackupSteadyStateListenerMethod0)( - uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, - RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceCallDeclineListenerMethod0)( - uint64_t uniffi_handle, RustBuffer decliner_user_id, - void *uniffi_out_return, RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceClientDelegateMethod0)( uint64_t uniffi_handle, int8_t is_soft_logout, void *uniffi_out_return, RustCallStatus *rust_call_status); @@ -121,9 +107,45 @@ typedef void (*UniffiCallbackInterfaceClientSessionDelegateMethod0)( typedef void (*UniffiCallbackInterfaceClientSessionDelegateMethod1)( uint64_t uniffi_handle, RustBuffer session, void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceIgnoredUsersListenerMethod0)( + uint64_t uniffi_handle, RustBuffer ignored_user_ids, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0)( + uint64_t uniffi_handle, RustBuffer media_preview_config, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceProgressWatcherMethod0)( + uint64_t uniffi_handle, RustBuffer progress, void *uniffi_out_return, + RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceRoomAccountDataListenerMethod0)( + uint64_t uniffi_handle, RustBuffer event, RustBuffer room_id, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0)( + uint64_t uniffi_handle, RustBuffer room_id, RustBuffer error, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0)( + uint64_t uniffi_handle, RustBuffer room_id, RustBuffer update, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceSyncNotificationListenerMethod0)( + uint64_t uniffi_handle, RustBuffer notification, RustBuffer room_id, + void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceBackupStateListenerMethod0)( + uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, + RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceBackupSteadyStateListenerMethod0)( + uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, + RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0)( uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceRecoveryStateListenerMethod0)( + uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, + RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceVerificationStateListenerMethod0)( + uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, + RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceNotificationSettingsDelegateMethod0)( + uint64_t uniffi_handle, void *uniffi_out_return, + RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0)( uint64_t uniffi_handle, RustBuffer state, void *uniffi_out_return, RustCallStatus *rust_call_status); @@ -134,46 +156,34 @@ typedef void ( typedef void (*UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0)( uint64_t uniffi_handle, RustBuffer state, void *uniffi_out_return, RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceQrLoginProgressListenerMethod0)( + uint64_t uniffi_handle, RustBuffer state, void *uniffi_out_return, + RustCallStatus *rust_call_status); +typedef void (*UniffiCallbackInterfaceCallDeclineListenerMethod0)( + uint64_t uniffi_handle, RustBuffer decliner_user_id, + void *uniffi_out_return, RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0)( uint64_t uniffi_handle, RustBuffer identity_status_change, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceIgnoredUsersListenerMethod0)( - uint64_t uniffi_handle, RustBuffer ignored_user_ids, - void *uniffi_out_return, RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceKnockRequestsListenerMethod0)( uint64_t uniffi_handle, RustBuffer join_requests, void *uniffi_out_return, RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceLiveLocationShareListenerMethod0)( uint64_t uniffi_handle, RustBuffer live_location_shares, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0)( - uint64_t uniffi_handle, RustBuffer media_preview_config, - void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceNotificationSettingsDelegateMethod0)( - uint64_t uniffi_handle, void *uniffi_out_return, - RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfacePaginationStatusListenerMethod0)( - uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, - RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceProgressWatcherMethod0)( - uint64_t uniffi_handle, RustBuffer progress, void *uniffi_out_return, +typedef void (*UniffiCallbackInterfaceRoomInfoListenerMethod0)( + uint64_t uniffi_handle, RustBuffer room_info, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceQrLoginProgressListenerMethod0)( - uint64_t uniffi_handle, RustBuffer state, void *uniffi_out_return, +typedef void (*UniffiCallbackInterfaceSendQueueListenerMethod0)( + uint64_t uniffi_handle, RustBuffer update, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceRecoveryStateListenerMethod0)( - uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, +typedef void (*UniffiCallbackInterfaceTypingNotificationsListenerMethod0)( + uint64_t uniffi_handle, RustBuffer typing_user_ids, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceRoomAccountDataListenerMethod0)( - uint64_t uniffi_handle, RustBuffer event, RustBuffer room_id, - void *uniffi_out_return, RustCallStatus *rust_call_status); typedef void ( *UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0)( uint64_t uniffi_handle, RustBuffer room_entries_update, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceRoomInfoListenerMethod0)( - uint64_t uniffi_handle, RustBuffer room_info, void *uniffi_out_return, - RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceRoomListEntriesListenerMethod0)( uint64_t uniffi_handle, RustBuffer room_entries_update, void *uniffi_out_return, RustCallStatus *rust_call_status); @@ -187,15 +197,6 @@ typedef void ( *UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0)( uint64_t uniffi_handle, RustBuffer sync_indicator, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceSendQueueListenerMethod0)( - uint64_t uniffi_handle, RustBuffer update, void *uniffi_out_return, - RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0)( - uint64_t uniffi_handle, RustBuffer room_id, RustBuffer error, - void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0)( - uint64_t uniffi_handle, RustBuffer room_id, RustBuffer update, - void *uniffi_out_return, RustCallStatus *rust_call_status); typedef void ( *UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0)( uint64_t uniffi_handle, RustBuffer details, void *uniffi_out_return, @@ -237,154 +238,190 @@ typedef void (*UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0)( typedef void (*UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0)( uint64_t uniffi_handle, RustBuffer room_updates, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceSyncNotificationListenerMethod0)( - uint64_t uniffi_handle, RustBuffer notification, RustBuffer room_id, - 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); +typedef void (*UniffiCallbackInterfacePaginationStatusListenerMethod0)( + uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, + RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceTimelineListenerMethod0)( uint64_t uniffi_handle, RustBuffer diff, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceTypingNotificationsListenerMethod0)( - uint64_t uniffi_handle, RustBuffer typing_user_ids, void *uniffi_out_return, - RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceUnableToDecryptDelegateMethod0)( uint64_t uniffi_handle, RustBuffer info, void *uniffi_out_return, RustCallStatus *rust_call_status); -typedef void (*UniffiCallbackInterfaceVerificationStateListenerMethod0)( - uint64_t uniffi_handle, RustBuffer status, void *uniffi_out_return, - RustCallStatus *rust_call_status); typedef void (*UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0)( uint64_t uniffi_handle, RustBuffer capabilities, RustBuffer *uniffi_out_return, RustCallStatus *rust_call_status); typedef struct UniffiVTableCallbackInterfaceAccountDataListener { - UniffiCallbackInterfaceAccountDataListenerMethod0 on_change; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceAccountDataListenerMethod0 on_change; } UniffiVTableCallbackInterfaceAccountDataListener; -typedef struct UniffiVTableCallbackInterfaceBackupStateListener { - UniffiCallbackInterfaceBackupStateListenerMethod0 on_update; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceBackupStateListener; -typedef struct UniffiVTableCallbackInterfaceBackupSteadyStateListener { - UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 on_update; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceBackupSteadyStateListener; -typedef struct UniffiVTableCallbackInterfaceCallDeclineListener { - UniffiCallbackInterfaceCallDeclineListenerMethod0 call; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceCallDeclineListener; typedef struct UniffiVTableCallbackInterfaceClientDelegate { - UniffiCallbackInterfaceClientDelegateMethod0 did_receive_auth_error; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceClientDelegateMethod0 did_receive_auth_error; } UniffiVTableCallbackInterfaceClientDelegate; typedef struct UniffiVTableCallbackInterfaceClientSessionDelegate { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; UniffiCallbackInterfaceClientSessionDelegateMethod0 retrieve_session_from_keychain; UniffiCallbackInterfaceClientSessionDelegateMethod1 save_session_in_keychain; - UniffiCallbackInterfaceFree uniffi_free; } UniffiVTableCallbackInterfaceClientSessionDelegate; +typedef struct UniffiVTableCallbackInterfaceIgnoredUsersListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceIgnoredUsersListenerMethod0 call; +} UniffiVTableCallbackInterfaceIgnoredUsersListener; +typedef struct UniffiVTableCallbackInterfaceMediaPreviewConfigListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 on_change; +} UniffiVTableCallbackInterfaceMediaPreviewConfigListener; +typedef struct UniffiVTableCallbackInterfaceProgressWatcher { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceProgressWatcherMethod0 transmission_progress; +} UniffiVTableCallbackInterfaceProgressWatcher; +typedef struct UniffiVTableCallbackInterfaceRoomAccountDataListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomAccountDataListenerMethod0 on_change; +} UniffiVTableCallbackInterfaceRoomAccountDataListener; +typedef struct UniffiVTableCallbackInterfaceSendQueueRoomErrorListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 on_error; +} UniffiVTableCallbackInterfaceSendQueueRoomErrorListener; +typedef struct UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener; +typedef struct UniffiVTableCallbackInterfaceSyncNotificationListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSyncNotificationListenerMethod0 on_notification; +} UniffiVTableCallbackInterfaceSyncNotificationListener; +typedef struct UniffiVTableCallbackInterfaceBackupStateListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceBackupStateListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceBackupStateListener; +typedef struct UniffiVTableCallbackInterfaceBackupSteadyStateListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceBackupSteadyStateListener; typedef struct UniffiVTableCallbackInterfaceEnableRecoveryProgressListener { - UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 on_update; } UniffiVTableCallbackInterfaceEnableRecoveryProgressListener; +typedef struct UniffiVTableCallbackInterfaceRecoveryStateListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRecoveryStateListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceRecoveryStateListener; +typedef struct UniffiVTableCallbackInterfaceVerificationStateListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceVerificationStateListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceVerificationStateListener; +typedef struct UniffiVTableCallbackInterfaceNotificationSettingsDelegate { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 + settings_did_change; +} UniffiVTableCallbackInterfaceNotificationSettingsDelegate; typedef struct UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener { - UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 on_update; } UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener; typedef struct UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener { - UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 on_update; } UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener; typedef struct UniffiVTableCallbackInterfaceGrantQrLoginProgressListener { - UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 on_update; } UniffiVTableCallbackInterfaceGrantQrLoginProgressListener; +typedef struct UniffiVTableCallbackInterfaceQrLoginProgressListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceQrLoginProgressListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceQrLoginProgressListener; +typedef struct UniffiVTableCallbackInterfaceCallDeclineListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceCallDeclineListenerMethod0 call; +} UniffiVTableCallbackInterfaceCallDeclineListener; typedef struct UniffiVTableCallbackInterfaceIdentityStatusChangeListener { - UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 call; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 call; } UniffiVTableCallbackInterfaceIdentityStatusChangeListener; -typedef struct UniffiVTableCallbackInterfaceIgnoredUsersListener { - UniffiCallbackInterfaceIgnoredUsersListenerMethod0 call; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceIgnoredUsersListener; typedef struct UniffiVTableCallbackInterfaceKnockRequestsListener { - UniffiCallbackInterfaceKnockRequestsListenerMethod0 call; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceKnockRequestsListenerMethod0 call; } UniffiVTableCallbackInterfaceKnockRequestsListener; typedef struct UniffiVTableCallbackInterfaceLiveLocationShareListener { - UniffiCallbackInterfaceLiveLocationShareListenerMethod0 call; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceLiveLocationShareListenerMethod0 call; } UniffiVTableCallbackInterfaceLiveLocationShareListener; -typedef struct UniffiVTableCallbackInterfaceMediaPreviewConfigListener { - UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 on_change; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceMediaPreviewConfigListener; -typedef struct UniffiVTableCallbackInterfaceNotificationSettingsDelegate { - UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 - settings_did_change; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceNotificationSettingsDelegate; -typedef struct UniffiVTableCallbackInterfacePaginationStatusListener { - UniffiCallbackInterfacePaginationStatusListenerMethod0 on_update; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfacePaginationStatusListener; -typedef struct UniffiVTableCallbackInterfaceProgressWatcher { - UniffiCallbackInterfaceProgressWatcherMethod0 transmission_progress; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceProgressWatcher; -typedef struct UniffiVTableCallbackInterfaceQrLoginProgressListener { - UniffiCallbackInterfaceQrLoginProgressListenerMethod0 on_update; +typedef struct UniffiVTableCallbackInterfaceRoomInfoListener { UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceQrLoginProgressListener; -typedef struct UniffiVTableCallbackInterfaceRecoveryStateListener { - UniffiCallbackInterfaceRecoveryStateListenerMethod0 on_update; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomInfoListenerMethod0 call; +} UniffiVTableCallbackInterfaceRoomInfoListener; +typedef struct UniffiVTableCallbackInterfaceSendQueueListener { UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceRecoveryStateListener; -typedef struct UniffiVTableCallbackInterfaceRoomAccountDataListener { - UniffiCallbackInterfaceRoomAccountDataListenerMethod0 on_change; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSendQueueListenerMethod0 on_update; +} UniffiVTableCallbackInterfaceSendQueueListener; +typedef struct UniffiVTableCallbackInterfaceTypingNotificationsListener { UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceRoomAccountDataListener; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceTypingNotificationsListenerMethod0 call; +} UniffiVTableCallbackInterfaceTypingNotificationsListener; typedef struct UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener { - UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 on_update; } UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener; -typedef struct UniffiVTableCallbackInterfaceRoomInfoListener { - UniffiCallbackInterfaceRoomInfoListenerMethod0 call; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceRoomInfoListener; typedef struct UniffiVTableCallbackInterfaceRoomListEntriesListener { - UniffiCallbackInterfaceRoomListEntriesListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomListEntriesListenerMethod0 on_update; } UniffiVTableCallbackInterfaceRoomListEntriesListener; typedef struct UniffiVTableCallbackInterfaceRoomListLoadingStateListener { - UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0 on_update; } UniffiVTableCallbackInterfaceRoomListLoadingStateListener; typedef struct UniffiVTableCallbackInterfaceRoomListServiceStateListener { - UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 on_update; } UniffiVTableCallbackInterfaceRoomListServiceStateListener; typedef struct UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener { - UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 on_update; } UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener; -typedef struct UniffiVTableCallbackInterfaceSendQueueListener { - UniffiCallbackInterfaceSendQueueListenerMethod0 on_update; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceSendQueueListener; -typedef struct UniffiVTableCallbackInterfaceSendQueueRoomErrorListener { - UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 on_error; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceSendQueueRoomErrorListener; -typedef struct UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener { - UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 on_update; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener; typedef struct UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 did_receive_verification_request; UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1 @@ -398,1434 +435,1505 @@ typedef struct did_cancel; UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 did_finish; - UniffiCallbackInterfaceFree uniffi_free; } UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate; typedef struct UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener { - UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 on_update; } UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener; typedef struct UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener { - UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 on_update; } UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener; typedef struct UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener { - UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 on_update; } UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener; typedef struct UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener { - UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 on_update; } UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener; -typedef struct UniffiVTableCallbackInterfaceSyncNotificationListener { - UniffiCallbackInterfaceSyncNotificationListenerMethod0 on_notification; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceSyncNotificationListener; typedef struct UniffiVTableCallbackInterfaceSyncServiceStateObserver { - UniffiCallbackInterfaceSyncServiceStateObserverMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceSyncServiceStateObserverMethod0 on_update; } UniffiVTableCallbackInterfaceSyncServiceStateObserver; +typedef struct UniffiVTableCallbackInterfacePaginationStatusListener { + UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfacePaginationStatusListenerMethod0 on_update; +} UniffiVTableCallbackInterfacePaginationStatusListener; typedef struct UniffiVTableCallbackInterfaceTimelineListener { - UniffiCallbackInterfaceTimelineListenerMethod0 on_update; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceTimelineListenerMethod0 on_update; } UniffiVTableCallbackInterfaceTimelineListener; -typedef struct UniffiVTableCallbackInterfaceTypingNotificationsListener { - UniffiCallbackInterfaceTypingNotificationsListenerMethod0 call; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceTypingNotificationsListener; typedef struct UniffiVTableCallbackInterfaceUnableToDecryptDelegate { - UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 on_utd; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 on_utd; } UniffiVTableCallbackInterfaceUnableToDecryptDelegate; -typedef struct UniffiVTableCallbackInterfaceVerificationStateListener { - UniffiCallbackInterfaceVerificationStateListenerMethod0 on_update; - UniffiCallbackInterfaceFree uniffi_free; -} UniffiVTableCallbackInterfaceVerificationStateListener; typedef struct UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider { - UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 acquire_capabilities; UniffiCallbackInterfaceFree uniffi_free; + UniffiCallbackInterfaceClone uniffi_clone; + UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 acquire_capabilities; } UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider; -void * -uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_checkcodesender( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send(void *ptr, uint8_t code); -void *uniffi_matrix_sdk_ffi_fn_clone_client(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_client(void *ptr, - RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( - void *ptr, void *authorization_data); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_account_data(void *ptr, - RustBuffer event_type); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_account_url(void *ptr, - RustBuffer action); +uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji(void *ptr, - RustBuffer emoji); +uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + /*handle*/ uint64_t ptr, RustBuffer mentions, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_ssohandler( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_ssohandler( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( + /*handle*/ uint64_t ptr, RustBuffer callback_url); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_client( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_client( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t authorization_data); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_account_data( + /*handle*/ uint64_t ptr, RustBuffer event_type); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_account_url( + /*handle*/ uint64_t ptr, RustBuffer action); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( - void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_avatar_url(void *ptr); + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_avatar_url( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo( - void *ptr, RustBuffer room_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url(void *ptr); + /*handle*/ uint64_t ptr, RustBuffer room_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url( + /*handle*/ uint64_t ptr); int8_t uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_clear_caches(void *ptr, - RustBuffer sync_service); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_create_room(void *ptr, - RustBuffer request); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_clear_caches( + /*handle*/ uint64_t ptr, RustBuffer sync_service); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_create_room( + /*handle*/ uint64_t ptr, RustBuffer request); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt( - void *ptr, RustBuffer jwt, RustBuffer initial_device_name, + /*handle*/ uint64_t ptr, RustBuffer jwt, RustBuffer initial_device_name, RustBuffer device_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account( - void *ptr, RustBuffer auth_data, int8_t erase_data); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher(void *ptr, - RustBuffer identifiers); + /*handle*/ uint64_t ptr, RustBuffer auth_data, int8_t erase_data); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher( + /*handle*/ uint64_t ptr, RustBuffer identifiers); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_device_id( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_display_name(void *ptr); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_display_name( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues(void *ptr, - int8_t enable); +uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( + /*handle*/ uint64_t 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 ptr, int8_t enable, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_encryption( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config( + /*handle*/ uint64_t ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy( - void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size(void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_media_content(void *ptr, - void *media_source); +uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_media_content( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t media_source); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_media_file( - void *ptr, void *media_source, RustBuffer filename, RustBuffer mime_type, + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t media_source, RustBuffer filename, RustBuffer mime_type, int8_t use_cache, RustBuffer temp_dir); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail( - void *ptr, void *media_source, uint64_t width, uint64_t height); + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t media_source, uint64_t width, uint64_t height); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_profile( + /*handle*/ uint64_t ptr, RustBuffer user_id); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_profile(void *ptr, - RustBuffer user_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms(void *ptr); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_client_get_room(void *ptr, RustBuffer room_id, - RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( + /*handle*/ uint64_t ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_get_room( + /*handle*/ uint64_t ptr, RustBuffer room_id, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias( - void *ptr, RustBuffer room_alias); + /*handle*/ uint64_t ptr, RustBuffer room_alias); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id( - void *ptr, RustBuffer room_id, RustBuffer via_servers); + /*handle*/ uint64_t ptr, RustBuffer room_id, RustBuffer via_servers); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller( - void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_get_url(void *ptr, RustBuffer url); + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_url( + /*handle*/ uint64_t ptr, RustBuffer url); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_homeserver( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_ignore_user(void *ptr, - RustBuffer user_id); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_ignored_users(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_ignore_user( + /*handle*/ uint64_t ptr, RustBuffer user_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_ignored_users( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available( - void *ptr, RustBuffer alias); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id(void *ptr, - RustBuffer room_id); + /*handle*/ uint64_t ptr, RustBuffer alias); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id( + /*handle*/ uint64_t ptr, RustBuffer room_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias( - void *ptr, RustBuffer room_id_or_alias, RustBuffer server_names); + /*handle*/ uint64_t ptr, RustBuffer room_id_or_alias, + RustBuffer server_names); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_knock( - void *ptr, RustBuffer room_id_or_alias, RustBuffer reason, + /*handle*/ uint64_t ptr, RustBuffer room_id_or_alias, RustBuffer reason, RustBuffer server_names); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_login( - void *ptr, RustBuffer username, RustBuffer password, + /*handle*/ uint64_t ptr, RustBuffer username, RustBuffer password, RustBuffer initial_device_name, RustBuffer device_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_login_with_email( - void *ptr, RustBuffer email, RustBuffer password, + /*handle*/ uint64_t ptr, RustBuffer email, RustBuffer password, RustBuffer initial_device_name, RustBuffer device_id); /*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_logout(void *ptr); -void * + /*handle*/ uint64_t ptr, RustBuffer callback_url); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_logout( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( - void *ptr, RustBuffer oidc_configuration, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_notification_client( - void *ptr, RustBuffer process_setup); -void *uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event( - void *ptr, RustBuffer event_type, uint64_t listener, + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( + /*handle*/ uint64_t ptr, RustBuffer oidc_configuration, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( - void *ptr, RustBuffer room_id, RustBuffer event_type, uint64_t listener, +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_notification_client( + /*handle*/ uint64_t ptr, RustBuffer process_setup); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event( + /*handle*/ uint64_t ptr, RustBuffer event_type, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( + /*handle*/ uint64_t ptr, RustBuffer room_id, RustBuffer event_type, + uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler( - void *ptr, uint64_t listener); + /*handle*/ uint64_t ptr, uint64_t listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias( - void *ptr, RustBuffer room_alias); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_restore_session(void *ptr, - RustBuffer session); + /*handle*/ uint64_t ptr, RustBuffer room_alias); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_restore_session( + /*handle*/ uint64_t ptr, RustBuffer session); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with( - void *ptr, RustBuffer session, RustBuffer room_load_settings); + /*handle*/ uint64_t ptr, RustBuffer session, RustBuffer room_load_settings); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists( + /*handle*/ uint64_t ptr, RustBuffer room_alias); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists(void *ptr, - RustBuffer room_alias); -void *uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_client_rooms(void *ptr, - RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_rooms( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_search_users( - void *ptr, RustBuffer search_term, uint64_t limit); -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); + /*handle*/ uint64_t ptr, RustBuffer search_term, uint64_t limit); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_server( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( + /*handle*/ uint64_t ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_session( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_account_data( - void *ptr, RustBuffer event_type, RustBuffer content); + /*handle*/ uint64_t ptr, RustBuffer event_type, RustBuffer content); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_set_delegate( - void *ptr, RustBuffer delegate, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_set_display_name(void *ptr, - RustBuffer name); + /*handle*/ uint64_t ptr, RustBuffer delegate, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_display_name( + /*handle*/ uint64_t ptr, RustBuffer name); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy( - void *ptr, RustBuffer policy); + /*handle*/ uint64_t ptr, RustBuffer policy); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy( - void *ptr, RustBuffer policy); + /*handle*/ uint64_t ptr, RustBuffer policy); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy( - void *ptr, RustBuffer policy); + /*handle*/ uint64_t ptr, RustBuffer policy); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_pusher( - void *ptr, RustBuffer identifiers, RustBuffer kind, + /*handle*/ uint64_t ptr, RustBuffer identifiers, RustBuffer kind, RustBuffer app_display_name, RustBuffer device_display_name, RustBuffer profile_tag, RustBuffer lang); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate(void *ptr, - uint64_t utd_delegate); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate( + /*handle*/ uint64_t 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 ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_space_service( + /*handle*/ uint64_t 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( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer redirect_url, RustBuffer idp_id); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config( - void *ptr, uint64_t listener); + /*handle*/ uint64_t ptr, uint64_t listener); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info( - void *ptr, RustBuffer room_id, uint64_t listener); -void *uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer room_id, uint64_t listener); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates( - void *ptr, uint64_t listener); -void *uniffi_matrix_sdk_ffi_fn_method_client_sync_service( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, uint64_t listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_sync_service( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( - void *ptr, RustBuffer room); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_client_unignore_user(void *ptr, - RustBuffer user_id); + /*handle*/ uint64_t ptr, RustBuffer room); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_unignore_user( + /*handle*/ uint64_t ptr, RustBuffer user_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar( - void *ptr, RustBuffer mime_type, RustBuffer data); + /*handle*/ uint64_t ptr, RustBuffer mime_type, RustBuffer data); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_upload_media( - void *ptr, RustBuffer mime_type, RustBuffer data, + /*handle*/ uint64_t ptr, RustBuffer mime_type, RustBuffer data, RustBuffer progress_watcher); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( - void *ptr, RustBuffer oidc_configuration, RustBuffer prompt, + /*handle*/ uint64_t ptr, RustBuffer oidc_configuration, RustBuffer prompt, 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); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_user_id( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( + /*handle*/ uint64_t ptr, RustBuffer emoji); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( + /*handle*/ uint64_t ptr, RustBuffer path, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_clientbuilder( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_clientbuilder( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new( + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( + /*handle*/ uint64_t ptr, RustBuffer certificates, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( + /*handle*/ uint64_t ptr, int8_t auto_enable_backups, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( - void *ptr, RustBuffer certificates, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( - void *ptr, int8_t auto_enable_backups, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( - void *ptr, int8_t auto_enable_cross_signing, +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( + /*handle*/ uint64_t ptr, int8_t auto_enable_cross_signing, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( - void *ptr, RustBuffer backup_download_strategy, +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( + /*handle*/ uint64_t ptr, RustBuffer backup_download_strategy, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build(void *ptr); -void * uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( - void *ptr, RustBuffer holder_name, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( - void *ptr, RustBuffer decryption_settings, RustCallStatus *uniffi_out_err); -void * + /*handle*/ uint64_t ptr, RustBuffer holder_name, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( + /*handle*/ uint64_t ptr, RustBuffer decryption_settings, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh( - void *ptr, RustCallStatus *uniffi_out_err); -void * + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( - void *ptr, RustCallStatus *uniffi_out_err); -void * + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite( - void *ptr, int8_t enable_share_history_on_invite, + /*handle*/ uint64_t ptr, int8_t enable_share_history_on_invite, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( + /*handle*/ uint64_t ptr, RustBuffer url, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( + /*handle*/ uint64_t ptr, RustBuffer url, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( + /*handle*/ uint64_t ptr, RustBuffer config, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( + /*handle*/ uint64_t ptr, RustBuffer strategy, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( - void *ptr, RustBuffer url, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( - void *ptr, RustBuffer url, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( - void *ptr, RustBuffer config, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( - void *ptr, RustBuffer strategy, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( - void *ptr, RustBuffer server_name, RustCallStatus *uniffi_out_err); -void * +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( + /*handle*/ uint64_t ptr, RustBuffer server_name, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url( - void *ptr, RustBuffer server_name_or_url, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( - void *ptr, RustBuffer data_path, RustBuffer cache_path, + /*handle*/ uint64_t ptr, RustBuffer server_name_or_url, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( - void *ptr, uint64_t session_delegate, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( - void *ptr, RustBuffer version_builder, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( - void *ptr, void *config, RustCallStatus *uniffi_out_err); -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, int8_t thread_subscriptions, +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( + /*handle*/ uint64_t ptr, RustBuffer data_path, RustBuffer cache_path, 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( - void *ptr, RustBuffer username, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_encryption(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_encryption(void *ptr, - RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server(void *ptr); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( + /*handle*/ uint64_t ptr, uint64_t session_delegate, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( + /*handle*/ uint64_t ptr, RustBuffer version_builder, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t config, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( + /*handle*/ uint64_t ptr, int8_t enabled, int8_t thread_subscriptions, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( + /*handle*/ uint64_t ptr, RustBuffer user_agent, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( + /*handle*/ uint64_t ptr, RustBuffer username, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_encryption( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_encryption( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( + /*handle*/ uint64_t ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( - void *ptr, int8_t wait_for_backups_to_upload, RustBuffer passphrase, - uint64_t progress_listener); + /*handle*/ uint64_t ptr, int8_t wait_for_backups_to_upload, + RustBuffer passphrase, uint64_t progress_listener); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against( - void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_recover(void *ptr, - RustBuffer recovery_key); + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_recover( + /*handle*/ uint64_t ptr, RustBuffer recovery_key); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset( - void *ptr, RustBuffer old_recovery_key); + /*handle*/ uint64_t ptr, RustBuffer old_recovery_key); RustBuffer uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( - void *ptr, RustBuffer user_id, int8_t fallback_to_server); + /*handle*/ uint64_t ptr, RustBuffer user_id, int8_t fallback_to_server); RustBuffer uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( - void *ptr, RustBuffer progress_listener); + /*handle*/ uint64_t ptr, RustBuffer progress_listener); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( - void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( - void *ptr, uint64_t progress_listener); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( - void *ptr, void *qr_code_data, uint64_t progress_listener); -void *uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t -uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( - void *ptr, RustCallStatus *uniffi_out_err); -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( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_identityresethandle( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset(void *ptr, - RustBuffer auth); -void * -uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline(void *ptr, - RustBuffer reason); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( - void *ptr, RustBuffer reason); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t -uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( - void *ptr, int8_t strict, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave(void *ptr, - RustBuffer room_ids); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( + /*handle*/ uint64_t ptr, RustBuffer auth); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_useridentity( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_useridentity( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +int8_t uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( + /*handle*/ uint64_t ptr); +int8_t uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( - void *ptr, uint64_t progress_listener); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( - void *ptr, void *qr_code_data, uint64_t progress_listener); -void * -uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( - void *ptr, RustBuffer path, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_mediasource(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_mediasource(void *ptr, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( - RustBuffer json, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( - RustBuffer url, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_mediasource_url(void *ptr, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_notificationclient( - void *ptr, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_timelineevent( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_timelineevent( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +uint64_t uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_notificationclient( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_notificationclient( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( - void *ptr, RustBuffer room_id, RustBuffer event_id); + /*handle*/ uint64_t ptr, RustBuffer room_id, RustBuffer event_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( - void *ptr, RustBuffer requests); + /*handle*/ uint64_t ptr, RustBuffer requests); RustBuffer uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( - void *ptr, RustBuffer room_id, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_notificationsettings( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer room_id, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_notificationsettings( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_notificationsettings( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode( - void *ptr, int8_t is_encrypted, int8_t is_one_to_one); + /*handle*/ uint64_t ptr, int8_t is_encrypted, int8_t is_one_to_one); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings( - void *ptr, RustBuffer room_id, int8_t is_encrypted, int8_t is_one_to_one); + /*handle*/ uint64_t ptr, RustBuffer room_id, int8_t is_encrypted, + int8_t is_one_to_one); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules( - void *ptr, RustBuffer enabled); + /*handle*/ uint64_t ptr, RustBuffer enabled); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode( - void *ptr, RustBuffer room_id); + /*handle*/ uint64_t ptr, RustBuffer room_id); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode( - void *ptr, RustBuffer room_id); + /*handle*/ uint64_t ptr, RustBuffer room_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled( - void *ptr, int8_t enabled); + /*handle*/ uint64_t ptr, int8_t enabled); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule( - void *ptr, RustBuffer rule_id, RustBuffer rule_kind, RustBuffer actions, - RustBuffer conditions); + /*handle*/ uint64_t ptr, RustBuffer rule_id, RustBuffer rule_kind, + RustBuffer actions, RustBuffer conditions); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode( - void *ptr, int8_t is_encrypted, int8_t is_one_to_one, RustBuffer mode); + /*handle*/ uint64_t ptr, int8_t is_encrypted, int8_t is_one_to_one, + RustBuffer mode); void uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate( - void *ptr, RustBuffer delegate, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer delegate, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled( - void *ptr, int8_t enabled); + /*handle*/ uint64_t ptr, int8_t enabled); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled( - void *ptr, int8_t enabled); + /*handle*/ uint64_t ptr, int8_t enabled); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode( - void *ptr, RustBuffer room_id, RustBuffer mode); + /*handle*/ uint64_t ptr, RustBuffer room_id, RustBuffer mode); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled( - void *ptr, int8_t enabled); + /*handle*/ uint64_t ptr, int8_t enabled); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( - void *ptr, RustBuffer room_id, int8_t is_encrypted, int8_t is_one_to_one); -void *uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_qrcodedata(void *ptr, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( + /*handle*/ uint64_t ptr, RustBuffer room_id, int8_t is_encrypted, + int8_t is_one_to_one); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_checkcodesender( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_checkcodesender( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( + /*handle*/ uint64_t ptr, uint8_t code); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( + /*handle*/ uint64_t ptr, uint64_t progress_listener); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t qr_code_data, uint64_t progress_listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( + /*handle*/ uint64_t ptr, uint64_t progress_listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t qr_code_data, uint64_t progress_listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_qrcodedata( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_qrcodedata( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( RustBuffer bytes, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_room(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_room(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( + /*handle*/ uint64_t ptr, RustBuffer reason); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( + /*handle*/ uint64_t ptr, RustBuffer reason); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_room( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_room( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); uint64_t uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( - void *ptr, RustBuffer changes); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_room_avatar_url(void *ptr, - RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_ban_user(void *ptr, RustBuffer user_id, - RustBuffer reason); + /*handle*/ uint64_t ptr, RustBuffer changes); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_ban_user( + /*handle*/ uint64_t ptr, RustBuffer user_id, RustBuffer reason); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft( - void *ptr, RustBuffer thread_root); + /*handle*/ uint64_t ptr, RustBuffer thread_root); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_decline_call( - void *ptr, RustBuffer rtc_notification_event_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key(void *ptr); + /*handle*/ uint64_t ptr, RustBuffer rtc_notification_event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( + /*handle*/ uint64_t ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_display_name( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_edit(void *ptr, RustBuffer event_id, - void *new_content); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption(void *ptr); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_edit( + /*handle*/ uint64_t ptr, RustBuffer event_id, + /*handle*/ uint64_t new_content); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( + /*handle*/ uint64_t ptr); void uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( - void *ptr, int8_t enable, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t 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 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); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility(void *ptr); -int8_t uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_room_heroes(void *ptr, - RustCallStatus *uniffi_out_err); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_room_id(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer thread_root_event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_forget( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility( + /*handle*/ uint64_t ptr); +int8_t uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_heroes( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_id( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend( - void *ptr, RustBuffer devices, void *send_handle); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_ignore_user(void *ptr, RustBuffer user_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id(void *ptr, - RustBuffer user_id); + /*handle*/ uint64_t ptr, RustBuffer devices, + /*handle*/ uint64_t send_handle); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_ignore_user( + /*handle*/ uint64_t ptr, RustBuffer user_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id( + /*handle*/ uint64_t ptr, RustBuffer user_id); uint64_t uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_inviter(void *ptr); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_is_direct(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted(void *ptr); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_room_is_public(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_inviter( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_is_direct( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted( + /*handle*/ uint64_t ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_is_public( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t -uniffi_matrix_sdk_ffi_fn_method_room_is_space(void *ptr, - RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_join(void *ptr); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t uniffi_matrix_sdk_ffi_fn_method_room_is_space( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_join( + /*handle*/ uint64_t ptr); uint64_t uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_kick_user( + /*handle*/ uint64_t ptr, RustBuffer user_id, RustBuffer reason); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_kick_user(void *ptr, RustBuffer user_id, - RustBuffer reason); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_latest_event(void *ptr); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_leave(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_latest_event( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_leave( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft( - void *ptr, RustBuffer thread_root); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event(void *ptr, - RustBuffer event_id); + /*handle*/ uint64_t ptr, RustBuffer thread_root); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event( + /*handle*/ uint64_t ptr, RustBuffer event_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked( - void *ptr, RustBuffer event_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read(void *ptr, - RustBuffer receipt_type); + /*handle*/ uint64_t ptr, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read( + /*handle*/ uint64_t ptr, RustBuffer receipt_type); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink( - void *ptr, RustBuffer event_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_member(void *ptr, RustBuffer user_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url(void *ptr, - RustBuffer user_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_member_display_name(void *ptr, - RustBuffer user_id); + /*handle*/ uint64_t ptr, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_member( + /*handle*/ uint64_t ptr, RustBuffer user_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url( + /*handle*/ uint64_t ptr, RustBuffer user_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_member_display_name( + /*handle*/ uint64_t ptr, RustBuffer user_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info( - void *ptr, RustBuffer user_id); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_members(void *ptr); -/*handle*/ uint64_t -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); + /*handle*/ uint64_t ptr, RustBuffer user_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_members( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync( + /*handle*/ uint64_t ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_membership( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( + /*handle*/ uint64_t ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_preview_room(void *ptr, RustBuffer via); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_preview_room( + /*handle*/ uint64_t ptr, RustBuffer via); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory( - void *ptr, RustBuffer alias); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_room_raw_name(void *ptr, - RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_redact(void *ptr, RustBuffer event_id, - RustBuffer reason); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar(void *ptr); + /*handle*/ uint64_t ptr, RustBuffer alias); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_raw_name( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_redact( + /*handle*/ uint64_t ptr, RustBuffer event_id, RustBuffer reason); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory( - void *ptr, RustBuffer alias); + /*handle*/ uint64_t ptr, RustBuffer alias); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_report_content( - void *ptr, RustBuffer event_id, RustBuffer score, RustBuffer reason); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_report_room(void *ptr, RustBuffer reason); + /*handle*/ uint64_t ptr, RustBuffer event_id, RustBuffer score, + RustBuffer reason); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_report_room( + /*handle*/ uint64_t ptr, RustBuffer reason); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels(void *ptr); -/*handle*/ uint64_t -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); +uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_room_info( + /*handle*/ uint64_t 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_live_location(void *ptr, - RustBuffer geo_uri); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_send_raw(void *ptr, RustBuffer event_type, - RustBuffer content); + /*handle*/ uint64_t ptr, RustBuffer draft, RustBuffer thread_root); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( + /*handle*/ uint64_t ptr, RustBuffer geo_uri); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_send_raw( + /*handle*/ uint64_t ptr, RustBuffer event_type, RustBuffer content); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( - void *ptr, int8_t is_favourite, RustBuffer tag_order); + /*handle*/ uint64_t ptr, int8_t is_favourite, RustBuffer tag_order); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( - void *ptr, int8_t is_low_priority, RustBuffer tag_order); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_set_name(void *ptr, RustBuffer name); + /*handle*/ uint64_t ptr, int8_t is_low_priority, RustBuffer tag_order); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_name( + /*handle*/ uint64_t 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, - int8_t new_value); + /*handle*/ uint64_t ptr, RustBuffer thread_root_event_id, + int8_t subscribed); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_topic( + /*handle*/ uint64_t ptr, RustBuffer topic); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag( + /*handle*/ uint64_t ptr, int8_t new_value); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share( - void *ptr, uint64_t duration_millis); + /*handle*/ uint64_t ptr, uint64_t duration_millis); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events( - void *ptr, RustBuffer rtc_notification_event_id, uint64_t listener, - RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events( + /*handle*/ uint64_t ptr, RustBuffer rtc_notification_event_id, + uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes( - void *ptr, uint64_t listener); + /*handle*/ uint64_t ptr, uint64_t listener); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests( - void *ptr, uint64_t listener); -void *uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, uint64_t listener); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates( - void *ptr, uint64_t listener); -void *uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, uint64_t listener); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_successor_room( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user( - void *ptr, RustBuffer user_id); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_timeline(void *ptr); + /*handle*/ uint64_t ptr, RustBuffer user_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_timeline( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration( - void *ptr, RustBuffer configuration); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_room_topic(void *ptr, - RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_typing_notice(void *ptr, int8_t is_typing); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_unban_user(void *ptr, RustBuffer user_id, - RustBuffer reason); + /*handle*/ uint64_t ptr, RustBuffer configuration); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_room_topic( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( + /*handle*/ uint64_t ptr, int8_t is_typing); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_unban_user( + /*handle*/ uint64_t ptr, RustBuffer user_id, RustBuffer reason); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias( - void *ptr, RustBuffer alias, RustBuffer alt_aliases); + /*handle*/ uint64_t ptr, RustBuffer alias, RustBuffer alt_aliases); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility( - void *ptr, RustBuffer visibility); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules(void *ptr, - RustBuffer new_rule); + /*handle*/ uint64_t ptr, RustBuffer visibility); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules( + /*handle*/ uint64_t ptr, RustBuffer new_rule); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users( - void *ptr, RustBuffer updates); + /*handle*/ uint64_t ptr, RustBuffer updates); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility( - void *ptr, RustBuffer visibility); + /*handle*/ uint64_t ptr, RustBuffer visibility); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar( - void *ptr, RustBuffer mime_type, RustBuffer data, RustBuffer media_info); + /*handle*/ uint64_t ptr, RustBuffer mime_type, RustBuffer data, + RustBuffer media_info); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend( - void *ptr, RustBuffer user_ids, void *send_handle); -void *uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results(void *ptr, - uint64_t listener); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( - void *ptr, RustBuffer filter, uint32_t batch_size, - RustBuffer via_server_name); -void *uniffi_matrix_sdk_ffi_fn_clone_roomlist(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roomlist(void *ptr, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( - void *ptr, uint32_t page_size, uint64_t listener, - RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( - void *ptr, uint32_t page_size, int8_t enable_latest_event_sorter, - uint64_t listener, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_roomlist_room(void *ptr, RustBuffer room_id, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t -uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( - void *ptr, RustBuffer kind, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roomlistservice( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( - void *ptr, RustBuffer room_id, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( - void *ptr, RustBuffer room_ids); -void *uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( - void *ptr, uint32_t delay_before_showing_in_ms, - uint32_t delay_before_hiding_in_ms, uint64_t listener, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_ids, + /*handle*/ uint64_t send_handle); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); uint32_t uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( - void *ptr, uint32_t chunk_size, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( - void *ptr, RustBuffer mentions, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, uint32_t chunk_size, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( - void *ptr, RustBuffer message, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer message, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( - void *ptr, RustBuffer state_event, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer state_event, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( - void *ptr, RustBuffer user_id, RustBuffer message, + /*handle*/ uint64_t ptr, RustBuffer user_id, RustBuffer message, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( - void *ptr, RustBuffer user_id, RustBuffer state_event, + /*handle*/ uint64_t ptr, RustBuffer user_id, RustBuffer state_event, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( - void *ptr, RustBuffer user_id, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer user_id, + RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_roompreview(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_roompreview(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roompreview_forget(void *ptr); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_roompreview_info( - void *ptr, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( + /*handle*/ uint64_t ptr, uint64_t listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + /*handle*/ uint64_t ptr, RustBuffer filter, uint32_t batch_size, + RustBuffer via_server_name); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_roomlist( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roomlist( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + /*handle*/ uint64_t ptr, uint32_t page_size, uint64_t listener, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roompreview_leave(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + /*handle*/ uint64_t ptr, uint32_t page_size, + int8_t enable_latest_event_sorter, uint64_t listener, + RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomlist_room( + /*handle*/ uint64_t ptr, RustBuffer room_id, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( - void *ptr, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + /*handle*/ uint64_t ptr, RustBuffer kind, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( - void *ptr, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roomlistservice( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( + /*handle*/ uint64_t ptr, RustBuffer room_id, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( + /*handle*/ uint64_t ptr, RustBuffer room_ids); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( + /*handle*/ uint64_t ptr, uint32_t delay_before_showing_in_ms, + uint32_t delay_before_hiding_in_ms, uint64_t listener, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +uint32_t +uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +uint32_t +uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_roompreview( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_roompreview( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roompreview_forget( + /*handle*/ uint64_t ptr); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_roompreview_info( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_roompreview_leave( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_sendhandle(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_sendhandle(void *ptr, - RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_mediasource( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_mediasource( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( + RustBuffer json, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( + RustBuffer url, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_mediasource_url( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( - void *ptr, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request( - void *ptr, RustBuffer sender_id, RustBuffer flow_id); + /*handle*/ uint64_t ptr, RustBuffer sender_id, RustBuffer flow_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification( - void *ptr); + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification( - void *ptr, RustBuffer user_id); + /*handle*/ uint64_t ptr, RustBuffer user_id); void uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate( - void *ptr, RustBuffer delegate, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer delegate, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification( - void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t 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); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( + /*handle*/ uint64_t ptr, RustBuffer room_ids); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + /*handle*/ uint64_t handle, 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); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( + /*handle*/ uint64_t ptr); RustBuffer uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space( - void *ptr, RustCallStatus *uniffi_out_err); -void * + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t 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_method_spaceroomlist_subscribe_to_space_updates( - 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 ptr, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( - void *ptr, RustBuffer child_id, RustBuffer space_id); +uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_spaceservice( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_spaceservice( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child( - void *ptr, RustBuffer child_id); +uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( + /*handle*/ uint64_t ptr, RustBuffer child_id, RustBuffer space_id); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces(void *ptr); +uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space(void *ptr, - RustBuffer space_id); +uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child( + /*handle*/ uint64_t ptr, RustBuffer child_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space( + /*handle*/ uint64_t ptr, RustBuffer space_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space( - void *ptr, RustBuffer child_id, RustBuffer space_id); + /*handle*/ uint64_t ptr, RustBuffer child_id, RustBuffer space_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( - void *ptr, RustBuffer space_id); + /*handle*/ uint64_t 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, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_span_current( - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_span_new( - RustBuffer file, RustBuffer line, RustBuffer level, RustBuffer target, - RustBuffer name, RustBuffer bridge_trace_id, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( - RustBuffer target, RustBuffer parent_trace_id, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_method_span_enter(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_method_span_exit(void *ptr, - RustCallStatus *uniffi_out_err); -int8_t -uniffi_matrix_sdk_ffi_fn_method_span_is_none(void *ptr, - RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, uint64_t listener); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new( RustBuffer data_path, RustBuffer cache_path, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( - void *ptr, RustBuffer cache_size, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( - void *ptr, RustBuffer limit, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( - void *ptr, RustBuffer passphrase, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( - void *ptr, RustBuffer pool_max_size, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_ssohandler(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_ssohandler(void *ptr, - RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish(void *ptr, - RustBuffer callback_url); -RustBuffer -uniffi_matrix_sdk_ffi_fn_method_ssohandler_url(void *ptr, - RustCallStatus *uniffi_out_err); -void * -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); +uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( + /*handle*/ uint64_t ptr, RustBuffer cache_size, + 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); +uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( + /*handle*/ uint64_t ptr, RustBuffer limit, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( + /*handle*/ uint64_t ptr, RustBuffer passphrase, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( + /*handle*/ uint64_t ptr, RustBuffer pool_max_size, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_syncservice( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_syncservice( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_syncservice_start(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_method_syncservice_state( - void *ptr, uint64_t listener, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_syncservice_stop(void *ptr); -void *uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder( - void *ptr, RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_syncservice_start( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_syncservice_state( + /*handle*/ uint64_t ptr, uint64_t listener, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish(void *ptr); -void * uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( - void *ptr, int8_t enable, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_taskhandle(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_taskhandle(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( + /*handle*/ uint64_t ptr, int8_t enable, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_taskhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_taskhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); int8_t uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_threadsummary(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_threadsummary( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( - void *ptr, RustCallStatus *uniffi_out_err); -uint64_t uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_timeline(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_timeline(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +int8_t +uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + /*handle*/ uint64_t ptr, int8_t strict, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener(void *ptr, - uint64_t listener); +uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_sendhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_sendhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_timeline( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_timeline( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( + /*handle*/ uint64_t ptr, uint64_t listener); RustBuffer uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content( - void *ptr, RustBuffer msg_type, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer msg_type, + RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll( - void *ptr, RustBuffer question, RustBuffer answers, uint8_t max_selections, - RustBuffer poll_kind); + /*handle*/ uint64_t ptr, RustBuffer question, RustBuffer answers, + uint8_t max_selections, RustBuffer poll_kind); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_edit( - void *ptr, RustBuffer event_or_transaction_id, RustBuffer new_content); + /*handle*/ uint64_t ptr, RustBuffer event_or_transaction_id, + RustBuffer new_content); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll( - void *ptr, RustBuffer poll_start_event_id, RustBuffer text); + /*handle*/ uint64_t ptr, RustBuffer poll_start_event_id, RustBuffer text); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event( - void *ptr, RustBuffer event_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members(void *ptr); + /*handle*/ uint64_t ptr, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id( - void *ptr, RustBuffer event_id); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id(void *ptr); + /*handle*/ uint64_t ptr, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id( + /*handle*/ uint64_t ptr); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details( - void *ptr, RustBuffer event_id_str); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read(void *ptr, - RustBuffer receipt_type); + /*handle*/ uint64_t ptr, RustBuffer event_id_str); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read( + /*handle*/ uint64_t ptr, RustBuffer receipt_type); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards( - void *ptr, uint16_t num_events); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards(void *ptr, - uint16_t num_events); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event(void *ptr, - RustBuffer event_id); + /*handle*/ uint64_t ptr, uint16_t num_events); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards( + /*handle*/ uint64_t ptr, uint16_t num_events); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event( + /*handle*/ uint64_t ptr, RustBuffer event_id); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event( - void *ptr, RustBuffer event_or_transaction_id, RustBuffer reason); + /*handle*/ uint64_t ptr, RustBuffer event_or_transaction_id, + RustBuffer reason); void uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( - void *ptr, RustBuffer session_ids, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send(void *ptr, - void *msg); -void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( - void *ptr, RustBuffer params, RustBuffer audio_info, + /*handle*/ uint64_t ptr, RustBuffer session_ids, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( - void *ptr, RustBuffer params, RustBuffer file_info, +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t msg); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( + /*handle*/ uint64_t ptr, RustBuffer params, RustBuffer audio_info, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( - void *ptr, RustBuffer params, RustBuffer item_infos, +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( + /*handle*/ uint64_t ptr, RustBuffer params, RustBuffer file_info, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( - void *ptr, RustBuffer params, RustBuffer thumbnail_source, +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( + /*handle*/ uint64_t 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, + /*handle*/ uint64_t ptr, RustBuffer body, RustBuffer geo_uri, + RustBuffer description, 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 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 event_id); -void *uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( - void *ptr, RustBuffer params, RustBuffer thumbnail_source, + /*handle*/ uint64_t ptr, RustBuffer receipt_type, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t msg, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( + /*handle*/ uint64_t 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, - RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( + /*handle*/ uint64_t ptr, RustBuffer params, RustBuffer audio_info, + RustBuffer waveform, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( - void *ptr, uint64_t listener); + /*handle*/ uint64_t ptr, uint64_t listener); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction( - void *ptr, RustBuffer item_id, RustBuffer key); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(void *ptr, - RustBuffer event_id); -void * -uniffi_matrix_sdk_ffi_fn_clone_timelineevent(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_timelineevent( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( - void *ptr, RustCallStatus *uniffi_out_err); -uint64_t uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude( - RustBuffer event_types, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( - RustBuffer event_types, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_timelineitem(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_timelineitem(void *ptr, - RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustBuffer item_id, RustBuffer key); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( + /*handle*/ uint64_t ptr, RustBuffer event_id); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( + /*handle*/ uint64_t ptr, RustBuffer params, RustBuffer item_infos, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_timelineitem( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_timelineitem( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( - void *ptr, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( - void *ptr, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t -uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( - void *ptr, RustCallStatus *uniffi_out_err); -uint32_t -uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( - void *ptr, RustCallStatus *uniffi_out_err); -uint32_t -uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( - void *ptr, RustCallStatus *uniffi_out_err); -void * -uniffi_matrix_sdk_ffi_fn_clone_useridentity(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_useridentity(void *ptr, - RustCallStatus *uniffi_out_err); -int8_t uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( - void *ptr, RustCallStatus *uniffi_out_err); -int8_t uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( - void *ptr, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_useridentity_pin(void *ptr); -int8_t uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude( + RustBuffer event_types, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification(void *ptr); -void * -uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(void *ptr, - RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_free_widgetdriver(void *ptr, - RustCallStatus *uniffi_out_err); +uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( + RustBuffer event_types, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_threadsummary( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_threadsummary( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +uint64_t uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_span( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_span( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_span_current( + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_span_new( + RustBuffer file, RustBuffer line, RustBuffer level, RustBuffer target, + RustBuffer name, RustBuffer bridge_trace_id, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( + RustBuffer target, RustBuffer parent_trace_id, + RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_method_span_enter( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_method_span_exit( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +int8_t uniffi_matrix_sdk_ffi_fn_method_span_is_none( + /*handle*/ uint64_t ptr, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_widgetdriver( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_free_widgetdriver( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); /*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( - void *ptr, void *room, uint64_t capabilities_provider); -void *uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle( - void *ptr, RustCallStatus *uniffi_out_err); + /*handle*/ uint64_t ptr, + /*handle*/ uint64_t room, uint64_t capabilities_provider); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle( + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle( - void *ptr, RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv(void *ptr); -/*handle*/ uint64_t -uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send(void *ptr, - RustBuffer msg); + /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( + /*handle*/ uint64_t ptr); +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send( + /*handle*/ uint64_t ptr, RustBuffer msg); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener( UniffiVTableCallbackInterfaceAccountDataListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( - UniffiVTableCallbackInterfaceBackupStateListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( - UniffiVTableCallbackInterfaceBackupSteadyStateListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( - UniffiVTableCallbackInterfaceCallDeclineListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( UniffiVTableCallbackInterfaceClientDelegate *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( UniffiVTableCallbackInterfaceClientSessionDelegate *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( + UniffiVTableCallbackInterfaceIgnoredUsersListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( + UniffiVTableCallbackInterfaceMediaPreviewConfigListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( + UniffiVTableCallbackInterfaceProgressWatcher *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( + UniffiVTableCallbackInterfaceRoomAccountDataListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( + UniffiVTableCallbackInterfaceSendQueueRoomErrorListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( + UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( + UniffiVTableCallbackInterfaceSyncNotificationListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( + UniffiVTableCallbackInterfaceBackupStateListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( + UniffiVTableCallbackInterfaceBackupSteadyStateListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( UniffiVTableCallbackInterfaceEnableRecoveryProgressListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( + UniffiVTableCallbackInterfaceRecoveryStateListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( + UniffiVTableCallbackInterfaceVerificationStateListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate( + UniffiVTableCallbackInterfaceNotificationSettingsDelegate *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( UniffiVTableCallbackInterfaceGrantQrLoginProgressListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener( + UniffiVTableCallbackInterfaceQrLoginProgressListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( + UniffiVTableCallbackInterfaceCallDeclineListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( UniffiVTableCallbackInterfaceIdentityStatusChangeListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( - UniffiVTableCallbackInterfaceIgnoredUsersListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( UniffiVTableCallbackInterfaceKnockRequestsListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( UniffiVTableCallbackInterfaceLiveLocationShareListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( - UniffiVTableCallbackInterfaceMediaPreviewConfigListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate( - UniffiVTableCallbackInterfaceNotificationSettingsDelegate *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( - UniffiVTableCallbackInterfacePaginationStatusListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( - UniffiVTableCallbackInterfaceProgressWatcher *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener( - UniffiVTableCallbackInterfaceQrLoginProgressListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( - UniffiVTableCallbackInterfaceRecoveryStateListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( - UniffiVTableCallbackInterfaceRoomAccountDataListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( - UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener( UniffiVTableCallbackInterfaceRoomInfoListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( + UniffiVTableCallbackInterfaceSendQueueListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( + UniffiVTableCallbackInterfaceTypingNotificationsListener *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( + UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( UniffiVTableCallbackInterfaceRoomListEntriesListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( @@ -1834,12 +1942,6 @@ void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( UniffiVTableCallbackInterfaceRoomListServiceStateListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( - UniffiVTableCallbackInterfaceSendQueueListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( - UniffiVTableCallbackInterfaceSendQueueRoomErrorListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( - UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate( UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( @@ -1850,73 +1952,75 @@ void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener( UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( - UniffiVTableCallbackInterfaceSyncNotificationListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( UniffiVTableCallbackInterfaceSyncServiceStateObserver *vtable); +void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( + UniffiVTableCallbackInterfacePaginationStatusListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener( UniffiVTableCallbackInterfaceTimelineListener *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( - UniffiVTableCallbackInterfaceTypingNotificationsListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate( UniffiVTableCallbackInterfaceUnableToDecryptDelegate *vtable); -void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( - UniffiVTableCallbackInterfaceVerificationStateListener *vtable); void uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider( UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider *vtable); -void *uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - RustBuffer message, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( - RustBuffer caption, RustBuffer formatted_caption, RustBuffer mentions, - RustCallStatus *uniffi_out_err); +RustBuffer +uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha(RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( RustCallStatus *uniffi_out_err); -/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( - RustBuffer widget_settings, void *room, RustBuffer props); -RustBuffer uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( - RustBuffer own_user_id, RustBuffer own_device_id, - RustCallStatus *uniffi_out_err); void uniffi_matrix_sdk_ffi_fn_func_init_platform( RustBuffer config, int8_t use_lightweight_tokio_runtime, RustCallStatus *uniffi_out_err); -int8_t uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( - RustBuffer alias, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_func_log_event(RustBuffer file, RustBuffer line, - RustBuffer level, - RustBuffer target, - RustBuffer message, - RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( - RustBuffer settings, RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + RustBuffer configuration, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( RustBuffer room_alias, RustCallStatus *uniffi_out_err); +int8_t uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( + RustBuffer alias, RustCallStatus *uniffi_out_err); +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_matrix_to_user_permalink( RustBuffer user_id, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html( +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( + RustBuffer power_level, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( + RustBuffer message, RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html( RustBuffer body, RustBuffer html_body, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote( +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote( RustBuffer body, RustBuffer html_body, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown( +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown( RustBuffer md, RustCallStatus *uniffi_out_err); -void * +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown_as_emote( RustBuffer md, RustCallStatus *uniffi_out_err); -void *uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( +/*handle*/ uint64_t uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( RustBuffer msgtype, RustCallStatus *uniffi_out_err); -RustBuffer uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( - RustBuffer props, RustBuffer config, RustCallStatus *uniffi_out_err); RustBuffer uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( RustBuffer uri, RustCallStatus *uniffi_out_err); -void uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( - RustBuffer configuration, RustCallStatus *uniffi_out_err); -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); -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( - RustBuffer power_level, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + RustBuffer caption, RustBuffer formatted_caption, RustBuffer mentions, + RustCallStatus *uniffi_out_err); +void uniffi_matrix_sdk_ffi_fn_func_log_event(RustBuffer file, RustBuffer line, + RustBuffer level, + RustBuffer target, + RustBuffer message, + RustCallStatus *uniffi_out_err); +/*handle*/ uint64_t +uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(RustBuffer widget_settings, + /*handle*/ uint64_t room, + RustBuffer props); +RustBuffer uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + RustBuffer own_user_id, RustBuffer own_device_id, + RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + RustBuffer settings, RustCallStatus *uniffi_out_err); +RustBuffer uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( + RustBuffer props, RustBuffer config, RustCallStatus *uniffi_out_err); RustBuffer ffi_matrix_sdk_ffi_rustbuffer_alloc(uint64_t size, RustCallStatus *uniffi_out_err); RustBuffer @@ -2017,15 +2121,6 @@ void ffi_matrix_sdk_ffi_rust_future_free_f64( /*handle*/ uint64_t handle); double ffi_matrix_sdk_ffi_rust_future_complete_f64( /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); -void ffi_matrix_sdk_ffi_rust_future_poll_pointer( - /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, - /*handle*/ uint64_t callback_data); -void ffi_matrix_sdk_ffi_rust_future_cancel_pointer( - /*handle*/ uint64_t handle); -void ffi_matrix_sdk_ffi_rust_future_free_pointer( - /*handle*/ uint64_t handle); -void *ffi_matrix_sdk_ffi_rust_future_complete_pointer( - /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer( /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, /*handle*/ uint64_t callback_data); @@ -2044,19 +2139,19 @@ void ffi_matrix_sdk_ffi_rust_future_free_void( /*handle*/ uint64_t handle); void ffi_matrix_sdk_ffi_rust_future_complete_void( /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); -uint16_t -uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_init_platform(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_log_event(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote(); @@ -2065,19 +2160,32 @@ uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget(); uint16_t uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_log_event(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url(); uint16_t -uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role(); -uint16_t uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send(); +uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver(); +uint16_t uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts(); +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_ssohandler_finish(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_account_data(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_account_url(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url(); @@ -2110,7 +2218,6 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_profile(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_room(); @@ -2199,6 +2306,10 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_upload_media(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_user_id(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates(); uint16_t @@ -2270,58 +2381,33 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate(); +uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan(); +uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version(); +uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification(); +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(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts(); +uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login(); +uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login(); +uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room(); 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(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline(); +uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediasource_url(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device(); +uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules(); uint16_t @@ -2362,7 +2448,21 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants(); @@ -2476,40 +2576,9 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlist_room(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite(); @@ -2546,19 +2615,49 @@ uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_noti uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlist_room(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompreview_info(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_mediasource_url(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request(); uint16_t @@ -2581,6 +2680,8 @@ 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_leavespacehandle_leave(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms(); 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(); @@ -2603,9 +2704,6 @@ uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space(); 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_sqlitestorebuilder_cache_size(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit(); @@ -2614,8 +2712,6 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained(); -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(); @@ -2630,8 +2726,19 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content(); @@ -2654,7 +2761,6 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response(); @@ -2666,87 +2772,85 @@ 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_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(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id(); +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_widgetdriver_run(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send(); uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new(); +uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes(); uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json(); uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url(); -uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes(); -uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_span_current(); -uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_span_new(); -uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span(); uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new(); uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude(); uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include(); +uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_span_current(); +uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_span_new(); +uint16_t uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update(); +uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update(); +uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update(); +uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update(); +uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call(); +uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change(); +uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update(); +uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress(); +uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update(); +uint16_t +uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update(); +uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change(); +uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update(); uint16_t @@ -2755,11 +2859,6 @@ uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error(); -uint16_t -uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request(); uint16_t @@ -2783,16 +2882,12 @@ uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(); +uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update(); +uint16_t uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(); uint16_t uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd(); uint16_t -uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(); -uint16_t uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities(); uint32_t ffi_matrix_sdk_ffi_uniffi_contract_version(); } @@ -3074,7 +3169,7 @@ static void callback(uint64_t rs_data, int8_t rs_pollResult) { rsLambda(rs_data, rs_pollResult); } -static UniffiRustFutureContinuationCallback +[[maybe_unused]] static UniffiRustFutureContinuationCallback makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::rustfuturecontinuationcallback jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -3118,42 +3213,11 @@ static void cleanup() { rsLambda = nullptr; } } // namespace uniffi::matrix_sdk_ffi::cb::rustfuturecontinuationcallback - // Implementation of callback function calling from JS to Rust - // ForeignFutureFree, passed from Rust to JS as part of async callbacks. -namespace uniffi::matrix_sdk_ffi { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureFree rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureFree func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_ffi - // Implementation of free callback function CallbackInterfaceFree + // Implementation of callback function calling from Rust to JS + // ForeignFutureDroppedCallback // Callback function: -// uniffi::matrix_sdk_ffi::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::cb::foreignfuturedroppedcallback::UniffiForeignFutureDroppedCallback // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3166,7 +3230,7 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk_ffi::st::foreignfuture::foreignfuture::free { +namespace uniffi::matrix_sdk_ffi::cb::foreignfuturedroppedcallback { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -3194,7 +3258,7 @@ static void body(jsi::Runtime &rt, auto uniffiResult = cb.call(rt, js_handle); } catch (const jsi::JSError &error) { - std::cout << "Error in callback UniffiCallbackInterfaceFree: " + std::cout << "Error in callback UniffiForeignFutureDroppedCallback: " << error.what() << std::endl; throw error; } @@ -3219,8 +3283,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::foreignfuture::foreignfuture::free +[[maybe_unused]] static UniffiForeignFutureDroppedCallback +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::foreignfuturedroppedcallback jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -3260,7 +3324,8 @@ static void cleanup() { // out, then the pointer will no longer be left dangling. rsLambda = nullptr; } -} // namespace uniffi::matrix_sdk_ffi::st::foreignfuture::foreignfuture::free +} // namespace uniffi::matrix_sdk_ffi::cb::foreignfuturedroppedcallback + // Implementation of free callback function CallbackInterfaceFree // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceaccountdatalistener::vtablecallbackinterfaceaccountdatalistener::free::UniffiCallbackInterfaceFree @@ -3331,7 +3396,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceaccountdatalistener::vtablecallbackinterfaceaccountdatalistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -3376,7 +3441,7 @@ static void cleanup() { // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceaccountdatalistener::vtablecallbackinterfaceaccountdatalistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener::vtablecallbackinterfacebackupstatelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate::vtablecallbackinterfaceclientdelegate::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3389,9 +3454,8 @@ 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::st:: - vtablecallbackinterfacebackupstatelistener:: - vtablecallbackinterfacebackupstatelistener::free { +namespace uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate:: + vtablecallbackinterfaceclientdelegate::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -3444,8 +3508,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener::vtablecallbackinterfacebackupstatelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate::vtablecallbackinterfaceclientdelegate::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -3486,10 +3550,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener::vtablecallbackinterfacebackupstatelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate::vtablecallbackinterfaceclientdelegate::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener::vtablecallbackinterfacebackupsteadystatelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate::vtablecallbackinterfaceclientsessiondelegate::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3503,8 +3567,8 @@ 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::st:: - vtablecallbackinterfacebackupsteadystatelistener:: - vtablecallbackinterfacebackupsteadystatelistener::free { + vtablecallbackinterfaceclientsessiondelegate:: + vtablecallbackinterfaceclientsessiondelegate::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -3557,8 +3621,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener::vtablecallbackinterfacebackupsteadystatelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate::vtablecallbackinterfaceclientsessiondelegate::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -3599,10 +3663,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener::vtablecallbackinterfacebackupsteadystatelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate::vtablecallbackinterfaceclientsessiondelegate::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener::vtablecallbackinterfacecalldeclinelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener::vtablecallbackinterfaceignoreduserslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3616,8 +3680,8 @@ 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::st:: - vtablecallbackinterfacecalldeclinelistener:: - vtablecallbackinterfacecalldeclinelistener::free { + vtablecallbackinterfaceignoreduserslistener:: + vtablecallbackinterfaceignoreduserslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -3670,8 +3734,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener::vtablecallbackinterfacecalldeclinelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener::vtablecallbackinterfaceignoreduserslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -3712,10 +3776,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener::vtablecallbackinterfacecalldeclinelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener::vtablecallbackinterfaceignoreduserslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate::vtablecallbackinterfaceclientdelegate::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacemediapreviewconfiglistener::vtablecallbackinterfacemediapreviewconfiglistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3728,8 +3792,9 @@ 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::st::vtablecallbackinterfaceclientdelegate:: - vtablecallbackinterfaceclientdelegate::free { +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacemediapreviewconfiglistener:: + vtablecallbackinterfacemediapreviewconfiglistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -3782,8 +3847,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate::vtablecallbackinterfaceclientdelegate::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacemediapreviewconfiglistener::vtablecallbackinterfacemediapreviewconfiglistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -3824,10 +3889,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate::vtablecallbackinterfaceclientdelegate::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacemediapreviewconfiglistener::vtablecallbackinterfacemediapreviewconfiglistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate::vtablecallbackinterfaceclientsessiondelegate::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher::vtablecallbackinterfaceprogresswatcher::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3840,9 +3905,8 @@ 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::st:: - vtablecallbackinterfaceclientsessiondelegate:: - vtablecallbackinterfaceclientsessiondelegate::free { +namespace uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher:: + vtablecallbackinterfaceprogresswatcher::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -3895,8 +3959,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate::vtablecallbackinterfaceclientsessiondelegate::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher::vtablecallbackinterfaceprogresswatcher::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -3937,10 +4001,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate::vtablecallbackinterfaceclientsessiondelegate::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher::vtablecallbackinterfaceprogresswatcher::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceenablerecoveryprogresslistener::vtablecallbackinterfaceenablerecoveryprogresslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener::vtablecallbackinterfaceroomaccountdatalistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -3954,8 +4018,8 @@ 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::st:: - vtablecallbackinterfaceenablerecoveryprogresslistener:: - vtablecallbackinterfaceenablerecoveryprogresslistener::free { + vtablecallbackinterfaceroomaccountdatalistener:: + vtablecallbackinterfaceroomaccountdatalistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4008,8 +4072,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceenablerecoveryprogresslistener::vtablecallbackinterfaceenablerecoveryprogresslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener::vtablecallbackinterfaceroomaccountdatalistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4050,10 +4114,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceenablerecoveryprogresslistener::vtablecallbackinterfaceenablerecoveryprogresslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener::vtablecallbackinterfaceroomaccountdatalistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegeneratedqrloginprogresslistener::vtablecallbackinterfacegeneratedqrloginprogresslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomerrorlistener::vtablecallbackinterfacesendqueueroomerrorlistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4067,8 +4131,8 @@ 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::st:: - vtablecallbackinterfacegeneratedqrloginprogresslistener:: - vtablecallbackinterfacegeneratedqrloginprogresslistener::free { + vtablecallbackinterfacesendqueueroomerrorlistener:: + vtablecallbackinterfacesendqueueroomerrorlistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4121,8 +4185,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegeneratedqrloginprogresslistener::vtablecallbackinterfacegeneratedqrloginprogresslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomerrorlistener::vtablecallbackinterfacesendqueueroomerrorlistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4163,10 +4227,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegeneratedqrloginprogresslistener::vtablecallbackinterfacegeneratedqrloginprogresslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomerrorlistener::vtablecallbackinterfacesendqueueroomerrorlistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomupdatelistener::vtablecallbackinterfacesendqueueroomupdatelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4180,8 +4244,8 @@ 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::st:: - vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: - vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free { + vtablecallbackinterfacesendqueueroomupdatelistener:: + vtablecallbackinterfacesendqueueroomupdatelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4234,8 +4298,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomupdatelistener::vtablecallbackinterfacesendqueueroomupdatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4276,10 +4340,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomupdatelistener::vtablecallbackinterfacesendqueueroomupdatelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantqrloginprogresslistener::vtablecallbackinterfacegrantqrloginprogresslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener::vtablecallbackinterfacesyncnotificationlistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4293,8 +4357,8 @@ 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::st:: - vtablecallbackinterfacegrantqrloginprogresslistener:: - vtablecallbackinterfacegrantqrloginprogresslistener::free { + vtablecallbackinterfacesyncnotificationlistener:: + vtablecallbackinterfacesyncnotificationlistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4347,8 +4411,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantqrloginprogresslistener::vtablecallbackinterfacegrantqrloginprogresslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener::vtablecallbackinterfacesyncnotificationlistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4389,10 +4453,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantqrloginprogresslistener::vtablecallbackinterfacegrantqrloginprogresslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener::vtablecallbackinterfacesyncnotificationlistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceidentitystatuschangelistener::vtablecallbackinterfaceidentitystatuschangelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener::vtablecallbackinterfacebackupstatelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4406,8 +4470,8 @@ 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::st:: - vtablecallbackinterfaceidentitystatuschangelistener:: - vtablecallbackinterfaceidentitystatuschangelistener::free { + vtablecallbackinterfacebackupstatelistener:: + vtablecallbackinterfacebackupstatelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4460,8 +4524,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceidentitystatuschangelistener::vtablecallbackinterfaceidentitystatuschangelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener::vtablecallbackinterfacebackupstatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4502,10 +4566,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceidentitystatuschangelistener::vtablecallbackinterfaceidentitystatuschangelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener::vtablecallbackinterfacebackupstatelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener::vtablecallbackinterfaceignoreduserslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener::vtablecallbackinterfacebackupsteadystatelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4519,8 +4583,8 @@ 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::st:: - vtablecallbackinterfaceignoreduserslistener:: - vtablecallbackinterfaceignoreduserslistener::free { + vtablecallbackinterfacebackupsteadystatelistener:: + vtablecallbackinterfacebackupsteadystatelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4573,8 +4637,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener::vtablecallbackinterfaceignoreduserslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener::vtablecallbackinterfacebackupsteadystatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4615,10 +4679,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener::vtablecallbackinterfaceignoreduserslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener::vtablecallbackinterfacebackupsteadystatelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener::vtablecallbackinterfaceknockrequestslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceenablerecoveryprogresslistener::vtablecallbackinterfaceenablerecoveryprogresslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4632,8 +4696,8 @@ 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::st:: - vtablecallbackinterfaceknockrequestslistener:: - vtablecallbackinterfaceknockrequestslistener::free { + vtablecallbackinterfaceenablerecoveryprogresslistener:: + vtablecallbackinterfaceenablerecoveryprogresslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4686,8 +4750,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener::vtablecallbackinterfaceknockrequestslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceenablerecoveryprogresslistener::vtablecallbackinterfaceenablerecoveryprogresslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4728,10 +4792,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener::vtablecallbackinterfaceknockrequestslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceenablerecoveryprogresslistener::vtablecallbackinterfaceenablerecoveryprogresslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener::vtablecallbackinterfacelivelocationsharelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener::vtablecallbackinterfacerecoverystatelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4745,8 +4809,8 @@ 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::st:: - vtablecallbackinterfacelivelocationsharelistener:: - vtablecallbackinterfacelivelocationsharelistener::free { + vtablecallbackinterfacerecoverystatelistener:: + vtablecallbackinterfacerecoverystatelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4799,8 +4863,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener::vtablecallbackinterfacelivelocationsharelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener::vtablecallbackinterfacerecoverystatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4841,10 +4905,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener::vtablecallbackinterfacelivelocationsharelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener::vtablecallbackinterfacerecoverystatelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacemediapreviewconfiglistener::vtablecallbackinterfacemediapreviewconfiglistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceverificationstatelistener::vtablecallbackinterfaceverificationstatelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -4858,8 +4922,8 @@ 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::st:: - vtablecallbackinterfacemediapreviewconfiglistener:: - vtablecallbackinterfacemediapreviewconfiglistener::free { + vtablecallbackinterfaceverificationstatelistener:: + vtablecallbackinterfaceverificationstatelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -4912,8 +4976,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacemediapreviewconfiglistener::vtablecallbackinterfacemediapreviewconfiglistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceverificationstatelistener::vtablecallbackinterfaceverificationstatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -4954,7 +5018,7 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacemediapreviewconfiglistener::vtablecallbackinterfacemediapreviewconfiglistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceverificationstatelistener::vtablecallbackinterfaceverificationstatelistener::free // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacenotificationsettingsdelegate::vtablecallbackinterfacenotificationsettingsdelegate::free::UniffiCallbackInterfaceFree @@ -5025,7 +5089,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacenotificationsettingsdelegate::vtablecallbackinterfacenotificationsettingsdelegate::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -5070,7 +5134,7 @@ static void cleanup() { // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacenotificationsettingsdelegate::vtablecallbackinterfacenotificationsettingsdelegate::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener::vtablecallbackinterfacepaginationstatuslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegeneratedqrloginprogresslistener::vtablecallbackinterfacegeneratedqrloginprogresslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5084,8 +5148,8 @@ 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::st:: - vtablecallbackinterfacepaginationstatuslistener:: - vtablecallbackinterfacepaginationstatuslistener::free { + vtablecallbackinterfacegeneratedqrloginprogresslistener:: + vtablecallbackinterfacegeneratedqrloginprogresslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5138,8 +5202,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener::vtablecallbackinterfacepaginationstatuslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegeneratedqrloginprogresslistener::vtablecallbackinterfacegeneratedqrloginprogresslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5180,10 +5244,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener::vtablecallbackinterfacepaginationstatuslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegeneratedqrloginprogresslistener::vtablecallbackinterfacegeneratedqrloginprogresslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher::vtablecallbackinterfaceprogresswatcher::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5196,8 +5260,9 @@ 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::st::vtablecallbackinterfaceprogresswatcher:: - vtablecallbackinterfaceprogresswatcher::free { +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5250,8 +5315,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher::vtablecallbackinterfaceprogresswatcher::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5292,10 +5357,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher::vtablecallbackinterfaceprogresswatcher::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener::vtablecallbackinterfaceqrloginprogresslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantqrloginprogresslistener::vtablecallbackinterfacegrantqrloginprogresslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5309,8 +5374,8 @@ 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::st:: - vtablecallbackinterfaceqrloginprogresslistener:: - vtablecallbackinterfaceqrloginprogresslistener::free { + vtablecallbackinterfacegrantqrloginprogresslistener:: + vtablecallbackinterfacegrantqrloginprogresslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5363,8 +5428,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener::vtablecallbackinterfaceqrloginprogresslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantqrloginprogresslistener::vtablecallbackinterfacegrantqrloginprogresslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5405,10 +5470,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener::vtablecallbackinterfaceqrloginprogresslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacegrantqrloginprogresslistener::vtablecallbackinterfacegrantqrloginprogresslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener::vtablecallbackinterfacerecoverystatelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener::vtablecallbackinterfaceqrloginprogresslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5422,8 +5487,8 @@ 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::st:: - vtablecallbackinterfacerecoverystatelistener:: - vtablecallbackinterfacerecoverystatelistener::free { + vtablecallbackinterfaceqrloginprogresslistener:: + vtablecallbackinterfaceqrloginprogresslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5476,8 +5541,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener::vtablecallbackinterfacerecoverystatelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener::vtablecallbackinterfaceqrloginprogresslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5518,10 +5583,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener::vtablecallbackinterfacerecoverystatelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener::vtablecallbackinterfaceqrloginprogresslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener::vtablecallbackinterfaceroomaccountdatalistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener::vtablecallbackinterfacecalldeclinelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5535,8 +5600,8 @@ 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::st:: - vtablecallbackinterfaceroomaccountdatalistener:: - vtablecallbackinterfaceroomaccountdatalistener::free { + vtablecallbackinterfacecalldeclinelistener:: + vtablecallbackinterfacecalldeclinelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5589,8 +5654,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener::vtablecallbackinterfaceroomaccountdatalistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener::vtablecallbackinterfacecalldeclinelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5631,10 +5696,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener::vtablecallbackinterfaceroomaccountdatalistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener::vtablecallbackinterfacecalldeclinelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomdirectorysearchentrieslistener::vtablecallbackinterfaceroomdirectorysearchentrieslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceidentitystatuschangelistener::vtablecallbackinterfaceidentitystatuschangelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5648,8 +5713,8 @@ 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::st:: - vtablecallbackinterfaceroomdirectorysearchentrieslistener:: - vtablecallbackinterfaceroomdirectorysearchentrieslistener::free { + vtablecallbackinterfaceidentitystatuschangelistener:: + vtablecallbackinterfaceidentitystatuschangelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5702,8 +5767,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomdirectorysearchentrieslistener::vtablecallbackinterfaceroomdirectorysearchentrieslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceidentitystatuschangelistener::vtablecallbackinterfaceidentitystatuschangelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5744,10 +5809,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomdirectorysearchentrieslistener::vtablecallbackinterfaceroomdirectorysearchentrieslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceidentitystatuschangelistener::vtablecallbackinterfaceidentitystatuschangelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener::vtablecallbackinterfaceroominfolistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener::vtablecallbackinterfaceknockrequestslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5760,8 +5825,9 @@ 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::st::vtablecallbackinterfaceroominfolistener:: - vtablecallbackinterfaceroominfolistener::free { +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceknockrequestslistener:: + vtablecallbackinterfaceknockrequestslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5814,8 +5880,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener::vtablecallbackinterfaceroominfolistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener::vtablecallbackinterfaceknockrequestslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5856,10 +5922,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener::vtablecallbackinterfaceroominfolistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener::vtablecallbackinterfaceknockrequestslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener::vtablecallbackinterfaceroomlistentrieslistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener::vtablecallbackinterfacelivelocationsharelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5873,8 +5939,8 @@ 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::st:: - vtablecallbackinterfaceroomlistentrieslistener:: - vtablecallbackinterfaceroomlistentrieslistener::free { + vtablecallbackinterfacelivelocationsharelistener:: + vtablecallbackinterfacelivelocationsharelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -5927,8 +5993,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener::vtablecallbackinterfaceroomlistentrieslistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener::vtablecallbackinterfacelivelocationsharelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -5969,10 +6035,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener::vtablecallbackinterfaceroomlistentrieslistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener::vtablecallbackinterfacelivelocationsharelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistloadingstatelistener::vtablecallbackinterfaceroomlistloadingstatelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener::vtablecallbackinterfaceroominfolistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -5985,9 +6051,8 @@ 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::st:: - vtablecallbackinterfaceroomlistloadingstatelistener:: - vtablecallbackinterfaceroomlistloadingstatelistener::free { +namespace uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener:: + vtablecallbackinterfaceroominfolistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -6040,8 +6105,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistloadingstatelistener::vtablecallbackinterfaceroomlistloadingstatelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener::vtablecallbackinterfaceroominfolistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -6082,10 +6147,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistloadingstatelistener::vtablecallbackinterfaceroomlistloadingstatelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener::vtablecallbackinterfaceroominfolistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicestatelistener::vtablecallbackinterfaceroomlistservicestatelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener::vtablecallbackinterfacesendqueuelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -6098,9 +6163,8 @@ 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::st:: - vtablecallbackinterfaceroomlistservicestatelistener:: - vtablecallbackinterfaceroomlistservicestatelistener::free { +namespace uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener:: + vtablecallbackinterfacesendqueuelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -6153,8 +6217,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicestatelistener::vtablecallbackinterfaceroomlistservicestatelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener::vtablecallbackinterfacesendqueuelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -6195,10 +6259,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicestatelistener::vtablecallbackinterfaceroomlistservicestatelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener::vtablecallbackinterfacesendqueuelistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetypingnotificationslistener::vtablecallbackinterfacetypingnotificationslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -6212,8 +6276,8 @@ 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::st:: - vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: - vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free { + vtablecallbackinterfacetypingnotificationslistener:: + vtablecallbackinterfacetypingnotificationslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -6266,8 +6330,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetypingnotificationslistener::vtablecallbackinterfacetypingnotificationslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -6308,10 +6372,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetypingnotificationslistener::vtablecallbackinterfacetypingnotificationslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener::vtablecallbackinterfacesendqueuelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomdirectorysearchentrieslistener::vtablecallbackinterfaceroomdirectorysearchentrieslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -6324,8 +6388,9 @@ 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::st::vtablecallbackinterfacesendqueuelistener:: - vtablecallbackinterfacesendqueuelistener::free { +namespace uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -6378,8 +6443,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener::vtablecallbackinterfacesendqueuelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomdirectorysearchentrieslistener::vtablecallbackinterfaceroomdirectorysearchentrieslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -6420,10 +6485,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener::vtablecallbackinterfacesendqueuelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomdirectorysearchentrieslistener::vtablecallbackinterfaceroomdirectorysearchentrieslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomerrorlistener::vtablecallbackinterfacesendqueueroomerrorlistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener::vtablecallbackinterfaceroomlistentrieslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -6437,8 +6502,8 @@ 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::st:: - vtablecallbackinterfacesendqueueroomerrorlistener:: - vtablecallbackinterfacesendqueueroomerrorlistener::free { + vtablecallbackinterfaceroomlistentrieslistener:: + vtablecallbackinterfaceroomlistentrieslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -6491,8 +6556,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomerrorlistener::vtablecallbackinterfacesendqueueroomerrorlistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener::vtablecallbackinterfaceroomlistentrieslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -6533,10 +6598,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomerrorlistener::vtablecallbackinterfacesendqueueroomerrorlistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener::vtablecallbackinterfaceroomlistentrieslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomupdatelistener::vtablecallbackinterfacesendqueueroomupdatelistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistloadingstatelistener::vtablecallbackinterfaceroomlistloadingstatelistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -6550,8 +6615,8 @@ 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::st:: - vtablecallbackinterfacesendqueueroomupdatelistener:: - vtablecallbackinterfacesendqueueroomupdatelistener::free { + vtablecallbackinterfaceroomlistloadingstatelistener:: + vtablecallbackinterfaceroomlistloadingstatelistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -6604,8 +6669,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomupdatelistener::vtablecallbackinterfacesendqueueroomupdatelistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistloadingstatelistener::vtablecallbackinterfaceroomlistloadingstatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -6646,7 +6711,233 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueueroomupdatelistener::vtablecallbackinterfacesendqueueroomupdatelistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistloadingstatelistener::vtablecallbackinterfaceroomlistloadingstatelistener::free + +// Callback function: +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicestatelistener::vtablecallbackinterfaceroomlistservicestatelistener::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:: + vtablecallbackinterfaceroomlistservicestatelistener:: + vtablecallbackinterfaceroomlistservicestatelistener::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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicestatelistener::vtablecallbackinterfaceroomlistservicestatelistener::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::vtablecallbackinterfaceroomlistservicestatelistener::vtablecallbackinterfaceroomlistservicestatelistener::free + +// Callback function: +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::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:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener::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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::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::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesessionverificationcontrollerdelegate::vtablecallbackinterfacesessionverificationcontrollerdelegate::free::UniffiCallbackInterfaceFree @@ -6717,7 +7008,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesessionverificationcontrollerdelegate::vtablecallbackinterfacesessionverificationcontrollerdelegate::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -6830,7 +7121,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistentrieslistener::vtablecallbackinterfacespaceroomlistentrieslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -6943,7 +7234,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistpaginationstatelistener::vtablecallbackinterfacespaceroomlistpaginationstatelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -7056,7 +7347,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceroomlistspacelistener::vtablecallbackinterfacespaceroomlistspacelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -7169,7 +7460,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceservicejoinedspaceslistener::vtablecallbackinterfacespaceservicejoinedspaceslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -7214,7 +7505,7 @@ static void cleanup() { // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacespaceservicejoinedspaceslistener::vtablecallbackinterfacespaceservicejoinedspaceslistener::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener::vtablecallbackinterfacesyncnotificationlistener::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -7228,8 +7519,8 @@ 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::st:: - vtablecallbackinterfacesyncnotificationlistener:: - vtablecallbackinterfacesyncnotificationlistener::free { + vtablecallbackinterfacesyncservicestateobserver:: + vtablecallbackinterfacesyncservicestateobserver::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -7282,8 +7573,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener::vtablecallbackinterfacesyncnotificationlistener::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -7324,10 +7615,10 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener::vtablecallbackinterfacesyncnotificationlistener::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free // Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener::vtablecallbackinterfacepaginationstatuslistener::free::UniffiCallbackInterfaceFree // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -7341,8 +7632,8 @@ 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::st:: - vtablecallbackinterfacesyncservicestateobserver:: - vtablecallbackinterfacesyncservicestateobserver::free { + vtablecallbackinterfacepaginationstatuslistener:: + vtablecallbackinterfacepaginationstatuslistener::free { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -7395,8 +7686,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free +[[maybe_unused]] static UniffiCallbackInterfaceFree +makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener::vtablecallbackinterfacepaginationstatuslistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -7437,7 +7728,7 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver::vtablecallbackinterfacesyncservicestateobserver::free + // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener::vtablecallbackinterfacepaginationstatuslistener::free // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetimelinelistener::vtablecallbackinterfacetimelinelistener::free::UniffiCallbackInterfaceFree @@ -7507,7 +7798,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetimelinelistener::vtablecallbackinterfacetimelinelistener::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -7551,119 +7842,6 @@ static void cleanup() { } // namespace // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetimelinelistener::vtablecallbackinterfacetimelinelistener::free -// Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetypingnotificationslistener::vtablecallbackinterfacetypingnotificationslistener::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:: - vtablecallbackinterfacetypingnotificationslistener:: - vtablecallbackinterfacetypingnotificationslistener::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::vtablecallbackinterfacetypingnotificationslistener::vtablecallbackinterfacetypingnotificationslistener::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::vtablecallbackinterfacetypingnotificationslistener::vtablecallbackinterfacetypingnotificationslistener::free - // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceunabletodecryptdelegate::vtablecallbackinterfaceunabletodecryptdelegate::free::UniffiCallbackInterfaceFree // @@ -7733,7 +7911,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceunabletodecryptdelegate::vtablecallbackinterfaceunabletodecryptdelegate::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -7777,119 +7955,6 @@ static void cleanup() { } // namespace // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceunabletodecryptdelegate::vtablecallbackinterfaceunabletodecryptdelegate::free -// Callback function: -// uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceverificationstatelistener::vtablecallbackinterfaceverificationstatelistener::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:: - vtablecallbackinterfaceverificationstatelistener:: - vtablecallbackinterfaceverificationstatelistener::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::vtablecallbackinterfaceverificationstatelistener::vtablecallbackinterfaceverificationstatelistener::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::vtablecallbackinterfaceverificationstatelistener::vtablecallbackinterfaceverificationstatelistener::free - // Callback function: // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacewidgetcapabilitiesprovider::vtablecallbackinterfacewidgetcapabilitiesprovider::free::UniffiCallbackInterfaceFree // @@ -7959,7 +8024,7 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree +[[maybe_unused]] static UniffiCallbackInterfaceFree makeCallbackFunction( // uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacewidgetcapabilitiesprovider::vtablecallbackinterfacewidgetcapabilitiesprovider::free jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -8006,27 +8071,28 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFuture fromJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &jsValue) { +template <> struct Bridging { + static UniffiForeignFutureDroppedCallbackStruct + 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 UniffiForeignFuture"); + throw jsi::JSError( + rt, + "Expected an object for UniffiForeignFutureDroppedCallbackStruct"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFuture rsObject; + UniffiForeignFutureDroppedCallbackStruct rsObject; // Create the vtable from the js callbacks. rsObject.handle = uniffi_jsi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "handle")); - rsObject.free = uniffi::matrix_sdk_ffi::st::foreignfuture::foreignfuture:: - free::makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "free")); + rsObject.free = uniffi::matrix_sdk_ffi::cb::foreignfuturedroppedcallback:: + makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "free")); return rsObject; } @@ -8037,21 +8103,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU8 +template <> struct Bridging { + static UniffiForeignFutureResultU8 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 UniffiForeignFutureStructU8"); + "Expected an object for UniffiForeignFutureResultU8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU8 rsObject; + UniffiForeignFutureResultU8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8092,7 +8158,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8103,21 +8169,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI8 +template <> struct Bridging { + static UniffiForeignFutureResultI8 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 UniffiForeignFutureStructI8"); + "Expected an object for UniffiForeignFutureResultI8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI8 rsObject; + UniffiForeignFutureResultI8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8158,7 +8224,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8169,21 +8235,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU16 +template <> struct Bridging { + static UniffiForeignFutureResultU16 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 UniffiForeignFutureStructU16"); + "Expected an object for UniffiForeignFutureResultU16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU16 rsObject; + UniffiForeignFutureResultU16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8225,7 +8291,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8236,21 +8302,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI16 +template <> struct Bridging { + static UniffiForeignFutureResultI16 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 UniffiForeignFutureStructI16"); + "Expected an object for UniffiForeignFutureResultI16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI16 rsObject; + UniffiForeignFutureResultI16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8292,7 +8358,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8303,21 +8369,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU32 +template <> struct Bridging { + static UniffiForeignFutureResultU32 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 UniffiForeignFutureStructU32"); + "Expected an object for UniffiForeignFutureResultU32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU32 rsObject; + UniffiForeignFutureResultU32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8359,7 +8425,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8370,21 +8436,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI32 +template <> struct Bridging { + static UniffiForeignFutureResultI32 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 UniffiForeignFutureStructI32"); + "Expected an object for UniffiForeignFutureResultI32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI32 rsObject; + UniffiForeignFutureResultI32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8426,7 +8492,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8437,21 +8503,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU64 +template <> struct Bridging { + static UniffiForeignFutureResultU64 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 UniffiForeignFutureStructU64"); + "Expected an object for UniffiForeignFutureResultU64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU64 rsObject; + UniffiForeignFutureResultU64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8493,7 +8559,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8504,21 +8570,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI64 +template <> struct Bridging { + static UniffiForeignFutureResultI64 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 UniffiForeignFutureStructI64"); + "Expected an object for UniffiForeignFutureResultI64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI64 rsObject; + UniffiForeignFutureResultI64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8560,7 +8626,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8571,21 +8637,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF32 +template <> struct Bridging { + static UniffiForeignFutureResultF32 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 UniffiForeignFutureStructF32"); + "Expected an object for UniffiForeignFutureResultF32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF32 rsObject; + UniffiForeignFutureResultF32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8627,7 +8693,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8638,21 +8704,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF64 +template <> struct Bridging { + static UniffiForeignFutureResultF64 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 UniffiForeignFutureStructF64"); + "Expected an object for UniffiForeignFutureResultF64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF64 rsObject; + UniffiForeignFutureResultF64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -8694,7 +8760,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -8705,25 +8771,26 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructPointer +template <> struct Bridging { + static UniffiForeignFutureResultRustBuffer 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 UniffiForeignFutureStructPointer"); + rt, "Expected an object for UniffiForeignFutureResultRustBuffer"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructPointer rsObject; + UniffiForeignFutureResultRustBuffer rsObject; // Create the vtable from the js callbacks. - rsObject.return_value = uniffi_jsi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); + rsObject.return_value = + uniffi::matrix_sdk_ffi::Bridging::fromJs( + rt, callInvoker, jsObject.getProperty(rt, "returnValue")); rsObject.call_status = uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "callStatus")); @@ -8734,17 +8801,18 @@ template <> struct Bridging { } // namespace uniffi::matrix_sdk_ffi // Implementation of callback function calling from JS to Rust - // ForeignFutureCompletePointer, passed from Rust to JS as part of async + // ForeignFutureCompleteRustBuffer, passed from Rust to JS as part of async // callbacks. namespace uniffi::matrix_sdk_ffi { using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { +template <> struct Bridging { static jsi::Value toJs(jsi::Runtime &rt, std::shared_ptr callInvoker, - UniffiForeignFutureCompletePointer rsCallback) { + UniffiForeignFutureCompleteRustBuffer rsCallback) { return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2, + rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"), + 2, [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, const jsi::Value *arguments, size_t count) -> jsi::Value { @@ -8757,13 +8825,13 @@ template <> struct Bridging { std::shared_ptr callInvoker, const jsi::Value &thisValue, const jsi::Value *args, size_t count, - UniffiForeignFutureCompletePointer func) { + UniffiForeignFutureCompleteRustBuffer func) { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_ffi::Bridging< - UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, - args[1])); + UniffiForeignFutureResultRustBuffer>::fromJs(rt, callInvoker, + args[1])); return jsi::Value::undefined(); } @@ -8773,91 +8841,21 @@ namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructRustBuffer +template <> struct Bridging { + static UniffiForeignFutureResultVoid 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 UniffiForeignFutureStructRustBuffer"); + rt, "Expected an object for UniffiForeignFutureResultVoid"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructRustBuffer rsObject; - - // Create the vtable from the js callbacks. - rsObject.return_value = - uniffi::matrix_sdk_ffi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); - rsObject.call_status = - uniffi::matrix_sdk_ffi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "callStatus")); - - return rsObject; - } -}; - -} // namespace uniffi::matrix_sdk_ffi - // Implementation of callback function calling from JS to Rust - // ForeignFutureCompleteRustBuffer, passed from Rust to JS as part of async - // callbacks. -namespace uniffi::matrix_sdk_ffi { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureCompleteRustBuffer rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompleteRustBuffer"), - 2, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureCompleteRustBuffer func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging< - UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, - args[1])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static UniffiForeignFutureStructVoid - 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 UniffiForeignFutureStructVoid"); - } - - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiForeignFutureStructVoid rsObject; + UniffiForeignFutureResultVoid rsObject; // Create the vtable from the js callbacks. rsObject.call_status = @@ -8898,18 +8896,18 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func( uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs( + uniffi::matrix_sdk_ffi::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); } }; } // namespace uniffi::matrix_sdk_ffi - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceAccountDataListenerMethod0 + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceAccountDataListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0::UniffiCallbackInterfaceAccountDataListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceaccountdatalistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -8922,29 +8920,25 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceaccountdatalistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceaccountdatalistener { 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_event, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_event = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_event); + 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 @@ -8952,29 +8946,21 @@ 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_event); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceAccountDataListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -8985,16 +8971,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_event, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceAccountDataListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceaccountdatalistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9012,16 +9000,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdat } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_event, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_event, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_event, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -9038,12 +9024,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceBackupStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceaccountdatalistener + // Implementation of CallbackInterfaceAccountDataListenerMethod0 for vtable + // field on_change in VTableCallbackInterfaceAccountDataListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0::UniffiCallbackInterfaceBackupStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0::vtablecallbackinterfaceaccountdatalistener::UniffiCallbackInterfaceAccountDataListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9057,7 +9043,8 @@ 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:: - callbackinterfacebackupstatelistenermethod0 { + callbackinterfaceaccountdatalistenermethod0:: + vtablecallbackinterfaceaccountdatalistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -9070,15 +9057,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_status, + uint64_t rs_uniffiHandle, RustBuffer rs_event, 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_status); + auto js_event = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_event); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -9086,7 +9073,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_status); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_event); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -9100,13 +9087,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceBackupStateListenerMethod0: " + "UniffiCallbackInterfaceAccountDataListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -9124,11 +9111,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_event, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceBackupStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceAccountDataListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0::vtablecallbackinterfaceaccountdatalistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9147,14 +9134,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstat auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_status, + uint64_t rs_uniffiHandle, RustBuffer rs_event, 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_status, + [callInvoker, callbackValue, rs_uniffiHandle, rs_event, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_event, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -9172,12 +9159,52 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceBackupSteadyStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0::vtablecallbackinterfaceaccountdatalistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> struct Bridging { + static UniffiVTableCallbackInterfaceAccountDataListener + 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 " + "UniffiVTableCallbackInterfaceAccountDataListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceAccountDataListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceaccountdatalistener:: + vtablecallbackinterfaceaccountdatalistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceaccountdatalistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_change = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceaccountdatalistenermethod0:: + vtablecallbackinterfaceaccountdatalistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "onChange")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceClientDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupsteadystatelistenermethod0::UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceclientdelegate::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9190,29 +9217,25 @@ 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:: - callbackinterfacebackupsteadystatelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceclientdelegate { 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_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_status); + 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 @@ -9220,29 +9243,21 @@ 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_status); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceBackupSteadyStateListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -9253,16 +9268,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupsteadystatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceclientdelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9280,16 +9297,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstea } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -9306,12 +9321,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupsteadystatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceCallDeclineListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceclientdelegate + // Implementation of CallbackInterfaceClientDelegateMethod0 for vtable field + // did_receive_auth_error in VTableCallbackInterfaceClientDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0::UniffiCallbackInterfaceCallDeclineListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0::vtablecallbackinterfaceclientdelegate::UniffiCallbackInterfaceClientDelegateMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9324,13 +9339,13 @@ 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:: - callbackinterfacecalldeclinelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0:: + vtablecallbackinterfaceclientdelegate { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -9338,15 +9353,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, + uint64_t rs_uniffiHandle, int8_t rs_isSoftLogout, 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_declinerUserId = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_declinerUserId); + auto js_isSoftLogout = + uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_isSoftLogout); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -9354,7 +9369,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_declinerUserId); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_isSoftLogout); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -9367,14 +9382,14 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceCallDeclineListenerMethod0: " - << error.what() << std::endl; + std::cout + << "Error in callback UniffiCallbackInterfaceClientDelegateMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, +static void callback(uint64_t rs_uniffiHandle, int8_t rs_isSoftLogout, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -9392,12 +9407,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_declinerUserId, rs_uniffiOutReturn, + rsLambda(rs_uniffiHandle, rs_isSoftLogout, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceCallDeclineListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClientDelegateMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0::vtablecallbackinterfaceclientdelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9416,15 +9431,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclin auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, + uint64_t rs_uniffiHandle, int8_t rs_isSoftLogout, 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_declinerUserId, + [callInvoker, callbackValue, rs_uniffiHandle, rs_isSoftLogout, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_declinerUserId, rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_isSoftLogout, + rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -9441,12 +9456,52 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceClientDelegateMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0::vtablecallbackinterfaceclientdelegate +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> struct Bridging { + static UniffiVTableCallbackInterfaceClientDelegate + 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 UniffiVTableCallbackInterfaceClientDelegate"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceClientDelegate rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate:: + vtablecallbackinterfaceclientdelegate::free::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceclientdelegate::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.did_receive_auth_error = + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0:: + vtablecallbackinterfaceclientdelegate::makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "didReceiveAuthError")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceClientSessionDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0::UniffiCallbackInterfaceClientDelegateMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceclientsessiondelegate::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9459,28 +9514,25 @@ 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::callbackinterfaceclientdelegatemethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceclientsessiondelegate { 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, int8_t rs_isSoftLogout, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_isSoftLogout = - uniffi_jsi::Bridging::toJs(rt, callInvoker, rs_isSoftLogout); + 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 @@ -9488,29 +9540,21 @@ 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_isSoftLogout); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout - << "Error in callback UniffiCallbackInterfaceClientDelegateMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, int8_t rs_isSoftLogout, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -9521,17 +9565,18 @@ static void callback(uint64_t rs_uniffiHandle, int8_t rs_isSoftLogout, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_isSoftLogout, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceClientDelegateMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceclientsessiondelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9549,16 +9594,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdele } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, int8_t rs_isSoftLogout, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_isSoftLogout, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_isSoftLogout, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -9575,12 +9618,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceClientSessionDelegateMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceclientsessiondelegate + // Implementation of CallbackInterfaceClientSessionDelegateMethod0 for vtable + // field retrieve_session_from_keychain in + // VTableCallbackInterfaceClientSessionDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0::UniffiCallbackInterfaceClientSessionDelegateMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0::vtablecallbackinterfaceclientsessiondelegate::UniffiCallbackInterfaceClientSessionDelegateMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9594,7 +9638,8 @@ 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:: - callbackinterfaceclientsessiondelegatemethod0 { + callbackinterfaceclientsessiondelegatemethod0:: + vtablecallbackinterfaceclientsessiondelegate { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -9636,9 +9681,9 @@ static void body(jsi::Runtime &rt, return; } - // return type is MutReference(RustBuffer(Some(ExternalFfiMetadata { name: - // "Session", module_path: "matrix_sdk_ffi" }))) Finally, we need to copy - // the return value back into the Rust pointer. + // return type is RustBuffer(Some(ExternalFfiMetadata { name: "Session", + // module_path: "matrix_sdk_ffi::client" })) Finally, we need to copy the + // return value back into the Rust pointer. *rs_uniffiOutReturn = uniffi::matrix_sdk_ffi::Bridging>::fromJs( rt, callInvoker, uniffiResult); @@ -9671,8 +9716,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_userId, rsLambda(rs_uniffiHandle, rs_userId, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceClientSessionDelegateMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClientSessionDelegateMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0::vtablecallbackinterfaceclientsessiondelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9717,12 +9762,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceClientSessionDelegateMethod1 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0::vtablecallbackinterfaceclientsessiondelegate + // Implementation of CallbackInterfaceClientSessionDelegateMethod1 for vtable + // field save_session_in_keychain in + // VTableCallbackInterfaceClientSessionDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1::UniffiCallbackInterfaceClientSessionDelegateMethod1 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1::vtablecallbackinterfaceclientsessiondelegate::UniffiCallbackInterfaceClientSessionDelegateMethod1 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9736,7 +9782,8 @@ 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:: - callbackinterfaceclientsessiondelegatemethod1 { + callbackinterfaceclientsessiondelegatemethod1:: + vtablecallbackinterfaceclientsessiondelegate { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -9806,8 +9853,8 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_session, rsLambda(rs_uniffiHandle, rs_session, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceClientSessionDelegateMethod1 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1 +[[maybe_unused]] static UniffiCallbackInterfaceClientSessionDelegateMethod1 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1::vtablecallbackinterfaceclientsessiondelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9851,12 +9898,59 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceEnableRecoveryProgressListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1::vtablecallbackinterfaceclientsessiondelegate +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceClientSessionDelegate + 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 " + "UniffiVTableCallbackInterfaceClientSessionDelegate"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceClientSessionDelegate rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceclientsessiondelegate:: + vtablecallbackinterfaceclientsessiondelegate::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceclientsessiondelegate::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.retrieve_session_from_keychain = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceclientsessiondelegatemethod0:: + vtablecallbackinterfaceclientsessiondelegate::makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "retrieveSessionFromKeychain")); + rsObject.save_session_in_keychain = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceclientsessiondelegatemethod1:: + vtablecallbackinterfaceclientsessiondelegate::makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "saveSessionInKeychain")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceIgnoredUsersListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablerecoveryprogresslistenermethod0::UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceignoreduserslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -9869,29 +9963,25 @@ 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:: - callbackinterfaceenablerecoveryprogresslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceignoreduserslistener { 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_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_status); + 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 @@ -9899,30 +9989,21 @@ 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_status); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout - << "Error in callback " - "UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -9933,16 +10014,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablerecoveryprogresslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceignoreduserslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -9960,16 +10043,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablereco } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -9986,12 +10067,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablerecoveryprogresslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceGeneratedQrLoginProgressListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceignoreduserslistener + // Implementation of CallbackInterfaceIgnoredUsersListenerMethod0 for vtable + // field call in VTableCallbackInterfaceIgnoredUsersListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedqrloginprogresslistenermethod0::UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0::vtablecallbackinterfaceignoreduserslistener::UniffiCallbackInterfaceIgnoredUsersListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10005,7 +10086,8 @@ 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:: - callbackinterfacegeneratedqrloginprogresslistenermethod0 { + callbackinterfaceignoreduserslistenermethod0:: + vtablecallbackinterfaceignoreduserslistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -10018,15 +10100,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_state, + uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + auto js_ignoredUserIds = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_ignoredUserIds); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -10034,7 +10116,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_state); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_ignoredUserIds); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -10047,15 +10129,14 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout - << "Error in callback " - "UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback " + "UniffiCallbackInterfaceIgnoredUsersListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -10073,11 +10154,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_ignoredUserIds, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedqrloginprogresslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceIgnoredUsersListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0::vtablecallbackinterfaceignoreduserslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10096,15 +10178,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedq auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, + uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, 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_state, + [callInvoker, callbackValue, rs_uniffiHandle, rs_ignoredUserIds, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, - rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_ignoredUserIds, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10121,12 +10203,52 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedqrloginprogresslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0::vtablecallbackinterfaceignoreduserslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> struct Bridging { + static UniffiVTableCallbackInterfaceIgnoredUsersListener + 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 " + "UniffiVTableCallbackInterfaceIgnoredUsersListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceIgnoredUsersListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceignoreduserslistener:: + vtablecallbackinterfaceignoreduserslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceignoreduserslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceignoreduserslistenermethod0:: + vtablecallbackinterfaceignoreduserslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "call")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceMediaPreviewConfigListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgeneratedqrloginprogresslistenermethod0::UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacemediapreviewconfiglistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10139,29 +10261,25 @@ 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:: - callbackinterfacegrantgeneratedqrloginprogresslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacemediapreviewconfiglistener { 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_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + 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 @@ -10169,30 +10287,21 @@ 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_state); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerM" - "ethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -10203,16 +10312,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgeneratedqrloginprogresslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacemediapreviewconfiglistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10230,16 +10341,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgener } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10256,12 +10365,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgeneratedqrloginprogresslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceGrantQrLoginProgressListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacemediapreviewconfiglistener + // Implementation of CallbackInterfaceMediaPreviewConfigListenerMethod0 for + // vtable field on_change in VTableCallbackInterfaceMediaPreviewConfigListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrloginprogresslistenermethod0::UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacemediapreviewconfiglistenermethod0::vtablecallbackinterfacemediapreviewconfiglistener::UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10275,7 +10384,8 @@ 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:: - callbackinterfacegrantqrloginprogresslistenermethod0 { + callbackinterfacemediapreviewconfiglistenermethod0:: + vtablecallbackinterfacemediapreviewconfiglistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -10288,15 +10398,16 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_state, + uint64_t rs_uniffiHandle, RustBuffer rs_mediaPreviewConfig, 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + auto js_mediaPreviewConfig = + uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + rs_mediaPreviewConfig); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -10304,7 +10415,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_state); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_mediaPreviewConfig); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -10318,13 +10429,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0: " + "UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_mediaPreviewConfig, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -10342,11 +10453,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_mediaPreviewConfig, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrloginprogresslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacemediapreviewconfiglistenermethod0::vtablecallbackinterfacemediapreviewconfiglistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10365,15 +10477,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrlog auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, + uint64_t rs_uniffiHandle, RustBuffer rs_mediaPreviewConfig, 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_state, + [callInvoker, callbackValue, rs_uniffiHandle, rs_mediaPreviewConfig, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, - rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_mediaPreviewConfig, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10390,12 +10502,54 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrloginprogresslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceIdentityStatusChangeListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacemediapreviewconfiglistenermethod0::vtablecallbackinterfacemediapreviewconfiglistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceMediaPreviewConfigListener + 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 " + "UniffiVTableCallbackInterfaceMediaPreviewConfigListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceMediaPreviewConfigListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacemediapreviewconfiglistener:: + vtablecallbackinterfacemediapreviewconfiglistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacemediapreviewconfiglistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_change = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacemediapreviewconfiglistenermethod0:: + vtablecallbackinterfacemediapreviewconfiglistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onChange")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceProgressWatcher // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentitystatuschangelistenermethod0::UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceprogresswatcher::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10408,30 +10562,25 @@ 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:: - callbackinterfaceidentitystatuschangelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceprogresswatcher { 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_identityStatusChange, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_identityStatusChange = - uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_identityStatusChange); + 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 @@ -10439,30 +10588,21 @@ 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_identityStatusChange); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, - RustBuffer rs_identityStatusChange, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -10473,17 +10613,18 @@ static void callback(uint64_t rs_uniffiHandle, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_identityStatusChange, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentitystatuschangelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceprogresswatcher jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10501,16 +10642,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentityst } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_identityStatusChange, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_identityStatusChange, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_identityStatusChange, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10527,12 +10666,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentitystatuschangelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceIgnoredUsersListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceprogresswatcher + // Implementation of CallbackInterfaceProgressWatcherMethod0 for vtable field + // transmission_progress in VTableCallbackInterfaceProgressWatcher // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0::UniffiCallbackInterfaceIgnoredUsersListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0::vtablecallbackinterfaceprogresswatcher::UniffiCallbackInterfaceProgressWatcherMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10545,8 +10684,8 @@ 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:: - callbackinterfaceignoreduserslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0:: + vtablecallbackinterfaceprogresswatcher { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -10559,15 +10698,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, + uint64_t rs_uniffiHandle, RustBuffer rs_progress, 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_ignoredUserIds = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_ignoredUserIds); + auto js_progress = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_progress); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -10575,7 +10714,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_ignoredUserIds); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_progress); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -10588,14 +10727,14 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceIgnoredUsersListenerMethod0: " - << error.what() << std::endl; + std::cout + << "Error in callback UniffiCallbackInterfaceProgressWatcherMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_progress, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -10613,12 +10752,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_ignoredUserIds, rs_uniffiOutReturn, + rsLambda(rs_uniffiHandle, rs_progress, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceIgnoredUsersListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceProgressWatcherMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0::vtablecallbackinterfaceprogresswatcher jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10637,15 +10776,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduse auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_ignoredUserIds, + uint64_t rs_uniffiHandle, RustBuffer rs_progress, 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_ignoredUserIds, + [callInvoker, callbackValue, rs_uniffiHandle, rs_progress, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_ignoredUserIds, rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_progress, + rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10662,12 +10801,51 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceKnockRequestsListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0::vtablecallbackinterfaceprogresswatcher +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> struct Bridging { + static UniffiVTableCallbackInterfaceProgressWatcher + 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 " + "UniffiVTableCallbackInterfaceProgressWatcher"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceProgressWatcher rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher:: + vtablecallbackinterfaceprogresswatcher::free::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceprogresswatcher::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.transmission_progress = + uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0:: + vtablecallbackinterfaceprogresswatcher::makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "transmissionProgress")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomAccountDataListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0::UniffiCallbackInterfaceKnockRequestsListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomaccountdatalistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10680,29 +10858,25 @@ 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:: - callbackinterfaceknockrequestslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomaccountdatalistener { 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_joinRequests, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_joinRequests = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_joinRequests); + 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 @@ -10710,29 +10884,21 @@ 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_joinRequests); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceKnockRequestsListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_joinRequests, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -10743,17 +10909,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_joinRequests, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_joinRequests, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceKnockRequestsListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomaccountdatalistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10771,16 +10938,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockreque } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_joinRequests, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_joinRequests, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_joinRequests, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10797,12 +10962,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceLiveLocationShareListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomaccountdatalistener + // Implementation of CallbackInterfaceRoomAccountDataListenerMethod0 for + // vtable field on_change in VTableCallbackInterfaceRoomAccountDataListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocationsharelistenermethod0::UniffiCallbackInterfaceLiveLocationShareListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0::vtablecallbackinterfaceroomaccountdatalistener::UniffiCallbackInterfaceRoomAccountDataListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10816,12 +10981,14 @@ 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:: - callbackinterfacelivelocationsharelistenermethod0 { + callbackinterfaceroomaccountdatalistenermethod0:: + vtablecallbackinterfaceroomaccountdatalistener { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -10829,16 +10996,18 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_event, + RustBuffer rs_roomId, 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_liveLocationShares = - uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - rs_liveLocationShares); + auto js_event = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_event); + auto js_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_roomId); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -10846,7 +11015,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_liveLocationShares); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_event, js_roomId); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -10860,14 +11029,14 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceLiveLocationShareListenerMethod0: " + "UniffiCallbackInterfaceRoomAccountDataListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, - void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event, + RustBuffer rs_roomId, 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? @@ -10884,12 +11053,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_liveLocationShares, rs_uniffiOutReturn, + rsLambda(rs_uniffiHandle, rs_event, rs_roomId, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceLiveLocationShareListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocationsharelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceRoomAccountDataListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0::vtablecallbackinterfaceroomaccountdatalistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -10907,16 +11076,17 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocati } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, + callbackValue](uint64_t rs_uniffiHandle, RustBuffer rs_event, + RustBuffer rs_roomId, 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_liveLocationShares, + [callInvoker, callbackValue, rs_uniffiHandle, rs_event, rs_roomId, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_liveLocationShares, rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_event, + rs_roomId, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -10933,12 +11103,54 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocationsharelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceMediaPreviewConfigListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0::vtablecallbackinterfaceroomaccountdatalistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceRoomAccountDataListener + 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 " + "UniffiVTableCallbackInterfaceRoomAccountDataListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceRoomAccountDataListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceroomaccountdatalistener:: + vtablecallbackinterfaceroomaccountdatalistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomaccountdatalistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_change = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceroomaccountdatalistenermethod0:: + vtablecallbackinterfaceroomaccountdatalistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onChange")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSendQueueRoomErrorListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacemediapreviewconfiglistenermethod0::UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueueroomerrorlistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -10951,30 +11163,25 @@ 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:: - callbackinterfacemediapreviewconfiglistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueueroomerrorlistener { 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_mediaPreviewConfig, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_mediaPreviewConfig = - uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - rs_mediaPreviewConfig); + 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 @@ -10982,29 +11189,21 @@ 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_mediaPreviewConfig); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_mediaPreviewConfig, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -11015,17 +11214,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_mediaPreviewConfig, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_mediaPreviewConfig, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacemediapreviewconfiglistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueueroomerrorlistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11043,16 +11243,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacemediaprevi } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_mediaPreviewConfig, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_mediaPreviewConfig, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_mediaPreviewConfig, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11069,12 +11267,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacemediapreviewconfiglistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceNotificationSettingsDelegateMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueueroomerrorlistener + // Implementation of CallbackInterfaceSendQueueRoomErrorListenerMethod0 for + // vtable field on_error in VTableCallbackInterfaceSendQueueRoomErrorListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificationsettingsdelegatemethod0::UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomerrorlistenermethod0::vtablecallbackinterfacesendqueueroomerrorlistener::UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11088,26 +11286,33 @@ 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:: - callbackinterfacenotificationsettingsdelegatemethod0 { + callbackinterfacesendqueueroomerrorlistenermethod0:: + vtablecallbackinterfacesendqueueroomerrorlistener { 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, + uint64_t rs_uniffiHandle, RustBuffer rs_roomId, + RustBuffer rs_error, 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_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_roomId); + auto js_error = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_error); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11115,7 +11320,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_roomId, js_error); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11129,13 +11334,14 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceNotificationSettingsDelegateMethod0: " + "UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0: " << 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_roomId, + RustBuffer rs_error, 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? @@ -11152,11 +11358,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_roomId, rs_error, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificationsettingsdelegatemethod0 +[[maybe_unused]] static UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomerrorlistenermethod0::vtablecallbackinterfacesendqueueroomerrorlistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11175,15 +11382,16 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificati 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, + callbackValue](uint64_t rs_uniffiHandle, RustBuffer rs_roomId, + RustBuffer rs_error, 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); + [callInvoker, callbackValue, rs_uniffiHandle, rs_roomId, rs_error, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomId, + rs_error, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11200,12 +11408,54 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificationsettingsdelegatemethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfacePaginationStatusListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomerrorlistenermethod0::vtablecallbackinterfacesendqueueroomerrorlistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceSendQueueRoomErrorListener + 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 " + "UniffiVTableCallbackInterfaceSendQueueRoomErrorListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSendQueueRoomErrorListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacesendqueueroomerrorlistener:: + vtablecallbackinterfacesendqueueroomerrorlistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueueroomerrorlistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_error = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesendqueueroomerrorlistenermethod0:: + vtablecallbackinterfacesendqueueroomerrorlistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onError")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSendQueueRoomUpdateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0::UniffiCallbackInterfacePaginationStatusListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueueroomupdatelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11218,29 +11468,25 @@ 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:: - callbackinterfacepaginationstatuslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueueroomupdatelistener { 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_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_status); + 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 @@ -11248,29 +11494,21 @@ 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_status); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfacePaginationStatusListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -11281,16 +11519,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfacePaginationStatusListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueueroomupdatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11308,16 +11548,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacepagination } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11334,12 +11572,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceProgressWatcherMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueueroomupdatelistener + // Implementation of CallbackInterfaceSendQueueRoomUpdateListenerMethod0 for + // vtable field on_update in + // VTableCallbackInterfaceSendQueueRoomUpdateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0::UniffiCallbackInterfaceProgressWatcherMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomupdatelistenermethod0::vtablecallbackinterfacesendqueueroomupdatelistener::UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11352,12 +11591,15 @@ 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::callbackinterfaceprogresswatchermethod0 { +namespace uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesendqueueroomupdatelistenermethod0:: + vtablecallbackinterfacesendqueueroomupdatelistener { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -11365,15 +11607,18 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_progress, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_roomId, + RustBuffer rs_update, 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_progress = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_progress); + auto js_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_roomId); + auto js_update = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_update); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11381,7 +11626,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_progress); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_roomId, js_update); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11394,15 +11639,15 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout - << "Error in callback UniffiCallbackInterfaceProgressWatcherMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback " + "UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_progress, - void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomId, + RustBuffer rs_update, 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? @@ -11419,12 +11664,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_progress, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_progress, rs_uniffiOutReturn, + rsLambda(rs_uniffiHandle, rs_roomId, rs_update, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceProgressWatcherMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomupdatelistenermethod0::vtablecallbackinterfacesendqueueroomupdatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11442,16 +11687,17 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswa } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_progress, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, + callbackValue](uint64_t rs_uniffiHandle, RustBuffer rs_roomId, + RustBuffer rs_update, 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_progress, + [callInvoker, callbackValue, rs_uniffiHandle, rs_roomId, rs_update, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_progress, - rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomId, + rs_update, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11468,12 +11714,55 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceQrLoginProgressListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomupdatelistenermethod0::vtablecallbackinterfacesendqueueroomupdatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener + 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 " + "UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacesendqueueroomupdatelistener:: + vtablecallbackinterfacesendqueueroomupdatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueueroomupdatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesendqueueroomupdatelistenermethod0:: + vtablecallbackinterfacesendqueueroomupdatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSyncNotificationListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0::UniffiCallbackInterfaceQrLoginProgressListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesyncnotificationlistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11486,29 +11775,25 @@ 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:: - callbackinterfaceqrloginprogresslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesyncnotificationlistener { 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_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + 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 @@ -11516,29 +11801,21 @@ 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_state); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceQrLoginProgressListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -11549,16 +11826,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceQrLoginProgressListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesyncnotificationlistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11576,16 +11855,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginpro } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11602,12 +11879,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRecoveryStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesyncnotificationlistener + // Implementation of CallbackInterfaceSyncNotificationListenerMethod0 for + // vtable field on_notification in + // VTableCallbackInterfaceSyncNotificationListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0::UniffiCallbackInterfaceRecoveryStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0::vtablecallbackinterfacesyncnotificationlistener::UniffiCallbackInterfaceSyncNotificationListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11621,12 +11899,14 @@ 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:: - callbackinterfacerecoverystatelistenermethod0 { + callbackinterfacesyncnotificationlistenermethod0:: + vtablecallbackinterfacesyncnotificationlistener { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -11634,15 +11914,18 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_notification, + RustBuffer rs_roomId, 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_status); + auto js_notification = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_notification); + auto js_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_roomId); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11650,7 +11933,8 @@ 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_status); + auto uniffiResult = + cb.call(rt, js_uniffiHandle, js_notification, js_roomId); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11664,14 +11948,14 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceRecoveryStateListenerMethod0: " + "UniffiCallbackInterfaceSyncNotificationListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_notification, + RustBuffer rs_roomId, 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? @@ -11688,11 +11972,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_notification, rs_roomId, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceRecoveryStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceSyncNotificationListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0::vtablecallbackinterfacesyncnotificationlistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11711,15 +11996,17 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoveryst auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_notification, + RustBuffer rs_roomId, 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_status, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_uniffiHandle, rs_notification, + rs_roomId, rs_uniffiOutReturn, + uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_notification, + rs_roomId, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11736,12 +12023,55 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomAccountDataListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0::vtablecallbackinterfacesyncnotificationlistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceSyncNotificationListener + 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 " + "UniffiVTableCallbackInterfaceSyncNotificationListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSyncNotificationListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacesyncnotificationlistener:: + vtablecallbackinterfacesyncnotificationlistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesyncnotificationlistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_notification = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesyncnotificationlistenermethod0:: + vtablecallbackinterfacesyncnotificationlistener:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "onNotification")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceBackupStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0::UniffiCallbackInterfaceRoomAccountDataListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacebackupstatelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11754,33 +12084,25 @@ 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:: - callbackinterfaceroomaccountdatalistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacebackupstatelistener { 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_event, - RustBuffer rs_roomId, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_event = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_event); - auto js_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_roomId); + 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 @@ -11788,29 +12110,21 @@ 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_event, js_roomId); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceRoomAccountDataListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event, - RustBuffer rs_roomId, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -11821,17 +12135,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_event, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_event, rs_roomId, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceRoomAccountDataListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacebackupstatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11849,17 +12164,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccoun } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, - callbackValue](uint64_t rs_uniffiHandle, RustBuffer rs_event, - RustBuffer rs_roomId, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_event, rs_roomId, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_event, - rs_roomId, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -11876,12 +12188,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacebackupstatelistener + // Implementation of CallbackInterfaceBackupStateListenerMethod0 for vtable + // field on_update in VTableCallbackInterfaceBackupStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomdirectorysearchentrieslistenermethod0::UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0::vtablecallbackinterfacebackupstatelistener::UniffiCallbackInterfaceBackupStateListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -11895,7 +12207,8 @@ 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:: - callbackinterfaceroomdirectorysearchentrieslistenermethod0 { + callbackinterfacebackupstatelistenermethod0:: + vtablecallbackinterfacebackupstatelistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -11908,16 +12221,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_roomEntriesUpdate = - uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - rs_roomEntriesUpdate); + auto js_status = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_status); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -11925,7 +12237,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_roomEntriesUpdate); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_status); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -11938,15 +12250,14 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout - << "Error in callback " - "UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback " + "UniffiCallbackInterfaceBackupStateListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -11964,12 +12275,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_roomEntriesUpdate, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomdirectorysearchentrieslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceBackupStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0::vtablecallbackinterfacebackupstatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -11988,15 +12298,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomdirect auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_roomEntriesUpdate, + [callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_roomEntriesUpdate, rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, + rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -12013,12 +12323,52 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomdirectorysearchentrieslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomInfoListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0::vtablecallbackinterfacebackupstatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> struct Bridging { + static UniffiVTableCallbackInterfaceBackupStateListener + 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 " + "UniffiVTableCallbackInterfaceBackupStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceBackupStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener:: + vtablecallbackinterfacebackupstatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacebackupstatelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacebackupstatelistenermethod0:: + vtablecallbackinterfacebackupstatelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceBackupSteadyStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0::UniffiCallbackInterfaceRoomInfoListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacebackupsteadystatelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12031,28 +12381,25 @@ 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::callbackinterfaceroominfolistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacebackupsteadystatelistener { 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_roomInfo, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_roomInfo = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_roomInfo); + 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 @@ -12060,29 +12407,21 @@ 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_roomInfo); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout - << "Error in callback UniffiCallbackInterfaceRoomInfoListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomInfo, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -12093,17 +12432,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomInfo, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_roomInfo, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceRoomInfoListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacebackupsteadystatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12121,16 +12461,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfoli } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_roomInfo, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_roomInfo, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomInfo, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -12147,12 +12485,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomListEntriesListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacebackupsteadystatelistener + // Implementation of CallbackInterfaceBackupSteadyStateListenerMethod0 for + // vtable field on_update in VTableCallbackInterfaceBackupSteadyStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0::UniffiCallbackInterfaceRoomListEntriesListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupsteadystatelistenermethod0::vtablecallbackinterfacebackupsteadystatelistener::UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12166,7 +12504,8 @@ 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:: - callbackinterfaceroomlistentrieslistenermethod0 { + callbackinterfacebackupsteadystatelistenermethod0:: + vtablecallbackinterfacebackupsteadystatelistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -12179,16 +12518,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_roomEntriesUpdate = - uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - rs_roomEntriesUpdate); + auto js_status = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_status); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -12196,7 +12534,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_roomEntriesUpdate); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_status); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -12210,13 +12548,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceRoomListEntriesListenerMethod0: " + "UniffiCallbackInterfaceBackupSteadyStateListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -12234,12 +12572,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_roomEntriesUpdate, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceRoomListEntriesListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupsteadystatelistenermethod0::vtablecallbackinterfacebackupsteadystatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12258,15 +12595,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlisten auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_roomEntriesUpdate, + [callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_roomEntriesUpdate, rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, + rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -12283,12 +12620,54 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomListLoadingStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupsteadystatelistenermethod0::vtablecallbackinterfacebackupsteadystatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceBackupSteadyStateListener + 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 " + "UniffiVTableCallbackInterfaceBackupSteadyStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceBackupSteadyStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacebackupsteadystatelistener:: + vtablecallbackinterfacebackupsteadystatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacebackupsteadystatelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacebackupsteadystatelistenermethod0:: + vtablecallbackinterfacebackupsteadystatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceEnableRecoveryProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistloadingstatelistenermethod0::UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceenablerecoveryprogresslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12301,29 +12680,25 @@ 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:: - callbackinterfaceroomlistloadingstatelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceenablerecoveryprogresslistener { 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_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + 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 @@ -12331,29 +12706,21 @@ 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_state); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -12364,16 +12731,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistloadingstatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceenablerecoveryprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12391,16 +12760,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistlo } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -12417,12 +12784,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistloadingstatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomListServiceStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceenablerecoveryprogresslistener + // Implementation of CallbackInterfaceEnableRecoveryProgressListenerMethod0 + // for vtable field on_update in + // VTableCallbackInterfaceEnableRecoveryProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicestatelistenermethod0::UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablerecoveryprogresslistenermethod0::vtablecallbackinterfaceenablerecoveryprogresslistener::UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12436,7 +12804,8 @@ 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:: - callbackinterfaceroomlistservicestatelistenermethod0 { + callbackinterfaceenablerecoveryprogresslistenermethod0:: + vtablecallbackinterfaceenablerecoveryprogresslistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -12449,15 +12818,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_state, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + auto js_status = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_status); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -12465,7 +12834,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_state); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_status); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -12478,14 +12847,15 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceRoomListServiceStateListenerMethod0: " - << error.what() << std::endl; + std::cout + << "Error in callback " + "UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -12503,11 +12873,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicestatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablerecoveryprogresslistenermethod0::vtablecallbackinterfaceenablerecoveryprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12526,14 +12896,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistse auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_state, + [callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -12551,12 +12921,55 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicestatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceenablerecoveryprogresslistenermethod0::vtablecallbackinterfaceenablerecoveryprogresslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceEnableRecoveryProgressListener + 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 " + "UniffiVTableCallbackInterfaceEnableRecoveryProgressListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceEnableRecoveryProgressListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceenablerecoveryprogresslistener:: + vtablecallbackinterfaceenablerecoveryprogresslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceenablerecoveryprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceenablerecoveryprogresslistenermethod0:: + vtablecallbackinterfaceenablerecoveryprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRecoveryStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicesyncindicatorlistenermethod0::UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacerecoverystatelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12569,29 +12982,25 @@ 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:: - callbackinterfaceroomlistservicesyncindicatorlistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacerecoverystatelistener { 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_syncIndicator, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_syncIndicator = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_syncIndicator); + 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 @@ -12599,30 +13008,21 @@ 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_syncIndicator); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMe" - "thod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_syncIndicator, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -12633,17 +13033,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_syncIndicator, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_syncIndicator, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicesyncindicatorlistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacerecoverystatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12661,16 +13062,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistse } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_syncIndicator, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_syncIndicator, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_syncIndicator, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -12687,12 +13086,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicesyncindicatorlistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSendQueueListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacerecoverystatelistener + // Implementation of CallbackInterfaceRecoveryStateListenerMethod0 for vtable + // field on_update in VTableCallbackInterfaceRecoveryStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0::UniffiCallbackInterfaceSendQueueListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0::vtablecallbackinterfacerecoverystatelistener::UniffiCallbackInterfaceRecoveryStateListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12706,7 +13105,8 @@ 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:: - callbackinterfacesendqueuelistenermethod0 { + callbackinterfacerecoverystatelistenermethod0:: + vtablecallbackinterfacerecoverystatelistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -12719,15 +13119,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_update, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_update = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_update); + auto js_status = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_status); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -12735,7 +13135,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_update); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_status); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -12748,14 +13148,14 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout - << "Error in callback UniffiCallbackInterfaceSendQueueListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback " + "UniffiCallbackInterfaceRecoveryStateListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_update, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -12773,11 +13173,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_update, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_update, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSendQueueListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceRecoveryStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0::vtablecallbackinterfacerecoverystatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12796,14 +13196,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuel auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_update, + uint64_t rs_uniffiHandle, RustBuffer rs_status, 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_update, + [callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_update, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -12821,12 +13221,53 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSendQueueRoomErrorListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0::vtablecallbackinterfacerecoverystatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceRecoveryStateListener + 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 " + "UniffiVTableCallbackInterfaceRecoveryStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceRecoveryStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacerecoverystatelistener:: + vtablecallbackinterfacerecoverystatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacerecoverystatelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacerecoverystatelistenermethod0:: + vtablecallbackinterfacerecoverystatelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceVerificationStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomerrorlistenermethod0::UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceverificationstatelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12839,33 +13280,25 @@ 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:: - callbackinterfacesendqueueroomerrorlistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceverificationstatelistener { 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_roomId, - RustBuffer rs_error, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_roomId); - auto js_error = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_error); + 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 @@ -12873,29 +13306,21 @@ 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_roomId, js_error); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomId, - RustBuffer rs_error, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -12906,17 +13331,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomId, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_roomId, rs_error, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomerrorlistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceverificationstatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -12934,17 +13360,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuer } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, - callbackValue](uint64_t rs_uniffiHandle, RustBuffer rs_roomId, - RustBuffer rs_error, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_roomId, rs_error, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomId, - rs_error, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -12961,12 +13384,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomerrorlistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSendQueueRoomUpdateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceverificationstatelistener + // Implementation of CallbackInterfaceVerificationStateListenerMethod0 for + // vtable field on_update in VTableCallbackInterfaceVerificationStateListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomupdatelistenermethod0::UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificationstatelistenermethod0::vtablecallbackinterfaceverificationstatelistener::UniffiCallbackInterfaceVerificationStateListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -12980,13 +13403,13 @@ 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:: - callbackinterfacesendqueueroomupdatelistenermethod0 { + callbackinterfaceverificationstatelistenermethod0:: + vtablecallbackinterfaceverificationstatelistener { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -12994,18 +13417,15 @@ static std::function callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_roomId, - RustBuffer rs_update, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_status, + 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_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_roomId); - auto js_update = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_update); + auto js_status = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_status); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -13013,7 +13433,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_roomId, js_update); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_status); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -13027,14 +13447,14 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0: " + "UniffiCallbackInterfaceVerificationStateListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomId, - RustBuffer rs_update, void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, + 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? @@ -13051,12 +13471,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomId, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_roomId, rs_update, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomupdatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceVerificationStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificationstatelistenermethod0::vtablecallbackinterfaceverificationstatelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13074,17 +13493,16 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuer } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, - callbackValue](uint64_t rs_uniffiHandle, RustBuffer rs_roomId, - RustBuffer rs_update, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue]( + uint64_t rs_uniffiHandle, RustBuffer rs_status, + 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_roomId, rs_update, + [callInvoker, callbackValue, rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomId, - rs_update, rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, + rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -13101,12 +13519,54 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueueroomupdatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificationstatelistenermethod0::vtablecallbackinterfaceverificationstatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceVerificationStateListener + 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 " + "UniffiVTableCallbackInterfaceVerificationStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceVerificationStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceverificationstatelistener:: + vtablecallbackinterfaceverificationstatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceverificationstatelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceverificationstatelistenermethod0:: + vtablecallbackinterfaceverificationstatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceNotificationSettingsDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod0::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacenotificationsettingsdelegate::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13119,29 +13579,25 @@ 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:: - callbackinterfacesessionverificationcontrollerdelegatemethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacenotificationsettingsdelegate { 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_details, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_details = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_details); + 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 @@ -13149,30 +13605,21 @@ 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_details); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_details, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -13183,16 +13630,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_details, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_details, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacenotificationsettingsdelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13210,16 +13659,14 @@ 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_details, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_details, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_details, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -13236,12 +13683,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod1 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacenotificationsettingsdelegate + // Implementation of CallbackInterfaceNotificationSettingsDelegateMethod0 for + // vtable field settings_did_change in + // VTableCallbackInterfaceNotificationSettingsDelegate // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod1::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificationsettingsdelegatemethod0::vtablecallbackinterfacenotificationsettingsdelegate::UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13255,7 +13703,8 @@ 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:: - callbackinterfacesessionverificationcontrollerdelegatemethod1 { + callbackinterfacenotificationsettingsdelegatemethod0:: + vtablecallbackinterfacenotificationsettingsdelegate { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -13296,8 +13745,7 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod1: " + "UniffiCallbackInterfaceNotificationSettingsDelegateMethod0: " << error.what() << std::endl; throw error; } @@ -13323,8 +13771,8 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, rsLambda(rs_uniffiHandle, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod1 +[[maybe_unused]] static UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificationsettingsdelegatemethod0::vtablecallbackinterfacenotificationsettingsdelegate jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13368,12 +13816,56 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod1 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod2 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacenotificationsettingsdelegatemethod0::vtablecallbackinterfacenotificationsettingsdelegate +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceNotificationSettingsDelegate + 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 " + "UniffiVTableCallbackInterfaceNotificationSettingsDelegate"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceNotificationSettingsDelegate rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacenotificationsettingsdelegate:: + vtablecallbackinterfacenotificationsettingsdelegate::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacenotificationsettingsdelegate:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.settings_did_change = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacenotificationsettingsdelegatemethod0:: + vtablecallbackinterfacenotificationsettingsdelegate:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "settingsDidChange")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceGeneratedQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegeneratedqrloginprogresslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13386,27 +13878,25 @@ 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:: - callbackinterfacesessionverificationcontrollerdelegatemethod2 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegeneratedqrloginprogresslistener { 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) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_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 @@ -13414,29 +13904,21 @@ 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); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod2: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -13447,16 +13929,18 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // 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_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegeneratedqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13474,16 +13958,14 @@ 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_handle, + uint64_t *uniffi_direct_return) { // 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); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -13500,12 +13982,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod3 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegeneratedqrloginprogresslistener + // Implementation of CallbackInterfaceGeneratedQrLoginProgressListenerMethod0 + // for vtable field on_update in + // VTableCallbackInterfaceGeneratedQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedqrloginprogresslistenermethod0::vtablecallbackinterfacegeneratedqrloginprogresslistener::UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13519,7 +14002,8 @@ 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 { + callbackinterfacegeneratedqrloginprogresslistenermethod0:: + vtablecallbackinterfacegeneratedqrloginprogresslistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -13532,15 +14016,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_data, + uint64_t rs_uniffiHandle, RustBuffer rs_state, 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); + auto js_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -13548,7 +14032,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, js_state); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -13561,15 +14045,15 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod3: " - << error.what() << std::endl; + std::cout + << "Error in callback " + "UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_data, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -13587,11 +14071,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_state, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3 +[[maybe_unused]] static UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedqrloginprogresslistenermethod0::vtablecallbackinterfacegeneratedqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13610,14 +14094,14 @@ 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, + uint64_t rs_uniffiHandle, RustBuffer rs_state, 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, + [callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_data, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -13635,12 +14119,55 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod4 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacegeneratedqrloginprogresslistenermethod0::vtablecallbackinterfacegeneratedqrloginprogresslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener + 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 " + "UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacegeneratedqrloginprogresslistener:: + vtablecallbackinterfacegeneratedqrloginprogresslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegeneratedqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacegeneratedqrloginprogresslistenermethod0:: + vtablecallbackinterfacegeneratedqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceGrantGeneratedQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13653,27 +14180,25 @@ 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 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener { 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) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_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 @@ -13681,29 +14206,21 @@ 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); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod4: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -13714,16 +14231,18 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // 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_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13741,16 +14260,14 @@ 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_handle, + uint64_t *uniffi_direct_return) { // 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); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -13767,12 +14284,14 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod5 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener + // Implementation of + // CallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 for vtable + // field on_update in + // VTableCallbackInterfaceGrantGeneratedQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgeneratedqrloginprogresslistenermethod0::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13786,26 +14305,29 @@ 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 { + callbackinterfacegrantgeneratedqrloginprogresslistenermethod0:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener { 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_state, + 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -13813,7 +14335,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_state); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -13827,14 +14349,15 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod5: " + "UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerM" + "ethod0: " << 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_state, + 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? @@ -13851,11 +14374,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_state, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5 +[[maybe_unused]] static UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgeneratedqrloginprogresslistenermethod0::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -13873,15 +14396,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_state, + 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_state, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -13899,12 +14422,57 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSessionVerificationControllerDelegateMethod6 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantgeneratedqrloginprogresslistenermethod0::vtablecallbackinterfacegrantgeneratedqrloginprogresslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging< + UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener> { + static UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener + 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 " + "UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacegrantgeneratedqrloginprogresslistenermethod0:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceGrantQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegrantqrloginprogresslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -13917,27 +14485,25 @@ 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 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegrantqrloginprogresslistener { 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) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_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 @@ -13945,29 +14511,21 @@ 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); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSessionVerificationControllerDelegateM" - "ethod6: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -13978,16 +14536,18 @@ static void callback(uint64_t rs_uniffiHandle, void *rs_uniffiOutReturn, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // 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_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegrantqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14005,16 +14565,14 @@ 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_handle, + uint64_t *uniffi_direct_return) { // 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); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -14031,12 +14589,13 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSpaceRoomListEntriesListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacegrantqrloginprogresslistener + // Implementation of CallbackInterfaceGrantQrLoginProgressListenerMethod0 for + // vtable field on_update in + // VTableCallbackInterfaceGrantQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0::UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrloginprogresslistenermethod0::vtablecallbackinterfacegrantqrloginprogresslistener::UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14050,7 +14609,8 @@ 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:: - callbackinterfacespaceroomlistentrieslistenermethod0 { + callbackinterfacegrantqrloginprogresslistenermethod0:: + vtablecallbackinterfacegrantqrloginprogresslistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -14063,15 +14623,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_rooms, + uint64_t rs_uniffiHandle, RustBuffer rs_state, 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); + auto js_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -14079,7 +14639,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_rooms); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_state); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -14093,13 +14653,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0: " + "UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_rooms, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -14117,11 +14677,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_rooms, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_rooms, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrloginprogresslistenermethod0::vtablecallbackinterfacegrantqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14140,14 +14700,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespacerooml auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_rooms, + uint64_t rs_uniffiHandle, RustBuffer rs_state, 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_rooms, + [callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_rooms, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -14165,12 +14725,55 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacegrantqrloginprogresslistenermethod0::vtablecallbackinterfacegrantqrloginprogresslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceGrantQrLoginProgressListener + 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 " + "UniffiVTableCallbackInterfaceGrantQrLoginProgressListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceGrantQrLoginProgressListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacegrantqrloginprogresslistener:: + vtablecallbackinterfacegrantqrloginprogresslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegrantqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacegrantqrloginprogresslistenermethod0:: + vtablecallbackinterfacegrantqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0::UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceqrloginprogresslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14183,29 +14786,25 @@ 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:: - callbackinterfacespaceroomlistpaginationstatelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceqrloginprogresslistener { 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_paginationState, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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); + 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 @@ -14213,30 +14812,21 @@ 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_paginationState); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMe" - "thod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_paginationState, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -14247,17 +14837,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_paginationState, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_paginationState, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14275,16 +14866,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespacerooml } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_paginationState, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_paginationState, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_paginationState, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -14301,12 +14890,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSpaceRoomListSpaceListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceqrloginprogresslistener + // Implementation of CallbackInterfaceQrLoginProgressListenerMethod0 for + // vtable field on_update in VTableCallbackInterfaceQrLoginProgressListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistspacelistenermethod0::UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0::vtablecallbackinterfaceqrloginprogresslistener::UniffiCallbackInterfaceQrLoginProgressListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14320,7 +14909,8 @@ 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:: - callbackinterfacespaceroomlistspacelistenermethod0 { + callbackinterfaceqrloginprogresslistenermethod0:: + vtablecallbackinterfaceqrloginprogresslistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -14333,15 +14923,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_space, + uint64_t rs_uniffiHandle, RustBuffer rs_state, 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_space = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_space); + auto js_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -14349,7 +14939,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_space); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_state); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -14363,13 +14953,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0: " + "UniffiCallbackInterfaceQrLoginProgressListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_space, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -14387,11 +14977,11 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_space, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_space, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistspacelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceQrLoginProgressListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0::vtablecallbackinterfaceqrloginprogresslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14410,14 +15000,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespacerooml auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_space, + uint64_t rs_uniffiHandle, RustBuffer rs_state, 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_space, + [callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_space, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -14435,12 +15025,54 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistspacelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0::vtablecallbackinterfaceqrloginprogresslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceQrLoginProgressListener + 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 " + "UniffiVTableCallbackInterfaceQrLoginProgressListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceQrLoginProgressListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceqrloginprogresslistener:: + vtablecallbackinterfaceqrloginprogresslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceqrloginprogresslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceqrloginprogresslistenermethod0:: + vtablecallbackinterfaceqrloginprogresslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceCallDeclineListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0::UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacecalldeclinelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14453,29 +15085,25 @@ 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:: - callbackinterfacespaceservicejoinedspaceslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacecalldeclinelistener { 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_roomUpdates, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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); + 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 @@ -14483,30 +15111,21 @@ 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_roomUpdates); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout - << "Error in callback " - "UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomUpdates, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -14517,17 +15136,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomUpdates, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_roomUpdates, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacecalldeclinelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14545,16 +15165,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservi } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_roomUpdates, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_roomUpdates, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomUpdates, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -14571,12 +15189,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSyncNotificationListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacecalldeclinelistener + // Implementation of CallbackInterfaceCallDeclineListenerMethod0 for vtable + // field call in VTableCallbackInterfaceCallDeclineListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0::UniffiCallbackInterfaceSyncNotificationListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0::vtablecallbackinterfacecalldeclinelistener::UniffiCallbackInterfaceCallDeclineListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14590,13 +15208,13 @@ 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:: - callbackinterfacesyncnotificationlistenermethod0 { + callbackinterfacecalldeclinelistenermethod0:: + vtablecallbackinterfacecalldeclinelistener { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -14604,18 +15222,15 @@ static std::function callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_notification, - RustBuffer rs_roomId, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, + 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_notification = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_notification); - auto js_roomId = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_roomId); + auto js_declinerUserId = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_declinerUserId); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -14623,8 +15238,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_notification, js_roomId); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_declinerUserId); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -14638,14 +15252,14 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceSyncNotificationListenerMethod0: " + "UniffiCallbackInterfaceCallDeclineListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_notification, - RustBuffer rs_roomId, void *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, + 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? @@ -14662,12 +15276,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_notification, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_notification, rs_roomId, rs_uniffiOutReturn, + rsLambda(rs_uniffiHandle, rs_declinerUserId, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceSyncNotificationListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceCallDeclineListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0::vtablecallbackinterfacecalldeclinelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14686,17 +15300,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotifi auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_notification, - RustBuffer rs_roomId, void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_declinerUserId, + 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_notification, - rs_roomId, rs_uniffiOutReturn, - uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_notification, - rs_roomId, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_uniffiHandle, rs_declinerUserId, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_declinerUserId, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -14713,12 +15325,52 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceSyncServiceStateObserverMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0::vtablecallbackinterfacecalldeclinelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> struct Bridging { + static UniffiVTableCallbackInterfaceCallDeclineListener + 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 " + "UniffiVTableCallbackInterfaceCallDeclineListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceCallDeclineListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener:: + vtablecallbackinterfacecalldeclinelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacecalldeclinelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacecalldeclinelistenermethod0:: + vtablecallbackinterfacecalldeclinelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "call")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceIdentityStatusChangeListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0::UniffiCallbackInterfaceSyncServiceStateObserverMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceidentitystatuschangelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14731,29 +15383,25 @@ 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:: - callbackinterfacesyncservicestateobservermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceidentitystatuschangelistener { 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_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_state); + 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 @@ -14761,29 +15409,21 @@ 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_state); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceSyncServiceStateObserverMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -14794,16 +15434,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceSyncServiceStateObserverMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceidentitystatuschangelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14821,16 +15463,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservic } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_state, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_state, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -14847,12 +15487,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceTimelineListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceidentitystatuschangelistener + // Implementation of CallbackInterfaceIdentityStatusChangeListenerMethod0 for + // vtable field call in VTableCallbackInterfaceIdentityStatusChangeListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0::UniffiCallbackInterfaceTimelineListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentitystatuschangelistenermethod0::vtablecallbackinterfaceidentitystatuschangelistener::UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14865,7 +15505,9 @@ 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::callbackinterfacetimelinelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceidentitystatuschangelistenermethod0:: + vtablecallbackinterfaceidentitystatuschangelistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -14878,15 +15520,16 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_diff, + uint64_t rs_uniffiHandle, RustBuffer rs_identityStatusChange, 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_diff = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_diff); + auto js_identityStatusChange = + uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_identityStatusChange); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -14894,7 +15537,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_diff); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_identityStatusChange); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -14907,14 +15550,15 @@ static void body(jsi::Runtime &rt, } } catch (const jsi::JSError &error) { - std::cout - << "Error in callback UniffiCallbackInterfaceTimelineListenerMethod0: " - << error.what() << std::endl; + std::cout << "Error in callback " + "UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0: " + << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_diff, +static void callback(uint64_t rs_uniffiHandle, + RustBuffer rs_identityStatusChange, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -14932,11 +15576,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_diff, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_diff, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_identityStatusChange, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceTimelineListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentitystatuschangelistenermethod0::vtablecallbackinterfaceidentitystatuschangelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -14955,15 +15600,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelineli auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_diff, + uint64_t rs_uniffiHandle, RustBuffer rs_identityStatusChange, 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_diff, + [callInvoker, callbackValue, rs_uniffiHandle, rs_identityStatusChange, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_diff, - rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_identityStatusChange, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -14980,12 +15625,55 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceTypingNotificationsListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceidentitystatuschangelistenermethod0::vtablecallbackinterfaceidentitystatuschangelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceIdentityStatusChangeListener + 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 " + "UniffiVTableCallbackInterfaceIdentityStatusChangeListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceIdentityStatusChangeListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceidentitystatuschangelistener:: + vtablecallbackinterfaceidentitystatuschangelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceidentitystatuschangelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceidentitystatuschangelistenermethod0:: + vtablecallbackinterfaceidentitystatuschangelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "call")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceKnockRequestsListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacetypingnotificationslistenermethod0::UniffiCallbackInterfaceTypingNotificationsListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceknockrequestslistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -14998,29 +15686,25 @@ 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:: - callbackinterfacetypingnotificationslistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceknockrequestslistener { 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_typingUserIds, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_typingUserIds = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_typingUserIds); + 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 @@ -15028,29 +15712,21 @@ 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_typingUserIds); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceTypingNotificationsListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_typingUserIds, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -15061,17 +15737,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_typingUserIds, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_typingUserIds, rs_uniffiOutReturn, - uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceTypingNotificationsListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacetypingnotificationslistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceknockrequestslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -15089,16 +15766,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacetypingnoti } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_typingUserIds, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_typingUserIds, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, - rs_typingUserIds, rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -15115,12 +15790,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacetypingnotificationslistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceUnableToDecryptDelegateMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceknockrequestslistener + // Implementation of CallbackInterfaceKnockRequestsListenerMethod0 for vtable + // field call in VTableCallbackInterfaceKnockRequestsListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletodecryptdelegatemethod0::UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0::vtablecallbackinterfaceknockrequestslistener::UniffiCallbackInterfaceKnockRequestsListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -15134,7 +15809,8 @@ 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:: - callbackinterfaceunabletodecryptdelegatemethod0 { + callbackinterfaceknockrequestslistenermethod0:: + vtablecallbackinterfaceknockrequestslistener { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -15147,15 +15823,15 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_info, + uint64_t rs_uniffiHandle, RustBuffer rs_joinRequests, 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_info = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_info); + auto js_joinRequests = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_joinRequests); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -15163,7 +15839,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_info); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_joinRequests); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -15177,13 +15853,13 @@ static void body(jsi::Runtime &rt, } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceUnableToDecryptDelegateMethod0: " + "UniffiCallbackInterfaceKnockRequestsListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_info, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_joinRequests, void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { // If the runtime has shutdown, then there is no point in trying to @@ -15201,11 +15877,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_info, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_info, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_uniffiHandle, rs_joinRequests, rs_uniffiOutReturn, + uniffi_call_status); } -static UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletodecryptdelegatemethod0 +[[maybe_unused]] static UniffiCallbackInterfaceKnockRequestsListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0::vtablecallbackinterfaceknockrequestslistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -15224,14 +15901,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletode auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_info, + uint64_t rs_uniffiHandle, RustBuffer rs_joinRequests, 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_info, + [callInvoker, callbackValue, rs_uniffiHandle, rs_joinRequests, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_info, + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_joinRequests, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will @@ -15249,12 +15926,53 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletodecryptdelegatemethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceVerificationStateListenerMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0::vtablecallbackinterfaceknockrequestslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceKnockRequestsListener + 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 " + "UniffiVTableCallbackInterfaceKnockRequestsListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceKnockRequestsListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceknockrequestslistener:: + vtablecallbackinterfaceknockrequestslistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceknockrequestslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceknockrequestslistenermethod0:: + vtablecallbackinterfaceknockrequestslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "call")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceLiveLocationShareListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificationstatelistenermethod0::UniffiCallbackInterfaceVerificationStateListenerMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacelivelocationsharelistener::UniffiCallbackInterfaceClone // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -15267,29 +15985,25 @@ 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:: - callbackinterfaceverificationstatelistenermethod0 { +namespace uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacelivelocationsharelistener { 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_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + std::shared_ptr callbackValue, uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_status); + 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 @@ -15297,29 +16011,21 @@ 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_status); - - // Now copy the result back from JS into the RustCallStatus object. - uniffi::matrix_sdk_ffi::Bridging::copyFromJs( - rt, callInvoker, uniffiResult, uniffi_call_status); + auto uniffiResult = cb.call(rt, js_handle); - if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { - // The JS callback finished abnormally, so we cannot retrieve the return - // value. - return; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } - } catch (const jsi::JSError &error) { - std::cout << "Error in callback " - "UniffiCallbackInterfaceVerificationStateListenerMethod0: " + std::cout << "Error in callback UniffiCallbackInterfaceClone: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { +static uint64_t 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? // @@ -15330,16 +16036,18 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, if (rsLambda == nullptr) { // This only occurs when destructors are calling into Rust free/drop, // which causes the JS callback to be dropped. - return; + return 0; } + uint64_t uniffi_result = 0; // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; } -static UniffiCallbackInterfaceVerificationStateListenerMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificationstatelistenermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacelivelocationsharelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -15357,16 +16065,14 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificati } auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); - rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_status, - void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { + rsLambda = [&rt, callInvoker, callbackValue](uint64_t rs_handle, + uint64_t *uniffi_direct_return) { // 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_status, - rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, - rs_uniffiOutReturn, uniffi_call_status); + [callInvoker, callbackValue, rs_handle, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -15383,12 +16089,12 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfaceverificationstatelistenermethod0 - // Implementation of callback function calling from Rust to JS - // CallbackInterfaceWidgetCapabilitiesProviderMethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacelivelocationsharelistener + // Implementation of CallbackInterfaceLiveLocationShareListenerMethod0 for + // vtable field call in VTableCallbackInterfaceLiveLocationShareListener // Callback function: -// uniffi::matrix_sdk_ffi::cb::callbackinterfacewidgetcapabilitiesprovidermethod0::UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 +// uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocationsharelistenermethod0::vtablecallbackinterfacelivelocationsharelistener::UniffiCallbackInterfaceLiveLocationShareListenerMethod0 // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -15402,12 +16108,13 @@ 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:: - callbackinterfacewidgetcapabilitiesprovidermethod0 { + callbackinterfacelivelocationsharelistenermethod0:: + vtablecallbackinterfacelivelocationsharelistener { 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 +static std::function rsLambda = nullptr; // This is the main body of the callback. It's called from the lambda, @@ -15415,16 +16122,16 @@ static std::function static void body(jsi::Runtime &rt, std::shared_ptr callInvoker, std::shared_ptr callbackValue, - uint64_t rs_uniffiHandle, RustBuffer rs_capabilities, - RustBuffer *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, + 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_capabilities = uniffi::matrix_sdk_ffi::Bridging::toJs( - rt, callInvoker, rs_capabilities); + auto js_liveLocationShares = + uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + rs_liveLocationShares); // Now we are ready to call the callback. // We are already on the JS thread, because this `body` function was @@ -15432,7 +16139,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_capabilities); + auto uniffiResult = cb.call(rt, js_uniffiHandle, js_liveLocationShares); // Now copy the result back from JS into the RustCallStatus object. uniffi::matrix_sdk_ffi::Bridging::copyFromJs( @@ -15444,22 +16151,16 @@ static void body(jsi::Runtime &rt, return; } - // return type is MutReference(RustBuffer(Some(ExternalFfiMetadata { name: - // "WidgetCapabilities", module_path: "matrix_sdk_ffi" }))) Finally, we need - // to copy the return value back into the Rust pointer. - *rs_uniffiOutReturn = - uniffi::matrix_sdk_ffi::Bridging>::fromJs( - rt, callInvoker, uniffiResult); } catch (const jsi::JSError &error) { std::cout << "Error in callback " - "UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0: " + "UniffiCallbackInterfaceLiveLocationShareListenerMethod0: " << error.what() << std::endl; throw error; } } -static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_capabilities, - RustBuffer *rs_uniffiOutReturn, +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, + 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? @@ -15476,12 +16177,12 @@ static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_capabilities, // The runtime, the actual callback jsi::funtion, and the callInvoker // are all in the lambda. - rsLambda(rs_uniffiHandle, rs_capabilities, rs_uniffiOutReturn, + rsLambda(rs_uniffiHandle, rs_liveLocationShares, rs_uniffiOutReturn, uniffi_call_status); } -static UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 -makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacewidgetcapabilitiesprovidermethod0 +[[maybe_unused]] static UniffiCallbackInterfaceLiveLocationShareListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocationsharelistenermethod0::vtablecallbackinterfacelivelocationsharelistener jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -15500,16 +16201,15 @@ makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacewidgetcapa auto callbackFunction = value.asObject(rt).asFunction(rt); auto callbackValue = std::make_shared(rt, callbackFunction); rsLambda = [&rt, callInvoker, callbackValue]( - uint64_t rs_uniffiHandle, RustBuffer rs_capabilities, - RustBuffer *rs_uniffiOutReturn, - RustCallStatus *uniffi_call_status) { + uint64_t rs_uniffiHandle, RustBuffer rs_liveLocationShares, + 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_capabilities, + [callInvoker, callbackValue, rs_uniffiHandle, rs_liveLocationShares, rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { - body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_capabilities, - rs_uniffiOutReturn, uniffi_call_status); + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_liveLocationShares, rs_uniffiOutReturn, uniffi_call_status); }; // We'll then call that lambda from the callInvoker which will // look after calling it on the correct thread. @@ -15526,1422 +16226,5671 @@ static void cleanup() { rsLambda = nullptr; } } // namespace - // uniffi::matrix_sdk_ffi::cb::callbackinterfacewidgetcapabilitiesprovidermethod0 + // uniffi::matrix_sdk_ffi::cb::callbackinterfacelivelocationsharelistenermethod0::vtablecallbackinterfacelivelocationsharelistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiVTableCallbackInterfaceAccountDataListener +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceLiveLocationShareListener 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 " - "UniffiVTableCallbackInterfaceAccountDataListener"); + throw jsi::JSError( + rt, "Expected an object for " + "UniffiVTableCallbackInterfaceLiveLocationShareListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceAccountDataListener rsObject; + UniffiVTableCallbackInterfaceLiveLocationShareListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_change = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceaccountdatalistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onChange")); - rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceaccountdatalistener:: - vtablecallbackinterfaceaccountdatalistener::free:: + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacelivelocationsharelistener:: + vtablecallbackinterfacelivelocationsharelistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacelivelocationsharelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacelivelocationsharelistenermethod0:: + vtablecallbackinterfacelivelocationsharelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "call")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomInfoListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroominfolistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceroominfolistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiVTableCallbackInterfaceBackupStateListener - 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 " - "UniffiVTableCallbackInterfaceBackupStateListener"); - } +// 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; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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, + uint64_t *uniffi_direct_return) { - // Create the vtable struct - UniffiVTableCallbackInterfaceBackupStateListener rsObject; + // 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); - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacebackupstatelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener:: - vtablecallbackinterfacebackupstatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // 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); - return rsObject; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; } -}; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceBackupSteadyStateListener - 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 " - "UniffiVTableCallbackInterfaceBackupSteadyStateListener"); - } + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroominfolistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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; +} - // Create the vtable struct - UniffiVTableCallbackInterfaceBackupSteadyStateListener rsObject; +// 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::callbackinterfaceclone::vtablecallbackinterfaceroominfolistener + // Implementation of CallbackInterfaceRoomInfoListenerMethod0 for vtable field + // call in VTableCallbackInterfaceRoomInfoListener - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacebackupsteadystatelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacebackupsteadystatelistener:: - vtablecallbackinterfacebackupsteadystatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0::vtablecallbackinterfaceroominfolistener::UniffiCallbackInterfaceRoomInfoListenerMethod0 +// +// 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::callbackinterfaceroominfolistenermethod0:: + vtablecallbackinterfaceroominfolistener { +using namespace facebook; - return rsObject; - } -}; +// 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; -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; +// 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_roomInfo, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { -template <> struct Bridging { - static UniffiVTableCallbackInterfaceCallDeclineListener - 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 " - "UniffiVTableCallbackInterfaceCallDeclineListener"); + // 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_roomInfo = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_roomInfo); + + // 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_roomInfo); + + // 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; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout + << "Error in callback UniffiCallbackInterfaceRoomInfoListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceCallDeclineListener rsObject; +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomInfo, + 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; + } - // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacecalldeclinelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "call")); - rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener:: - vtablecallbackinterfacecalldeclinelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_roomInfo, rs_uniffiOutReturn, + uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceRoomInfoListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0::vtablecallbackinterfaceroominfolistener + 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_roomInfo, + 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_roomInfo, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_roomInfo, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfaceroominfolistenermethod0::vtablecallbackinterfaceroominfolistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiVTableCallbackInterfaceClientDelegate +template <> struct Bridging { + static UniffiVTableCallbackInterfaceRoomInfoListener 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 UniffiVTableCallbackInterfaceClientDelegate"); + throw jsi::JSError(rt, "Expected an object for " + "UniffiVTableCallbackInterfaceRoomInfoListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceClientDelegate rsObject; + UniffiVTableCallbackInterfaceRoomInfoListener rsObject; // Create the vtable from the js callbacks. - rsObject.did_receive_auth_error = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceclientdelegatemethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "didReceiveAuthError")); rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate:: - vtablecallbackinterfaceclientdelegate::free::makeCallbackFunction( + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener:: + vtablecallbackinterfaceroominfolistener::free::makeCallbackFunction( rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroominfolistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = + uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0:: + vtablecallbackinterfaceroominfolistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "call")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSendQueueListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueuelistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacesendqueuelistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceClientSessionDelegate - 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 " - "UniffiVTableCallbackInterfaceClientSessionDelegate"); - } +// 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; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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, + uint64_t *uniffi_direct_return) { - // Create the vtable struct - UniffiVTableCallbackInterfaceClientSessionDelegate rsObject; + // 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); - // Create the vtable from the js callbacks. - rsObject.retrieve_session_from_keychain = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceclientsessiondelegatemethod0::makeCallbackFunction( - rt, callInvoker, - jsObject.getProperty(rt, "retrieveSessionFromKeychain")); - rsObject.save_session_in_keychain = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceclientsessiondelegatemethod1::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "saveSessionInKeychain")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceclientsessiondelegate:: - vtablecallbackinterfaceclientsessiondelegate::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // 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); - return rsObject; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; } -}; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesendqueuelistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfacesendqueuelistener + // Implementation of CallbackInterfaceSendQueueListenerMethod0 for vtable + // field on_update in VTableCallbackInterfaceSendQueueListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0::vtablecallbackinterfacesendqueuelistener::UniffiCallbackInterfaceSendQueueListenerMethod0 +// +// 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:: + callbackinterfacesendqueuelistenermethod0:: + vtablecallbackinterfacesendqueuelistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceEnableRecoveryProgressListener - 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 " - "UniffiVTableCallbackInterfaceEnableRecoveryProgressListener"); +// 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_update, + 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_update = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_update); + + // 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_update); + + // 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; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout + << "Error in callback UniffiCallbackInterfaceSendQueueListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceEnableRecoveryProgressListener rsObject; +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_update, + 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; + } - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceenablerecoveryprogresslistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceenablerecoveryprogresslistener:: - vtablecallbackinterfaceenablerecoveryprogresslistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_update, rs_uniffiOutReturn, uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceSendQueueListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0::vtablecallbackinterfacesendqueuelistener + 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_update, + 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_update, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_update, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacesendqueuelistenermethod0::vtablecallbackinterfacesendqueuelistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener +template <> struct Bridging { + static UniffiVTableCallbackInterfaceSendQueueListener 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 " - "UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener"); + throw jsi::JSError(rt, "Expected an object for " + "UniffiVTableCallbackInterfaceSendQueueListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener rsObject; + UniffiVTableCallbackInterfaceSendQueueListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacegeneratedqrloginprogresslistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacegeneratedqrloginprogresslistener:: - vtablecallbackinterfacegeneratedqrloginprogresslistener::free:: + rsObject.uniffi_free = + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener:: + vtablecallbackinterfacesendqueuelistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueuelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = + uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0:: + vtablecallbackinterfacesendqueuelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceTypingNotificationsListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacetypingnotificationslistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacetypingnotificationslistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging< - UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener> { - static UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener - 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 " - "UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener"); - } +// 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; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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, + uint64_t *uniffi_direct_return) { - // Create the vtable struct - UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener rsObject; + // 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); - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacegrantgeneratedqrloginprogresslistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: - vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // 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); - return rsObject; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; } -}; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacetypingnotificationslistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfacetypingnotificationslistener + // Implementation of CallbackInterfaceTypingNotificationsListenerMethod0 for + // vtable field call in VTableCallbackInterfaceTypingNotificationsListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacetypingnotificationslistenermethod0::vtablecallbackinterfacetypingnotificationslistener::UniffiCallbackInterfaceTypingNotificationsListenerMethod0 +// +// 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:: + callbackinterfacetypingnotificationslistenermethod0:: + vtablecallbackinterfacetypingnotificationslistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceGrantQrLoginProgressListener - 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 " - "UniffiVTableCallbackInterfaceGrantQrLoginProgressListener"); +// 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_typingUserIds, + 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_typingUserIds = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_typingUserIds); + + // 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_typingUserIds); + + // 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; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceTypingNotificationsListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceGrantQrLoginProgressListener rsObject; +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_typingUserIds, + 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; + } - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacegrantqrloginprogresslistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacegrantqrloginprogresslistener:: - vtablecallbackinterfacegrantqrloginprogresslistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_typingUserIds, rs_uniffiOutReturn, + uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceTypingNotificationsListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacetypingnotificationslistenermethod0::vtablecallbackinterfacetypingnotificationslistener + 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_typingUserIds, + 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_typingUserIds, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_typingUserIds, 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacetypingnotificationslistenermethod0::vtablecallbackinterfacetypingnotificationslistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceIdentityStatusChangeListener +struct Bridging { + static UniffiVTableCallbackInterfaceTypingNotificationsListener 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 " - "UniffiVTableCallbackInterfaceIdentityStatusChangeListener"); + "UniffiVTableCallbackInterfaceTypingNotificationsListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceIdentityStatusChangeListener rsObject; + UniffiVTableCallbackInterfaceTypingNotificationsListener rsObject; // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceidentitystatuschangelistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "call")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceidentitystatuschangelistener:: - vtablecallbackinterfaceidentitystatuschangelistener::free:: + vtablecallbackinterfacetypingnotificationslistener:: + vtablecallbackinterfacetypingnotificationslistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacetypingnotificationslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.call = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacetypingnotificationslistenermethod0:: + vtablecallbackinterfacetypingnotificationslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "call")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomDirectorySearchEntriesListener -template <> struct Bridging { - static UniffiVTableCallbackInterfaceIgnoredUsersListener +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomdirectorysearchentrieslistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener { +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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomdirectorysearchentrieslistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfaceroomdirectorysearchentrieslistener + // Implementation of + // CallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 for vtable field + // on_update in VTableCallbackInterfaceRoomDirectorySearchEntriesListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomdirectorysearchentrieslistenermethod0::vtablecallbackinterfaceroomdirectorysearchentrieslistener::UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 +// +// 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:: + callbackinterfaceroomdirectorysearchentrieslistenermethod0:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener { +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_roomEntriesUpdate, + 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_roomEntriesUpdate = + uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + rs_roomEntriesUpdate); + + // 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_roomEntriesUpdate); + + // 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 " + "UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, + 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_roomEntriesUpdate, rs_uniffiOutReturn, + uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomdirectorysearchentrieslistenermethod0::vtablecallbackinterfaceroomdirectorysearchentrieslistener + 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_roomEntriesUpdate, + 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_roomEntriesUpdate, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_roomEntriesUpdate, 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::callbackinterfaceroomdirectorysearchentrieslistenermethod0::vtablecallbackinterfaceroomdirectorysearchentrieslistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging< + UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener> { + static UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener 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 " - "UniffiVTableCallbackInterfaceIgnoredUsersListener"); + throw jsi::JSError( + rt, + "Expected an object for " + "UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceIgnoredUsersListener rsObject; + UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener rsObject; // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceignoreduserslistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "call")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceignoreduserslistener:: - vtablecallbackinterfaceignoreduserslistener::free:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceroomdirectorysearchentrieslistenermethod0:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomListEntriesListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistentrieslistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistentrieslistener { +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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistentrieslistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfaceroomlistentrieslistener + // Implementation of CallbackInterfaceRoomListEntriesListenerMethod0 for + // vtable field on_update in VTableCallbackInterfaceRoomListEntriesListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0::vtablecallbackinterfaceroomlistentrieslistener::UniffiCallbackInterfaceRoomListEntriesListenerMethod0 +// +// 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:: + callbackinterfaceroomlistentrieslistenermethod0:: + vtablecallbackinterfaceroomlistentrieslistener { +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_roomEntriesUpdate, + 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_roomEntriesUpdate = + uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + rs_roomEntriesUpdate); + + // 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_roomEntriesUpdate); + + // 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 " + "UniffiCallbackInterfaceRoomListEntriesListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_roomEntriesUpdate, + 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_roomEntriesUpdate, rs_uniffiOutReturn, + uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceRoomListEntriesListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0::vtablecallbackinterfaceroomlistentrieslistener + 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_roomEntriesUpdate, + 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_roomEntriesUpdate, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_roomEntriesUpdate, 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::callbackinterfaceroomlistentrieslistenermethod0::vtablecallbackinterfaceroomlistentrieslistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceKnockRequestsListener +struct Bridging { + static UniffiVTableCallbackInterfaceRoomListEntriesListener 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 " - "UniffiVTableCallbackInterfaceKnockRequestsListener"); + throw jsi::JSError( + rt, "Expected an object for " + "UniffiVTableCallbackInterfaceRoomListEntriesListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceKnockRequestsListener rsObject; + UniffiVTableCallbackInterfaceRoomListEntriesListener rsObject; // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceknockrequestslistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "call")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceknockrequestslistener:: - vtablecallbackinterfaceknockrequestslistener::free:: + vtablecallbackinterfaceroomlistentrieslistener:: + vtablecallbackinterfaceroomlistentrieslistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistentrieslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceroomlistentrieslistenermethod0:: + vtablecallbackinterfaceroomlistentrieslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomListLoadingStateListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistloadingstatelistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistloadingstatelistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +// 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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistloadingstatelistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfaceroomlistloadingstatelistener + // Implementation of CallbackInterfaceRoomListLoadingStateListenerMethod0 for + // vtable field on_update in + // VTableCallbackInterfaceRoomListLoadingStateListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistloadingstatelistenermethod0::vtablecallbackinterfaceroomlistloadingstatelistener::UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0 +// +// 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:: + callbackinterfaceroomlistloadingstatelistenermethod0:: + vtablecallbackinterfaceroomlistloadingstatelistener { +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_state, + 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); + + // 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_state); + + // 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 " + "UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, + 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_state, rs_uniffiOutReturn, uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistloadingstatelistenermethod0::vtablecallbackinterfaceroomlistloadingstatelistener + 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_state, + 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_state, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, + 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::callbackinterfaceroomlistloadingstatelistenermethod0::vtablecallbackinterfaceroomlistloadingstatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceRoomListLoadingStateListener + 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 " + "UniffiVTableCallbackInterfaceRoomListLoadingStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceRoomListLoadingStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceroomlistloadingstatelistener:: + vtablecallbackinterfaceroomlistloadingstatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistloadingstatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceroomlistloadingstatelistenermethod0:: + vtablecallbackinterfaceroomlistloadingstatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomListServiceStateListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistservicestatelistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistservicestatelistener { +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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistservicestatelistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfaceroomlistservicestatelistener + // Implementation of CallbackInterfaceRoomListServiceStateListenerMethod0 for + // vtable field on_update in + // VTableCallbackInterfaceRoomListServiceStateListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicestatelistenermethod0::vtablecallbackinterfaceroomlistservicestatelistener::UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 +// +// 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:: + callbackinterfaceroomlistservicestatelistenermethod0:: + vtablecallbackinterfaceroomlistservicestatelistener { +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_state, + 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); + + // 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_state); + + // 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 " + "UniffiCallbackInterfaceRoomListServiceStateListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, + 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_state, rs_uniffiOutReturn, uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceRoomListServiceStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicestatelistenermethod0::vtablecallbackinterfaceroomlistservicestatelistener + 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_state, + 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_state, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, + 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::callbackinterfaceroomlistservicestatelistenermethod0::vtablecallbackinterfaceroomlistservicestatelistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging { + static UniffiVTableCallbackInterfaceRoomListServiceStateListener + 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 " + "UniffiVTableCallbackInterfaceRoomListServiceStateListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceRoomListServiceStateListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceroomlistservicestatelistener:: + vtablecallbackinterfaceroomlistservicestatelistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistservicestatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceroomlistservicestatelistenermethod0:: + vtablecallbackinterfaceroomlistservicestatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceRoomListServiceSyncIndicatorListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener { +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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceroomlistservicesyncindicatorlistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfaceroomlistservicesyncindicatorlistener + // Implementation of + // CallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 for vtable + // field on_update in + // VTableCallbackInterfaceRoomListServiceSyncIndicatorListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicesyncindicatorlistenermethod0::vtablecallbackinterfaceroomlistservicesyncindicatorlistener::UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 +// +// 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:: + callbackinterfaceroomlistservicesyncindicatorlistenermethod0:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener { +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_syncIndicator, + 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_syncIndicator = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_syncIndicator); + + // 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_syncIndicator); + + // 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 " + "UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMe" + "thod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_syncIndicator, + 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_syncIndicator, rs_uniffiOutReturn, + uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistservicesyncindicatorlistenermethod0::vtablecallbackinterfaceroomlistservicesyncindicatorlistener + 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_syncIndicator, + 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_syncIndicator, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + rs_syncIndicator, 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::callbackinterfaceroomlistservicesyncindicatorlistenermethod0::vtablecallbackinterfaceroomlistservicesyncindicatorlistener +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; + +template <> +struct Bridging< + UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener> { + static UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener + 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 " + "UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceroomlistservicesyncindicatorlistenermethod0:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesessionverificationcontrollerdelegate::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod0 for vtable + // field did_receive_verification_request in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod0::vtablecallbackinterfacesessionverificationcontrollerdelegate::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 +// +// 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:: + callbackinterfacesessionverificationcontrollerdelegatemethod0:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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_details, + 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_details = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_details); + + // 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_details); + + // 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" + "ethod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_details, + 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_details, rs_uniffiOutReturn, uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod0::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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_details, + 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_details, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_details, + 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::callbackinterfacesessionverificationcontrollerdelegatemethod0::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod1 for vtable + // field did_accept_verification_request in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod1::vtablecallbackinterfacesessionverificationcontrollerdelegate::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1 +// +// 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:: + callbackinterfacesessionverificationcontrollerdelegatemethod1:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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" + "ethod1: " + << 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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod1::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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::callbackinterfacesessionverificationcontrollerdelegatemethod1::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod2 for vtable + // field did_start_sas_verification in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2::vtablecallbackinterfacesessionverificationcontrollerdelegate::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2 +// +// 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:: + callbackinterfacesessionverificationcontrollerdelegatemethod2:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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" + "ethod2: " + << 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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod2::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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::callbackinterfacesessionverificationcontrollerdelegatemethod2::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod3 for vtable + // field did_receive_verification_data in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3::vtablecallbackinterfacesessionverificationcontrollerdelegate::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:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod3 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod3::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod4 for vtable + // field did_fail in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4::vtablecallbackinterfacesessionverificationcontrollerdelegate::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:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod4::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod5 for vtable + // field did_cancel in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5::vtablecallbackinterfacesessionverificationcontrollerdelegate::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:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod5::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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::vtablecallbackinterfacesessionverificationcontrollerdelegate + // Implementation of + // CallbackInterfaceSessionVerificationControllerDelegateMethod6 for vtable + // field did_finish in + // VTableCallbackInterfaceSessionVerificationControllerDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6::vtablecallbackinterfacesessionverificationcontrollerdelegate::UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 +// +// 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:: + callbackinterfacesessionverificationcontrollerdelegatemethod6:: + vtablecallbackinterfacesessionverificationcontrollerdelegate { +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" + "ethod6: " + << 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); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesessionverificationcontrollerdelegatemethod6::vtablecallbackinterfacesessionverificationcontrollerdelegate + 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::callbackinterfacesessionverificationcontrollerdelegatemethod6::vtablecallbackinterfacesessionverificationcontrollerdelegate +namespace uniffi::matrix_sdk_ffi { +using namespace facebook; +using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceLiveLocationShareListener +struct Bridging< + UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate> { + static UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate + 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 " + "UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate"); + } + + // Get the object from the jsi::Value + auto jsObject = jsValue.getObject(rt); + + // Create the vtable struct + UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate rsObject; + + // Create the vtable from the js callbacks. + rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + vtablecallbackinterfacesessionverificationcontrollerdelegate::free:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.did_receive_verification_request = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod0:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "didReceiveVerificationRequest")); + rsObject.did_accept_verification_request = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod1:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "didAcceptVerificationRequest")); + rsObject.did_start_sas_verification = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod2:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "didStartSasVerification")); + rsObject.did_receive_verification_data = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod3:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "didReceiveVerificationData")); + rsObject.did_fail = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod4:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "didFail")); + rsObject.did_cancel = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod5:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "didCancel")); + rsObject.did_finish = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesessionverificationcontrollerdelegatemethod6:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "didFinish")); + + return rsObject; + } +}; + +} // namespace uniffi::matrix_sdk_ffi + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSpaceRoomListEntriesListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistentrieslistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistentrieslistener { +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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} + +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistentrieslistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistentrieslistener + // Implementation of CallbackInterfaceSpaceRoomListEntriesListenerMethod0 for + // vtable field on_update in + // VTableCallbackInterfaceSpaceRoomListEntriesListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0::vtablecallbackinterfacespaceroomlistentrieslistener::UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 +// +// 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:: + callbackinterfacespaceroomlistentrieslistenermethod0:: + vtablecallbackinterfacespaceroomlistentrieslistener { +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_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 + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + 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( + 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 " + "UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} + +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? + // + // 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_rooms, rs_uniffiOutReturn, uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistentrieslistenermethod0::vtablecallbackinterfacespaceroomlistentrieslistener + 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_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_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 + // 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::callbackinterfacespaceroomlistentrieslistenermethod0::vtablecallbackinterfacespaceroomlistentrieslistener +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 " - "UniffiVTableCallbackInterfaceLiveLocationShareListener"); + "UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceLiveLocationShareListener rsObject; + UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener rsObject; // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacelivelocationsharelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "call")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacelivelocationsharelistener:: - vtablecallbackinterfacelivelocationsharelistener::free:: + vtablecallbackinterfacespaceroomlistentrieslistener:: + vtablecallbackinterfacespaceroomlistentrieslistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistentrieslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistentrieslistenermethod0:: + vtablecallbackinterfacespaceroomlistentrieslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSpaceRoomListPaginationStateListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistpaginationstatelistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceMediaPreviewConfigListener - 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 " - "UniffiVTableCallbackInterfaceMediaPreviewConfigListener"); - } +// 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; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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, + uint64_t *uniffi_direct_return) { - // Create the vtable struct - UniffiVTableCallbackInterfaceMediaPreviewConfigListener rsObject; + // 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); - // Create the vtable from the js callbacks. - rsObject.on_change = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacemediapreviewconfiglistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onChange")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacemediapreviewconfiglistener:: - vtablecallbackinterfacemediapreviewconfiglistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // 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); - return rsObject; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; } -}; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; + + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistpaginationstatelistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistpaginationstatelistener + // Implementation of + // CallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 for vtable + // field on_update in + // VTableCallbackInterfaceSpaceRoomListPaginationStateListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0::vtablecallbackinterfacespaceroomlistpaginationstatelistener::UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 +// +// 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:: + callbackinterfacespaceroomlistpaginationstatelistenermethod0:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceNotificationSettingsDelegate - 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 " - "UniffiVTableCallbackInterfaceNotificationSettingsDelegate"); +// 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_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 + // invoked from the CallInvoker. + try { + // Getting the callback function + auto cb = callbackValue->asObject(rt).asFunction(rt); + 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( + 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; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMe" + "thod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceNotificationSettingsDelegate rsObject; +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? + // + // 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; + } - // Create the vtable from the js callbacks. - rsObject.settings_did_change = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacenotificationsettingsdelegatemethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "settingsDidChange")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacenotificationsettingsdelegate:: - vtablecallbackinterfacenotificationsettingsdelegate::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_paginationState, rs_uniffiOutReturn, + uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistpaginationstatelistenermethod0::vtablecallbackinterfacespaceroomlistpaginationstatelistener + 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_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_paginationState, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, + 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. + callInvoker->invokeBlocking(rt, jsLambda); + }; + return callback; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacespaceroomlistpaginationstatelistenermethod0::vtablecallbackinterfacespaceroomlistpaginationstatelistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfacePaginationStatusListener +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 " - "UniffiVTableCallbackInterfacePaginationStatusListener"); + rt, + "Expected an object for " + "UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfacePaginationStatusListener rsObject; + UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacepaginationstatuslistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacepaginationstatuslistener:: - vtablecallbackinterfacepaginationstatuslistener::free:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistpaginationstatelistenermethod0:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSpaceRoomListSpaceListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistspacelistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistspacelistener { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiVTableCallbackInterfaceProgressWatcher - 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 " - "UniffiVTableCallbackInterfaceProgressWatcher"); +// 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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; - // Create the vtable struct - UniffiVTableCallbackInterfaceProgressWatcher rsObject; + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - // Create the vtable from the js callbacks. - rsObject.transmission_progress = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceprogresswatchermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "transmissionProgress")); - rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher:: - vtablecallbackinterfaceprogresswatcher::free::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistspacelistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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; +} - return rsObject; +// 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::callbackinterfaceclone::vtablecallbackinterfacespaceroomlistspacelistener + // Implementation of CallbackInterfaceSpaceRoomListSpaceListenerMethod0 for + // vtable field on_update in VTableCallbackInterfaceSpaceRoomListSpaceListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistspacelistenermethod0::vtablecallbackinterfacespaceroomlistspacelistener::UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 +// +// 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:: + callbackinterfacespaceroomlistspacelistenermethod0:: + vtablecallbackinterfacespaceroomlistspacelistener { +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_space, + 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_space = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_space); + + // 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_space); + + // 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 " + "UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0: " + << error.what() << std::endl; + throw error; } -}; +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_space, + 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_space, rs_uniffiOutReturn, uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceroomlistspacelistenermethod0::vtablecallbackinterfacespaceroomlistspacelistener + 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_space, + 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_space, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_space, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacespaceroomlistspacelistenermethod0::vtablecallbackinterfacespaceroomlistspacelistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceQrLoginProgressListener +struct Bridging { + static UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener 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 " - "UniffiVTableCallbackInterfaceQrLoginProgressListener"); + "UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceQrLoginProgressListener rsObject; + UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceqrloginprogresslistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceqrloginprogresslistener:: - vtablecallbackinterfaceqrloginprogresslistener::free:: + vtablecallbackinterfacespaceroomlistspacelistener:: + vtablecallbackinterfacespaceroomlistspacelistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistspacelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceroomlistspacelistenermethod0:: + vtablecallbackinterfacespaceroomlistspacelistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceRecoveryStateListener - 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 " - "UniffiVTableCallbackInterfaceRecoveryStateListener"); - } + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSpaceServiceJoinedSpacesListener - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceservicejoinedspaceslistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacespaceservicejoinedspaceslistener { +using namespace facebook; - // Create the vtable struct - UniffiVTableCallbackInterfaceRecoveryStateListener rsObject; +// 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; - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacerecoverystatelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacerecoverystatelistener:: - vtablecallbackinterfacerecoverystatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); +// 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, + uint64_t *uniffi_direct_return) { - return rsObject; - } -}; + // 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); -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // 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); -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceRoomAccountDataListener - 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 " - "UniffiVTableCallbackInterfaceRoomAccountDataListener"); + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiVTableCallbackInterfaceRoomAccountDataListener rsObject; +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; - // Create the vtable from the js callbacks. - rsObject.on_change = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomaccountdatalistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onChange")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceroomaccountdatalistener:: - vtablecallbackinterfaceroomaccountdatalistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacespaceservicejoinedspaceslistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; +// 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::callbackinterfaceclone::vtablecallbackinterfacespaceservicejoinedspaceslistener + // Implementation of CallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 + // for vtable field on_update in + // VTableCallbackInterfaceSpaceServiceJoinedSpacesListener -template <> -struct Bridging< - UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener> { - static UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener - 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 " - "UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener"); - } +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0::vtablecallbackinterfacespaceservicejoinedspaceslistener::UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 +// +// 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:: + callbackinterfacespaceservicejoinedspaceslistenermethod0:: + vtablecallbackinterfacespaceservicejoinedspaceslistener { +using namespace facebook; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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; - // Create the vtable struct - UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener rsObject; +// 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_roomUpdates, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomdirectorysearchentrieslistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceroomdirectorysearchentrieslistener:: - vtablecallbackinterfaceroomdirectorysearchentrieslistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // 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); - return rsObject; - } -}; + // 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_roomUpdates); -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // Now copy the result back from JS into the RustCallStatus object. + uniffi::matrix_sdk_ffi::Bridging::copyFromJs( + rt, callInvoker, uniffiResult, uniffi_call_status); -template <> struct Bridging { - static UniffiVTableCallbackInterfaceRoomInfoListener - 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 " - "UniffiVTableCallbackInterfaceRoomInfoListener"); + if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { + // The JS callback finished abnormally, so we cannot retrieve the return + // value. + return; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout + << "Error in callback " + "UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceRoomInfoListener rsObject; +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? + // + // 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; + } - // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroominfolistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "call")); - rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener:: - vtablecallbackinterfaceroominfolistener::free::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_roomUpdates, rs_uniffiOutReturn, + uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacespaceservicejoinedspaceslistenermethod0::vtablecallbackinterfacespaceservicejoinedspaceslistener + 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_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_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 + // look after calling it on the correct thread. + callInvoker->invokeBlocking(rt, jsLambda); + }; + return callback; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacespaceservicejoinedspaceslistenermethod0::vtablecallbackinterfacespaceservicejoinedspaceslistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceRoomListEntriesListener +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 " - "UniffiVTableCallbackInterfaceRoomListEntriesListener"); + "UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceRoomListEntriesListener rsObject; + UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistentrieslistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceroomlistentrieslistener:: - vtablecallbackinterfaceroomlistentrieslistener::free:: + vtablecallbackinterfacespaceservicejoinedspaceslistener:: + vtablecallbackinterfacespaceservicejoinedspaceslistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceservicejoinedspaceslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacespaceservicejoinedspaceslistenermethod0:: + vtablecallbackinterfacespaceservicejoinedspaceslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceRoomListLoadingStateListener - 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 " - "UniffiVTableCallbackInterfaceRoomListLoadingStateListener"); - } + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceSyncServiceStateObserver - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesyncservicestateobserver::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacesyncservicestateobserver { +using namespace facebook; - // Create the vtable struct - UniffiVTableCallbackInterfaceRoomListLoadingStateListener rsObject; +// 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; - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistloadingstatelistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceroomlistloadingstatelistener:: - vtablecallbackinterfaceroomlistloadingstatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); +// 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, + uint64_t *uniffi_direct_return) { - return rsObject; - } -}; + // 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); -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // 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); -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceRoomListServiceStateListener - 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 " - "UniffiVTableCallbackInterfaceRoomListServiceStateListener"); + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiVTableCallbackInterfaceRoomListServiceStateListener rsObject; +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistservicestatelistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceroomlistservicestatelistener:: - vtablecallbackinterfaceroomlistservicestatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacesyncservicestateobserver + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfacesyncservicestateobserver + // Implementation of CallbackInterfaceSyncServiceStateObserverMethod0 for + // vtable field on_update in VTableCallbackInterfaceSyncServiceStateObserver -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0::vtablecallbackinterfacesyncservicestateobserver::UniffiCallbackInterfaceSyncServiceStateObserverMethod0 +// +// 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:: + callbackinterfacesyncservicestateobservermethod0:: + vtablecallbackinterfacesyncservicestateobserver { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> -struct Bridging< - UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener> { - static UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener - 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 " - "UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener"); - } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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; - // Create the vtable struct - UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener rsObject; +// 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_state, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistservicesyncindicatorlistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: - vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // 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_state = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_state); - return rsObject; - } -}; + // 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_state); -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // Now copy the result back from JS into the RustCallStatus object. + uniffi::matrix_sdk_ffi::Bridging::copyFromJs( + rt, callInvoker, uniffiResult, uniffi_call_status); -template <> struct Bridging { - static UniffiVTableCallbackInterfaceSendQueueListener - 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 " - "UniffiVTableCallbackInterfaceSendQueueListener"); + if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { + // The JS callback finished abnormally, so we cannot retrieve the return + // value. + return; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceSyncServiceStateObserverMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceSendQueueListener rsObject; +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_state, + 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; + } - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesendqueuelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener:: - vtablecallbackinterfacesendqueuelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_state, rs_uniffiOutReturn, uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceSyncServiceStateObserverMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0::vtablecallbackinterfacesyncservicestateobserver + 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_state, + 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_state, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_state, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacesyncservicestateobservermethod0::vtablecallbackinterfacesyncservicestateobserver namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceSendQueueRoomErrorListener +struct Bridging { + static UniffiVTableCallbackInterfaceSyncServiceStateObserver 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 " - "UniffiVTableCallbackInterfaceSendQueueRoomErrorListener"); + "UniffiVTableCallbackInterfaceSyncServiceStateObserver"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceSendQueueRoomErrorListener rsObject; + UniffiVTableCallbackInterfaceSyncServiceStateObserver rsObject; // Create the vtable from the js callbacks. - rsObject.on_error = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesendqueueroomerrorlistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onError")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesendqueueroomerrorlistener:: - vtablecallbackinterfacesendqueueroomerrorlistener::free:: + vtablecallbackinterfacesyncservicestateobserver:: + vtablecallbackinterfacesyncservicestateobserver::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesyncservicestateobserver::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacesyncservicestateobservermethod0:: + vtablecallbackinterfacesyncservicestateobserver:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener - 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 " - "UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener"); - } + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfacePaginationStatusListener - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacepaginationstatuslistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacepaginationstatuslistener { +using namespace facebook; - // Create the vtable struct - UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener rsObject; +// 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; - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesendqueueroomupdatelistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesendqueueroomupdatelistener:: - vtablecallbackinterfacesendqueueroomupdatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); +// 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, + uint64_t *uniffi_direct_return) { - return rsObject; - } -}; + // 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); -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // 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); -template <> -struct Bridging< - UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate> { - static UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate - 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 " - "UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate"); + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate rsObject; +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; - // Create the vtable from the js callbacks. - rsObject.did_receive_verification_request = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod0:: - makeCallbackFunction( - rt, callInvoker, - jsObject.getProperty(rt, "didReceiveVerificationRequest")); - rsObject.did_accept_verification_request = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod1:: - makeCallbackFunction( - rt, callInvoker, - jsObject.getProperty(rt, "didAcceptVerificationRequest")); - rsObject.did_start_sas_verification = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod2:: - makeCallbackFunction( - rt, callInvoker, - jsObject.getProperty(rt, "didStartSasVerification")); - rsObject.did_receive_verification_data = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod3:: - makeCallbackFunction( - rt, callInvoker, - jsObject.getProperty(rt, "didReceiveVerificationData")); - rsObject.did_fail = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod4:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "didFail")); - rsObject.did_cancel = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod5:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "didCancel")); - rsObject.did_finish = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod6:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "didFinish")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesessionverificationcontrollerdelegate:: - vtablecallbackinterfacesessionverificationcontrollerdelegate::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacepaginationstatuslistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; +// 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::callbackinterfaceclone::vtablecallbackinterfacepaginationstatuslistener + // Implementation of CallbackInterfacePaginationStatusListenerMethod0 for + // vtable field on_update in VTableCallbackInterfacePaginationStatusListener -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"); - } +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0::vtablecallbackinterfacepaginationstatuslistener::UniffiCallbackInterfacePaginationStatusListenerMethod0 +// +// 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:: + callbackinterfacepaginationstatuslistenermethod0:: + vtablecallbackinterfacepaginationstatuslistener { +using namespace facebook; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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; - // Create the vtable struct - UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener rsObject; +// 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_status, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { - // 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")); + // 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_status = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_status); - return rsObject; - } -}; + // 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_status); -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; + // Now copy the result back from JS into the RustCallStatus object. + uniffi::matrix_sdk_ffi::Bridging::copyFromJs( + rt, callInvoker, uniffiResult, uniffi_call_status); -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"); + if (uniffi_call_status->code != UNIFFI_CALL_STATUS_OK) { + // The JS callback finished abnormally, so we cannot retrieve the return + // value. + return; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfacePaginationStatusListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener rsObject; +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_status, + 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; + } - // 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")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_status, rs_uniffiOutReturn, uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfacePaginationStatusListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0::vtablecallbackinterfacepaginationstatuslistener + 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_status, + 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_status, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_status, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacepaginationstatuslistenermethod0::vtablecallbackinterfacepaginationstatuslistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; template <> -struct Bridging { - static UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener +struct Bridging { + static UniffiVTableCallbackInterfacePaginationStatusListener 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 " - "UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener"); + "UniffiVTableCallbackInterfacePaginationStatusListener"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener rsObject; + UniffiVTableCallbackInterfacePaginationStatusListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacespaceroomlistspacelistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "onUpdate")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacespaceroomlistspacelistener:: - vtablecallbackinterfacespaceroomlistspacelistener::free:: + vtablecallbackinterfacepaginationstatuslistener:: + vtablecallbackinterfacepaginationstatuslistener::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacepaginationstatuslistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacepaginationstatuslistenermethod0:: + vtablecallbackinterfacepaginationstatuslistener:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceTimelineListener + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacetimelinelistener::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacetimelinelistener { 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"); - } +// 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; - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +// 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, + uint64_t *uniffi_direct_return) { - // Create the vtable struct - UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener rsObject; + // 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); - // 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")); + // 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); - return rsObject; + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); + } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; } -}; +} -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceSyncNotificationListener - 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 " - "UniffiVTableCallbackInterfaceSyncNotificationListener"); - } + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacetimelinelistener + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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; +} - // Create the vtable struct - UniffiVTableCallbackInterfaceSyncNotificationListener rsObject; +// 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::callbackinterfaceclone::vtablecallbackinterfacetimelinelistener + // Implementation of CallbackInterfaceTimelineListenerMethod0 for vtable field + // on_update in VTableCallbackInterfaceTimelineListener - // Create the vtable from the js callbacks. - rsObject.on_notification = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesyncnotificationlistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onNotification")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesyncnotificationlistener:: - vtablecallbackinterfacesyncnotificationlistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0::vtablecallbackinterfacetimelinelistener::UniffiCallbackInterfaceTimelineListenerMethod0 +// +// 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::callbackinterfacetimelinelistenermethod0:: + vtablecallbackinterfacetimelinelistener { +using namespace facebook; - return rsObject; - } -}; +// 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; -} // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; +// 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_diff, + void *rs_uniffiOutReturn, RustCallStatus *uniffi_call_status) { -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceSyncServiceStateObserver - 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 " - "UniffiVTableCallbackInterfaceSyncServiceStateObserver"); + // 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_diff = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_diff); + + // 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_diff); + + // 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; } - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); + } catch (const jsi::JSError &error) { + std::cout + << "Error in callback UniffiCallbackInterfaceTimelineListenerMethod0: " + << error.what() << std::endl; + throw error; + } +} - // Create the vtable struct - UniffiVTableCallbackInterfaceSyncServiceStateObserver rsObject; +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_diff, + 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; + } - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesyncservicestateobservermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesyncservicestateobserver:: - vtablecallbackinterfacesyncservicestateobserver::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_diff, rs_uniffiOutReturn, uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceTimelineListenerMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0::vtablecallbackinterfacetimelinelistener + 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_diff, + 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_diff, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_diff, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfacetimelinelistenermethod0::vtablecallbackinterfacetimelinelistener namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; @@ -16963,57 +21912,280 @@ template <> struct Bridging { UniffiVTableCallbackInterfaceTimelineListener rsObject; // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacetimelinelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetimelinelistener:: vtablecallbackinterfacetimelinelistener::free::makeCallbackFunction( rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacetimelinelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_update = + uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0:: + vtablecallbackinterfacetimelinelistener::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceUnableToDecryptDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceunabletodecryptdelegate::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfaceunabletodecryptdelegate { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceTypingNotificationsListener - 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 " - "UniffiVTableCallbackInterfaceTypingNotificationsListener"); +// 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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; - // Create the vtable struct - UniffiVTableCallbackInterfaceTypingNotificationsListener rsObject; + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} + +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfaceunabletodecryptdelegate + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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::callbackinterfaceclone::vtablecallbackinterfaceunabletodecryptdelegate + // Implementation of CallbackInterfaceUnableToDecryptDelegateMethod0 for + // vtable field on_utd in VTableCallbackInterfaceUnableToDecryptDelegate + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletodecryptdelegatemethod0::vtablecallbackinterfaceunabletodecryptdelegate::UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 +// +// 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:: + callbackinterfaceunabletodecryptdelegatemethod0:: + vtablecallbackinterfaceunabletodecryptdelegate { +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_info, + 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_info = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_info); + + // 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_info); + + // 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 " + "UniffiCallbackInterfaceUnableToDecryptDelegateMethod0: " + << error.what() << std::endl; + throw error; + } +} + +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_info, + 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; + } - // Create the vtable from the js callbacks. - rsObject.call = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacetypingnotificationslistenermethod0:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "call")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacetypingnotificationslistener:: - vtablecallbackinterfacetypingnotificationslistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_uniffiHandle, rs_info, rs_uniffiOutReturn, uniffi_call_status); +} - return rsObject; +[[maybe_unused]] static UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletodecryptdelegatemethod0::vtablecallbackinterfaceunabletodecryptdelegate + 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_info, + 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_info, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_info, + 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; +} -} // namespace uniffi::matrix_sdk_ffi +// 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::callbackinterfaceunabletodecryptdelegatemethod0::vtablecallbackinterfaceunabletodecryptdelegate namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; @@ -17037,57 +22209,292 @@ struct Bridging { UniffiVTableCallbackInterfaceUnableToDecryptDelegate rsObject; // Create the vtable from the js callbacks. - rsObject.on_utd = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceunabletodecryptdelegatemethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUtd")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfaceunabletodecryptdelegate:: vtablecallbackinterfaceunabletodecryptdelegate::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceunabletodecryptdelegate::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.on_utd = uniffi::matrix_sdk_ffi::cb:: + callbackinterfaceunabletodecryptdelegatemethod0:: + vtablecallbackinterfaceunabletodecryptdelegate:: + makeCallbackFunction(rt, callInvoker, + jsObject.getProperty(rt, "onUtd")); return rsObject; } }; } // namespace uniffi::matrix_sdk_ffi -namespace uniffi::matrix_sdk_ffi { + // Implementation of CallbackInterfaceClone for vtable field uniffi_clone in + // VTableCallbackInterfaceWidgetCapabilitiesProvider + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacewidgetcapabilitiesprovider::UniffiCallbackInterfaceClone +// +// 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::callbackinterfaceclone:: + vtablecallbackinterfacewidgetcapabilitiesprovider { using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> -struct Bridging { - static UniffiVTableCallbackInterfaceVerificationStateListener - 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 " - "UniffiVTableCallbackInterfaceVerificationStateListener"); +// 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, + uint64_t *uniffi_direct_return) { + + // 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); + + // Write the direct return value back to the caller. + if (uniffi_direct_return != nullptr) { + *uniffi_direct_return = + uniffi_jsi::Bridging::fromJs(rt, callInvoker, uniffiResult); } + } catch (const jsi::JSError &error) { + std::cout << "Error in callback UniffiCallbackInterfaceClone: " + << error.what() << std::endl; + throw error; + } +} - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); +static uint64_t 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 0; + } + uint64_t uniffi_result = 0; - // Create the vtable struct - UniffiVTableCallbackInterfaceVerificationStateListener rsObject; + // The runtime, the actual callback jsi::funtion, and the callInvoker + // are all in the lambda. + rsLambda(rs_handle, &uniffi_result); + return uniffi_result; +} - // Create the vtable from the js callbacks. - rsObject.on_update = uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceverificationstatelistenermethod0::makeCallbackFunction( - rt, callInvoker, jsObject.getProperty(rt, "onUpdate")); - rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfaceverificationstatelistener:: - vtablecallbackinterfaceverificationstatelistener::free:: - makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "uniffiFree")); +[[maybe_unused]] static UniffiCallbackInterfaceClone +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone::vtablecallbackinterfacewidgetcapabilitiesprovider + 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, + uint64_t *uniffi_direct_return) { + // 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, + uniffi_direct_return](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_handle, uniffi_direct_return); + }; + // 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; +} - return rsObject; +// 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::callbackinterfaceclone::vtablecallbackinterfacewidgetcapabilitiesprovider + // Implementation of CallbackInterfaceWidgetCapabilitiesProviderMethod0 for + // vtable field acquire_capabilities in + // VTableCallbackInterfaceWidgetCapabilitiesProvider + +// Callback function: +// uniffi::matrix_sdk_ffi::cb::callbackinterfacewidgetcapabilitiesprovidermethod0::vtablecallbackinterfacewidgetcapabilitiesprovider::UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 +// +// 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:: + callbackinterfacewidgetcapabilitiesprovidermethod0:: + vtablecallbackinterfacewidgetcapabilitiesprovider { +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_capabilities, + RustBuffer *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_capabilities = uniffi::matrix_sdk_ffi::Bridging::toJs( + rt, callInvoker, rs_capabilities); + + // 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_capabilities); + + // 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; + } + + // return type is RustBuffer(Some(ExternalFfiMetadata { name: + // "WidgetCapabilities", module_path: "matrix_sdk_ffi::widget" })) Finally, + // we need to copy the return value back into the Rust pointer. + *rs_uniffiOutReturn = + uniffi::matrix_sdk_ffi::Bridging>::fromJs( + rt, callInvoker, uniffiResult); + } catch (const jsi::JSError &error) { + std::cout << "Error in callback " + "UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0: " + << error.what() << std::endl; + throw error; } -}; +} -} // namespace uniffi::matrix_sdk_ffi +static void callback(uint64_t rs_uniffiHandle, RustBuffer rs_capabilities, + RustBuffer *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_capabilities, rs_uniffiOutReturn, + uniffi_call_status); +} + +[[maybe_unused]] static UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 +makeCallbackFunction( // uniffi::matrix_sdk_ffi::cb::callbackinterfacewidgetcapabilitiesprovidermethod0::vtablecallbackinterfacewidgetcapabilitiesprovider + 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_capabilities, + RustBuffer *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_capabilities, + rs_uniffiOutReturn, uniffi_call_status](jsi::Runtime &rt) mutable { + body(rt, callInvoker, callbackValue, rs_uniffiHandle, rs_capabilities, + 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::callbackinterfacewidgetcapabilitiesprovidermethod0::vtablecallbackinterfacewidgetcapabilitiesprovider namespace uniffi::matrix_sdk_ffi { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; @@ -17111,16 +22518,20 @@ struct Bridging { UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider rsObject; // Create the vtable from the js callbacks. - rsObject.acquire_capabilities = uniffi::matrix_sdk_ffi::cb:: - callbackinterfacewidgetcapabilitiesprovidermethod0:: - makeCallbackFunction( - rt, callInvoker, - jsObject.getProperty(rt, "acquireCapabilities")); rsObject.uniffi_free = uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfacewidgetcapabilitiesprovider:: vtablecallbackinterfacewidgetcapabilitiesprovider::free:: makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "uniffiFree")); + rsObject.uniffi_clone = uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacewidgetcapabilitiesprovider::makeCallbackFunction( + rt, callInvoker, jsObject.getProperty(rt, "uniffiClone")); + rsObject.acquire_capabilities = uniffi::matrix_sdk_ffi::cb:: + callbackinterfacewidgetcapabilitiesprovidermethod0:: + vtablecallbackinterfacewidgetcapabilitiesprovider:: + makeCallbackFunction( + rt, callInvoker, + jsObject.getProperty(rt, "acquireCapabilities")); return rsObject; } @@ -17185,39 +22596,192 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_" + "roommessageeventcontentwithoutrelation"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_clone_" + "roommessageeventcontentwithoutrelation"), + 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_roommessageeventcontentwithoutrelation( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_" + "roommessageeventcontentwithoutrelation"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_free_" + "roommessageeventcontentwithoutrelation"), + 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_roommessageeventcontentwithoutrelation( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roommessageeventcontentwithoutrelation_with_mentions"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roommessageeventcontentwithoutrelation_with_mentions"), + 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_roommessageeventcontentwithoutrelation_with_mentions( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails"), 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_checkcodesender( + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails"), + 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_homeserverlogindetails( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_" + "sync_version"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "homeserverlogindetails_sliding_sync_version"), + 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_sliding_sync_version( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_" + "oidc_prompts"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_" + "supported_oidc_prompts"), + 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_supported_oidc_prompts( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_" + "oidc_login"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "homeserverlogindetails_supports_oidc_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_oidc_login( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_" + "password_login"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_" + "supports_password_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_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, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "homeserverlogindetails_url"), + 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_url( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_ssohandler"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_ssohandler"), + 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_ssohandler( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler"), 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_checkcodesender( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_ssohandler( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish"), 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_checkcodesender_send( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url"), + 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_ssohandler_url( + rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_client"] = jsi::Function::createFromHostFunction( @@ -17277,19 +22841,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_method_client_account_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji"), - 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_add_recent_emoji( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_" "versions"] = jsi::Function::createFromHostFunction( rt, @@ -17587,19 +23138,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_profile( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis"), - 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_get_recent_emojis( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_" "rooms"] = jsi::Function::createFromHostFunction( rt, @@ -18383,6 +23921,79 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji"), + 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_add_recent_emoji( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis"), + 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_get_recent_emojis( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle"), + 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_mediafilehandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle"), + 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_mediafilehandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path"), + 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_mediafilehandle_path( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist"), + 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_mediafilehandle_persist( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_clientbuilder"] = jsi::Function::createFromHostFunction( rt, @@ -18943,713 +24554,338 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( "encryption_recovery_state_listener"), 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_encryption_recovery_state_listener( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity"), - 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_encryption_reset_identity( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "encryption_reset_recovery_key"), - 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_encryption_reset_recovery_key( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity"), - 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_encryption_user_identity( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "encryption_verification_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_encryption_verification_state( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_" - "listener"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "encryption_verification_state_listener"), - 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_encryption_verification_state_listener( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_" - "upload_steady_state"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_" - "upload_steady_state"), - 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_encryption_wait_for_backup_upload_steady_state( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_" - "initialization_tasks"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_" - "initialization_tasks"), - 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_encryption_wait_for_e2ee_initialization_tasks( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_" - "grantloginwithqrcodehandler"), - 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_grantloginwithqrcodehandler( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler"), - 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_grantloginwithqrcodehandler( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_" - "generate"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "grantloginwithqrcodehandler_generate"), - 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_grantloginwithqrcodehandler_generate( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_" - "scan"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "grantloginwithqrcodehandler_scan"), - 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_grantloginwithqrcodehandler_scan( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails"), - 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_homeserverlogindetails( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails"), - 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_homeserverlogindetails( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_" - "sync_version"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "homeserverlogindetails_sliding_sync_version"), - 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_sliding_sync_version( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_" - "oidc_prompts"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_" - "supported_oidc_prompts"), - 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_supported_oidc_prompts( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_" - "oidc_login"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "homeserverlogindetails_supports_oidc_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_oidc_login( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_" - "password_login"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_" - "supports_password_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_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, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "homeserverlogindetails_url"), - 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_url( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle"), - 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_identityresethandle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_identityresethandle"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_identityresethandle"), - 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_identityresethandle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "identityresethandle_auth_type"), - 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_identityresethandle_auth_type( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "identityresethandle_cancel"), - 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_identityresethandle_cancel( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset"), - 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_identityresethandle_reset( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails"), - 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_inreplytodetails( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails"), - 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_inreplytodetails( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_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_inreplytodetails_event( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id"), - 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_inreplytodetails_event_id( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions"), - 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_knockrequestactions( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions"), - 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_knockrequestactions( + const jsi::Value *args, size_t count) -> jsi::Value { + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept"] = + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "knockrequestactions_accept"), + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity"), 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_knockrequestactions_accept( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "knockrequestactions_decline"), - 2, + "encryption_reset_recovery_key"), + 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_knockrequestactions_decline( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_" - "ban"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "knockrequestactions_decline_and_ban"), - 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_knockrequestactions_decline_and_ban( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_" - "seen"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "knockrequestactions_mark_as_seen"), - 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_knockrequestactions_mark_as_seen( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider"), - 1, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity"), + 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_clone_lazytimelineitemprovider( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "encryption_verification_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_free_lazytimelineitemprovider( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_" - "contains_only_emojis"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_" - "contains_only_emojis"), - 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_lazytimelineitemprovider_contains_only_emojis( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_" - "info"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_" + "listener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "lazytimelineitemprovider_debug_info"), - 1, + "encryption_verification_state_listener"), + 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_lazytimelineitemprovider_debug_info( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_" - "send_handle"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_" + "upload_steady_state"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "lazytimelineitemprovider_get_send_handle"), - 1, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_" + "upload_steady_state"), + 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_lazytimelineitemprovider_get_send_handle( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_" - "shields"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_" + "initialization_tasks"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "lazytimelineitemprovider_get_shields"), - 2, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_" + "initialization_tasks"), + 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_lazytimelineitemprovider_get_shields( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle"), 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_leavespacehandle( + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_identityresethandle"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_identityresethandle"), 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_leavespacehandle( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_identityresethandle( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave"), - 2, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "identityresethandle_auth_type"), + 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_leavespacehandle_leave( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "identityresethandle_cancel"), 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_leavespacehandle_rooms( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler"), - 1, + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset"), + 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_clone_loginwithqrcodehandler( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_useridentity"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_useridentity"), 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_loginwithqrcodehandler( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_" - "generate"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "loginwithqrcodehandler_generate"), - 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_loginwithqrcodehandler_generate( + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_useridentity( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "loginwithqrcodehandler_scan"), - 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_loginwithqrcodehandler_scan( - rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity"), 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_mediafilehandle( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_useridentity( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_" + "violation"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "useridentity_has_verification_violation"), + 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_useridentity_has_verification_violation( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified"), 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_mediafilehandle( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key"), 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_mediafilehandle_path( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist"), - 2, + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin"), + 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_mediafilehandle_persist( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediasource"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_" + "verified"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "useridentity_was_previously_verified"), + 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_useridentity_was_previously_verified( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_" + "verification"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "useridentity_withdraw_verification"), + 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_useridentity_withdraw_verification( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediasource"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent"), 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_mediasource( + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent"), 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_mediasource( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_timelineevent( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_" - "constructor_mediasource_from_json"), + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id"), 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_constructor_mediasource_from_json( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type"), 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_constructor_mediasource_from_url( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id"), 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_mediasource_to_json( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_url"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_" + "id"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "timelineevent_thread_root_event_id"), + 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_timelineevent_thread_root_event_id( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_url"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp"), 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_mediasource_url( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( + rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_notificationclient"] = jsi::Function::createFromHostFunction( @@ -20014,6 +25250,137 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender"), + 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_checkcodesender( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender"), + 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_checkcodesender( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send"), + 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_checkcodesender_send( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_" + "grantloginwithqrcodehandler"), + 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_grantloginwithqrcodehandler( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler"), + 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_grantloginwithqrcodehandler( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_" + "generate"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "grantloginwithqrcodehandler_generate"), + 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_grantloginwithqrcodehandler_generate( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_" + "scan"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "grantloginwithqrcodehandler_scan"), + 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_grantloginwithqrcodehandler_scan( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler"), + 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_loginwithqrcodehandler( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler"), + 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_loginwithqrcodehandler( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_" + "generate"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "loginwithqrcodehandler_generate"), + 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_loginwithqrcodehandler_generate( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "loginwithqrcodehandler_scan"), + 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_loginwithqrcodehandler_scan( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_qrcodedata"] = jsi::Function::createFromHostFunction( rt, @@ -20061,6 +25428,76 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions"), + 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_knockrequestactions( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions"), + 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_knockrequestactions( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "knockrequestactions_accept"), + 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_knockrequestactions_accept( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "knockrequestactions_decline"), + 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_knockrequestactions_decline( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_" + "ban"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "knockrequestactions_decline_and_ban"), + 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_knockrequestactions_decline_and_ban( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_" + "seen"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "knockrequestactions_mark_as_seen"), + 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_knockrequestactions_mark_as_seen( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_room"] = jsi::Function::createFromHostFunction( rt, @@ -21145,102 +26582,416 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( const jsi::Value *args, size_t count) -> jsi::Value { return this->cpp_uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_unban_user"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_unban_user"), - 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_unban_user( + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_unban_user"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_unban_user"), + 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_unban_user( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "room_update_canonical_alias"), + 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_update_canonical_alias( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "room_update_history_visibility"), + 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_update_history_visibility( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules"), + 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_update_join_rules( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_" + "users"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_" + "update_power_levels_for_users"), + 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_update_power_levels_for_users( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "room_update_room_visibility"), + 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_update_room_visibility( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar"), + 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_room_upload_avatar( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_" + "resend"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_" + "withdraw_verification_and_resend"), + 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_withdraw_verification_and_resend( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator"), + 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_roommembersiterator( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator"), + 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_roommembersiterator( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len"), + 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_roommembersiterator_len( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roommembersiterator_next_chunk"), + 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_roommembersiterator_next_chunk( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels"), + 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_roompowerlevels( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels"), + 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_roompowerlevels( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "ban"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_ban"), + 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_roompowerlevels_can_own_user_ban( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "invite"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_invite"), + 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_roompowerlevels_can_own_user_invite( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "kick"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_kick"), + 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_roompowerlevels_can_own_user_kick( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_" + "unpin"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_pin_unpin"), + 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_roompowerlevels_can_own_user_pin_unpin( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "redact_other"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_redact_other"), + 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_roompowerlevels_can_own_user_redact_other( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "redact_own"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_redact_own"), + 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_roompowerlevels_can_own_user_redact_own( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "send_message"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_send_message"), + 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_roompowerlevels_can_own_user_send_message( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "send_state"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_own_user_send_state"), + 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_roompowerlevels_can_own_user_send_state( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" + "trigger_room_notification"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_" + "user_trigger_room_notification"), + 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_roompowerlevels_can_own_user_trigger_room_notification( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "room_update_canonical_alias"), - 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_update_canonical_alias( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility"] = + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "room_update_history_visibility"), - 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_update_history_visibility( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules"), + "roompowerlevels_can_user_ban"), 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_update_join_rules( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_" - "users"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_" + "invite"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_" - "update_power_levels_for_users"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_user_invite"), 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_update_power_levels_for_users( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "room_update_room_visibility"), + "roompowerlevels_can_user_kick"), 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_update_room_visibility( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar"), - 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_room_upload_avatar( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_" + "unpin"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_user_pin_unpin"), + 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_roompowerlevels_can_user_pin_unpin( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_" - "resend"] = jsi::Function::createFromHostFunction( + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_" + "other"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_room_" - "withdraw_verification_and_resend"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_user_redact_other"), + 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_roompowerlevels_can_user_redact_other( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_" + "own"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_user_redact_own"), + 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_roompowerlevels_can_user_redact_own( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_" + "message"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_user_send_message"), 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_withdraw_verification_and_resend( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_" + "state"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_can_user_send_state"), + 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_roompowerlevels_can_user_send_state( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_" + "room_notification"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_" + "trigger_room_notification"), + 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_roompowerlevels_can_user_trigger_room_notification( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_" + "levels"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "roompowerlevels_user_power_levels"), + 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_roompowerlevels_user_power_levels( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values"), + 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_roompowerlevels_values( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch"] = jsi::Function::createFromHostFunction( rt, @@ -21596,362 +27347,70 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator"), - 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_roommembersiterator( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator"), - 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_roommembersiterator( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len"), - 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_roommembersiterator_len( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roommembersiterator_next_chunk"), - 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_roommembersiterator_next_chunk( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_" - "roommessageeventcontentwithoutrelation"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_clone_" - "roommessageeventcontentwithoutrelation"), - 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_roommessageeventcontentwithoutrelation( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_" - "roommessageeventcontentwithoutrelation"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_free_" - "roommessageeventcontentwithoutrelation"), + "ubrn_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount"), 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_roommessageeventcontentwithoutrelation( + ->cpp_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roommessageeventcontentwithoutrelation_with_mentions"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roommessageeventcontentwithoutrelation_with_mentions"), - 2, + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount"), + 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_roommessageeventcontentwithoutrelation_with_mentions( + ->cpp_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels"), - 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_roompowerlevels( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels"), - 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_roompowerlevels( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "ban"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_ban"), - 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_roompowerlevels_can_own_user_ban( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "invite"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_invite"), - 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_roompowerlevels_can_own_user_invite( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "kick"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_kick"), - 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_roompowerlevels_can_own_user_kick( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_" - "unpin"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_pin_unpin"), - 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_roompowerlevels_can_own_user_pin_unpin( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "redact_other"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_" + "notifications"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_redact_other"), + "unreadnotificationscount_has_notifications"), 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_roompowerlevels_can_own_user_redact_other( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "redact_own"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_" + "highlight_count"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_redact_own"), + "unreadnotificationscount_highlight_count"), 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_roompowerlevels_can_own_user_redact_own( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "send_message"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_" + "notification_count"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_send_message"), - 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_roompowerlevels_can_own_user_send_message( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "send_state"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_own_user_send_state"), - 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_roompowerlevels_can_own_user_send_state( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_" - "trigger_room_notification"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_" - "user_trigger_room_notification"), - 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_roompowerlevels_can_own_user_trigger_room_notification( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_ban"), - 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_roompowerlevels_can_user_ban( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_" - "invite"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_invite"), - 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_roompowerlevels_can_user_invite( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_kick"), - 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_roompowerlevels_can_user_kick( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_" - "unpin"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_pin_unpin"), - 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_roompowerlevels_can_user_pin_unpin( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_" - "other"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_redact_other"), - 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_roompowerlevels_can_user_redact_other( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_" - "own"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_redact_own"), - 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_roompowerlevels_can_user_redact_own( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_" - "message"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_send_message"), - 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_roompowerlevels_can_user_send_message( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_" - "state"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_can_user_send_state"), - 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_roompowerlevels_can_user_send_state( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_" - "room_notification"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_" - "trigger_room_notification"), - 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_roompowerlevels_can_user_trigger_room_notification( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_" - "levels"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "roompowerlevels_user_power_levels"), + "unreadnotificationscount_notification_count"), 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_roompowerlevels_user_power_levels( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values"), - 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_roompowerlevels_values( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompreview"] = jsi::Function::createFromHostFunction( rt, @@ -22031,149 +27490,76 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediasource"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediasource"), 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_sendattachmentjoinhandle( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_mediasource( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource"), 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_sendattachmentjoinhandle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_" - "cancel"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "sendattachmentjoinhandle_cancel"), - 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_sendattachmentjoinhandle_cancel( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_mediasource( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "sendattachmentjoinhandle_join"), - 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_sendattachmentjoinhandle_join( - rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_" + "constructor_mediasource_from_json"), 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_sendgalleryjoinhandle( + ->cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle"), - 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_sendgalleryjoinhandle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "sendgalleryjoinhandle_cancel"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url"), 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_sendgalleryjoinhandle_cancel( + ->cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "sendgalleryjoinhandle_join"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json"), 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_sendgalleryjoinhandle_join( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendhandle"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendhandle"), - 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_sendhandle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle"), - 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_sendhandle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_url"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_url"), 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_sendhandle_abort( + return this->cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend"), - 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_sendhandle_try_resend( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller"] = jsi::Function::createFromHostFunction( rt, @@ -22365,6 +27751,54 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle"), + 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_leavespacehandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle"), + 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_leavespacehandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave"), + 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_leavespacehandle_leave( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_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_leavespacehandle_rooms( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist"] = jsi::Function::createFromHostFunction( rt, @@ -22592,96 +28026,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->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, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_clone_span"), - 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_span(rt, thisVal, - args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_span"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_free_span"), - 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_span(rt, thisVal, - args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_current"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_current"), - 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_fn_constructor_span_current( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new"), - 6, - [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_constructor_span_new( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span"), - 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_constructor_span_new_bridge_span( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter"), - 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_span_enter( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit"), - 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_span_exit( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_span_is_none"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_span_is_none"), - 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_span_is_none( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder"] = jsi::Function::createFromHostFunction( rt, @@ -22777,50 +28121,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_ssohandler"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_ssohandler"), - 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_ssohandler( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler"), - 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_ssohandler( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish"), - 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_ssohandler_finish( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url"), - 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_ssohandler_url( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_syncservice"] = jsi::Function::createFromHostFunction( rt, @@ -23018,51 +28318,174 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_threadsummary"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_threadsummary"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider"), 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_threadsummary( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider"), 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_threadsummary( + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_" + "contains_only_emojis"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_" + "contains_only_emojis"), + 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_lazytimelineitemprovider_contains_only_emojis( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_" + "info"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "lazytimelineitemprovider_debug_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_lazytimelineitemprovider_debug_info( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_" + "send_handle"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "lazytimelineitemprovider_get_send_handle"), + 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_lazytimelineitemprovider_get_send_handle( rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_" + "shields"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "lazytimelineitemprovider_get_shields"), + 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_lazytimelineitemprovider_get_shields( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle"), + 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_sendattachmentjoinhandle( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle"), + 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_sendattachmentjoinhandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_" + "cancel"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "sendattachmentjoinhandle_cancel"), + 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_sendattachmentjoinhandle_cancel( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "threadsummary_latest_event"), + "sendattachmentjoinhandle_join"), 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_threadsummary_latest_event( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendhandle"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendhandle"), + 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_sendhandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle"), + 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_sendhandle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort"), + 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_sendhandle_abort( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend"), 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_threadsummary_num_replies( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timeline"] = @@ -23314,18 +28737,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery"), - 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_gallery( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image"] = jsi::Function::createFromHostFunction( rt, @@ -23449,90 +28860,89 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery"), + 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_gallery( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineitem"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineitem"), 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_timelineevent( + return this->cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem"), 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_timelineevent( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_timelineitem( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_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_timelineevent_event_id( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual"), 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_timelineevent_event_type( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug"), 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_timelineevent_sender_id( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_" - "id"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "timelineevent_thread_root_event_id"), - 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_timelineevent_thread_root_event_id( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id"), 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_timelineevent_timestamp( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter"] = @@ -23584,238 +28994,239 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineitem"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineitem"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle"), 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_timelineitem( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle"), 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_timelineitem( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "sendgalleryjoinhandle_cancel"), 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_timelineitem_as_event( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "sendgalleryjoinhandle_join"), 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_timelineitem_as_virtual( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_threadsummary"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_threadsummary"), + 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_threadsummary( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary"), + 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_threadsummary( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" + "threadsummary_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_timelineitem_fmt_debug( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies"), 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_timelineitem_unique_id( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails"), + 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_inreplytodetails( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails"), + 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_inreplytodetails( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_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_clone_unreadnotificationscount( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount"), + "ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id"), 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_unreadnotificationscount( + ->cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_" - "notifications"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "unreadnotificationscount_has_notifications"), - 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_unreadnotificationscount_has_notifications( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_" - "highlight_count"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "unreadnotificationscount_highlight_count"), - 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_unreadnotificationscount_highlight_count( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_" - "notification_count"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "unreadnotificationscount_notification_count"), - 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_unreadnotificationscount_notification_count( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_useridentity"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_span"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_clone_useridentity"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_clone_span"), + 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_span(rt, thisVal, + args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_free_span"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_free_span"), 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_useridentity( + return this->cpp_uniffi_matrix_sdk_ffi_fn_free_span(rt, thisVal, + args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_current"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_current"), + 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_fn_constructor_span_current( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity"), - 1, + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new"), + 6, [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_useridentity( + return this->cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_" - "violation"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "useridentity_has_verification_violation"), - 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_useridentity_has_verification_violation( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified"), - 1, + "ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span"), + 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_useridentity_is_verified( + ->cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter"), 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_useridentity_master_key( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_fn_method_span_enter( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin"), + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit"), 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_useridentity_pin( + return this->cpp_uniffi_matrix_sdk_ffi_fn_method_span_exit( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_" - "verified"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "useridentity_was_previously_verified"), - 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_useridentity_was_previously_verified( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_" - "verification"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_" - "useridentity_withdraw_verification"), - 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_useridentity_withdraw_verification( + props["ubrn_uniffi_matrix_sdk_ffi_fn_method_span_is_none"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_method_span_is_none"), + 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_span_is_none( rt, thisVal, args, count); - }); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_clone_widgetdriver"] = jsi::Function::createFromHostFunction( rt, @@ -23909,181 +29320,178 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" + "callback_vtable_clientdelegate"), + 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_clientdelegate( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "backupstatelistener"] = jsi::Function::createFromHostFunction( + "clientsessiondelegate"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_backupstatelistener"), + "callback_vtable_clientsessiondelegate"), 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_backupstatelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "backupsteadystatelistener"] = jsi::Function::createFromHostFunction( + "ignoreduserslistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_backupsteadystatelistener"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" + "callback_vtable_ignoreduserslistener"), 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_backupsteadystatelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "calldeclinelistener"] = jsi::Function::createFromHostFunction( + "mediapreviewconfiglistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_calldeclinelistener"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_mediapreviewconfiglistener"), 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_calldeclinelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_clientdelegate"), + "callback_vtable_progresswatcher"), 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_clientdelegate( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "clientsessiondelegate"] = jsi::Function::createFromHostFunction( + "roomaccountdatalistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_clientsessiondelegate"), + "callback_vtable_roomaccountdatalistener"), 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_clientsessiondelegate( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "enablerecoveryprogresslistener"] = jsi::Function::createFromHostFunction( + "sendqueueroomerrorlistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_enablerecoveryprogresslistener"), + "vtable_sendqueueroomerrorlistener"), 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_enablerecoveryprogresslistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "generatedqrloginprogresslistener"] = jsi::Function::createFromHostFunction( + "sendqueueroomupdatelistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_generatedqrloginprogresslistener"), + "vtable_sendqueueroomupdatelistener"), 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_generatedqrloginprogresslistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "grantgeneratedqrloginprogresslistener"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "grantgeneratedqrloginprogresslistener"), - 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_grantgeneratedqrloginprogresslistener( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "grantqrloginprogresslistener"] = jsi::Function::createFromHostFunction( + "syncnotificationlistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_grantqrloginprogresslistener"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" + "callback_vtable_syncnotificationlistener"), 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_grantqrloginprogresslistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "identitystatuschangelistener"] = jsi::Function::createFromHostFunction( + "backupstatelistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_identitystatuschangelistener"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" + "callback_vtable_backupstatelistener"), 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_identitystatuschangelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "ignoreduserslistener"] = jsi::Function::createFromHostFunction( + "backupsteadystatelistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_ignoreduserslistener"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_backupsteadystatelistener"), 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_ignoreduserslistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "knockrequestslistener"] = jsi::Function::createFromHostFunction( + "enablerecoveryprogresslistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_knockrequestslistener"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_enablerecoveryprogresslistener"), 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_knockrequestslistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "livelocationsharelistener"] = jsi::Function::createFromHostFunction( + "recoverystatelistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_livelocationsharelistener"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" + "callback_vtable_recoverystatelistener"), 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_livelocationsharelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "mediapreviewconfiglistener"] = jsi::Function::createFromHostFunction( + "verificationstatelistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_mediapreviewconfiglistener"), + "vtable_verificationstatelistener"), 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_mediapreviewconfiglistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" @@ -24100,29 +29508,45 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "paginationstatuslistener"] = jsi::Function::createFromHostFunction( + "generatedqrloginprogresslistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_paginationstatuslistener"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_generatedqrloginprogresslistener"), 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_paginationstatuslistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "grantgeneratedqrloginprogresslistener"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_progresswatcher"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "grantgeneratedqrloginprogresslistener"), 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_progresswatcher( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "grantqrloginprogresslistener"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_grantqrloginprogresslistener"), + 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_grantqrloginprogresslistener( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" "qrloginprogresslistener"] = jsi::Function::createFromHostFunction( rt, @@ -24136,43 +29560,55 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "recoverystatelistener"] = jsi::Function::createFromHostFunction( + "calldeclinelistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_recoverystatelistener"), + "callback_vtable_calldeclinelistener"), 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_recoverystatelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomaccountdatalistener"] = jsi::Function::createFromHostFunction( + "identitystatuschangelistener"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_identitystatuschangelistener"), + 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_identitystatuschangelistener( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "knockrequestslistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_roomaccountdatalistener"), + "callback_vtable_knockrequestslistener"), 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_roomaccountdatalistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomdirectorysearchentrieslistener"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomdirectorysearchentrieslistener"), - 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_roomdirectorysearchentrieslistener( - rt, thisVal, args, count); - }); + "livelocationsharelistener"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" + "vtable_livelocationsharelistener"), + 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_livelocationsharelistener( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener"] = jsi::Function::createFromHostFunction( rt, @@ -24186,95 +29622,96 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomlistentrieslistener"] = jsi::Function::createFromHostFunction( + "sendqueuelistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_roomlistentrieslistener"), - 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_roomlistentrieslistener( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomlistloadingstatelistener"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_roomlistloadingstatelistener"), + "callback_vtable_sendqueuelistener"), 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_roomlistloadingstatelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomlistservicestatelistener"] = jsi::Function::createFromHostFunction( + "typingnotificationslistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_roomlistservicestatelistener"), + "vtable_typingnotificationslistener"), 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_roomlistservicestatelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomlistservicesyncindicatorlistener"] = + "roomdirectorysearchentrieslistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "roomlistservicesyncindicatorlistener"), + "roomdirectorysearchentrieslistener"), 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_roomlistservicesyncindicatorlistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "sendqueuelistener"] = jsi::Function::createFromHostFunction( + "roomlistentrieslistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_sendqueuelistener"), + "callback_vtable_roomlistentrieslistener"), 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_sendqueuelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "sendqueueroomerrorlistener"] = jsi::Function::createFromHostFunction( + "roomlistloadingstatelistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_sendqueueroomerrorlistener"), + "vtable_roomlistloadingstatelistener"), 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_sendqueueroomerrorlistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "sendqueueroomupdatelistener"] = jsi::Function::createFromHostFunction( + "roomlistservicestatelistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_sendqueueroomupdatelistener"), + "vtable_roomlistservicestatelistener"), 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_sendqueueroomupdatelistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "roomlistservicesyncindicatorlistener"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" + "roomlistservicesyncindicatorlistener"), + 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_roomlistservicesyncindicatorlistener( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" "sessionverificationcontrollerdelegate"] = jsi::Function::createFromHostFunction( @@ -24343,27 +29780,27 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "syncnotificationlistener"] = jsi::Function::createFromHostFunction( + "syncservicestateobserver"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_syncnotificationlistener"), + "callback_vtable_syncservicestateobserver"), 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_syncnotificationlistener( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "syncservicestateobserver"] = jsi::Function::createFromHostFunction( + "paginationstatuslistener"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_init_" - "callback_vtable_syncservicestateobserver"), + "callback_vtable_paginationstatuslistener"), 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_syncservicestateobserver( + ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener"] = @@ -24378,19 +29815,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "typingnotificationslistener"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_typingnotificationslistener"), - 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_typingnotificationslistener( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" "unabletodecryptdelegate"] = jsi::Function::createFromHostFunction( rt, @@ -24403,19 +29827,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" - "verificationstatelistener"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_" - "vtable_verificationstatelistener"), - 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_verificationstatelistener( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_" "widgetcapabilitiesprovider"] = jsi::Function::createFromHostFunction( rt, @@ -24429,27 +29840,15 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_" - "message"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" - "content_without_relation_from_message"), - 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_func_content_without_relation_from_message( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit"), - 3, + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha"), + 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_fn_func_create_caption_edit( + return this->cpp_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id"] = @@ -24463,29 +29862,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url"), - 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_func_generate_webview_url( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_" - "permissions"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_get_" - "element_call_required_permissions"), - 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_func_get_element_call_required_permissions( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_func_init_platform"] = jsi::Function::createFromHostFunction( rt, @@ -24497,66 +29873,105 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_uniffi_matrix_sdk_ffi_fn_func_init_platform( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid"), + "ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer"), 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_func_is_room_alias_format_valid( + ->cpp_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event"), - 5, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" + "matrix_to_room_alias_permalink"), + 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_func_log_event( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid"), 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_func_make_widget_driver( + return this + ->cpp_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_" + "name"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_room_" + "alias_name_from_room_display_name"), + 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_func_room_alias_name_from_room_display_name( rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink"), + 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_func_matrix_to_user_permalink( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" - "matrix_to_room_alias_permalink"), + "suggested_power_level_for_role"), 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_func_matrix_to_room_alias_permalink( + ->cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" + "suggested_role_for_power_level"), 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_func_matrix_to_user_permalink( + ->cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_" + "message"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" + "content_without_relation_from_message"), + 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_func_content_without_relation_from_message( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html"] = jsi::Function::createFromHostFunction( rt, @@ -24619,18 +30034,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" - "new_virtual_element_call_widget"), - 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_func_new_virtual_element_call_widget( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from"] = jsi::Function::createFromHostFunction( rt, @@ -24644,64 +30047,72 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer"), - 1, + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit"), + 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_func_reload_tracing_file_writer( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_" - "name"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_room_" - "alias_name_from_room_display_name"), - 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_func_room_alias_name_from_room_display_name( + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event"), + 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_func_log_event( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha"] = + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha"), - 0, + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url"), + 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_func_sdk_git_sha( + return this->cpp_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_" + "permissions"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_get_" + "element_call_required_permissions"), + 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_func_get_element_call_required_permissions( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" - "suggested_power_level_for_role"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver"), 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_func_suggested_power_level_for_role( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level"] = + props["ubrn_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_fn_func_" - "suggested_role_for_power_level"), - 1, + "new_virtual_element_call_widget"), + 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_func_suggested_role_for_power_level( + ->cpp_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( rt, thisVal, args, count); }); props["ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u8"] = @@ -25144,50 +30555,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_ffi_matrix_sdk_ffi_rust_future_complete_f64( rt, thisVal, args, count); }); - props["ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer"), - 3, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_ffi_matrix_sdk_ffi_rust_future_poll_pointer( - rt, thisVal, args, count); - }); - props["ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_ffi_matrix_sdk_ffi_rust_future_cancel_pointer( - rt, thisVal, args, count); - }); - props["ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_ffi_matrix_sdk_ffi_rust_future_free_pointer( - rt, thisVal, args, count); - }); - props["ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer"), - 1, - [this](jsi::Runtime &rt, const jsi::Value &thisVal, - const jsi::Value *args, size_t count) -> jsi::Value { - return this->cpp_ffi_matrix_sdk_ffi_rust_future_complete_pointer( - rt, thisVal, args, count); - }); props["ubrn_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer"] = jsi::Function::createFromHostFunction( rt, @@ -25277,6 +30644,125 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_ffi_matrix_sdk_ffi_rust_future_complete_void( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha"), + 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_func_sdk_git_sha( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id"), + 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_func_gen_transaction_id( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform"), + 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_func_init_platform( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "func_reload_tracing_file_writer"), + 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_func_reload_tracing_file_writer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_" + "permalink"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "matrix_to_room_alias_permalink"), + 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_func_matrix_to_room_alias_permalink( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "func_is_room_alias_format_valid"), + 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_func_is_room_alias_format_valid( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_" + "display_name"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "room_alias_name_from_room_display_name"), + 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_func_room_alias_name_from_room_display_name( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "func_matrix_to_user_permalink"), + 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_func_matrix_to_user_permalink( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_" + "role"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "suggested_power_level_for_role"), + 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_func_suggested_power_level_for_role( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_" + "level"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "suggested_role_for_power_level"), + 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_func_suggested_role_for_power_level( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_" "from_message"] = jsi::Function::createFromHostFunction( rt, @@ -25289,6 +30775,79 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" + "html"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "message_event_content_from_html"), + 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_func_message_event_content_from_html( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" + "html_as_emote"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "message_event_content_from_html_as_emote"), + 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_func_message_event_content_from_html_as_emote( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" + "markdown"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "message_event_content_from_markdown"), + 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_func_message_event_content_from_markdown( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" + "markdown_as_emote"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" + "message_event_content_from_markdown_as_emote"), + 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_func_message_event_content_from_markdown_as_emote( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "func_message_event_content_new"), + 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_func_message_event_content_new( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "func_parse_matrix_entity_from"), + 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_func_parse_matrix_entity_from( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit"] = jsi::Function::createFromHostFunction( rt, @@ -25302,18 +30861,16 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_event"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id"), + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_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_func_gen_transaction_id( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_checksum_func_log_event( + rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url"] = jsi::Function::createFromHostFunction( @@ -25340,40 +30897,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform"), - 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_func_init_platform( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "func_is_room_alias_format_valid"), - 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_func_is_room_alias_format_valid( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_event"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_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_func_log_event( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver"] = jsi::Function::createFromHostFunction( rt, @@ -25387,184 +30910,132 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_" - "permalink"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_" + "widget"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "matrix_to_room_alias_permalink"), + "new_virtual_element_call_widget"), 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_func_matrix_to_room_alias_permalink( + ->cpp_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roommessageeventcontentwithoutrelation_with_mentions"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "func_matrix_to_user_permalink"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roommessageeventcontentwithoutrelation_with_mentions"), 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_func_matrix_to_user_permalink( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" - "html"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" + "sliding_sync_version"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "message_event_content_from_html"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "homeserverlogindetails_sliding_sync_version"), 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_func_message_event_content_from_html( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" - "html_as_emote"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" + "supported_oidc_prompts"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "message_event_content_from_html_as_emote"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "homeserverlogindetails_supported_oidc_prompts"), 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_func_message_event_content_from_html_as_emote( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" - "markdown"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" + "supports_oidc_login"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "message_event_content_from_markdown"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "homeserverlogindetails_supports_oidc_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_func_message_event_content_from_markdown( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_" - "markdown_as_emote"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" + "supports_password_login"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "message_event_content_from_markdown_as_emote"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "homeserverlogindetails_supports_password_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_func_message_event_content_from_markdown_as_emote( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "func_message_event_content_new"), - 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_func_message_event_content_new( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_" - "widget"] = jsi::Function::createFromHostFunction( + 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_func_" - "new_virtual_element_call_widget"), + 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_func_new_virtual_element_call_widget( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "func_parse_matrix_entity_from"), - 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_func_parse_matrix_entity_from( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "func_reload_tracing_file_writer"), - 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_func_reload_tracing_file_writer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_" - "display_name"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" + "url"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "room_alias_name_from_room_display_name"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_homeserverlogindetails_url"), 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_func_room_alias_name_from_room_display_name( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish"), 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_func_sdk_git_sha( - rt, thisVal, args, count); + return this + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_" - "role"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "suggested_power_level_for_role"), - 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_func_suggested_power_level_for_role( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_" - "level"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_func_" - "suggested_role_for_power_level"), - 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_func_suggested_role_for_power_level( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_checkcodesender_send"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url"), 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_checkcodesender_send( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth"] = @@ -25605,18 +31076,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_account_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_client_add_recent_emoji"), - 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_add_recent_emoji( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_" "sync_versions"] = jsi::Function::createFromHostFunction( rt, @@ -25929,18 +31388,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_profile( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_client_get_recent_emojis"), - 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_get_recent_emojis( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_" "visited_rooms"] = jsi::Function::createFromHostFunction( rt, @@ -26740,6 +32187,54 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_client_add_recent_emoji"), + 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_add_recent_emoji( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_client_get_recent_emojis"), + 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_get_recent_emojis( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_mediafilehandle_path"), + 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_mediafilehandle_path( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_mediafilehandle_persist"), + 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_mediafilehandle_persist( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_" "certificates"] = jsi::Function::createFromHostFunction( rt, @@ -27339,109 +32834,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "grantloginwithqrcodehandler_generate"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "grantloginwithqrcodehandler_generate"), - 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_grantloginwithqrcodehandler_generate( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "grantloginwithqrcodehandler_scan"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_grantloginwithqrcodehandler_scan"), - 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_grantloginwithqrcodehandler_scan( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" - "sliding_sync_version"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "homeserverlogindetails_sliding_sync_version"), - 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_sliding_sync_version( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" - "supported_oidc_prompts"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "homeserverlogindetails_supported_oidc_prompts"), - 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_supported_oidc_prompts( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" - "supports_oidc_login"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "homeserverlogindetails_supports_oidc_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_oidc_login( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_" - "supports_password_login"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "homeserverlogindetails_supports_password_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_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, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_homeserverlogindetails_url"), - 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_url( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_" "type"] = jsi::Function::createFromHostFunction( rt, @@ -27478,226 +32870,141 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_inreplytodetails_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_inreplytodetails_event( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_" - "id"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_inreplytodetails_event_id"), - 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_inreplytodetails_event_id( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_" - "accept"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_knockrequestactions_accept"), - 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_knockrequestactions_accept( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_" - "decline"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_knockrequestactions_decline"), - 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_knockrequestactions_decline( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_" - "decline_and_ban"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "knockrequestactions_decline_and_ban"), - 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_knockrequestactions_decline_and_ban( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_" - "as_seen"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_knockrequestactions_mark_as_seen"), - 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_knockrequestactions_mark_as_seen( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" - "contains_only_emojis"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "lazytimelineitemprovider_contains_only_emojis"), - 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_lazytimelineitemprovider_contains_only_emojis( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" - "debug_info"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "lazytimelineitemprovider_debug_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_lazytimelineitemprovider_debug_info( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" - "get_send_handle"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "lazytimelineitemprovider_get_send_handle"), - 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_lazytimelineitemprovider_get_send_handle( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" - "get_shields"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_" + "verification_violation"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "lazytimelineitemprovider_get_shields"), + "useridentity_has_verification_violation"), 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_lazytimelineitemprovider_get_shields( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_leavespacehandle_leave"), + "method_useridentity_is_verified"), 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_leavespacehandle_leave( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_leavespacehandle_rooms"), + "method_useridentity_master_key"), 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_leavespacehandle_rooms( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_" - "generate"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin"), + 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_useridentity_pin( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_" + "previously_verified"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_loginwithqrcodehandler_generate"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "useridentity_was_previously_verified"), 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_loginwithqrcodehandler_generate( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_" - "scan"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_" + "verification"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_loginwithqrcodehandler_scan"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "useridentity_withdraw_verification"), 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_loginwithqrcodehandler_scan( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_mediafilehandle_path"), + "method_timelineevent_event_id"), 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_mediafilehandle_path( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_mediafilehandle_persist"), + "method_timelineevent_event_type"), 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_mediafilehandle_persist( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_timelineevent_sender_id"), 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_mediasource_to_json( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_" + "event_id"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "timelineevent_thread_root_event_id"), + 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_timelineevent_thread_root_event_id( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_timelineevent_timestamp"), 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_mediasource_url( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_" @@ -28028,6 +33335,68 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_checkcodesender_send"), + 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_checkcodesender_send( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "grantloginwithqrcodehandler_generate"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "grantloginwithqrcodehandler_generate"), + 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_grantloginwithqrcodehandler_generate( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "grantloginwithqrcodehandler_scan"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_grantloginwithqrcodehandler_scan"), + 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_grantloginwithqrcodehandler_scan( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_" + "generate"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_loginwithqrcodehandler_generate"), + 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_loginwithqrcodehandler_generate( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_" + "scan"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_loginwithqrcodehandler_scan"), + 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_loginwithqrcodehandler_scan( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name"] = jsi::Function::createFromHostFunction( rt, @@ -28040,6 +33409,55 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_" + "accept"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_knockrequestactions_accept"), + 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_knockrequestactions_accept( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_" + "decline"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_knockrequestactions_decline"), + 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_knockrequestactions_decline( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_" + "decline_and_ban"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "knockrequestactions_decline_and_ban"), + 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_knockrequestactions_decline_and_ban( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_" + "as_seen"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_knockrequestactions_mark_as_seen"), + 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_knockrequestactions_mark_as_seen( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_active_members_" "count"] = jsi::Function::createFromHostFunction( rt, @@ -28995,482 +34413,240 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_" - "requests"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_subscribe_to_knock_requests"), - 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_subscribe_to_knock_requests( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_" - "location_shares"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_subscribe_to_live_location_shares"), - 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_subscribe_to_live_location_shares( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_" - "info_updates"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_subscribe_to_room_info_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_room_subscribe_to_room_info_updates( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_" - "queue_updates"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_subscribe_to_send_queue_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_room_subscribe_to_send_queue_updates( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_" - "notifications"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_subscribe_to_typing_notifications"), - 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_subscribe_to_typing_notifications( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_successor_room"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_successor_room"), - 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_successor_room( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_" - "user"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_suggested_role_for_user"), - 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_suggested_role_for_user( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline"), - 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_timeline( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_" - "configuration"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_timeline_with_configuration"), - 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_timeline_with_configuration( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic"), - 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_topic( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice"), - 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_typing_notice( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user"), - 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_unban_user( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_" - "alias"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_update_canonical_alias"), - 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_update_canonical_alias( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_history_" - "visibility"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_update_history_visibility"), - 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_update_history_visibility( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_update_join_rules"), - 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_update_join_rules( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_" - "for_users"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_update_power_levels_for_users"), - 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_update_power_levels_for_users( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_room_" - "visibility"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_room_update_room_visibility"), - 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_update_room_visibility( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar"), - 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_upload_avatar( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_" - "and_resend"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "room_withdraw_verification_and_resend"), - 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_withdraw_verification_and_resend( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_" - "last_page"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomdirectorysearch_is_at_last_page"), - 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_roomdirectorysearch_is_at_last_page( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_" - "pages"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomdirectorysearch_loaded_pages"), - 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_roomdirectorysearch_loaded_pages( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_" - "page"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_" + "requests"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomdirectorysearch_next_page"), + "method_room_subscribe_to_knock_requests"), 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_roomdirectorysearch_next_page( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_" - "results"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_" + "location_shares"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomdirectorysearch_results"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "room_subscribe_to_live_location_shares"), 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_roomdirectorysearch_results( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_" - "search"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_" + "info_updates"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomdirectorysearch_search"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "room_subscribe_to_room_info_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_roomdirectorysearch_search( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_" - "dynamic_adapters"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_" + "queue_updates"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlist_entries_with_dynamic_adapters"), + "room_subscribe_to_send_queue_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_roomlist_entries_with_dynamic_adapters( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_" - "dynamic_adapters_with"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_" + "notifications"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlist_entries_with_dynamic_adapters_with"), + "room_subscribe_to_typing_notifications"), 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_roomlist_entries_with_dynamic_adapters_with( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomlist_loading_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_roomlist_loading_state( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room"), - 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_roomlist_room( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistdynamicentriescontroller_add_one_page"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_successor_room"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistdynamicentriescontroller_add_one_page"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_successor_room"), 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_roomlistdynamicentriescontroller_add_one_page( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_successor_room( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistdynamicentriescontroller_reset_to_one_page"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_" + "user"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_room_suggested_role_for_user"), + 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_suggested_role_for_user( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistdynamicentriescontroller_reset_to_one_page"), + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline"), 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_roomlistdynamicentriescontroller_reset_to_one_page( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_timeline( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistdynamicentriescontroller_set_filter"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_" + "configuration"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_room_timeline_with_configuration"), + 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_timeline_with_configuration( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistdynamicentriescontroller_set_filter"), + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic"), 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_roomlistdynamicentriescontroller_set_filter( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_topic( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistentrieswithdynamicadaptersresult_controller"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistentrieswithdynamicadaptersresult_controller"), + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice"), 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_roomlistentrieswithdynamicadaptersresult_controller( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistentrieswithdynamicadaptersresult_entries_stream"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistentrieswithdynamicadaptersresult_entries_stream"), + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user"), 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_roomlistentrieswithdynamicadaptersresult_entries_stream( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_" - "rooms"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_" + "alias"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomlistservice_all_rooms"), + "method_room_update_canonical_alias"), 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_roomlistservice_all_rooms( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomlistservice_room"), - 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_roomlistservice_room( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_history_" + "visibility"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_room_update_history_visibility"), + 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_update_history_visibility( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomlistservice_state"), + "method_room_update_join_rules"), 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_roomlistservice_state( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_" - "to_rooms"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_" + "for_users"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roomlistservice_subscribe_to_rooms"), + "room_update_power_levels_for_users"), 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_roomlistservice_subscribe_to_rooms( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_" - "indicator"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_room_" + "visibility"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomlistservice_sync_indicator"), + "method_room_update_room_visibility"), 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_roomlistservice_sync_indicator( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar"), + 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_upload_avatar( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_" + "and_resend"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "room_withdraw_verification_and_resend"), + 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_withdraw_verification_and_resend( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len"] = @@ -29497,20 +34673,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roommessageeventcontentwithoutrelation_with_mentions"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "roommessageeventcontentwithoutrelation_with_mentions"), - 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_roommessageeventcontentwithoutrelation_with_mentions( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_" "user_ban"] = jsi::Function::createFromHostFunction( rt, @@ -29764,6 +34926,287 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_" + "last_page"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomdirectorysearch_is_at_last_page"), + 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_roomdirectorysearch_is_at_last_page( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_" + "pages"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomdirectorysearch_loaded_pages"), + 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_roomdirectorysearch_loaded_pages( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_" + "page"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomdirectorysearch_next_page"), + 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_roomdirectorysearch_next_page( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_" + "results"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomdirectorysearch_results"), + 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_roomdirectorysearch_results( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_" + "search"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomdirectorysearch_search"), + 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_roomdirectorysearch_search( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_" + "dynamic_adapters"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlist_entries_with_dynamic_adapters"), + 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_roomlist_entries_with_dynamic_adapters( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_" + "dynamic_adapters_with"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlist_entries_with_dynamic_adapters_with"), + 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_roomlist_entries_with_dynamic_adapters_with( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomlist_loading_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_roomlist_loading_state( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room"), + 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_roomlist_room( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistdynamicentriescontroller_add_one_page"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistdynamicentriescontroller_add_one_page"), + 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_roomlistdynamicentriescontroller_add_one_page( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistdynamicentriescontroller_reset_to_one_page"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistdynamicentriescontroller_reset_to_one_page"), + 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_roomlistdynamicentriescontroller_reset_to_one_page( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistdynamicentriescontroller_set_filter"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistdynamicentriescontroller_set_filter"), + 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_roomlistdynamicentriescontroller_set_filter( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistentrieswithdynamicadaptersresult_controller"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistentrieswithdynamicadaptersresult_controller"), + 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_roomlistentrieswithdynamicadaptersresult_controller( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistentrieswithdynamicadaptersresult_entries_stream"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistentrieswithdynamicadaptersresult_entries_stream"), + 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_roomlistentrieswithdynamicadaptersresult_entries_stream( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_" + "rooms"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomlistservice_all_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_roomlistservice_all_rooms( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomlistservice_room"), + 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_roomlistservice_room( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomlistservice_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_roomlistservice_state( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_" + "to_rooms"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "roomlistservice_subscribe_to_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_roomlistservice_subscribe_to_rooms( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_" + "indicator"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roomlistservice_sync_indicator"), + 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_roomlistservice_sync_indicator( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_" + "has_notifications"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "unreadnotificationscount_has_notifications"), + 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_unreadnotificationscount_has_notifications( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_" + "highlight_count"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "unreadnotificationscount_highlight_count"), + 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_unreadnotificationscount_highlight_count( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_" + "notification_count"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "unreadnotificationscount_notification_count"), + 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_unreadnotificationscount_notification_count( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget"] = jsi::Function::createFromHostFunction( rt, @@ -29829,77 +35272,29 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_" - "cancel"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_sendattachmentjoinhandle_cancel"), - 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_sendattachmentjoinhandle_cancel( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_" - "join"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_sendattachmentjoinhandle_join"), - 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_sendattachmentjoinhandle_join( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_" - "cancel"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_sendgalleryjoinhandle_cancel"), - 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_sendgalleryjoinhandle_cancel( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_" - "join"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_sendgalleryjoinhandle_join"), - 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_sendgalleryjoinhandle_join( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort"), + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json"), 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_sendhandle_abort( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_sendhandle_try_resend"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url"), 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_sendhandle_try_resend( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" @@ -30054,6 +35449,30 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_leavespacehandle_leave"), + 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_leavespacehandle_leave( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_leavespacehandle_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_leavespacehandle_rooms( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate"] = jsi::Function::createFromHostFunction( rt, @@ -30242,39 +35661,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->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, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter"), - 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_span_enter( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit"), - 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_span_exit( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none"), - 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_span_is_none( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_" "size"] = jsi::Function::createFromHostFunction( rt, @@ -30337,31 +35723,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish"), - 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_ssohandler_finish( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url"), - 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_ssohandler_url( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_" "sessions"] = jsi::Function::createFromHostFunction( rt, @@ -30500,30 +35861,107 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_" - "event"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" + "contains_only_emojis"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "lazytimelineitemprovider_contains_only_emojis"), + 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_lazytimelineitemprovider_contains_only_emojis( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" + "debug_info"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "lazytimelineitemprovider_debug_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_lazytimelineitemprovider_debug_info( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" + "get_send_handle"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "lazytimelineitemprovider_get_send_handle"), + 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_lazytimelineitemprovider_get_send_handle( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_" + "get_shields"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "lazytimelineitemprovider_get_shields"), + 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_lazytimelineitemprovider_get_shields( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_" + "cancel"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_threadsummary_latest_event"), + "method_sendattachmentjoinhandle_cancel"), 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_threadsummary_latest_event( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_" - "replies"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_" + "join"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_threadsummary_num_replies"), + "method_sendattachmentjoinhandle_join"), 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_threadsummary_num_replies( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort"), + 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_sendhandle_abort( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_sendhandle_try_resend"), + 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_sendhandle_try_resend( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener"] = jsi::Function::createFromHostFunction( rt, @@ -30757,18 +36195,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timeline_send_gallery"), - 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_timeline_send_gallery( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image"] = jsi::Function::createFromHostFunction( rt, @@ -30885,73 +36311,24 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timeline_unpin_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_timeline_unpin_event( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelineevent_event_id"), - 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_timelineevent_event_id( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelineevent_event_type"), - 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_timelineevent_event_type( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelineevent_sender_id"), - 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_timelineevent_sender_id( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_" - "event_id"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "timelineevent_thread_root_event_id"), - 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_timelineevent_thread_root_event_id( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp"] = + "method_timeline_unpin_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_timeline_unpin_event( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_timelineevent_timestamp"), + "method_timeline_send_gallery"), 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_timelineevent_timestamp( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event"] = @@ -31002,121 +36379,111 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_" - "has_notifications"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_" + "cancel"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "unreadnotificationscount_has_notifications"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_sendgalleryjoinhandle_cancel"), 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_unreadnotificationscount_has_notifications( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_" - "highlight_count"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_" + "join"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "unreadnotificationscount_highlight_count"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_sendgalleryjoinhandle_join"), 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_unreadnotificationscount_highlight_count( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_" - "notification_count"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_" + "event"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "unreadnotificationscount_notification_count"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_threadsummary_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_unreadnotificationscount_notification_count( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_" - "verification_violation"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_" + "replies"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "useridentity_has_verification_violation"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_threadsummary_num_replies"), 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_useridentity_has_verification_violation( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_useridentity_is_verified"), + "method_inreplytodetails_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_useridentity_is_verified( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_" + "id"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_inreplytodetails_event_id"), + 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_inreplytodetails_event_id( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_useridentity_master_key"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter"), 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_useridentity_master_key( - rt, thisVal, args, count); + return this->cpp_uniffi_matrix_sdk_ffi_checksum_method_span_enter( + rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin"), + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit"), 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_useridentity_pin( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_" - "previously_verified"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "useridentity_was_previously_verified"), - 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_useridentity_was_previously_verified( + return this->cpp_uniffi_matrix_sdk_ffi_checksum_method_span_exit( rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_" - "verification"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "useridentity_withdraw_verification"), - 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_useridentity_withdraw_verification( + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none"), + 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_span_is_none( rt, thisVal, args, count); - }); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run"] = jsi::Function::createFromHostFunction( rt, @@ -31166,6 +36533,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_" + "bytes"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "constructor_qrcodedata_from_bytes"), + 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_constructor_qrcodedata_from_bytes( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_" "json"] = jsi::Function::createFromHostFunction( rt, @@ -31190,16 +36569,42 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_" - "bytes"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_" + "new"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "constructor_qrcodedata_from_bytes"), + "constructor_sqlitestorebuilder_new"), 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_constructor_qrcodedata_from_bytes( + ->cpp_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_" + "timelineeventtypefilter_exclude"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "constructor_timelineeventtypefilter_exclude"), + 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_constructor_timelineeventtypefilter_exclude( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_" + "timelineeventtypefilter_include"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "constructor_timelineeventtypefilter_include"), + 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_constructor_timelineeventtypefilter_include( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_current"] = @@ -31239,130 +36644,170 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_" - "new"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_" + "change"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "constructor_sqlitestorebuilder_new"), + "method_accountdatalistener_on_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_constructor_sqlitestorebuilder_new( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_" - "timelineeventtypefilter_exclude"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_" + "auth_error"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "constructor_timelineeventtypefilter_exclude"), + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "clientdelegate_did_receive_auth_error"), 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_constructor_timelineeventtypefilter_exclude( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_" - "timelineeventtypefilter_include"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_" + "retrieve_session_from_keychain"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "constructor_timelineeventtypefilter_include"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "clientsessiondelegate_retrieve_session_from_keychain"), 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_constructor_timelineeventtypefilter_include( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_" - "change"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_" + "session_in_keychain"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "clientsessiondelegate_save_session_in_keychain"), + 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_clientsessiondelegate_save_session_in_keychain( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_" + "call"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_accountdatalistener_on_change"), + "method_ignoreduserslistener_call"), 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_accountdatalistener_on_change( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_" - "update"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_" + "on_change"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "mediapreviewconfiglistener_on_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_mediapreviewconfiglistener_on_change( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_" + "transmission_progress"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "progresswatcher_transmission_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_progresswatcher_transmission_progress( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_" + "change"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_backupstatelistener_on_update"), + "method_roomaccountdatalistener_on_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_backupstatelistener_on_update( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_" - "on_update"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_" + "on_error"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "backupsteadystatelistener_on_update"), + "sendqueueroomerrorlistener_on_error"), 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_backupsteadystatelistener_on_update( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "sendqueueroomupdatelistener_on_update"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_calldeclinelistener_call"), + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "sendqueueroomupdatelistener_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_calldeclinelistener_call( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_" - "auth_error"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_" + "on_notification"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "clientdelegate_did_receive_auth_error"), + "syncnotificationlistener_on_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_clientdelegate_did_receive_auth_error( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_" - "retrieve_session_from_keychain"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_" + "update"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "clientsessiondelegate_retrieve_session_from_keychain"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_backupstatelistener_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_clientsessiondelegate_retrieve_session_from_keychain( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_" - "session_in_keychain"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_" + "on_update"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "clientsessiondelegate_save_session_in_keychain"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "backupsteadystatelistener_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_clientsessiondelegate_save_session_in_keychain( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" @@ -31379,6 +36824,45 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_" + "update"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_recoverystatelistener_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_recoverystatelistener_on_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_" + "on_update"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "verificationstatelistener_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_verificationstatelistener_on_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "notificationsettingsdelegate_settings_did_change"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "notificationsettingsdelegate_settings_did_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_notificationsettingsdelegate_settings_did_change( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" "generatedqrloginprogresslistener_on_update"] = jsi::Function::createFromHostFunction( @@ -31421,6 +36905,30 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update( rt, thisVal, args, count); }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_" + "update"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_qrloginprogresslistener_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_qrloginprogresslistener_on_update( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_calldeclinelistener_call"), + 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_calldeclinelistener_call( + rt, thisVal, args, count); + }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" "identitystatuschangelistener_call"] = jsi::Function::createFromHostFunction( @@ -31435,18 +36943,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_" - "call"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_ignoreduserslistener_call"), - 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_ignoreduserslistener_call( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_" "call"] = jsi::Function::createFromHostFunction( rt, @@ -31471,93 +36967,40 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_" - "on_change"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "mediapreviewconfiglistener_on_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_mediapreviewconfiglistener_on_change( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "notificationsettingsdelegate_settings_did_change"] = + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "notificationsettingsdelegate_settings_did_change"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" + "method_roominfolistener_call"), 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_notificationsettingsdelegate_settings_did_change( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_" - "on_update"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "paginationstatuslistener_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_paginationstatuslistener_on_update( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_" - "transmission_progress"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "progresswatcher_transmission_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_progresswatcher_transmission_progress( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_" - "update"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_qrloginprogresslistener_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_qrloginprogresslistener_on_update( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_" + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_" "update"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_recoverystatelistener_on_update"), + "method_sendqueuelistener_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_recoverystatelistener_on_update( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_" - "change"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" + "typingnotificationslistener_call"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roomaccountdatalistener_on_change"), + "method_typingnotificationslistener_call"), 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_roomaccountdatalistener_on_change( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" @@ -31574,18 +37017,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_roominfolistener_call"), - 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_roominfolistener_call( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_" "update"] = jsi::Function::createFromHostFunction( rt, @@ -31640,45 +37071,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_" - "update"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_sendqueuelistener_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_sendqueuelistener_on_update( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_" - "on_error"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "sendqueueroomerrorlistener_on_error"), - 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_sendqueueroomerrorlistener_on_error( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "sendqueueroomupdatelistener_on_update"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "sendqueueroomupdatelistener_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_sendqueueroomupdatelistener_on_update( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" "sessionverificationcontrollerdelegate_did_receive_verification_" "request"] = jsi::Function::createFromHostFunction( @@ -31836,30 +37228,30 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_" - "on_notification"] = jsi::Function::createFromHostFunction( + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_" + "on_update"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "syncnotificationlistener_on_notification"), + "syncservicestateobserver_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_syncnotificationlistener_on_notification( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_" + props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_" "on_update"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "syncservicestateobserver_on_update"), + "paginationstatuslistener_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_syncservicestateobserver_on_update( + ->cpp_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update( rt, thisVal, args, count); }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_" @@ -31874,18 +37266,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "typingnotificationslistener_call"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_matrix_sdk_ffi_checksum_" - "method_typingnotificationslistener_call"), - 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_typingnotificationslistener_call( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_" "utd"] = jsi::Function::createFromHostFunction( rt, @@ -31898,19 +37278,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd( rt, thisVal, args, count); }); - props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_" - "on_update"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_matrix_sdk_ffi_checksum_method_" - "verificationstatelistener_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_verificationstatelistener_on_update( - rt, thisVal, args, count); - }); props["ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_" "acquire_capabilities"] = jsi::Function::createFromHostFunction( rt, @@ -31935,16 +37302,43 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( return this->cpp_ffi_matrix_sdk_ffi_uniffi_contract_version( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_" + "ffi__bless_pointer"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_internal_fn_method_" + "roommessageeventcontentwithoutrelation_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_roommessageeventcontentwithoutrelation_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_" + "pointer"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_internal_fn_method_" + "homeserverlogindetails_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_homeserverlogindetails_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "checkcodesender_ffi__bless_pointer"), + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_internal_fn_method_ssohandler_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_checkcodesender_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( rt, thisVal, args, count); }); props["ubrn_uniffi_internal_fn_method_client_ffi__bless_pointer"] = @@ -31959,6 +37353,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_client_ffi__bless_pointer( rt, thisVal, args, count); }); + props["ubrn_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "mediafilehandle_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_mediafilehandle_ffi__bless_pointer( + rt, thisVal, args, count); + }); props["ubrn_uniffi_internal_fn_method_clientbuilder_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -31984,32 +37390,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_encryption_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_" - "pointer"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_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_grantloginwithqrcodehandler_ffi__bless_pointer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_" - "pointer"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_internal_fn_method_" - "homeserverlogindetails_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_homeserverlogindetails_ffi__bless_pointer( - rt, thisVal, args, count); - }); props["ubrn_uniffi_internal_fn_method_identityresethandle_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32022,55 +37402,80 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_identityresethandle_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_useridentity_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_internal_fn_method_useridentity_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_useridentity_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "inreplytodetails_ffi__bless_pointer"), + "timelineevent_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_inreplytodetails_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_knockrequestactions_ffi__bless_" + props["ubrn_uniffi_internal_fn_method_notificationclient_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "knockrequestactions_ffi__bless_pointer"), + "notificationclient_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_knockrequestactions_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_notificationclient_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_" + props["ubrn_uniffi_internal_fn_method_notificationsettings_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_internal_fn_method_" - "lazytimelineitemprovider_ffi__bless_pointer"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "notificationsettings_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_lazytimelineitemprovider_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "leavespacehandle_ffi__bless_pointer"), + "checkcodesender_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_leavespacehandle_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( rt, thisVal, args, count); }); + props["ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_" + "pointer"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_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_grantloginwithqrcodehandler_ffi__bless_pointer( + rt, thisVal, args, count); + }); props["ubrn_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32084,79 +37489,66 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "mediafilehandle_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_mediafilehandle_ffi__bless_pointer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_internal_fn_method_mediasource_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_internal_fn_method_mediasource_ffi__bless_pointer"), + "ubrn_uniffi_internal_fn_method_qrcodedata_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_mediasource_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_notificationclient_ffi__bless_" + props["ubrn_uniffi_internal_fn_method_knockrequestactions_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "notificationclient_ffi__bless_pointer"), + "knockrequestactions_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_notificationclient_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_notificationsettings_ffi__bless_" + props["ubrn_uniffi_internal_fn_method_room_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_internal_fn_method_room_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_room_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_roommembersiterator_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "notificationsettings_ffi__bless_pointer"), + "roommembersiterator_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_notificationsettings_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "roompowerlevels_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_qrcodedata_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_room_ffi__bless_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_internal_fn_method_room_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_room_ffi__bless_pointer( - rt, thisVal, args, count); - }); props["ubrn_uniffi_internal_fn_method_roomdirectorysearch_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32221,43 +37613,19 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_roomlistservice_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_roommembersiterator_ffi__bless_" + props["ubrn_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "roommembersiterator_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_roommembersiterator_ffi__bless_pointer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_" - "ffi__bless_pointer"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_internal_fn_method_" - "roommessageeventcontentwithoutrelation_ffi__bless_pointer"), + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_internal_fn_method_" + "unreadnotificationscount_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_roommessageeventcontentwithoutrelation_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "roompowerlevels_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_roompowerlevels_ffi__bless_pointer( - rt, thisVal, args, count); - }); props["ubrn_uniffi_internal_fn_method_roompreview_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32271,42 +37639,17 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_roompreview_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_" - "pointer"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_internal_fn_method_" - "sendattachmentjoinhandle_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_sendattachmentjoinhandle_ffi__bless_pointer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_" - "pointer"] = jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "sendgalleryjoinhandle_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_sendgalleryjoinhandle_ffi__bless_pointer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_mediasource_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, jsi::PropNameID::forAscii( rt, - "ubrn_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer"), + "ubrn_uniffi_internal_fn_method_mediasource_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_sendhandle_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( rt, thisVal, args, count); }); props["ubrn_uniffi_internal_fn_method_sessionverificationcontroller_ffi__" @@ -32335,6 +37678,18 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( rt, thisVal, args, count); }); + props["ubrn_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "leavespacehandle_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_leavespacehandle_ffi__bless_pointer( + rt, thisVal, args, count); + }); props["ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32360,17 +37715,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->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, - jsi::PropNameID::forAscii( - rt, "ubrn_uniffi_internal_fn_method_span_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_span_ffi__bless_pointer( - rt, thisVal, args, count); - }); props["ubrn_uniffi_internal_fn_method_sqlitestorebuilder_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32383,19 +37727,6 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_sqlitestorebuilder_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_internal_fn_method_ssohandler_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_ssohandler_ffi__bless_pointer( - rt, thisVal, args, count); - }); props["ubrn_uniffi_internal_fn_method_syncservice_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32434,16 +37765,43 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_taskhandle_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_" + "pointer"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_internal_fn_method_" + "lazytimelineitemprovider_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_lazytimelineitemprovider_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_" + "pointer"] = jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, + "ubrn_uniffi_internal_fn_method_" + "sendattachmentjoinhandle_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_sendattachmentjoinhandle_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "threadsummary_ffi__bless_pointer"), + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_internal_fn_method_sendhandle_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_threadsummary_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( rt, thisVal, args, count); }); props["ubrn_uniffi_internal_fn_method_timeline_ffi__bless_pointer"] = @@ -32458,16 +37816,17 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_timeline_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" - "timelineevent_ffi__bless_pointer"), + jsi::PropNameID::forAscii( + rt, + "ubrn_uniffi_internal_fn_method_timelineitem_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_timelineevent_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( rt, thisVal, args, count); }); props["ubrn_uniffi_internal_fn_method_timelineeventtypefilter_ffi__bless_" @@ -32483,45 +37842,53 @@ NativeMatrixSdkFfi::NativeMatrixSdkFfi( ->cpp_uniffi_internal_fn_method_timelineeventtypefilter_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer"] = - jsi::Function::createFromHostFunction( - rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_internal_fn_method_timelineitem_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_timelineitem_ffi__bless_pointer( - rt, thisVal, args, count); - }); - props["ubrn_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_" + props["ubrn_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_" "pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii(rt, - "ubrn_uniffi_internal_fn_method_" - "unreadnotificationscount_ffi__bless_pointer"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "sendgalleryjoinhandle_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_unreadnotificationscount_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( rt, thisVal, args, count); }); - props["ubrn_uniffi_internal_fn_method_useridentity_ffi__bless_pointer"] = + props["ubrn_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, - jsi::PropNameID::forAscii( - rt, - "ubrn_uniffi_internal_fn_method_useridentity_ffi__bless_pointer"), + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "threadsummary_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_useridentity_ffi__bless_pointer( + ->cpp_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer( + rt, thisVal, args, count); + }); + props["ubrn_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii(rt, "ubrn_uniffi_internal_fn_method_" + "inreplytodetails_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_inreplytodetails_ffi__bless_pointer( rt, thisVal, args, count); }); + props["ubrn_uniffi_internal_fn_method_span_ffi__bless_pointer"] = + jsi::Function::createFromHostFunction( + rt, + jsi::PropNameID::forAscii( + rt, "ubrn_uniffi_internal_fn_method_span_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_span_ffi__bless_pointer( + rt, thisVal, args, count); + }); props["ubrn_uniffi_internal_fn_method_widgetdriver_ffi__bless_pointer"] = jsi::Function::createFromHostFunction( rt, @@ -32588,24 +37955,47 @@ void NativeMatrixSdkFfi::set(jsi::Runtime &rt, const jsi::PropNameID &name, NativeMatrixSdkFfi::~NativeMatrixSdkFfi() { // Cleanup for callback function RustFutureContinuationCallback uniffi::matrix_sdk_ffi::cb::rustfuturecontinuationcallback::cleanup(); + // Cleanup for callback function ForeignFutureDroppedCallback + uniffi::matrix_sdk_ffi::cb::foreignfuturedroppedcallback::cleanup(); // Cleanup for "free" callback function CallbackInterfaceFree - uniffi::matrix_sdk_ffi::st::foreignfuture::foreignfuture::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceaccountdatalistener:: vtablecallbackinterfaceaccountdatalistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener:: - vtablecallbackinterfacebackupstatelistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener:: - vtablecallbackinterfacebackupsteadystatelistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener:: - vtablecallbackinterfacecalldeclinelistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientdelegate:: vtablecallbackinterfaceclientdelegate::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceclientsessiondelegate:: vtablecallbackinterfaceclientsessiondelegate::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener:: + vtablecallbackinterfaceignoreduserslistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacemediapreviewconfiglistener:: + vtablecallbackinterfacemediapreviewconfiglistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher:: + vtablecallbackinterfaceprogresswatcher::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener:: + vtablecallbackinterfaceroomaccountdatalistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacesendqueueroomerrorlistener:: + vtablecallbackinterfacesendqueueroomerrorlistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacesendqueueroomupdatelistener:: + vtablecallbackinterfacesendqueueroomupdatelistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener:: + vtablecallbackinterfacesyncnotificationlistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupstatelistener:: + vtablecallbackinterfacebackupstatelistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacebackupsteadystatelistener:: + vtablecallbackinterfacebackupsteadystatelistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfaceenablerecoveryprogresslistener:: vtablecallbackinterfaceenablerecoveryprogresslistener::free:: cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener:: + vtablecallbackinterfacerecoverystatelistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceverificationstatelistener:: + vtablecallbackinterfaceverificationstatelistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st:: + vtablecallbackinterfacenotificationsettingsdelegate:: + vtablecallbackinterfacenotificationsettingsdelegate::free::cleanup(); uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfacegeneratedqrloginprogresslistener:: vtablecallbackinterfacegeneratedqrloginprogresslistener::free:: @@ -32617,37 +38007,28 @@ NativeMatrixSdkFfi::~NativeMatrixSdkFfi() { uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfacegrantqrloginprogresslistener:: vtablecallbackinterfacegrantqrloginprogresslistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener:: + vtablecallbackinterfaceqrloginprogresslistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacecalldeclinelistener:: + vtablecallbackinterfacecalldeclinelistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfaceidentitystatuschangelistener:: vtablecallbackinterfaceidentitystatuschangelistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceignoreduserslistener:: - vtablecallbackinterfaceignoreduserslistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceknockrequestslistener:: vtablecallbackinterfaceknockrequestslistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacelivelocationsharelistener:: vtablecallbackinterfacelivelocationsharelistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener:: + vtablecallbackinterfaceroominfolistener::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener:: + vtablecallbackinterfacesendqueuelistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacemediapreviewconfiglistener:: - vtablecallbackinterfacemediapreviewconfiglistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacenotificationsettingsdelegate:: - vtablecallbackinterfacenotificationsettingsdelegate::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener:: - vtablecallbackinterfacepaginationstatuslistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceprogresswatcher:: - vtablecallbackinterfaceprogresswatcher::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceqrloginprogresslistener:: - vtablecallbackinterfaceqrloginprogresslistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacerecoverystatelistener:: - vtablecallbackinterfacerecoverystatelistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomaccountdatalistener:: - vtablecallbackinterfaceroomaccountdatalistener::free::cleanup(); + vtablecallbackinterfacetypingnotificationslistener:: + vtablecallbackinterfacetypingnotificationslistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfaceroomdirectorysearchentrieslistener:: vtablecallbackinterfaceroomdirectorysearchentrieslistener::free:: cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroominfolistener:: - vtablecallbackinterfaceroominfolistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceroomlistentrieslistener:: vtablecallbackinterfaceroomlistentrieslistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: @@ -32660,14 +38041,6 @@ NativeMatrixSdkFfi::~NativeMatrixSdkFfi() { vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: vtablecallbackinterfaceroomlistservicesyncindicatorlistener::free:: cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesendqueuelistener:: - vtablecallbackinterfacesendqueuelistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesendqueueroomerrorlistener:: - vtablecallbackinterfacesendqueueroomerrorlistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacesendqueueroomupdatelistener:: - vtablecallbackinterfacesendqueueroomupdatelistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfacesessionverificationcontrollerdelegate:: vtablecallbackinterfacesessionverificationcontrollerdelegate::free:: @@ -32686,204 +38059,238 @@ NativeMatrixSdkFfi::~NativeMatrixSdkFfi() { vtablecallbackinterfacespaceservicejoinedspaceslistener:: vtablecallbackinterfacespaceservicejoinedspaceslistener::free:: cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncnotificationlistener:: - vtablecallbackinterfacesyncnotificationlistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacesyncservicestateobserver:: vtablecallbackinterfacesyncservicestateobserver::free::cleanup(); + uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacepaginationstatuslistener:: + vtablecallbackinterfacepaginationstatuslistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfacetimelinelistener:: vtablecallbackinterfacetimelinelistener::free::cleanup(); - uniffi::matrix_sdk_ffi::st:: - vtablecallbackinterfacetypingnotificationslistener:: - vtablecallbackinterfacetypingnotificationslistener::free::cleanup(); uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceunabletodecryptdelegate:: vtablecallbackinterfaceunabletodecryptdelegate::free::cleanup(); - uniffi::matrix_sdk_ffi::st::vtablecallbackinterfaceverificationstatelistener:: - vtablecallbackinterfaceverificationstatelistener::free::cleanup(); uniffi::matrix_sdk_ffi::st:: vtablecallbackinterfacewidgetcapabilitiesprovider:: vtablecallbackinterfacewidgetcapabilitiesprovider::free::cleanup(); - // Cleanup for callback function CallbackInterfaceAccountDataListenerMethod0 + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceaccountdatalistener::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfaceaccountdatalistenermethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceBackupStateListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceBackupSteadyStateListenerMethod0 - uniffi::matrix_sdk_ffi::cb:: - callbackinterfacebackupsteadystatelistenermethod0::cleanup(); - // Cleanup for callback function CallbackInterfaceCallDeclineListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceClientDelegateMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0::cleanup(); - // Cleanup for callback function CallbackInterfaceClientSessionDelegateMethod0 + vtablecallbackinterfaceaccountdatalistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceclientdelegate::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientdelegatemethod0:: + vtablecallbackinterfaceclientdelegate::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceclientsessiondelegate::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceClientSessionDelegateMethod1 + vtablecallbackinterfaceclientsessiondelegate::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfaceclientsessiondelegatemethod1:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceEnableRecoveryProgressListenerMethod0 + vtablecallbackinterfaceclientsessiondelegate::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceignoreduserslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0:: + vtablecallbackinterfaceignoreduserslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacemediapreviewconfiglistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceenablerecoveryprogresslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceGeneratedQrLoginProgressListenerMethod0 + callbackinterfacemediapreviewconfiglistenermethod0:: + vtablecallbackinterfacemediapreviewconfiglistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceprogresswatcher::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0:: + vtablecallbackinterfaceprogresswatcher::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomaccountdatalistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0:: + vtablecallbackinterfaceroomaccountdatalistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueueroomerrorlistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacegeneratedqrloginprogresslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0 + callbackinterfacesendqueueroomerrorlistenermethod0:: + vtablecallbackinterfacesendqueueroomerrorlistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueueroomupdatelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacegrantgeneratedqrloginprogresslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceGrantQrLoginProgressListenerMethod0 + callbackinterfacesendqueueroomupdatelistenermethod0:: + vtablecallbackinterfacesendqueueroomupdatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesyncnotificationlistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0:: + vtablecallbackinterfacesyncnotificationlistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacebackupstatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfacebackupstatelistenermethod0:: + vtablecallbackinterfacebackupstatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacebackupsteadystatelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacegrantqrloginprogresslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceIdentityStatusChangeListenerMethod0 + callbackinterfacebackupsteadystatelistenermethod0:: + vtablecallbackinterfacebackupsteadystatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceenablerecoveryprogresslistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceidentitystatuschangelistenermethod0::cleanup(); - // Cleanup for callback function CallbackInterfaceIgnoredUsersListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfaceignoreduserslistenermethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceKnockRequestsListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceLiveLocationShareListenerMethod0 + callbackinterfaceenablerecoveryprogresslistenermethod0:: + vtablecallbackinterfaceenablerecoveryprogresslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacerecoverystatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0:: + vtablecallbackinterfacerecoverystatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceverificationstatelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacelivelocationsharelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceMediaPreviewConfigListenerMethod0 + callbackinterfaceverificationstatelistenermethod0:: + vtablecallbackinterfaceverificationstatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacenotificationsettingsdelegate::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacemediapreviewconfiglistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceNotificationSettingsDelegateMethod0 + callbackinterfacenotificationsettingsdelegatemethod0:: + vtablecallbackinterfacenotificationsettingsdelegate::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegeneratedqrloginprogresslistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacenotificationsettingsdelegatemethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfacePaginationStatusListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceProgressWatcherMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfaceprogresswatchermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceQrLoginProgressListenerMethod0 + callbackinterfacegeneratedqrloginprogresslistenermethod0:: + vtablecallbackinterfacegeneratedqrloginprogresslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb:: + callbackinterfacegrantgeneratedqrloginprogresslistenermethod0:: + vtablecallbackinterfacegrantgeneratedqrloginprogresslistener:: + cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacegrantqrloginprogresslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb:: + callbackinterfacegrantqrloginprogresslistenermethod0:: + vtablecallbackinterfacegrantqrloginprogresslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceqrloginprogresslistener::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfaceqrloginprogresslistenermethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceRecoveryStateListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfacerecoverystatelistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceRoomAccountDataListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomaccountdatalistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 + vtablecallbackinterfaceqrloginprogresslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacecalldeclinelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfacecalldeclinelistenermethod0:: + vtablecallbackinterfacecalldeclinelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceidentitystatuschangelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomdirectorysearchentrieslistenermethod0::cleanup(); - // Cleanup for callback function CallbackInterfaceRoomInfoListenerMethod0 + callbackinterfaceidentitystatuschangelistenermethod0:: + vtablecallbackinterfaceidentitystatuschangelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceknockrequestslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceknockrequestslistenermethod0:: + vtablecallbackinterfaceknockrequestslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacelivelocationsharelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb:: + callbackinterfacelivelocationsharelistenermethod0:: + vtablecallbackinterfacelivelocationsharelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroominfolistener::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfaceroominfolistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceRoomListEntriesListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceRoomListLoadingStateListenerMethod0 + vtablecallbackinterfaceroominfolistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesendqueuelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0:: + vtablecallbackinterfacesendqueuelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacetypingnotificationslistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistloadingstatelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceRoomListServiceStateListenerMethod0 + callbackinterfacetypingnotificationslistenermethod0:: + vtablecallbackinterfacetypingnotificationslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistservicestatelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 + callbackinterfaceroomdirectorysearchentrieslistenermethod0:: + vtablecallbackinterfaceroomdirectorysearchentrieslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistentrieslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceroomlistentrieslistenermethod0:: + vtablecallbackinterfaceroomlistentrieslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistloadingstatelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceroomlistservicesyncindicatorlistenermethod0::cleanup(); - // Cleanup for callback function CallbackInterfaceSendQueueListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfacesendqueuelistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceSendQueueRoomErrorListenerMethod0 + callbackinterfaceroomlistloadingstatelistenermethod0:: + vtablecallbackinterfaceroomlistloadingstatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistservicestatelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesendqueueroomerrorlistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSendQueueRoomUpdateListenerMethod0 + callbackinterfaceroomlistservicestatelistenermethod0:: + vtablecallbackinterfaceroomlistservicestatelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesendqueueroomupdatelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod0 + callbackinterfaceroomlistservicesyncindicatorlistenermethod0:: + vtablecallbackinterfaceroomlistservicesyncindicatorlistener:: + cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesessionverificationcontrollerdelegate::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod1 + callbackinterfacesessionverificationcontrollerdelegatemethod0:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod1::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod2 + callbackinterfacesessionverificationcontrollerdelegatemethod1:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod2::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod3 + callbackinterfacesessionverificationcontrollerdelegatemethod2:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod3::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod4 + callbackinterfacesessionverificationcontrollerdelegatemethod3:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod4::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod5 + callbackinterfacesessionverificationcontrollerdelegatemethod4:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod5::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSessionVerificationControllerDelegateMethod6 + callbackinterfacesessionverificationcontrollerdelegatemethod5:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacesessionverificationcontrollerdelegatemethod6::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSpaceRoomListEntriesListenerMethod0 + callbackinterfacesessionverificationcontrollerdelegatemethod6:: + vtablecallbackinterfacesessionverificationcontrollerdelegate:: + cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistentrieslistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacespaceroomlistentrieslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 + callbackinterfacespaceroomlistentrieslistenermethod0:: + vtablecallbackinterfacespaceroomlistentrieslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacespaceroomlistpaginationstatelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSpaceRoomListSpaceListenerMethod0 + callbackinterfacespaceroomlistpaginationstatelistenermethod0:: + vtablecallbackinterfacespaceroomlistpaginationstatelistener:: + cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceroomlistspacelistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacespaceroomlistspacelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 + callbackinterfacespaceroomlistspacelistenermethod0:: + vtablecallbackinterfacespaceroomlistspacelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacespaceservicejoinedspaceslistener::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacespaceservicejoinedspaceslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceSyncNotificationListenerMethod0 - uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncnotificationlistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceSyncServiceStateObserverMethod0 + callbackinterfacespaceservicejoinedspaceslistenermethod0:: + vtablecallbackinterfacespaceservicejoinedspaceslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacesyncservicestateobserver::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfacesyncservicestateobservermethod0:: - cleanup(); - // Cleanup for callback function CallbackInterfaceTimelineListenerMethod0 + vtablecallbackinterfacesyncservicestateobserver::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacepaginationstatuslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfacepaginationstatuslistenermethod0:: + vtablecallbackinterfacepaginationstatuslistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacetimelinelistener::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfacetimelinelistenermethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceTypingNotificationsListenerMethod0 - uniffi::matrix_sdk_ffi::cb:: - callbackinterfacetypingnotificationslistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceUnableToDecryptDelegateMethod0 + vtablecallbackinterfacetimelinelistener::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfaceunabletodecryptdelegate::cleanup(); uniffi::matrix_sdk_ffi::cb::callbackinterfaceunabletodecryptdelegatemethod0:: - cleanup(); - // Cleanup for callback function - // CallbackInterfaceVerificationStateListenerMethod0 - uniffi::matrix_sdk_ffi::cb:: - callbackinterfaceverificationstatelistenermethod0::cleanup(); - // Cleanup for callback function - // CallbackInterfaceWidgetCapabilitiesProviderMethod0 + vtablecallbackinterfaceunabletodecryptdelegate::cleanup(); + uniffi::matrix_sdk_ffi::cb::callbackinterfaceclone:: + vtablecallbackinterfacewidgetcapabilitiesprovider::cleanup(); uniffi::matrix_sdk_ffi::cb:: - callbackinterfacewidgetcapabilitiesprovidermethod0::cleanup(); + callbackinterfacewidgetcapabilitiesprovidermethod0:: + vtablecallbackinterfacewidgetcapabilitiesprovider::cleanup(); } // Utility functions for serialization/deserialization of strings. @@ -32908,47 +38315,45 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string( return uniffi_jsi::Bridging::arraybuffer_to_string(rt, args[0]); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_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_checkcodesender(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( + p, &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_client_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_internal_fn_method_homeserverlogindetails_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_client(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(p, &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_clientbuilder_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_ssohandler_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_clientbuilder(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_ssohandler(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -32956,15 +38361,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_encryption_ffi__bless_pointer( +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_client_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_encryption(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_client(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -32972,15 +38376,14 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_encryption_ffi__bless_pointer( return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_mediafilehandle_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_grantloginwithqrcodehandler(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -32988,15 +38391,29 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_clientbuilder_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_homeserverlogindetails(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_clientbuilder(p, &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_encryption_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) { + RustCallStatus status = {0}; + uniffi_matrix_sdk_ffi_fn_free_encryption(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33010,9 +38427,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_identityresethandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_identityresethandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33020,15 +38436,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_useridentity_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_inreplytodetails(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_useridentity(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33036,15 +38451,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_timelineevent_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_knockrequestactions(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_timelineevent(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33052,15 +38466,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_notificationclient_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_lazytimelineitemprovider(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_notificationclient(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33068,15 +38481,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_notificationsettings_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_leavespacehandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_notificationsettings(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33084,15 +38496,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_checkcodesender_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_loginwithqrcodehandler(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_checkcodesender(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33100,15 +38511,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_grantloginwithqrcodehandler_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_mediafilehandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33116,31 +38526,29 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_loginwithqrcodehandler_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_mediasource(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(p, &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_notificationclient_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_qrcodedata_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_notificationclient(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_qrcodedata(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33148,15 +38556,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_knockrequestactions_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_notificationsettings(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33164,31 +38571,44 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_room_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_qrcodedata(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_room(p, &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_room_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_internal_fn_method_roommembersiterator_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) { + RustCallStatus status = {0}; + uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(p, &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_roompowerlevels_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_room(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33202,9 +38622,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_roomdirectorysearch(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33218,9 +38637,8 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_roomlist_ffi__bless_pointer( 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_roomlist(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_roomlist(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33234,10 +38652,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_roomlistdynamicentriescontroller(pointer, - &status); + uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33251,10 +38667,9 @@ jsi::Value NativeMatrixSdkFfi:: 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_roomlistentrieswithdynamicadaptersresult( - pointer, &status); + p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33268,9 +38683,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_roomlistservice(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_roomlistservice(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33278,15 +38692,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_unreadnotificationscount_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_roommembersiterator(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33294,16 +38707,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_roompreview_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_roommessageeventcontentwithoutrelation( - pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_roompreview(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33311,15 +38722,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_mediasource_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_roompowerlevels(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_mediasource(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33327,15 +38737,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_roompreview_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_sessionverificationcontroller_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_roompreview(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33343,15 +38752,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_sessionverificationemoji_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_sendattachmentjoinhandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33359,31 +38767,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_leavespacehandle_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_sendgalleryjoinhandle(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_sendhandle_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_sendhandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33391,16 +38782,14 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_sessionverificationcontroller_ffi__bless_pointer( + 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_sessionverificationcontroller(pointer, - &status); + uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33408,15 +38797,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( + 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_sessionverificationemoji(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_spaceservice(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33424,15 +38812,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_sqlitestorebuilder_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); + uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33440,31 +38827,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_syncservice_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, - 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_span(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_syncservice(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33472,15 +38842,14 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_span_ffi__bless_pointer( return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_sqlitestorebuilder_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_syncservicebuilder_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_sqlitestorebuilder(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33488,15 +38857,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_taskhandle_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_ssohandler(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_taskhandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33504,15 +38872,14 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_syncservice_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_lazytimelineitemprovider_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_syncservice(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33520,15 +38887,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_syncservicebuilder_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_sendattachmentjoinhandle_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_syncservicebuilder(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33536,47 +38902,44 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_taskhandle_ffi__bless_pointer( +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_sendhandle_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_taskhandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_sendhandle(p, &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_threadsummary_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_timeline_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_threadsummary(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_timeline(p, &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_timeline_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_internal_fn_method_timelineitem_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_timeline(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_timelineitem(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33584,15 +38947,14 @@ NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_timeline_ffi__bless_pointer( return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_timelineeventtypefilter_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_timelineevent(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33600,15 +38962,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_timelineeventtypefilter_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_sendgalleryjoinhandle_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_timelineeventtypefilter(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33616,15 +38977,14 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_threadsummary_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_timelineitem(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_threadsummary(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33632,31 +38992,29 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value(rt, obj); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_inreplytodetails_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_unreadnotificationscount(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(p, &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_useridentity_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_internal_fn_method_span_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_useridentity(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_span(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33670,9 +39028,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_widgetdriver(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_widgetdriver(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33686,9 +39043,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_widgetdriverhandle(pointer, &status); + uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(p, &status); }; auto ptrObj = std::make_shared(pointer, destructor); @@ -33697,54 +39053,258 @@ jsi::Value NativeMatrixSdkFfi:: } // Methods calling directly into the uniffi generated C API of the Rust crate. +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( + 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_roommessageeventcontentwithoutrelation( + 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_roommessageeventcontentwithoutrelation( + 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_roommessageeventcontentwithoutrelation( + 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_roommessageeventcontentwithoutrelation_with_mentions( + 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_roommessageeventcontentwithoutrelation_with_mentions( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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_checkcodesender( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( 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_checkcodesender( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_checkcodesender( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( 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_checkcodesender( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( + 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_homeserverlogindetails_sliding_sync_version( + 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_sliding_sync_version( + 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_homeserverlogindetails_supported_oidc_prompts( + 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_supported_oidc_prompts( + 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_homeserverlogindetails_supports_oidc_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_oidc_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_supports_password_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_password_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_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, + size_t count) { + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( + 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_ssohandler( + 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_ssohandler( + 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_ssohandler( + 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_ssohandler( + 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_checkcodesender_send( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + auto value = uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( + 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_ssohandler_url( + 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_ssohandler_url( + 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_client( 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_client( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_client( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -33752,7 +39312,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_client( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_client( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -33763,8 +39325,10 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -33774,7 +39338,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_account_data( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_account_data( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -33786,19 +39351,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_account_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_account_url( - 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_client_add_recent_emoji( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -33811,7 +39365,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -33821,7 +39376,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_avatar_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_avatar_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -33831,7 +39387,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -33843,7 +39400,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -33855,7 +39413,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -33866,7 +39426,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_clear_caches( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_clear_caches( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -33878,7 +39439,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_create_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_create_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -33890,7 +39452,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -33906,7 +39469,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); @@ -33919,7 +39483,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -33933,7 +39498,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_device_id( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_device_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -33945,7 +39512,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_display_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_display_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -33955,7 +39523,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -33968,7 +39537,8 @@ jsi::Value NativeMatrixSdkFfi:: 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[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -33982,11 +39552,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_encryption( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_encryption( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config( @@ -33994,7 +39567,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34006,7 +39580,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -34022,7 +39597,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34032,7 +39608,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34042,8 +39619,10 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_media_content( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34053,8 +39632,10 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_media_file( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_media_file( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + 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::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, @@ -34072,7 +39653,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34082,8 +39664,10 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[1]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3])); @@ -34095,7 +39679,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34105,30 +39690,22 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_profile( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_profile( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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_client_get_recent_emojis( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( - 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_get_recently_visited_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34140,7 +39717,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_room( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -34156,7 +39734,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34169,7 +39748,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34184,7 +39764,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34194,7 +39775,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34204,7 +39786,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34218,7 +39801,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_homeserver( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_homeserver( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34230,7 +39815,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34240,7 +39826,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_ignore_user( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_ignore_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34252,7 +39839,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_ignored_users( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_ignored_users( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34262,7 +39850,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34273,7 +39862,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34283,7 +39873,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34295,7 +39886,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34307,7 +39899,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34320,7 +39913,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_knock( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_knock( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34335,7 +39929,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_login( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34353,7 +39948,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_login_with_email( 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_email( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34371,7 +39967,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_oidc_callback( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34383,7 +39980,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_logout( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_logout( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34396,12 +39994,14 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( @@ -34411,21 +40011,24 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_notification_client( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_notification_client( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34440,7 +40043,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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]), @@ -34448,7 +40052,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( @@ -34458,7 +40063,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34468,14 +40074,16 @@ 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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34486,7 +40094,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -34497,7 +40106,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34507,7 +40117,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34517,7 +40128,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34527,7 +40139,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34539,7 +40152,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_restore_session( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_restore_session( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34551,7 +40165,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34565,7 +40180,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34579,11 +40195,14 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -34591,7 +40210,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_rooms( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_rooms( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34603,7 +40224,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_search_users( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_search_users( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); @@ -34618,7 +40240,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_server( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_server( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34630,7 +40254,8 @@ jsi::Value NativeMatrixSdkFfi:: 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -34642,7 +40267,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_session( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_session( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34654,7 +40281,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_set_account_data( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_account_data( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34670,7 +40298,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_set_delegate( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_delegate( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -34685,7 +40314,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_set_display_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_display_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34698,7 +40328,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34711,7 +40342,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34724,7 +40356,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34736,7 +40369,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_set_pusher( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_pusher( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34758,7 +40392,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -34771,7 +40406,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -34785,18 +40422,22 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_space_service( 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_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); + 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) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34813,13 +40454,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config( @@ -34827,7 +40470,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -34838,7 +40482,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); @@ -34854,13 +40499,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates( @@ -34868,7 +40515,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -34881,11 +40529,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_sync_service( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_client_sync_service( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( @@ -34893,7 +40544,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34905,7 +40557,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_unignore_user( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_unignore_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -34917,7 +40570,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34931,7 +40585,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_upload_media( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_upload_media( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34947,7 +40602,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -34964,1177 +40620,838 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_user_id( - 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_user_id( - 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_client_user_id_server_name( - 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_user_id_server_name( - 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_clientbuilder( - 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_clientbuilder( - 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_clientbuilder( - 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_clientbuilder( - 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_constructor_clientbuilder_new( - 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_constructor_clientbuilder_new(&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_clientbuilder_add_root_certificates( - 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_clientbuilder_add_root_certificates( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_auto_enable_backups( - 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_clientbuilder_auto_enable_backups( - 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_clientbuilder_auto_enable_cross_signing( - 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_clientbuilder_auto_enable_cross_signing( - 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_clientbuilder_backup_download_strategy( - 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_clientbuilder_backup_download_strategy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_build( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( - 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_clientbuilder_cross_process_store_locks_holder_name( - 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_clientbuilder_cross_process_store_locks_holder_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_decryption_settings( - 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_clientbuilder_decryption_settings( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_disable_automatic_token_refresh( - 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_clientbuilder_disable_automatic_token_refresh( - 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_clientbuilder_disable_built_in_root_certificates( - 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_clientbuilder_disable_built_in_root_certificates( - 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_clientbuilder_disable_ssl_verification( - 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_clientbuilder_disable_ssl_verification( - 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_clientbuilder_enable_oidc_refresh_lock( - 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_clientbuilder_enable_oidc_refresh_lock( - 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_clientbuilder_enable_share_history_on_invite( - 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_clientbuilder_enable_share_history_on_invite( - 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_clientbuilder_homeserver_url( - 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_clientbuilder_homeserver_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_in_memory_store( - 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_clientbuilder_in_memory_store( - 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_clientbuilder_proxy( - 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_clientbuilder_proxy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_request_config( - 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_clientbuilder_request_config( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_room_key_recipient_strategy( - 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_clientbuilder_room_key_recipient_strategy( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_server_name( - 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_clientbuilder_server_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_server_name_or_homeserver_url( - 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_clientbuilder_server_name_or_homeserver_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::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_clientbuilder_session_paths( - 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_clientbuilder_session_paths( - 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]), - &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_clientbuilder_set_session_delegate( - 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_clientbuilder_set_session_delegate( - 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_clientbuilder_sliding_sync_version_builder( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { + 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_clientbuilder_sliding_sync_version_builder( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_client_user_id( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( + cpp_uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( 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_clientbuilder_sqlite_store( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( + 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_clientbuilder_system_is_memory_constrained( + cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( + 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_clone_mediafilehandle( + 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_clientbuilder_system_is_memory_constrained( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( + 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_clientbuilder_threads_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), &status); + uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( + 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); + return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + 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_clientbuilder_user_agent( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + auto value = uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( 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_clientbuilder_username( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + auto value = uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_encryption( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_clientbuilder( 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_encryption( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_clientbuilder( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_encryption( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_clientbuilder( 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_encryption( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_clientbuilder( + 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_encryption_backup_exists_on_server( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( - 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_encryption_backup_state( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new( 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_encryption_backup_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new(&status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( 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_encryption_backup_state_listener( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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_encryption_curve25519_key( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( - 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_encryption_disable_recovery( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery( - 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_encryption_ed25519_key( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( - 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_encryption_enable_backups( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( - 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_encryption_enable_recovery( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( - 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])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( + 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_encryption_has_devices_to_verify_against( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( 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_encryption_has_devices_to_verify_against( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( + 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_encryption_is_last_device( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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_encryption_recover( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_recover( - 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_encryption_recover_and_reset( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1])); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( + 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_encryption_recovery_state( + 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) { RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( 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_encryption_recovery_state_listener( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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_encryption_reset_identity( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( - 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_encryption_reset_recovery_key( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( - 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_encryption_user_identity( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( - 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])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh( + 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_encryption_verification_state( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates( 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_encryption_verification_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( 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_encryption_verification_state_listener( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( + 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_encryption_wait_for_backup_upload_steady_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( - 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_encryption_wait_for_e2ee_initialization_tasks( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( 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_encryption_wait_for_e2ee_initialization_tasks( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( + 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_clone_grantloginwithqrcodehandler( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite( 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_grantloginwithqrcodehandler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( 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_grantloginwithqrcodehandler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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_grantloginwithqrcodehandler_generate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( - 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_method_grantloginwithqrcodehandler_scan( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( + 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_clone_homeserverlogindetails( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( 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_homeserverlogindetails( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( + 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_homeserverlogindetails( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( 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_sliding_sync_version( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( 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_supported_oidc_prompts( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url( 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_oidc_login( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( 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_password_login( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( + 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]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( 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]), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( 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_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( + 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_identityresethandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_identityresethandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( + 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_identityresethandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( + 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(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( 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_identityresethandle_auth_type( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), &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_identityresethandle_cancel( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( - 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_identityresethandle_reset( + cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1])); + 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_inreplytodetails( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( 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_inreplytodetails( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_encryption( 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_inreplytodetails( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_encryption( + 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(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_encryption( 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_inreplytodetails_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_encryption( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( + 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_encryption_backup_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_inreplytodetails_event_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_backup_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_clone_knockrequestactions( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( + 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_knockrequestactions( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( + 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_encryption_disable_recovery( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery( + 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_free_knockrequestactions( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( 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_knockrequestactions( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( + 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_knockrequestactions_decline( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( + 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[1])); + 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_knockrequestactions_decline_and_ban( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1])); + uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against( + 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_knockrequestactions_mark_as_seen( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( + 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_clone_lazytimelineitemprovider( - 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_lazytimelineitemprovider( - 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_lazytimelineitemprovider( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_recover( 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_lazytimelineitemprovider( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_recover( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1])); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_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_lazytimelineitemprovider_contains_only_emojis( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_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_lazytimelineitemprovider_debug_info( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36142,173 +41459,260 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( 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_lazytimelineitemprovider_get_send_handle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( + 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::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, - value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( + 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_encryption_reset_recovery_key( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( + 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_encryption_user_identity( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( + 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_encryption_verification_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_lazytimelineitemprovider_get_shields( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_encryption_verification_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_clone_leavespacehandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( + 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_leavespacehandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( - 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_leavespacehandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1])); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1])); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( + 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_leavespacehandle_rooms( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( 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_leavespacehandle_rooms( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_identityresethandle( 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_loginwithqrcodehandler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_identityresethandle( + 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); + return jsi::Value::undefined(); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( + 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_loginwithqrcodehandler( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( + 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(); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( + cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + auto value = uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( + 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_loginwithqrcodehandler_scan( + cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2])); + auto value = uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( + 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_clone_mediafilehandle( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_useridentity( 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_mediafilehandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_useridentity( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_useridentity( 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_mediafilehandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_useridentity( + 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_useridentity_has_verification_violation( + 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_useridentity_has_verification_violation( + 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_useridentity_is_verified( + 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_useridentity_is_verified( + 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_mediafilehandle_path( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( 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_mediafilehandle_path( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36316,83 +41720,132 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( + 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_useridentity_was_previously_verified( + 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_mediafilehandle_persist( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( + 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_clone_mediasource( +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( + 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_clone_timelineevent( 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_mediasource( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_timelineevent( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_mediasource( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelineevent( 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_mediasource( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_timelineevent( + 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_constructor_mediasource_from_json( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + 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_constructor_mediasource_from_json( - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[0]), + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( + cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( 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_constructor_mediasource_from_url( - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[0]), + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( 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_mediasource_to_json( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( + 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_timelineevent_thread_root_event_id( + 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_timelineevent_thread_root_event_id( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36400,18 +41853,19 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( 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_mediasource_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_notificationclient( @@ -36420,11 +41874,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_notificationclient( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_notificationclient( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_notificationclient( @@ -36433,7 +41890,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_notificationclient( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_notificationclient( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36445,7 +41904,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -36460,7 +41920,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -36474,7 +41935,8 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -36491,11 +41953,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_notificationsettings( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_notificationsettings( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_notificationsettings( @@ -36504,7 +41969,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_notificationsettings( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_notificationsettings( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36516,7 +41983,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36527,7 +41995,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36538,7 +42007,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36549,7 +42019,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2])); @@ -36562,7 +42033,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36573,7 +42045,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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]), @@ -36588,7 +42061,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -36601,7 +42075,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -36614,7 +42089,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36625,7 +42101,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36636,7 +42113,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36647,7 +42125,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36658,7 +42137,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -36671,7 +42151,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -36683,7 +42164,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -36702,7 +42184,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, @@ -36718,7 +42201,8 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -36733,7 +42217,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -36745,7 +42230,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -36757,7 +42243,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -36772,7 +42259,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -36783,7 +42271,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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]), @@ -36792,17 +42281,178 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender( + 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_checkcodesender( + 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_checkcodesender( + 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_checkcodesender( + 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_checkcodesender_send( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( + 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_grantloginwithqrcodehandler( + 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_grantloginwithqrcodehandler( + 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_grantloginwithqrcodehandler( + 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_grantloginwithqrcodehandler( + 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_grantloginwithqrcodehandler_generate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( + 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_method_grantloginwithqrcodehandler_scan( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::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_clone_loginwithqrcodehandler( + 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_loginwithqrcodehandler( + 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_loginwithqrcodehandler( + 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_loginwithqrcodehandler( + 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_loginwithqrcodehandler_generate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( + 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_method_loginwithqrcodehandler_scan( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::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_clone_qrcodedata( 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_qrcodedata( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -36810,7 +42460,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_qrcodedata( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36829,7 +42481,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( @@ -36838,24 +42491,109 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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_knockrequestactions( + 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_knockrequestactions( + 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_knockrequestactions( + 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_knockrequestactions( + 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_knockrequestactions_accept( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( + 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_knockrequestactions_decline( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( + 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_knockrequestactions_decline_and_ban( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( + 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_knockrequestactions_mark_as_seen( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( + 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_clone_room( 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_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -36863,7 +42601,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_room( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36876,7 +42616,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36890,7 +42632,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36905,7 +42648,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36917,7 +42662,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -36931,7 +42677,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36943,7 +42691,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_ban_user( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_ban_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -36959,7 +42708,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -36971,7 +42722,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -36983,7 +42735,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -36993,7 +42746,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_decline_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_decline_call( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37005,7 +42759,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37017,7 +42772,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_display_name( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_display_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37028,10 +42785,12 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_edit( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_edit( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[2])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37041,7 +42800,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37053,7 +42813,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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]); @@ -37067,7 +42828,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37079,7 +42842,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37090,7 +42854,8 @@ 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) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_forget( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37100,7 +42865,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37110,7 +42876,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37122,7 +42889,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37134,7 +42903,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_heroes( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_heroes( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37147,7 +42918,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_id( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37160,10 +42933,12 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[2])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37173,7 +42948,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_ignore_user( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_ignore_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37185,7 +42961,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37199,7 +42976,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37209,7 +42988,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_inviter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_inviter( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37219,7 +42999,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_is_direct( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_is_direct( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37229,7 +43010,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37241,7 +43023,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_is_public( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_is_public( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37255,7 +43039,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37268,7 +43054,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_is_space( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_is_space( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37278,7 +43066,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_join( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_join( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37290,7 +43079,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37301,7 +43092,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_kick_user( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_kick_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -37315,7 +43107,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37325,7 +43118,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_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_latest_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37334,7 +43128,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_leave( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_leave( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37344,7 +43139,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37356,7 +43152,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37369,7 +43166,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37381,7 +43179,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37393,7 +43192,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37405,7 +43205,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37414,7 +43215,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_member( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_member( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37426,7 +43228,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37438,7 +43241,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_member_display_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37450,7 +43254,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37461,7 +43266,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_members( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_members( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37471,7 +43277,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37483,7 +43290,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_membership( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_membership( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37495,7 +43304,8 @@ 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37507,7 +43317,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37521,7 +43333,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37533,7 +43347,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_preview_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_preview_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37546,7 +43361,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37560,7 +43376,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_raw_name( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_raw_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37571,7 +43389,8 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_redact( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_redact( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -37585,7 +43404,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37596,7 +43416,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37608,7 +43429,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_report_content( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_report_content( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -37624,7 +43446,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_report_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_report_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37636,7 +43459,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37646,7 +43470,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37656,7 +43481,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_room_info( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_room_info( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37666,7 +43492,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -37680,7 +43507,8 @@ NativeMatrixSdkFfi::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) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37692,7 +43520,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_send_raw( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_send_raw( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -37706,7 +43535,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); @@ -37719,7 +43549,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); @@ -37732,7 +43563,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_set_name( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37744,7 +43576,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_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])); @@ -37757,7 +43590,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_topic( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_set_topic( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37769,7 +43603,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -37780,7 +43615,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -37791,7 +43627,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37804,7 +43641,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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]), @@ -37812,7 +43650,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes( @@ -37820,7 +43659,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -37831,7 +43671,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -37845,13 +43686,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( @@ -37861,13 +43704,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates( @@ -37875,7 +43720,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -37889,13 +43735,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_successor_room( @@ -37904,7 +43752,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_successor_room( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_successor_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37916,7 +43766,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37928,7 +43779,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_timeline( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_timeline( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -37938,7 +43790,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -37951,7 +43804,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_topic( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_room_topic( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -37963,7 +43818,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -37974,7 +43830,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_unban_user( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_unban_user( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -37988,7 +43845,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -38002,7 +43860,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -38014,7 +43873,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -38027,7 +43887,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -38039,7 +43900,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -38051,7 +43913,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -38068,249 +43931,354 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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])); + 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_clone_roomdirectorysearch( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( 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_roomdirectorysearch( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( 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_roomdirectorysearch( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( + 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_roommembersiterator_len( + 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_roommembersiterator_len( + 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_roomdirectorysearch_is_at_last_page( + cpp_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( + 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::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( + 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_roompowerlevels( + 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_roompowerlevels( + 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_roompowerlevels( + 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_roomdirectorysearch_loaded_pages( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( - 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]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[3])); + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlist( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( + 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_roomlist( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roomlist( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + 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_roomlist( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + 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(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( 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_roomlist_entries_with_dynamic_adapters( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_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_roomlist_entries_with_dynamic_adapters_with( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3]), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( + 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_roomlist_loading_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), - &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_room( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( + 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_roomlist_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + auto value = uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( 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_roomlistdynamicentriescontroller( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( 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_roomlistdynamicentriescontroller( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( 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_roomlistdynamicentriescontroller_add_one_page( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( 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_roomlistdynamicentriescontroller_reset_to_one_page( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( 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_roomlistdynamicentriescontroller_set_filter( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -38320,353 +44288,365 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( 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_roomlistentrieswithdynamicadaptersresult( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( + 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]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( 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_roomlistentrieswithdynamicadaptersresult( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( + 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]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( 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_roomlistentrieswithdynamicadaptersresult_controller( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( 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_roomlistentrieswithdynamicadaptersresult_entries_stream( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( 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_roomlistservice( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( 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_roomlistservice( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( + 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_roomlistservice_all_rooms( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( - 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_roomlistservice_room( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( 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_roomlistservice_room( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( + 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); + return jsi::Value::undefined(); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_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_roomlistservice_state( - 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]); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1])); + auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( + 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_roomlistservice_sync_indicator( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + 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_roomdirectorysearch_results( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( + 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_method_roomdirectorysearch_search( 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_roomlistservice_sync_indicator( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + auto value = uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + 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]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3]), - &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_roommembersiterator( - 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_roommembersiterator( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[3])); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlist( 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_roommembersiterator( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_roomlist( + 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(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roomlist( 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_roommembersiterator_len( - 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_roommembersiterator_next_chunk( - 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_roommembersiterator_next_chunk( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_matrix_sdk_ffi_fn_free_roomlist( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( 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_roommessageeventcontentwithoutrelation( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + 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]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( - 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_roommessageeventcontentwithoutrelation( - 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(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( 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_roommessageeventcontentwithoutrelation_with_mentions( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_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_clone_roompowerlevels( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_room( 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_roompowerlevels( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roomlist_room( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( + cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( 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_roompowerlevels_can_own_user_ban( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( + cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( 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_roompowerlevels_can_own_user_invite( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( 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_roompowerlevels_can_own_user_kick( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( 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_roompowerlevels_can_own_user_pin_unpin( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( 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_roompowerlevels_can_own_user_redact_other( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -38674,217 +44654,222 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( 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_roompowerlevels_can_own_user_redact_own( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( + cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( 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_roompowerlevels_can_own_user_send_message( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); + uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( 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_roompowerlevels_can_own_user_send_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( 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_roompowerlevels_can_own_user_trigger_room_notification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( + 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_roompowerlevels_can_user_ban( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + auto value = uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( + 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_roompowerlevels_can_user_invite( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + uniffi_matrix_sdk_ffi_fn_free_roomlistservice( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( + 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_roomlistservice_room( + 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_roompowerlevels_can_user_kick( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + auto value = uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_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_roompowerlevels_can_user_pin_unpin( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_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_roompowerlevels_can_user_redact_other( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); - uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( - rt, callInvoker, status, args[count - 1]); + args[1])); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( 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_roompowerlevels_can_user_redact_own( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[3]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + 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_roompowerlevels_can_user_send_message( - 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]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( + 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_roompowerlevels_can_user_send_state( - 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]), - &status); + uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( + 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); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( + cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( 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_roompowerlevels_can_user_trigger_room_notification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), + uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -38892,34 +44877,36 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( + cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( 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_roompowerlevels_user_power_levels( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + 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_roompowerlevels_values( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roompreview( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -38927,11 +44914,14 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_roompreview( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_roompreview( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roompreview( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -38939,7 +44929,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_roompreview( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_roompreview( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -38950,7 +44942,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roompreview_forget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_roompreview_forget( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -38962,7 +44955,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roompreview_info( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_roompreview_info( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -38974,7 +44969,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -38984,7 +44980,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_roompreview_leave( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_roompreview_leave( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -38995,152 +44992,104 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + 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_clone_sendattachmentjoinhandle( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_mediasource( 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_sendattachmentjoinhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_mediasource( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_mediasource( 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_sendattachmentjoinhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_mediasource( + 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_sendattachmentjoinhandle_cancel( + cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( 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_sendattachmentjoinhandle_cancel( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( + uniffi::matrix_sdk_ffi::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_sendattachmentjoinhandle_join( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( - 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_clone_sendgalleryjoinhandle( - 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_sendgalleryjoinhandle( - 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_sendgalleryjoinhandle( - 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_sendgalleryjoinhandle( - 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_sendgalleryjoinhandle_cancel( + cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( 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_sendgalleryjoinhandle_cancel( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( + uniffi::matrix_sdk_ffi::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_sendgalleryjoinhandle_join( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( - 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_clone_sendhandle( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( 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_sendhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sendhandle( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( 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_sendhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_mediasource_url( + 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_sendhandle_abort( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( - 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_sendhandle_try_resend( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - 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_clone_sessionverificationcontroller( @@ -39149,11 +45098,14 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( @@ -39162,7 +45114,9 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39174,7 +45128,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39185,7 +45140,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -39200,7 +45156,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39211,7 +45168,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39222,7 +45180,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39233,7 +45192,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39244,7 +45204,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -39258,7 +45219,8 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -39273,7 +45235,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39285,11 +45248,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( @@ -39298,7 +45264,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39312,7 +45280,8 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39327,7 +45296,69 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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_leavespacehandle( + 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_leavespacehandle( + 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_leavespacehandle( + 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_leavespacehandle( + 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_leavespacehandle_leave( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( + 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_leavespacehandle_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_leavespacehandle_rooms( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39340,11 +45371,14 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( 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_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); + 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, @@ -39352,7 +45386,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( 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_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39363,7 +45399,8 @@ 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39375,7 +45412,9 @@ jsi::Value NativeMatrixSdkFfi:: 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_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39389,7 +45428,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( 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_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39403,7 +45444,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39418,13 +45461,15 @@ jsi::Value NativeMatrixSdkFfi:: 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[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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( @@ -39434,13 +45479,15 @@ jsi::Value NativeMatrixSdkFfi:: 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[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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates( @@ -39450,13 +45497,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + 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, @@ -39464,11 +45513,14 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( 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_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); + 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, @@ -39476,7 +45528,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_spaceservice( 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_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39487,7 +45541,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -39501,7 +45556,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39512,7 +45568,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -39524,7 +45581,8 @@ jsi::Value NativeMatrixSdkFfi:: 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39534,7 +45592,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -39547,7 +45606,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -39561,7 +45621,8 @@ jsi::Value NativeMatrixSdkFfi:: 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_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -39574,126 +45635,13 @@ jsi::Value NativeMatrixSdkFfi:: 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[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) { - RustCallStatus status = - uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = uniffi_matrix_sdk_ffi_fn_clone_span( - 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_span( - 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_span( - 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_constructor_span_current( - 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_constructor_span_current(&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_constructor_span_new( - 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_constructor_span_new( - uniffi::matrix_sdk_ffi::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]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[5]), - &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_constructor_span_new_bridge_span( - 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_constructor_span_new_bridge_span( - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[0]), - uniffi::matrix_sdk_ffi::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_span_enter( - 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_span_enter( - 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_span_exit( - 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_span_exit( - 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_span_is_none( - 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_span_is_none( - 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_clone_sqlitestorebuilder( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -39701,11 +45649,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder( @@ -39714,7 +45665,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39735,7 +45688,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( @@ -39744,14 +45698,16 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( @@ -39761,14 +45717,16 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( @@ -39777,14 +45735,16 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( @@ -39793,79 +45753,33 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::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_sqlitestorebuilder_system_is_memory_constrained( - 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_sqlitestorebuilder_system_is_memory_constrained( - 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_clone_ssohandler( - 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_ssohandler( - 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_ssohandler( - 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_ssohandler( - 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_ssohandler_finish( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( - 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_ssohandler_url( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( + 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_ssohandler_url( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_syncservice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -39873,11 +45787,14 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_syncservice( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_syncservice( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_syncservice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -39885,7 +45802,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_syncservice( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_syncservice( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39896,7 +45815,8 @@ jsi::Value NativeMatrixSdkFfi:: 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])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39908,18 +45828,22 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_start( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_syncservice_start( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39931,20 +45855,23 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_state( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_syncservice_state( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39956,11 +45883,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder( @@ -39969,7 +45899,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -39980,7 +45912,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -39993,12 +45926,14 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( @@ -40008,12 +45943,14 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( @@ -40023,13 +45960,15 @@ jsi::Value NativeMatrixSdkFfi:: uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_taskhandle( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -40037,11 +45976,14 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_taskhandle( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_taskhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_taskhandle( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -40049,7 +45991,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_taskhandle( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_taskhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40062,7 +46006,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40075,44 +46021,72 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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_clone_threadsummary( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( 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_threadsummary( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_threadsummary( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( 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_threadsummary( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( + 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_threadsummary_latest_event( + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( 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_threadsummary_latest_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + 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_lazytimelineitemprovider_debug_info( + 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_lazytimelineitemprovider_debug_info( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40120,17 +46094,147 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( 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_threadsummary_num_replies( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = + uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + 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_lazytimelineitemprovider_get_shields( + 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::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( + 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_sendattachmentjoinhandle( + 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_sendattachmentjoinhandle( + 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_sendattachmentjoinhandle( + 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_sendattachmentjoinhandle_cancel( + 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_sendattachmentjoinhandle_cancel( + 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_sendattachmentjoinhandle_join( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( + 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_clone_sendhandle( + 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_sendhandle( + 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_sendhandle( + 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_sendhandle( + 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_sendhandle_abort( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( + 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_sendhandle_try_resend( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( + 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_clone_timeline( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -40138,11 +46242,14 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timeline( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_timeline( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timeline( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -40150,7 +46257,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timeline( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_timeline( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40161,7 +46270,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -40174,7 +46284,8 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -40189,7 +46300,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40206,7 +46318,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_edit( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_edit( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40220,7 +46333,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40234,7 +46348,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -40246,7 +46361,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -40257,7 +46373,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -40269,7 +46386,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -40279,7 +46397,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -40291,7 +46410,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -40303,7 +46423,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -40314,7 +46435,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -40325,7 +46447,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -40337,7 +46460,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40353,7 +46477,8 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1]), &status); @@ -40367,8 +46492,10 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -40380,7 +46507,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40389,7 +46517,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( @@ -40398,25 +46527,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( - 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]), - &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_timeline_send_gallery( - 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_timeline_send_gallery( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40425,7 +46537,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( @@ -40434,7 +46547,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40445,14 +46559,16 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40474,7 +46590,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40488,7 +46605,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40502,8 +46620,10 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + 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])); @@ -40517,7 +46637,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40528,7 +46649,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( @@ -40537,7 +46659,8 @@ jsi::Value NativeMatrixSdkFfi:: RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40548,7 +46671,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( @@ -40556,7 +46680,8 @@ jsi::Value NativeMatrixSdkFfi:: size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -40567,7 +46692,8 @@ jsi::Value NativeMatrixSdkFfi:: jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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, @@ -40581,59 +46707,73 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + 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_clone_timelineevent( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( 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_timelineevent( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( + 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]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelineevent( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( 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_timelineevent( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_timelineitem( + 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(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelineitem( 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_timelineevent_event_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_timelineitem( + 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); + return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( + 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_timelineevent_event_type( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40641,29 +46781,31 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( 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_timelineevent_sender_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( + 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_timelineevent_thread_root_event_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( + 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_timelineevent_thread_root_event_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40671,17 +46813,20 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( 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_timelineevent_timestamp( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( @@ -40690,11 +46835,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( @@ -40703,7 +46851,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -40723,7 +46873,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( @@ -40739,272 +46890,331 @@ 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_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( 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_timelineitem( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_timelineitem( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( 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_timelineitem( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( + 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_timelineitem_as_event( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( + 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_timelineitem_as_event( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( + 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); + return jsi::Value::undefined(); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( + 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_clone_threadsummary( 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_timelineitem_as_virtual( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_threadsummary( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_threadsummary( 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_timelineitem_fmt_debug( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_threadsummary( + 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_threadsummary_latest_event( + 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_threadsummary_latest_event( + 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_threadsummary_num_replies( + 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_threadsummary_num_replies( + 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_timelineitem_unique_id( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( 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_timelineitem_unique_id( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( 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_unreadnotificationscount( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( + 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); + return jsi::Value::undefined(); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( 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_unreadnotificationscount( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( + 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(); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( + cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( 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_unreadnotificationscount_has_notifications( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( + 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); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +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) { RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); - auto value = - uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_clone_span( + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_span( + 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_unreadnotificationscount_notification_count( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + uniffi_matrix_sdk_ffi_fn_free_span( + 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); + return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_useridentity( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_current( 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_useridentity( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_constructor_span_current(&status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_useridentity( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new( 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_useridentity( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + auto value = uniffi_matrix_sdk_ffi_fn_constructor_span_new( + uniffi::matrix_sdk_ffi::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]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[5]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( + cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( 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_useridentity_has_verification_violation( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi::matrix_sdk_ffi::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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_span_enter( + 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_useridentity_is_verified( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_method_span_enter( + 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); + return jsi::Value::undefined(); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_span_exit( 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_useridentity_master_key( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_matrix_sdk_ffi_fn_method_span_exit( + 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); + return jsi::Value::undefined(); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_span_is_none( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( - 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_useridentity_was_previously_verified( - 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_useridentity_was_previously_verified( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_method_span_is_none( + 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_useridentity_withdraw_verification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( - 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_clone_widgetdriver( 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_widgetdriver( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_widgetdriver( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -41012,7 +47222,9 @@ jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_widgetdriver( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_widgetdriver( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -41023,8 +47235,10 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[1]), uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[2])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, @@ -41037,11 +47251,14 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); auto value = uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + 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); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle( @@ -41050,7 +47267,9 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle( RustCallStatus status = uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), &status); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -41061,7 +47280,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0])); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); @@ -41071,7 +47291,8 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[0]), uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[1])); @@ -41094,225 +47315,226 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceBackupStateListener>::fromJs(rt, callInvoker, - args[0]); + UniffiVTableCallbackInterfaceClientDelegate>::fromJs(rt, callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceBackupStateListener", vtableInstance)); + "UniffiVTableCallbackInterfaceClientDelegate", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( - rt, callInvoker, args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceClientSessionDelegate>::fromJs(rt, + callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceBackupSteadyStateListener", + "UniffiVTableCallbackInterfaceClientSessionDelegate", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceCallDeclineListener>::fromJs(rt, callInvoker, - args[0]); + UniffiVTableCallbackInterfaceIgnoredUsersListener>::fromJs(rt, + callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceCallDeclineListener", vtableInstance)); + "UniffiVTableCallbackInterfaceIgnoredUsersListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceClientDelegate>::fromJs(rt, callInvoker, - args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi:: + Bridging::fromJs( + rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceClientDelegate", vtableInstance)); + "UniffiVTableCallbackInterfaceMediaPreviewConfigListener", + vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceClientSessionDelegate>::fromJs(rt, - callInvoker, - args[0]); + UniffiVTableCallbackInterfaceProgressWatcher>::fromJs(rt, callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceClientSessionDelegate", - vtableInstance)); + "UniffiVTableCallbackInterfaceProgressWatcher", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceEnableRecoveryProgressListener>:: - fromJs(rt, callInvoker, args[0]); + UniffiVTableCallbackInterfaceRoomAccountDataListener>::fromJs(rt, + callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceEnableRecoveryProgressListener", + "UniffiVTableCallbackInterfaceRoomAccountDataListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener>:: - fromJs(rt, callInvoker, args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi:: + Bridging::fromJs( + rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener", + "UniffiVTableCallbackInterfaceSendQueueRoomErrorListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener>:: + UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener>:: fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener", + "UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceGrantQrLoginProgressListener>:: - fromJs(rt, callInvoker, args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi:: + Bridging::fromJs( + rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceGrantQrLoginProgressListener", + "UniffiVTableCallbackInterfaceSyncNotificationListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceIdentityStatusChangeListener>:: - fromJs(rt, callInvoker, args[0]); + UniffiVTableCallbackInterfaceBackupStateListener>::fromJs(rt, callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceIdentityStatusChangeListener", - vtableInstance)); + "UniffiVTableCallbackInterfaceBackupStateListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceIgnoredUsersListener>::fromJs(rt, - callInvoker, - args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi:: + Bridging::fromJs( + rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceIgnoredUsersListener", vtableInstance)); + "UniffiVTableCallbackInterfaceBackupSteadyStateListener", + vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceKnockRequestsListener>::fromJs(rt, - callInvoker, - args[0]); + UniffiVTableCallbackInterfaceEnableRecoveryProgressListener>:: + fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceKnockRequestsListener", + "UniffiVTableCallbackInterfaceEnableRecoveryProgressListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( - rt, callInvoker, args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceRecoveryStateListener>::fromJs(rt, + callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceLiveLocationShareListener", + "UniffiVTableCallbackInterfaceRecoveryStateListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( + Bridging::fromJs( rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceMediaPreviewConfigListener", + "UniffiVTableCallbackInterfaceVerificationStateListener", vtableInstance)); return jsi::Value::undefined(); } @@ -41333,34 +47555,51 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( - rt, callInvoker, args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener>:: + fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfacePaginationStatusListener", + "UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceProgressWatcher>::fromJs(rt, callInvoker, - args[0]); + UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener>:: + fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceProgressWatcher", vtableInstance)); + "UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener", + vtableInstance)); + return jsi::Value::undefined(); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceGrantQrLoginProgressListener>:: + fromJs(rt, callInvoker, args[0]); + + std::lock_guard lock( + uniffi::matrix_sdk_ffi::registry::vtableMutex); + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( + uniffi::matrix_sdk_ffi::registry::putTable( + "UniffiVTableCallbackInterfaceGrantQrLoginProgressListener", + vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: @@ -41381,52 +47620,66 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRecoveryStateListener>::fromJs(rt, - callInvoker, - args[0]); + UniffiVTableCallbackInterfaceCallDeclineListener>::fromJs(rt, callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRecoveryStateListener", - vtableInstance)); + "UniffiVTableCallbackInterfaceCallDeclineListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRoomAccountDataListener>::fromJs(rt, - callInvoker, - args[0]); + UniffiVTableCallbackInterfaceIdentityStatusChangeListener>:: + fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRoomAccountDataListener", + "UniffiVTableCallbackInterfaceIdentityStatusChangeListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener>:: - fromJs(rt, callInvoker, args[0]); + UniffiVTableCallbackInterfaceKnockRequestsListener>::fromJs(rt, + callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener", + "UniffiVTableCallbackInterfaceKnockRequestsListener", + vtableInstance)); + return jsi::Value::undefined(); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto vtableInstance = uniffi::matrix_sdk_ffi:: + Bridging::fromJs( + rt, callInvoker, args[0]); + + std::lock_guard lock( + uniffi::matrix_sdk_ffi::registry::vtableMutex); + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( + uniffi::matrix_sdk_ffi::registry::putTable( + "UniffiVTableCallbackInterfaceLiveLocationShareListener", vtableInstance)); return jsi::Value::undefined(); } @@ -41446,114 +47699,114 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRoomListEntriesListener>::fromJs(rt, - callInvoker, - args[0]); + UniffiVTableCallbackInterfaceSendQueueListener>::fromJs(rt, callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRoomListEntriesListener", - vtableInstance)); + "UniffiVTableCallbackInterfaceSendQueueListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRoomListLoadingStateListener>:: + UniffiVTableCallbackInterfaceTypingNotificationsListener>:: fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRoomListLoadingStateListener", + "UniffiVTableCallbackInterfaceTypingNotificationsListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRoomListServiceStateListener>:: + UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener>:: fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRoomListServiceStateListener", + "UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener>:: - fromJs(rt, callInvoker, args[0]); + UniffiVTableCallbackInterfaceRoomListEntriesListener>::fromJs(rt, + callInvoker, + args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener", + "UniffiVTableCallbackInterfaceRoomListEntriesListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceSendQueueListener>::fromJs(rt, callInvoker, - args[0]); + UniffiVTableCallbackInterfaceRoomListLoadingStateListener>:: + fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceSendQueueListener", vtableInstance)); + "UniffiVTableCallbackInterfaceRoomListLoadingStateListener", + vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( - rt, callInvoker, args[0]); + auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< + UniffiVTableCallbackInterfaceRoomListServiceStateListener>:: + fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceSendQueueRoomErrorListener", + "UniffiVTableCallbackInterfaceRoomListServiceStateListener", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener>:: + UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener>:: fromJs(rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener", + "UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener", vtableInstance)); return jsi::Value::undefined(); } @@ -41638,34 +47891,34 @@ jsi::Value NativeMatrixSdkFfi:: return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( + Bridging::fromJs( rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceSyncNotificationListener", + "UniffiVTableCallbackInterfaceSyncServiceStateObserver", vtableInstance)); return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( + Bridging::fromJs( rt, callInvoker, args[0]); std::lock_guard lock( uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( + uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceSyncServiceStateObserver", + "UniffiVTableCallbackInterfacePaginationStatusListener", vtableInstance)); return jsi::Value::undefined(); } @@ -41684,22 +47937,6 @@ jsi::Value NativeMatrixSdkFfi:: "UniffiVTableCallbackInterfaceTimelineListener", vtableInstance)); return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi::Bridging< - UniffiVTableCallbackInterfaceTypingNotificationsListener>:: - fromJs(rt, callInvoker, args[0]); - - std::lock_guard lock( - uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( - uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceTypingNotificationsListener", - vtableInstance)); - return jsi::Value::undefined(); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -41717,22 +47954,6 @@ jsi::Value NativeMatrixSdkFfi:: vtableInstance)); return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto vtableInstance = uniffi::matrix_sdk_ffi:: - Bridging::fromJs( - rt, callInvoker, args[0]); - - std::lock_guard lock( - uniffi::matrix_sdk_ffi::registry::vtableMutex); - uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( - uniffi::matrix_sdk_ffi::registry::putTable( - "UniffiVTableCallbackInterfaceVerificationStateListener", - vtableInstance)); - return jsi::Value::undefined(); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -41749,36 +47970,12 @@ jsi::Value NativeMatrixSdkFfi:: vtableInstance)); return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - 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_func_content_without_relation_from_message( - uniffi::matrix_sdk_ffi::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_func_create_caption_edit( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( 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_func_create_caption_edit( - uniffi::matrix_sdk_ffi::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]), - &status); + auto value = uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha(&status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -41798,52 +47995,50 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_init_platform( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( + RustCallStatus status = + uniffi::matrix_sdk_ffi::Bridging::rustSuccess(rt); + uniffi_matrix_sdk_ffi_fn_func_init_platform( uniffi::matrix_sdk_ffi::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[1]), &status); + uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( + rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, - value); + return jsi::Value::undefined(); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + cpp_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( 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_func_get_element_call_required_permissions( - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), - &status); + uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + uniffi::matrix_sdk_ffi::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); + return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_init_platform( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + 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_func_init_platform( + auto value = uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[1]), &status); + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( @@ -41860,35 +48055,30 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_log_event( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + 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_func_log_event( - uniffi::matrix_sdk_ffi::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]), - &status); + auto value = + uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[0]), + &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return jsi::Value::undefined(); + return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( 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_func_make_widget_driver( + auto value = uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), &status); @@ -41899,12 +48089,12 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( 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_func_matrix_to_room_alias_permalink( + auto value = uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), &status); @@ -41914,13 +48104,13 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + 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_func_matrix_to_user_permalink( + auto value = uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), &status); @@ -41930,6 +48120,23 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( + 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_func_content_without_relation_from_message( + uniffi::matrix_sdk_ffi::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_func_message_event_content_from_html( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -41945,7 +48152,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html_as_emote( @@ -41963,7 +48171,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown( @@ -41979,7 +48188,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_markdown_as_emote( @@ -41995,7 +48205,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_jsi::Bridging::toJs(rt, callInvoker, + value); } jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( @@ -42010,19 +48221,18 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( + 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_func_new_virtual_element_call_widget( + auto value = uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, - args[1]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -42031,14 +48241,18 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( 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_func_parse_matrix_entity_from( + auto value = uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( uniffi::matrix_sdk_ffi::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]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -42046,31 +48260,55 @@ NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { +jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_log_event( + 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_func_reload_tracing_file_writer( + uniffi_matrix_sdk_ffi_fn_func_log_event( uniffi::matrix_sdk_ffi::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]), &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_func_generate_webview_url( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[0]), + uniffi_jsi::Bridging::fromJs(rt, callInvoker, + args[1]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[2])); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, + value); +} jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + cpp_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( 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_func_room_alias_name_from_room_display_name( + uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -42078,25 +48316,13 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi::matrix_sdk_ffi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( 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_func_sdk_git_sha(&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_func_suggested_power_level_for_role( - 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_func_suggested_power_level_for_role( + auto value = uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), &status); @@ -42107,14 +48333,16 @@ jsi::Value NativeMatrixSdkFfi:: value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + cpp_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( 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_func_suggested_role_for_power_level( + auto value = uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, args[0]), + uniffi::matrix_sdk_ffi::Bridging::fromJs(rt, callInvoker, + args[1]), &status); uniffi::matrix_sdk_ffi::Bridging::copyIntoJs( rt, callInvoker, status, args[count - 1]); @@ -42582,54 +48810,6 @@ jsi::Value NativeMatrixSdkFfi::cpp_ffi_matrix_sdk_ffi_rust_future_complete_f64( return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi::cpp_ffi_matrix_sdk_ffi_rust_future_poll_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - ffi_matrix_sdk_ffi_rust_future_poll_pointer( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, - args[0]), - uniffi::matrix_sdk_ffi::Bridging< - UniffiRustFutureContinuationCallback>::fromJs(rt, callInvoker, - args[1]), - uniffi_jsi::Bridging::fromJs(rt, callInvoker, - args[2])); - - return jsi::Value::undefined(); -} -jsi::Value -NativeMatrixSdkFfi::cpp_ffi_matrix_sdk_ffi_rust_future_cancel_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - ffi_matrix_sdk_ffi_rust_future_cancel_pointer( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, - args[0])); - - return jsi::Value::undefined(); -} -jsi::Value NativeMatrixSdkFfi::cpp_ffi_matrix_sdk_ffi_rust_future_free_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - ffi_matrix_sdk_ffi_rust_future_free_pointer( - uniffi_jsi::Bridging::fromJs(rt, callInvoker, - args[0])); - - return jsi::Value::undefined(); -} -jsi::Value -NativeMatrixSdkFfi::cpp_ffi_matrix_sdk_ffi_rust_future_complete_pointer( - 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 = ffi_matrix_sdk_ffi_rust_future_complete_pointer( - 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_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -42727,94 +48907,96 @@ jsi::Value NativeMatrixSdkFfi::cpp_ffi_matrix_sdk_ffi_rust_future_complete_void( return jsi::Value::undefined(); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message(); +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit(); + auto value = uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_init_platform( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id(); + auto value = uniffi_matrix_sdk_ffi_checksum_func_init_platform(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url( + cpp_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url(); + auto value = uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( + cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions(); + uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_init_platform( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_init_platform(); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid( + cpp_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid(); + auto value = + uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_log_event( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_log_event(); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver(); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink( + cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink(); + uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink( + cpp_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink(); + auto value = + uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -42862,6 +49044,55 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_log_event( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_log_event(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -42872,61 +49103,81 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from(); + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer( + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer(); + auto value = + uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name( + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name(); + uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha(); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_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_oidc_login(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role( + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role(); + uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level( + 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_func_suggested_role_for_power_level(); + 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_checkcodesender_send( + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send(); + auto value = + uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -42954,14 +49205,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -43175,14 +49418,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -43735,6 +49970,38 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -44159,78 +50426,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_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_oidc_login(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_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_password_login(); - - 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, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -44259,157 +50454,94 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban(); + uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info(); +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle(); + uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields(); + uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist(); + uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_mediasource_url(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -44638,6 +50770,50 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -44646,6 +50822,42 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -45465,173 +51677,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlist_room(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -45649,15 +51694,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -45838,95 +51874,253 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget(); + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_info( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_info(); +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter(); + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlist_room(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_info( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_info(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_mediasource_url(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -46029,6 +52223,22 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms(); + + 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, @@ -46160,30 +52370,6 @@ jsi::Value NativeMatrixSdkFfi:: 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, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_span_enter(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_span_exit( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_span_exit(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_span_is_none( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_span_is_none(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -46229,22 +52415,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = 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, @@ -46340,20 +52510,72 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event( + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event(); + uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies(); + uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -46516,14 +52738,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -46609,43 +52823,10 @@ jsi::Value NativeMatrixSdkFfi:: 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, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -46682,80 +52863,79 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications(); + uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count(); + uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count( + cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count(); + uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation( + cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation(); + uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( + cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( + cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key(); + auto value = + uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value -NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin( +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_span_enter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_span_enter(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified(); +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_span_exit( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_span_exit(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification(); +jsi::Value +NativeMatrixSdkFfi::cpp_uniffi_matrix_sdk_ffi_checksum_method_span_is_none( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = uniffi_matrix_sdk_ffi_checksum_method_span_is_none(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -46791,6 +52971,15 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -46810,11 +52999,29 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes( + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes(); + uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude(); + + return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); +} +jsi::Value NativeMatrixSdkFfi:: + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count) { + auto value = + uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -46844,235 +53051,226 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new( + cpp_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new(); + uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude( + cpp_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude(); + uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include( + cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include(); + uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change(); + uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call(); + uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( + cpp_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error(); + uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain(); + uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain(); + uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call(); + uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call(); + uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call(); + uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call(); + uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change(); + uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change(); + uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress( + cpp_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress(); + uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update(); + auto value = uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change(); + uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -47085,65 +53283,65 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -47246,15 +53444,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification(); - - 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, @@ -47265,20 +53454,20 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(); + uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count) { auto value = - uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(); + uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(); return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } @@ -47291,15 +53480,6 @@ jsi::Value NativeMatrixSdkFfi:: return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); } -jsi::Value NativeMatrixSdkFfi:: - cpp_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count) { - auto value = - uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(); - - return uniffi_jsi::Bridging::toJs(rt, callInvoker, value); -} jsi::Value NativeMatrixSdkFfi:: cpp_uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities( 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 c406b03..f99492b 100644 --- a/cpp/generated/matrix_sdk_ffi.hpp +++ b/cpp/generated/matrix_sdk_ffi.hpp @@ -28,13 +28,57 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_internal_fn_func_ffi__arraybuffer_to_string( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_checkcodesender( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_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_homeserverlogindetails_supported_oidc_prompts( + 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_oidc_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_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); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_ssohandler( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_ssohandler( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_client( @@ -53,9 +97,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_account_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -138,9 +179,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_profile( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -359,6 +397,24 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_clientbuilder( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -541,49 +597,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_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_homeserverlogindetails_supported_oidc_prompts( - 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_oidc_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_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); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -599,113 +612,53 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_useridentity( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_useridentity( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( + cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle( + cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_timelineevent( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_mediasource( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_mediasource( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( + cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_notificationclient( @@ -819,73 +772,129 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_qrcodedata( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_checkcodesender( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_room(jsi::Runtime &rt, - const jsi::Value &thisVal, - const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_room(jsi::Runtime &rt, - const jsi::Value &thisVal, - const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( + cpp_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_ban_user( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_qrcodedata( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_decline_call( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_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_display_name( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_edit( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_room(jsi::Runtime &rt, + const jsi::Value &thisVal, + const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_room(jsi::Runtime &rt, + const jsi::Value &thisVal, + const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_ban_user( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_clear_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_clear_event_cache_storage( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_decline_call( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_display_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_edit( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + 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( @@ -1148,211 +1157,217 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlist( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomlist( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_room( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlist( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomlist( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlist_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( + cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( + cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( + cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( + cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( + cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_roompreview( @@ -1377,41 +1392,22 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_mediasource( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_mediasource( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sendhandle( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_sendhandle( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( @@ -1470,6 +1466,18 @@ 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_leavespacehandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( + 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); @@ -1534,32 +1542,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { 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, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_span(jsi::Runtime &rt, - const jsi::Value &thisVal, - const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_current( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_span_enter( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_span_exit( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_span_is_none( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1587,18 +1569,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_ssohandler( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_ssohandler( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_syncservice( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1653,16 +1623,51 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_threadsummary( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_threadsummary( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sendhandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_sendhandle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timeline( @@ -1731,9 +1736,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -1765,26 +1767,25 @@ 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_timelineevent( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_timelineevent( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_timelineitem( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( @@ -1801,67 +1802,66 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_include( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_timelineitem( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_threadsummary( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_threadsummary( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_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_unreadnotificationscount_has_notifications( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_useridentity( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_useridentity( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_span(jsi::Runtime &rt, + const jsi::Value &thisVal, + const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_free_span(jsi::Runtime &rt, + const jsi::Value &thisVal, + const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_current( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_span_enter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_span_exit( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_method_span_is_none( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_clone_widgetdriver( @@ -1889,70 +1889,74 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener( 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_clientdelegate( + 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_backupstatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( 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_backupsteadystatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( 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_calldeclinelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( 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_clientdelegate( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( 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_clientsessiondelegate( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( 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_enablerecoveryprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( 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_generatedqrloginprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( 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_grantgeneratedqrloginprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( 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_grantqrloginprogresslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( 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_identitystatuschangelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( 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_ignoreduserslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( 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_knockrequestslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( 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_livelocationsharelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( 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_mediapreviewconfiglistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate( 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_notificationsettingsdelegate( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( 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_paginationstatuslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( 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_progresswatcher( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -1960,46 +1964,50 @@ 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_recoverystatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( 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_roomaccountdatalistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( 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_roomdirectorysearchentrieslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( + 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_livelocationsharelistener( 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_roominfolistener( 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_roomlistentrieslistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( 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_roomlistloadingstatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( 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_roomlistservicestatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( 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_roomlistservicesyncindicatorlistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( 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_sendqueuelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( 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_sendqueueroomerrorlistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( 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_sendqueueroomupdatelistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -2023,65 +2031,57 @@ 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_syncnotificationlistener( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( 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( + cpp_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( 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_timelinelistener( 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_typingnotificationslistener( - 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_unabletodecryptdelegate( 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_verificationstatelistener( - 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_widgetcapabilitiesprovider( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_init_platform( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_init_platform( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_log_event( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html( @@ -2102,26 +2102,26 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_message_event_content_new( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_log_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + jsi::Value cpp_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_poll_u8( @@ -2244,18 +2244,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_complete_f64( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_poll_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_cancel_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_free_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_complete_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -2280,40 +2268,42 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_ffi_matrix_sdk_ffi_rust_future_complete_void( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_init_platform( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( + cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_init_platform( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_log_event( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink( + cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -2335,32 +2325,61 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_log_event( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_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_func_room_alias_name_from_room_display_name( + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role( + cpp_uniffi_matrix_sdk_ffi_checksum_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_checksum_func_suggested_role_for_power_level( + 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_checkcodesender_send( + 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); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth( @@ -2372,9 +2391,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_account_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -2463,9 +2479,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_profile( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -2693,6 +2706,18 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -2791,199 +2816,139 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recover( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery( 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_oidc_login( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against( 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_password_login( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recover( 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( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset( 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( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban( + cpp_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen( + cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis( + cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info( + cpp_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan( + cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path( + 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); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -3086,10 +3051,45 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3418,166 +3418,174 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification( + cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels( + cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget( @@ -3596,26 +3604,10 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -3662,6 +3654,12 @@ 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_leavespacehandle_leave( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_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_paginate( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3718,15 +3716,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { 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); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_span_exit( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_span_is_none( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, @@ -3743,14 +3732,8 @@ class NativeMatrixSdkFfi : public jsi::HostObject { cpp_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -3793,11 +3776,33 @@ 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_threadsummary_latest_event( + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener( @@ -3864,9 +3869,6 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3901,20 +3903,7 @@ 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_timelineevent_event_id( - 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_type( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event( @@ -3930,36 +3919,35 @@ 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_unreadnotificationscount_has_notifications( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count( + cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_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_useridentity_has_verification_violation( + cpp_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key( + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin( + 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); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_span_exit( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_span_is_none( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run( @@ -3975,6 +3963,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_constructor_qrcodedata_from_bytes( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -3983,7 +3975,15 @@ 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_constructor_qrcodedata_from_bytes( + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_constructor_span_current( @@ -3997,137 +3997,133 @@ 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_constructor_sqlitestorebuilder_new( + cpp_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude( + cpp_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include( + cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_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_calldeclinelistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error( + cpp_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_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_generatedqrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_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_grantqrloginprogresslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_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_identitystatuschangelistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_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_ignoreduserslistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_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_knockrequestslistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_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_livelocationsharelistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_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_notificationsettingsdelegate_settings_did_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_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_paginationstatuslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_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_progresswatcher_transmission_progress( + cpp_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_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_qrloginprogresslistener_on_update( + jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change( + cpp_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_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_roomlistloadingstatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_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_roomlistservicesyncindicatorlistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_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_sendqueuelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_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_sendqueueroomerrorlistener_on_error( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_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_sendqueueroomupdatelistener_on_update( + cpp_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -4175,11 +4171,11 @@ 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_syncnotificationlistener_on_notification( + cpp_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_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( + cpp_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -4187,84 +4183,83 @@ 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_typingnotificationslistener_call( + cpp_uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd( + cpp_uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update( + jsi::Value cpp_ffi_matrix_sdk_ffi_uniffi_contract_version( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities( + cpp_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_ffi_matrix_sdk_ffi_uniffi_contract_version( + jsi::Value + cpp_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_internal_fn_method_client_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_clientbuilder_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_encryption_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_clientbuilder_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_encryption_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_identityresethandle_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_identityresethandle_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_useridentity_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer( + 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); jsi::Value - cpp_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_notificationclient_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer( + jsi::Value + cpp_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_internal_fn_method_notificationclient_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_room_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( + jsi::Value + cpp_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_room_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -4286,28 +4281,13 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value - cpp_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( + cpp_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_internal_fn_method_roompreview_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); - jsi::Value cpp_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value @@ -4318,22 +4298,19 @@ 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::Value cpp_uniffi_internal_fn_method_leavespacehandle_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::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_span_ffi__bless_pointer( + 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_sqlitestorebuilder_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( - jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, - size_t count); jsi::Value cpp_uniffi_internal_fn_method_syncservice_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); @@ -4344,27 +4321,38 @@ class NativeMatrixSdkFfi : public jsi::HostObject { jsi::Value cpp_uniffi_internal_fn_method_taskhandle_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer( + jsi::Value + cpp_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_pointer( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value + cpp_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_pointer( + jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, + size_t count); + jsi::Value cpp_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); 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_timelineevent_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); jsi::Value cpp_uniffi_internal_fn_method_timelineeventtypefilter_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( + jsi::Value + cpp_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value - cpp_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer( jsi::Runtime &rt, const jsi::Value &thisVal, const jsi::Value *args, size_t count); - jsi::Value cpp_uniffi_internal_fn_method_useridentity_ffi__bless_pointer( + jsi::Value cpp_uniffi_internal_fn_method_inreplytodetails_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); jsi::Value cpp_uniffi_internal_fn_method_widgetdriver_ffi__bless_pointer( diff --git a/cpp/generated/matrix_sdk_ui.cpp b/cpp/generated/matrix_sdk_ui.cpp index 8a60a57..f021d70 100644 --- a/cpp/generated/matrix_sdk_ui.cpp +++ b/cpp/generated/matrix_sdk_ui.cpp @@ -17,89 +17,84 @@ namespace jsi = facebook::jsi; extern "C" { typedef void (*UniffiRustFutureContinuationCallback)(uint64_t data, int8_t poll_result); -typedef void (*UniffiForeignFutureFree)(uint64_t handle); +typedef void (*UniffiForeignFutureDroppedCallback)(uint64_t handle); typedef void (*UniffiCallbackInterfaceFree)(uint64_t handle); -typedef struct UniffiForeignFuture { +typedef uint64_t (*UniffiCallbackInterfaceClone)(uint64_t handle); +typedef struct UniffiForeignFutureDroppedCallbackStruct { uint64_t handle; - UniffiForeignFutureFree free; -} UniffiForeignFuture; -typedef struct UniffiForeignFutureStructU8 { + UniffiForeignFutureDroppedCallback free; +} UniffiForeignFutureDroppedCallbackStruct; +typedef struct UniffiForeignFutureResultU8 { uint8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU8; +} UniffiForeignFutureResultU8; typedef void (*UniffiForeignFutureCompleteU8)( - uint64_t callback_data, UniffiForeignFutureStructU8 result); -typedef struct UniffiForeignFutureStructI8 { + uint64_t callback_data, UniffiForeignFutureResultU8 result); +typedef struct UniffiForeignFutureResultI8 { int8_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI8; +} UniffiForeignFutureResultI8; typedef void (*UniffiForeignFutureCompleteI8)( - uint64_t callback_data, UniffiForeignFutureStructI8 result); -typedef struct UniffiForeignFutureStructU16 { + uint64_t callback_data, UniffiForeignFutureResultI8 result); +typedef struct UniffiForeignFutureResultU16 { uint16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU16; +} UniffiForeignFutureResultU16; typedef void (*UniffiForeignFutureCompleteU16)( - uint64_t callback_data, UniffiForeignFutureStructU16 result); -typedef struct UniffiForeignFutureStructI16 { + uint64_t callback_data, UniffiForeignFutureResultU16 result); +typedef struct UniffiForeignFutureResultI16 { int16_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI16; +} UniffiForeignFutureResultI16; typedef void (*UniffiForeignFutureCompleteI16)( - uint64_t callback_data, UniffiForeignFutureStructI16 result); -typedef struct UniffiForeignFutureStructU32 { + uint64_t callback_data, UniffiForeignFutureResultI16 result); +typedef struct UniffiForeignFutureResultU32 { uint32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU32; +} UniffiForeignFutureResultU32; typedef void (*UniffiForeignFutureCompleteU32)( - uint64_t callback_data, UniffiForeignFutureStructU32 result); -typedef struct UniffiForeignFutureStructI32 { + uint64_t callback_data, UniffiForeignFutureResultU32 result); +typedef struct UniffiForeignFutureResultI32 { int32_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI32; +} UniffiForeignFutureResultI32; typedef void (*UniffiForeignFutureCompleteI32)( - uint64_t callback_data, UniffiForeignFutureStructI32 result); -typedef struct UniffiForeignFutureStructU64 { + uint64_t callback_data, UniffiForeignFutureResultI32 result); +typedef struct UniffiForeignFutureResultU64 { uint64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructU64; +} UniffiForeignFutureResultU64; typedef void (*UniffiForeignFutureCompleteU64)( - uint64_t callback_data, UniffiForeignFutureStructU64 result); -typedef struct UniffiForeignFutureStructI64 { + uint64_t callback_data, UniffiForeignFutureResultU64 result); +typedef struct UniffiForeignFutureResultI64 { int64_t return_value; RustCallStatus call_status; -} UniffiForeignFutureStructI64; +} UniffiForeignFutureResultI64; typedef void (*UniffiForeignFutureCompleteI64)( - uint64_t callback_data, UniffiForeignFutureStructI64 result); -typedef struct UniffiForeignFutureStructF32 { + uint64_t callback_data, UniffiForeignFutureResultI64 result); +typedef struct UniffiForeignFutureResultF32 { float return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF32; +} UniffiForeignFutureResultF32; typedef void (*UniffiForeignFutureCompleteF32)( - uint64_t callback_data, UniffiForeignFutureStructF32 result); -typedef struct UniffiForeignFutureStructF64 { + uint64_t callback_data, UniffiForeignFutureResultF32 result); +typedef struct UniffiForeignFutureResultF64 { double return_value; RustCallStatus call_status; -} UniffiForeignFutureStructF64; +} UniffiForeignFutureResultF64; typedef void (*UniffiForeignFutureCompleteF64)( - uint64_t callback_data, UniffiForeignFutureStructF64 result); -typedef struct UniffiForeignFutureStructPointer { - void *return_value; - RustCallStatus call_status; -} UniffiForeignFutureStructPointer; -typedef void (*UniffiForeignFutureCompletePointer)( - uint64_t callback_data, UniffiForeignFutureStructPointer result); -typedef struct UniffiForeignFutureStructRustBuffer { + uint64_t callback_data, UniffiForeignFutureResultF64 result); +typedef struct UniffiForeignFutureResultRustBuffer { RustBuffer return_value; RustCallStatus call_status; -} UniffiForeignFutureStructRustBuffer; +} UniffiForeignFutureResultRustBuffer; typedef void (*UniffiForeignFutureCompleteRustBuffer)( - uint64_t callback_data, UniffiForeignFutureStructRustBuffer result); -typedef struct UniffiForeignFutureStructVoid { + uint64_t callback_data, UniffiForeignFutureResultRustBuffer result); +typedef struct UniffiForeignFutureResultVoid { RustCallStatus call_status; -} UniffiForeignFutureStructVoid; +} UniffiForeignFutureResultVoid; typedef void (*UniffiForeignFutureCompleteVoid)( - uint64_t callback_data, UniffiForeignFutureStructVoid result); + uint64_t callback_data, UniffiForeignFutureResultVoid result); RustBuffer ffi_matrix_sdk_ui_rustbuffer_alloc(uint64_t size, RustCallStatus *uniffi_out_err); RustBuffer @@ -200,15 +195,6 @@ void ffi_matrix_sdk_ui_rust_future_free_f64( /*handle*/ uint64_t handle); double ffi_matrix_sdk_ui_rust_future_complete_f64( /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); -void ffi_matrix_sdk_ui_rust_future_poll_pointer( - /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, - /*handle*/ uint64_t callback_data); -void ffi_matrix_sdk_ui_rust_future_cancel_pointer( - /*handle*/ uint64_t handle); -void ffi_matrix_sdk_ui_rust_future_free_pointer( - /*handle*/ uint64_t handle); -void *ffi_matrix_sdk_ui_rust_future_complete_pointer( - /*handle*/ uint64_t handle, RustCallStatus *uniffi_out_err); void ffi_matrix_sdk_ui_rust_future_poll_rust_buffer( /*handle*/ uint64_t handle, UniffiRustFutureContinuationCallback callback, /*handle*/ uint64_t callback_data); @@ -507,7 +493,7 @@ static void callback(uint64_t rs_data, int8_t rs_pollResult) { rsLambda(rs_data, rs_pollResult); } -static UniffiRustFutureContinuationCallback +[[maybe_unused]] static UniffiRustFutureContinuationCallback makeCallbackFunction( // uniffi::matrix_sdk_ui::cb::rustfuturecontinuationcallback jsi::Runtime &rt, std::shared_ptr callInvoker, @@ -551,42 +537,11 @@ static void cleanup() { rsLambda = nullptr; } } // namespace uniffi::matrix_sdk_ui::cb::rustfuturecontinuationcallback - // Implementation of callback function calling from JS to Rust - // ForeignFutureFree, passed from Rust to JS as part of async callbacks. -namespace uniffi::matrix_sdk_ui { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureFree rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureFree"), 1, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureFree func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_ui - // Implementation of free callback function CallbackInterfaceFree + // Implementation of callback function calling from Rust to JS + // ForeignFutureDroppedCallback // Callback function: -// uniffi::matrix_sdk_ui::st::foreignfuture::foreignfuture::free::UniffiCallbackInterfaceFree +// uniffi::matrix_sdk_ui::cb::foreignfuturedroppedcallback::UniffiForeignFutureDroppedCallback // // We have the following constraints: // - we need to pass a function pointer to Rust. @@ -599,7 +554,7 @@ template <> struct Bridging { // // We then give the `callback` function pointer to Rust which will call the // lambda sometime in the future. -namespace uniffi::matrix_sdk_ui::st::foreignfuture::foreignfuture::free { +namespace uniffi::matrix_sdk_ui::cb::foreignfuturedroppedcallback { using namespace facebook; // We need to store a lambda in a global so we can call it from @@ -627,7 +582,7 @@ static void body(jsi::Runtime &rt, auto uniffiResult = cb.call(rt, js_handle); } catch (const jsi::JSError &error) { - std::cout << "Error in callback UniffiCallbackInterfaceFree: " + std::cout << "Error in callback UniffiForeignFutureDroppedCallback: " << error.what() << std::endl; throw error; } @@ -652,8 +607,8 @@ static void callback(uint64_t rs_handle) { rsLambda(rs_handle); } -static UniffiCallbackInterfaceFree -makeCallbackFunction( // uniffi::matrix_sdk_ui::st::foreignfuture::foreignfuture::free +[[maybe_unused]] static UniffiForeignFutureDroppedCallback +makeCallbackFunction( // uniffi::matrix_sdk_ui::cb::foreignfuturedroppedcallback jsi::Runtime &rt, std::shared_ptr callInvoker, const jsi::Value &value) { @@ -693,32 +648,35 @@ static void cleanup() { // out, then the pointer will no longer be left dangling. rsLambda = nullptr; } -} // namespace uniffi::matrix_sdk_ui::st::foreignfuture::foreignfuture::free +} // namespace uniffi::matrix_sdk_ui::cb::foreignfuturedroppedcallback + // Implementation of free callback function CallbackInterfaceFree + namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFuture fromJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &jsValue) { +template <> struct Bridging { + static UniffiForeignFutureDroppedCallbackStruct + 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 UniffiForeignFuture"); + throw jsi::JSError( + rt, + "Expected an object for UniffiForeignFutureDroppedCallbackStruct"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFuture rsObject; + UniffiForeignFutureDroppedCallbackStruct rsObject; // Create the vtable from the js callbacks. rsObject.handle = uniffi_jsi::Bridging::fromJs( rt, callInvoker, jsObject.getProperty(rt, "handle")); - rsObject.free = uniffi::matrix_sdk_ui::st::foreignfuture::foreignfuture:: - free::makeCallbackFunction(rt, callInvoker, - jsObject.getProperty(rt, "free")); + rsObject.free = uniffi::matrix_sdk_ui::cb::foreignfuturedroppedcallback:: + makeCallbackFunction(rt, callInvoker, jsObject.getProperty(rt, "free")); return rsObject; } @@ -729,21 +687,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU8 +template <> struct Bridging { + static UniffiForeignFutureResultU8 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 UniffiForeignFutureStructU8"); + "Expected an object for UniffiForeignFutureResultU8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU8 rsObject; + UniffiForeignFutureResultU8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -784,7 +742,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -795,21 +753,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI8 +template <> struct Bridging { + static UniffiForeignFutureResultI8 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 UniffiForeignFutureStructI8"); + "Expected an object for UniffiForeignFutureResultI8"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI8 rsObject; + UniffiForeignFutureResultI8 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -850,7 +808,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -861,21 +819,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU16 +template <> struct Bridging { + static UniffiForeignFutureResultU16 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 UniffiForeignFutureStructU16"); + "Expected an object for UniffiForeignFutureResultU16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU16 rsObject; + UniffiForeignFutureResultU16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -917,7 +875,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -928,21 +886,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI16 +template <> struct Bridging { + static UniffiForeignFutureResultI16 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 UniffiForeignFutureStructI16"); + "Expected an object for UniffiForeignFutureResultI16"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI16 rsObject; + UniffiForeignFutureResultI16 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -984,7 +942,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -995,21 +953,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU32 +template <> struct Bridging { + static UniffiForeignFutureResultU32 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 UniffiForeignFutureStructU32"); + "Expected an object for UniffiForeignFutureResultU32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU32 rsObject; + UniffiForeignFutureResultU32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1051,7 +1009,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1062,21 +1020,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI32 +template <> struct Bridging { + static UniffiForeignFutureResultI32 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 UniffiForeignFutureStructI32"); + "Expected an object for UniffiForeignFutureResultI32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI32 rsObject; + UniffiForeignFutureResultI32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1118,7 +1076,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1129,21 +1087,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructU64 +template <> struct Bridging { + static UniffiForeignFutureResultU64 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 UniffiForeignFutureStructU64"); + "Expected an object for UniffiForeignFutureResultU64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructU64 rsObject; + UniffiForeignFutureResultU64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1185,7 +1143,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1196,21 +1154,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructI64 +template <> struct Bridging { + static UniffiForeignFutureResultI64 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 UniffiForeignFutureStructI64"); + "Expected an object for UniffiForeignFutureResultI64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructI64 rsObject; + UniffiForeignFutureResultI64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1252,7 +1210,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1263,21 +1221,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF32 +template <> struct Bridging { + static UniffiForeignFutureResultF32 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 UniffiForeignFutureStructF32"); + "Expected an object for UniffiForeignFutureResultF32"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF32 rsObject; + UniffiForeignFutureResultF32 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1319,7 +1277,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1330,21 +1288,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructF64 +template <> struct Bridging { + static UniffiForeignFutureResultF64 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 UniffiForeignFutureStructF64"); + "Expected an object for UniffiForeignFutureResultF64"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructF64 rsObject; + UniffiForeignFutureResultF64 rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi_jsi::Bridging::fromJs( @@ -1386,7 +1344,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1397,89 +1355,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructPointer - 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 UniffiForeignFutureStructPointer"); - } - - // Get the object from the jsi::Value - auto jsObject = jsValue.getObject(rt); - - // Create the vtable struct - UniffiForeignFutureStructPointer rsObject; - - // Create the vtable from the js callbacks. - rsObject.return_value = uniffi_jsi::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "returnValue")); - rsObject.call_status = - uniffi::matrix_sdk_ui::Bridging::fromJs( - rt, callInvoker, jsObject.getProperty(rt, "callStatus")); - - return rsObject; - } -}; - -} // namespace uniffi::matrix_sdk_ui - // Implementation of callback function calling from JS to Rust - // ForeignFutureCompletePointer, passed from Rust to JS as part of async - // callbacks. -namespace uniffi::matrix_sdk_ui { -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static jsi::Value toJs(jsi::Runtime &rt, - std::shared_ptr callInvoker, - UniffiForeignFutureCompletePointer rsCallback) { - return jsi::Function::createFromHostFunction( - rt, jsi::PropNameID::forAscii(rt, "--ForeignFutureCompletePointer"), 2, - [rsCallback, callInvoker](jsi::Runtime &rt, const jsi::Value &thisValue, - const jsi::Value *arguments, - size_t count) -> jsi::Value { - return intoRust(rt, callInvoker, thisValue, arguments, count, - rsCallback); - }); - } - - static jsi::Value intoRust(jsi::Runtime &rt, - std::shared_ptr callInvoker, - const jsi::Value &thisValue, - const jsi::Value *args, size_t count, - UniffiForeignFutureCompletePointer func) { - // Convert the arguments into the Rust, with Bridging::fromJs, - // then call the rs_callback with those arguments. - func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging< - UniffiForeignFutureStructPointer>::fromJs(rt, callInvoker, - args[1])); - - return jsi::Value::undefined(); - } -}; -} // namespace uniffi::matrix_sdk_ui -namespace uniffi::matrix_sdk_ui { -using namespace facebook; -using CallInvoker = uniffi_runtime::UniffiCallInvoker; - -template <> struct Bridging { - static UniffiForeignFutureStructRustBuffer +template <> struct Bridging { + static UniffiForeignFutureResultRustBuffer 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 UniffiForeignFutureStructRustBuffer"); + rt, "Expected an object for UniffiForeignFutureResultRustBuffer"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructRustBuffer rsObject; + UniffiForeignFutureResultRustBuffer rsObject; // Create the vtable from the js callbacks. rsObject.return_value = uniffi::matrix_sdk_ui::Bridging::fromJs( @@ -1523,7 +1413,7 @@ template <> struct Bridging { // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), uniffi::matrix_sdk_ui::Bridging< - UniffiForeignFutureStructRustBuffer>::fromJs(rt, callInvoker, + UniffiForeignFutureResultRustBuffer>::fromJs(rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1534,21 +1424,21 @@ namespace uniffi::matrix_sdk_ui { using namespace facebook; using CallInvoker = uniffi_runtime::UniffiCallInvoker; -template <> struct Bridging { - static UniffiForeignFutureStructVoid +template <> struct Bridging { + static UniffiForeignFutureResultVoid 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 UniffiForeignFutureStructVoid"); + rt, "Expected an object for UniffiForeignFutureResultVoid"); } // Get the object from the jsi::Value auto jsObject = jsValue.getObject(rt); // Create the vtable struct - UniffiForeignFutureStructVoid rsObject; + UniffiForeignFutureResultVoid rsObject; // Create the vtable from the js callbacks. rsObject.call_status = @@ -1588,7 +1478,7 @@ template <> struct Bridging { // Convert the arguments into the Rust, with Bridging::fromJs, // then call the rs_callback with those arguments. func(uniffi_jsi::Bridging::fromJs(rt, callInvoker, args[0]), - uniffi::matrix_sdk_ui::Bridging::fromJs( + uniffi::matrix_sdk_ui::Bridging::fromJs( rt, callInvoker, args[1])); return jsi::Value::undefined(); @@ -1705,8 +1595,9 @@ void NativeMatrixSdkUi::set(jsi::Runtime &rt, const jsi::PropNameID &name, NativeMatrixSdkUi::~NativeMatrixSdkUi() { // Cleanup for callback function RustFutureContinuationCallback uniffi::matrix_sdk_ui::cb::rustfuturecontinuationcallback::cleanup(); + // Cleanup for callback function ForeignFutureDroppedCallback + uniffi::matrix_sdk_ui::cb::foreignfuturedroppedcallback::cleanup(); // Cleanup for "free" callback function CallbackInterfaceFree - uniffi::matrix_sdk_ui::st::foreignfuture::foreignfuture::free::cleanup(); } // Utility functions for serialization/deserialization of strings. diff --git a/example/ios/Podfile.lock b/example/ios/Podfile.lock index 71a3e70..fc419a3 100644 --- a/example/ios/Podfile.lock +++ b/example/ios/Podfile.lock @@ -1558,7 +1558,7 @@ PODS: - React-logger - React-perflogger - React-utils (= 0.76.9) - - ReactNativeMatrixSdk (0.8.1): + - ReactNativeMatrixSdk (0.9.0): - DoubleConversion - glog - hermes-engine @@ -1578,10 +1578,10 @@ PODS: - ReactCodegen - ReactCommon/turbomodule/bridging - ReactCommon/turbomodule/core - - uniffi-bindgen-react-native (= 0.29.3-1) + - uniffi-bindgen-react-native (= 0.31.0-2) - Yoga - SocketRocket (0.7.1) - - uniffi-bindgen-react-native (0.29.3-1): + - uniffi-bindgen-react-native (0.31.0-2): - React-Core - Yoga (0.0.0) @@ -1856,9 +1856,9 @@ SPEC CHECKSUMS: React-utils: 54df9ada708578c8ad40d92895d6fed03e0e8a9e ReactCodegen: 21a52ccddc6479448fc91903a437dd23ddc7366c ReactCommon: bfd3600989d79bc3acbe7704161b171a1480b9fd - ReactNativeMatrixSdk: df121e47420fe4ac5059c3f7d81adffd8c3bb123 + ReactNativeMatrixSdk: 8ad8fce288035ae6b4e5a1a4cc43e92e4e2bef02 SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748 - uniffi-bindgen-react-native: 125eae9e3a0cf34bf8f3d4b0ceed517df7cc0733 + uniffi-bindgen-react-native: 205a15613d97a49fe17d5bda57f7fa46a7bbafd0 Yoga: feb4910aba9742cfedc059e2b2902e22ffe9954a PODFILE CHECKSUM: 26c75fa7a8774e3435310ec3d6056a0c49f27cc8 diff --git a/matrix-rust-sdk.patch b/matrix-rust-sdk.patch index ce16e99..718bbc5 100644 --- a/matrix-rust-sdk.patch +++ b/matrix-rust-sdk.patch @@ -1,183 +1,156 @@ diff --git a/Cargo.lock b/Cargo.lock -index e47e06f41..93ec4e2c5 100644 +index e47e06f41..18eb9ba56 100644 --- a/Cargo.lock +++ b/Cargo.lock -@@ -4957,7 +4957,7 @@ dependencies = [ - "ruma-identifiers-validation", - "serde", - "syn 2.0.101", -- "toml", -+ "toml 0.9.7", - ] +@@ -211,9 +211,9 @@ checksum = "9dbc3a507a82b17ba0d98f6ce8fd6954ea0c8152e98009d36a40d8dcc8ce078a" [[package]] -@@ -6144,18 +6144,25 @@ dependencies = [ - "tokio", - ] + name = "askama" +-version = "0.13.1" ++version = "0.14.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "5d4744ed2eef2645831b441d8f5459689ade2ab27c854488fbab1fbe94fce1a7" ++checksum = "f75363874b771be265f4ffe307ca705ef6f3baa19011c149da8674a87f1b75c4" + dependencies = [ + "askama_derive", + "itoa", +@@ -224,9 +224,9 @@ dependencies = [ -+[[package]] -+name = "toml" -+version = "0.5.11" -+source = "registry+https://github.com/rust-lang/crates.io-index" -+checksum = "f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234" -+dependencies = [ -+ "serde", -+] -+ [[package]] - name = "toml" - version = "0.9.7" + name = "askama_derive" +-version = "0.13.1" ++version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" - checksum = "00e5e5d9bf2475ac9d4f0d9edab68cc573dc2fd644b0dba36b0c30a92dd9eaa0" +-checksum = "d661e0f57be36a5c14c48f78d09011e67e0cb618f269cca9f2fd8d15b68c46ac" ++checksum = "129397200fe83088e8a68407a8e2b1f826cf0086b21ccdb866a722c8bcd3a94f" dependencies = [ -- "indexmap", - "serde_core", - "serde_spanned", - "toml_datetime 0.7.2", - "toml_parser", -- "toml_writer", - "winnow 0.7.13", - ] + "askama_parser", + "basic-toml", +@@ -241,9 +241,9 @@ dependencies = [ -@@ -6194,12 +6201,6 @@ dependencies = [ - "winnow 0.7.13", - ] - --[[package]] --name = "toml_writer" --version = "1.0.4" --source = "registry+https://github.com/rust-lang/crates.io-index" --checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2" -- [[package]] - name = "tower" - version = "0.5.2" -@@ -6484,9 +6485,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" + name = "askama_parser" +-version = "0.13.0" ++version = "0.14.0" + source = "registry+https://github.com/rust-lang/crates.io-index" +-checksum = "cf315ce6524c857bb129ff794935cf6d42c82a6cff60526fe2a63593de4d0d4f" ++checksum = "d6ab5630b3d5eaf232620167977f95eb51f3432fc76852328774afbd242d4358" + dependencies = [ + "memchr", + "serde", +@@ -6484,9 +6484,9 @@ checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" [[package]] name = "uniffi" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c866f627c3f04c3df068b68bb2d725492caaa539dd313e2a9d26bb85b1a32f4e" -+checksum = "3291800a6b06569f7d3e15bdb6dc235e0f0c8bd3eb07177f430057feb076415f" ++checksum = "b8c6dec3fc6645f71a16a3fa9ff57991028153bd194ca97f4b55e610c73ce66a" dependencies = [ "anyhow", "camino", -@@ -6508,9 +6509,9 @@ dependencies = [ +@@ -6508,9 +6508,9 @@ dependencies = [ [[package]] name = "uniffi_bindgen" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c8ca600167641ebe7c8ba9254af40492dda3397c528cc3b2f511bd23e8541a5" -+checksum = "a04b99fa7796eaaa7b87976a0dbdd1178dc1ee702ea00aca2642003aef9b669e" ++checksum = "4ed0150801958d4825da56a41c71f000a457ac3a4613fa9647df78ac4b6b6881" dependencies = [ "anyhow", "askama", -@@ -6525,7 +6526,7 @@ dependencies = [ - "serde", - "tempfile", - "textwrap", -- "toml", -+ "toml 0.5.11", - "uniffi_internal_macros", - "uniffi_meta", - "uniffi_pipeline", -@@ -6534,9 +6535,9 @@ dependencies = [ +@@ -6534,9 +6534,9 @@ dependencies = [ [[package]] name = "uniffi_build" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e55c05228f4858bb258f651d21d743fcc1fe5a2ec20d3c0f9daefddb105ee4d" -+checksum = "025a05cba02ee22b6624ac3d257e59c7395319ea8fe1aae33a7cdb4e2a3016cc" ++checksum = "b78fd9271a4c2e85bd2c266c5a9ede1fac676eb39fd77f636c27eaf67426fd5f" dependencies = [ "anyhow", "camino", -@@ -6545,9 +6546,9 @@ dependencies = [ +@@ -6545,9 +6545,9 @@ dependencies = [ [[package]] name = "uniffi_core" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e7a5a038ebffe8f4cf91416b154ef3c2468b18e828b7009e01b1b99938089f9" -+checksum = "f38a9a27529ccff732f8efddb831b65b1e07f7dea3fd4cacd4a35a8c4b253b98" ++checksum = "b0ef62e69762fbb9386dcb6c87cd3dd05d525fa8a3a579a290892e60ddbda47e" dependencies = [ "anyhow", "async-compat", -@@ -6558,9 +6559,9 @@ dependencies = [ +@@ -6558,9 +6558,9 @@ dependencies = [ [[package]] name = "uniffi_internal_macros" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3c2a6f93e7b73726e2015696ece25ca0ac5a5f1cf8d6a7ab5214dd0a01d2edf" -+checksum = "09acd2ce09c777dd65ee97c251d33c8a972afc04873f1e3b21eb3492ade16933" ++checksum = "98f51ebca0d9a4b2aa6c644d5ede45c56f73906b96403c08a1985e75ccb64a01" dependencies = [ "anyhow", "indexmap", -@@ -6571,9 +6572,9 @@ dependencies = [ +@@ -6571,9 +6571,9 @@ dependencies = [ [[package]] name = "uniffi_macros" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64c6309fc36c7992afc03bc0c5b059c656bccbef3f2a4bc362980017f8936141" -+checksum = "5596f178c4f7aafa1a501c4e0b96236a96bc2ef92bdb453d83e609dad0040152" ++checksum = "db9d12529f1223d014fd501e5f29ca0884d15d6ed5ddddd9f506e55350327dc3" dependencies = [ "camino", "fs-err", -@@ -6582,15 +6583,15 @@ dependencies = [ - "quote", - "serde", - "syn 2.0.101", -- "toml", -+ "toml 0.5.11", - "uniffi_meta", - ] +@@ -6588,21 +6588,21 @@ dependencies = [ [[package]] name = "uniffi_meta" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0a138823392dba19b0aa494872689f97d0ee157de5852e2bec157ce6de9cdc22" -+checksum = "beadc1f460eb2e209263c49c4f5b19e9a02e00a3b2b393f78ad10d766346ecff" ++checksum = "9df6d413db2827c68588f8149d30d49b71d540d46539e435b23a7f7dbd4d4f86" dependencies = [ "anyhow", - "siphasher 0.3.11", -@@ -6600,9 +6601,9 @@ dependencies = [ +- "siphasher 0.3.11", ++ "siphasher 1.0.1", + "uniffi_internal_macros", + "uniffi_pipeline", + ] [[package]] name = "uniffi_pipeline" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c27c4b515d25f8e53cc918e238c39a79c3144a40eaf2e51c4a7958973422c29" -+checksum = "dd76b3ac8a2d964ca9fce7df21c755afb4c77b054a85ad7a029ad179cc5abb8a" ++checksum = "a806dddc8208f22efd7e95a5cdf88ed43d0f3271e8f63b47e757a8bbdb43b63a" dependencies = [ "anyhow", "heck", -@@ -6613,9 +6614,9 @@ dependencies = [ +@@ -6613,9 +6613,9 @@ dependencies = [ [[package]] name = "uniffi_udl" -version = "0.30.0" -+version = "0.29.5" ++version = "0.31.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0adacdd848aeed7af4f5af7d2f621d5e82531325d405e29463482becfdeafca" -+checksum = "4319cf905911d70d5b97ce0f46f101619a22e9a189c8c46d797a9955e9233716" ++checksum = "0d1a7339539bf6f6fa3e9b534dece13f778bda2d54b1a6d4e40b4d6090ac26e7" dependencies = [ "anyhow", "textwrap", diff --git a/Cargo.toml b/Cargo.toml -index 23e28a80b..ffe025b2c 100644 +index 23e28a80b..5bb564db5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -105,8 +105,8 @@ tracing-appender = "0.2.3" @@ -186,8 +159,20 @@ index 23e28a80b..ffe025b2c 100644 unicode-normalization = "0.1.25" -uniffi = { version = "0.30.0" } -uniffi_bindgen = { version = "0.30.0" } -+uniffi = { version = "0.29.4" } -+uniffi_bindgen = { version = "0.29.4" } ++uniffi = { version = "0.31.0" } ++uniffi_bindgen = { version = "0.31.0" } url = "2.5.7" uuid = "1.18.1" vergen-gitcl = "1.0.8" +diff --git a/crates/matrix-sdk/src/lib.rs b/crates/matrix-sdk/src/lib.rs +index f7ccf826e..76563ca11 100644 +--- a/crates/matrix-sdk/src/lib.rs ++++ b/crates/matrix-sdk/src/lib.rs +@@ -13,6 +13,7 @@ + // See the License for the specific language governing permissions and + // limitations under the License. + ++#![recursion_limit = "256"] + #![doc = include_str!("../README.md")] + #![warn(missing_debug_implementations, missing_docs)] + #![cfg_attr(target_family = "wasm", allow(clippy::arc_with_non_send_sync))] diff --git a/package.json b/package.json index 215ce47..472bca7 100644 --- a/package.json +++ b/package.json @@ -231,6 +231,6 @@ "patch-package": "^8.0.0", "postinstall-postinstall": "^2.1.0", "tar": "^7.4.3", - "uniffi-bindgen-react-native": "0.29.3-1" + "uniffi-bindgen-react-native": "0.31.0-2" } } diff --git a/patches/uniffi-bindgen-react-native+0.29.3-1.patch b/patches/uniffi-bindgen-react-native+0.29.3-1.patch deleted file mode 100644 index fc4e9be..0000000 --- a/patches/uniffi-bindgen-react-native+0.29.3-1.patch +++ /dev/null @@ -1,12 +0,0 @@ -diff --git a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/commands/generate.rs b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/commands/generate.rs -index 1b13ea1..a5113cc 100644 ---- a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/commands/generate.rs -+++ b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/commands/generate.rs -@@ -98,6 +98,7 @@ pub(crate) struct GenerateAllArgs { - lib_file: Utf8PathBuf, - - /// Whether to generate native bindings or not. -+ #[clap(long, default_value = "false")] - native_bindings: bool, - } - diff --git a/patches/uniffi-bindgen-react-native+0.31.0-2.patch b/patches/uniffi-bindgen-react-native+0.31.0-2.patch new file mode 100644 index 0000000..2e0fd52 --- /dev/null +++ b/patches/uniffi-bindgen-react-native+0.31.0-2.patch @@ -0,0 +1,44 @@ +diff --git a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs +index 1234567..abcdefg 100644 +--- a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs ++++ b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs +@@ -208,12 +208,16 @@ impl AndroidBuildArgs { + .context("Need at least one library file to generate native Kotlin bindings")?; + let out_dir = config.android.src_main_java_dir(config.project_root()); +- generate_native_kotlin_bindings(GenerateOptions { ++ let pwd = ubrn_common::pwd()?; ++ ubrn_common::cd(&config.crate_.crate_dir()?)?; ++ let result = generate_native_kotlin_bindings(GenerateOptions { + source: library_path.clone(), + languages: vec![TargetLanguage::Kotlin], + out_dir: out_dir.clone(), + format: false, + ..Default::default() +- })?; ++ }); ++ ubrn_common::cd(&pwd)?; ++ result?; + Ok(()) + } +diff --git a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs +index 1234567..abcdefg 100644 +--- a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs ++++ b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs +@@ -193,12 +193,16 @@ impl IosBuildArgs { + } + ubrn_common::mk_dir(&out_dir)?; +- generate_native_swift_bindings(GenerateOptions { ++ let pwd = ubrn_common::pwd()?; ++ ubrn_common::cd(&config.crate_.crate_dir()?)?; ++ let result = generate_native_swift_bindings(GenerateOptions { + source: library_path.clone(), + languages: vec![TargetLanguage::Swift], + out_dir: out_dir.clone(), + format: false, + ..Default::default() +- })?; ++ }); ++ ubrn_common::cd(&pwd)?; ++ result?; + Ok(()) + } diff --git a/src/generated/matrix_sdk-ffi.ts b/src/generated/matrix_sdk-ffi.ts index 448463b..8e5e071 100644 --- a/src/generated/matrix_sdk-ffi.ts +++ b/src/generated/matrix_sdk-ffi.ts @@ -1,11 +1,15 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + import { type StructuralEquality as UniffiStructuralEquality, type UniffiForeignFuture as RuntimeUniffiForeignFuture, type UniffiRustCallStatus, - type UniffiRustArcPtr, + type UniffiGcObject, type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback, type UniffiResult, } from 'uniffi-bindgen-react-native'; @@ -24,11 +28,11 @@ interface NativeModuleInterface { uniffi_out_err: UniffiRustCallStatus ): string; ubrn_uniffi_matrix_sdk_fn_clone_oauthauthorizationdata( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_fn_free_oauthauthorizationdata( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url( @@ -40,7 +44,7 @@ interface NativeModuleInterface { ubrn_uniffi_internal_fn_method_oauthauthorizationdata_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; } // Casting globalThis to any allows us to look for `NativeMatrixSdk` @@ -57,114 +61,107 @@ export type UniffiRustFutureContinuationCallback = ( data: bigint, pollResult: number ) => void; -type UniffiForeignFutureFree = (handle: bigint) => void; +export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void; type UniffiCallbackInterfaceFree = (handle: bigint) => void; -export type UniffiForeignFuture = { +type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult; +export type UniffiForeignFutureDroppedCallbackStruct = { handle: bigint; - free: UniffiForeignFutureFree; + free: UniffiForeignFutureDroppedCallback; }; -export type UniffiForeignFutureStructU8 = { +export type UniffiForeignFutureResultU8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU8 = ( callbackData: bigint, - result: UniffiForeignFutureStructU8 + result: UniffiForeignFutureResultU8 ) => void; -export type UniffiForeignFutureStructI8 = { +export type UniffiForeignFutureResultI8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI8 = ( callbackData: bigint, - result: UniffiForeignFutureStructI8 + result: UniffiForeignFutureResultI8 ) => void; -export type UniffiForeignFutureStructU16 = { +export type UniffiForeignFutureResultU16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU16 = ( callbackData: bigint, - result: UniffiForeignFutureStructU16 + result: UniffiForeignFutureResultU16 ) => void; -export type UniffiForeignFutureStructI16 = { +export type UniffiForeignFutureResultI16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI16 = ( callbackData: bigint, - result: UniffiForeignFutureStructI16 + result: UniffiForeignFutureResultI16 ) => void; -export type UniffiForeignFutureStructU32 = { +export type UniffiForeignFutureResultU32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU32 = ( callbackData: bigint, - result: UniffiForeignFutureStructU32 + result: UniffiForeignFutureResultU32 ) => void; -export type UniffiForeignFutureStructI32 = { +export type UniffiForeignFutureResultI32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI32 = ( callbackData: bigint, - result: UniffiForeignFutureStructI32 + result: UniffiForeignFutureResultI32 ) => void; -export type UniffiForeignFutureStructU64 = { +export type UniffiForeignFutureResultU64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU64 = ( callbackData: bigint, - result: UniffiForeignFutureStructU64 + result: UniffiForeignFutureResultU64 ) => void; -export type UniffiForeignFutureStructI64 = { +export type UniffiForeignFutureResultI64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI64 = ( callbackData: bigint, - result: UniffiForeignFutureStructI64 + result: UniffiForeignFutureResultI64 ) => void; -export type UniffiForeignFutureStructF32 = { +export type UniffiForeignFutureResultF32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF32 = ( callbackData: bigint, - result: UniffiForeignFutureStructF32 + result: UniffiForeignFutureResultF32 ) => void; -export type UniffiForeignFutureStructF64 = { +export type UniffiForeignFutureResultF64 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF64 = ( callbackData: bigint, - result: UniffiForeignFutureStructF64 -) => void; -export type UniffiForeignFutureStructPointer = { - returnValue: bigint; - callStatus: UniffiRustCallStatus; -}; -export type UniffiForeignFutureCompletePointer = ( - callbackData: bigint, - result: UniffiForeignFutureStructPointer + result: UniffiForeignFutureResultF64 ) => void; -export type UniffiForeignFutureStructRustBuffer = { +export type UniffiForeignFutureResultRustBuffer = { returnValue: Uint8Array; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteRustBuffer = ( callbackData: bigint, - result: UniffiForeignFutureStructRustBuffer + result: UniffiForeignFutureResultRustBuffer ) => void; -export type UniffiForeignFutureStructVoid = { +export type UniffiForeignFutureResultVoid = { callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteVoid = ( callbackData: bigint, - result: UniffiForeignFutureStructVoid + result: UniffiForeignFutureResultVoid ) => void; // UniffiRustFutureContinuationCallback is generated as part of the component interface's diff --git a/src/generated/matrix_sdk.ts b/src/generated/matrix_sdk.ts index 0e7de0e..4e810bf 100644 --- a/src/generated/matrix_sdk.ts +++ b/src/generated/matrix_sdk.ts @@ -1,41 +1,44 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck import nativeModule, { type UniffiRustFutureContinuationCallback, - type UniffiForeignFuture, - type UniffiForeignFutureStructU8, + type UniffiForeignFutureDroppedCallback, + type UniffiForeignFutureDroppedCallbackStruct, + type UniffiForeignFutureResultU8, type UniffiForeignFutureCompleteU8, - type UniffiForeignFutureStructI8, + type UniffiForeignFutureResultI8, type UniffiForeignFutureCompleteI8, - type UniffiForeignFutureStructU16, + type UniffiForeignFutureResultU16, type UniffiForeignFutureCompleteU16, - type UniffiForeignFutureStructI16, + type UniffiForeignFutureResultI16, type UniffiForeignFutureCompleteI16, - type UniffiForeignFutureStructU32, + type UniffiForeignFutureResultU32, type UniffiForeignFutureCompleteU32, - type UniffiForeignFutureStructI32, + type UniffiForeignFutureResultI32, type UniffiForeignFutureCompleteI32, - type UniffiForeignFutureStructU64, + type UniffiForeignFutureResultU64, type UniffiForeignFutureCompleteU64, - type UniffiForeignFutureStructI64, + type UniffiForeignFutureResultI64, type UniffiForeignFutureCompleteI64, - type UniffiForeignFutureStructF32, + type UniffiForeignFutureResultF32, type UniffiForeignFutureCompleteF32, - type UniffiForeignFutureStructF64, + type UniffiForeignFutureResultF64, type UniffiForeignFutureCompleteF64, - type UniffiForeignFutureStructPointer, - type UniffiForeignFutureCompletePointer, - type UniffiForeignFutureStructRustBuffer, + type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleteRustBuffer, - type UniffiForeignFutureStructVoid, + type UniffiForeignFutureResultVoid, type UniffiForeignFutureCompleteVoid, } from './matrix_sdk-ffi'; import { type FfiConverter, type UniffiByteArray, + type UniffiGcObject, + type UniffiHandle, type UniffiObjectFactory, - type UniffiRustArcPtr, - type UnsafeMutableRawPointer, AbstractFfiConverterByteArray, FfiConverterBool, FfiConverterFloat64, @@ -78,47 +81,47 @@ export type RoomPowerLevelChanges = { /** * The level required to ban a user. */ - ban: /*i64*/ bigint | undefined; + ban?: /*i64*/ bigint; /** * The level required to invite a user. */ - invite: /*i64*/ bigint | undefined; + invite?: /*i64*/ bigint; /** * The level required to kick a user. */ - kick: /*i64*/ bigint | undefined; + kick?: /*i64*/ bigint; /** * The level required to redact an event. */ - redact: /*i64*/ bigint | undefined; + redact?: /*i64*/ bigint; /** * The default level required to send message events. */ - eventsDefault: /*i64*/ bigint | undefined; + eventsDefault?: /*i64*/ bigint; /** * The default level required to send state events. */ - stateDefault: /*i64*/ bigint | undefined; + stateDefault?: /*i64*/ bigint; /** * The default power level for every user in the room. */ - usersDefault: /*i64*/ bigint | undefined; + usersDefault?: /*i64*/ bigint; /** * The level required to change the room's name. */ - roomName: /*i64*/ bigint | undefined; + roomName?: /*i64*/ bigint; /** * The level required to change the room's avatar. */ - roomAvatar: /*i64*/ bigint | undefined; + roomAvatar?: /*i64*/ bigint; /** * The level required to change the room's topic. */ - roomTopic: /*i64*/ bigint | undefined; + roomTopic?: /*i64*/ bigint; /** * The level required to change the space's children. */ - spaceChild: /*i64*/ bigint | undefined; + spaceChild?: /*i64*/ bigint; }; /** @@ -145,21 +148,8 @@ export const RoomPowerLevelChanges = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomPowerLevelChanges}, with defaults specified - * in Rust, in the {@link matrix_sdk} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomPowerLevelChanges}, 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, }); })(); @@ -239,21 +229,8 @@ export const ServerVendorInfo = (() => { ); })(); 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, }); })(); @@ -298,58 +275,58 @@ export type VirtualElementCallWidgetConfig = { * If the user wants to start a call or join an existing one. * Controls if the lobby is skipped or not. */ - intent: Intent | undefined; + intent?: Intent; /** * Skip the lobby when joining a call. */ - skipLobby: boolean | undefined; + skipLobby?: boolean; /** * Whether the branding header of Element call should be shown or if a * mobile header navbar should be render. * * Default: [`HeaderStyle::Standard`] */ - header: HeaderStyle | undefined; + header?: HeaderStyle; /** * Whether the branding header of Element call should be hidden. * * Default: `true` */ - hideHeader: boolean | undefined; + hideHeader?: boolean; /** * If set, the lobby will be skipped and the widget will join the * call on the `io.element.join` action. * * Default: `false` */ - preload: boolean | undefined; + preload?: boolean; /** * Whether element call should prompt the user to open in the browser or * the app. * * Default: `false` */ - appPrompt: boolean | undefined; + appPrompt?: boolean; /** * Make it not possible to get to the calls list in the webview. * * Default: `true` */ - confineToRoom: boolean | undefined; + confineToRoom?: boolean; /** * Do not show the screenshare button. */ - hideScreensharing: boolean | undefined; + hideScreensharing?: boolean; /** * Make the audio devices be controlled by the os instead of the * element-call webview. */ - controlledAudioDevices: boolean | undefined; + controlledAudioDevices?: boolean; /** * Whether and what type of notification Element Call should send, when * starting a call. */ - sendNotificationType: NotificationType | undefined; + sendNotificationType?: NotificationType; }; /** @@ -374,21 +351,8 @@ export const VirtualElementCallWidgetConfig = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link VirtualElementCallWidgetConfig}, with defaults specified - * in Rust, in the {@link matrix_sdk} crate. - */ create, - - /** - * Create a frozen instance of {@link VirtualElementCallWidgetConfig}, 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, }); @@ -480,17 +444,17 @@ export type VirtualElementCallWidgetProperties = { * Defaults to `element_call_url` for the non-iframe (dedicated webview) * usecase. */ - parentUrl: string | undefined; + parentUrl?: string; /** * The font scale which will be used inside element call. * * Default: `1` */ - fontScale: /*f64*/ number | undefined; + fontScale?: /*f64*/ number; /** * The font to use, to adapt to the system font. */ - font: string | undefined; + font?: string; /** * The encryption system to use. * @@ -500,32 +464,32 @@ export type VirtualElementCallWidgetProperties = { /** * Can be used to pass a PostHog id to element call. */ - posthogUserId: string | undefined; + posthogUserId?: string; /** * The host of the posthog api. * This is only used by the embedded package of Element Call. */ - posthogApiHost: string | undefined; + posthogApiHost?: string; /** * The key for the posthog api. * This is only used by the embedded package of Element Call. */ - posthogApiKey: string | undefined; + posthogApiKey?: string; /** * The url to use for submitting rageshakes. * This is only used by the embedded package of Element Call. */ - rageshakeSubmitUrl: string | undefined; + rageshakeSubmitUrl?: string; /** * Sentry [DSN](https://docs.sentry.io/concepts/key-terms/dsn-explainer/) * This is only used by the embedded package of Element Call. */ - sentryDsn: string | undefined; + sentryDsn?: string; /** * Sentry [environment](https://docs.sentry.io/concepts/key-terms/key-terms/) * This is only used by the embedded package of Element Call. */ - sentryEnvironment: string | undefined; + sentryEnvironment?: string; }; /** @@ -550,21 +514,8 @@ export const VirtualElementCallWidgetProperties = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link VirtualElementCallWidgetProperties}, with defaults specified - * in Rust, in the {@link matrix_sdk} crate. - */ create, - - /** - * Create a frozen instance of {@link VirtualElementCallWidgetProperties}, 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, }); @@ -1156,7 +1107,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = QrCodeLoginError_Tags.OAuth; + readonly tag = QrCodeLoginError_Tags.OAuth; constructor(message: string) { super('QrCodeLoginError', 'OAuth', message); @@ -1181,7 +1132,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = QrCodeLoginError_Tags.LoginFailure; + readonly tag = QrCodeLoginError_Tags.LoginFailure; constructor(message: string) { super('QrCodeLoginError', 'LoginFailure', message); @@ -1206,7 +1157,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = QrCodeLoginError_Tags.UnexpectedMessage; + readonly tag = QrCodeLoginError_Tags.UnexpectedMessage; constructor(message: string) { super('QrCodeLoginError', 'UnexpectedMessage', message); @@ -1231,7 +1182,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = QrCodeLoginError_Tags.SecureChannel; + readonly tag = QrCodeLoginError_Tags.SecureChannel; constructor(message: string) { super('QrCodeLoginError', 'SecureChannel', message); @@ -1256,7 +1207,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = QrCodeLoginError_Tags.NotFound; + readonly tag = QrCodeLoginError_Tags.NotFound; constructor(message: string) { super('QrCodeLoginError', 'NotFound', message); @@ -1281,7 +1232,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 6; - public readonly tag = QrCodeLoginError_Tags.CrossProcessRefreshLock; + readonly tag = QrCodeLoginError_Tags.CrossProcessRefreshLock; constructor(message: string) { super('QrCodeLoginError', 'CrossProcessRefreshLock', message); @@ -1308,7 +1259,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 7; - public readonly tag = QrCodeLoginError_Tags.UserIdDiscovery; + readonly tag = QrCodeLoginError_Tags.UserIdDiscovery; constructor(message: string) { super('QrCodeLoginError', 'UserIdDiscovery', message); @@ -1334,7 +1285,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 8; - public readonly tag = QrCodeLoginError_Tags.SessionTokens; + readonly tag = QrCodeLoginError_Tags.SessionTokens; constructor(message: string) { super('QrCodeLoginError', 'SessionTokens', message); @@ -1359,7 +1310,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 9; - public readonly tag = QrCodeLoginError_Tags.DeviceKeyUpload; + readonly tag = QrCodeLoginError_Tags.DeviceKeyUpload; constructor(message: string) { super('QrCodeLoginError', 'DeviceKeyUpload', message); @@ -1385,7 +1336,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 10; - public readonly tag = QrCodeLoginError_Tags.SecretImport; + readonly tag = QrCodeLoginError_Tags.SecretImport; constructor(message: string) { super('QrCodeLoginError', 'SecretImport', message); @@ -1411,7 +1362,7 @@ export const QrCodeLoginError = (() => { */ readonly [variantOrdinalSymbol] = 11; - public readonly tag = QrCodeLoginError_Tags.ServerReset; + readonly tag = QrCodeLoginError_Tags.ServerReset; constructor(message: string) { super('QrCodeLoginError', 'ServerReset', message); @@ -1748,25 +1699,29 @@ const FfiConverterTypeRoomPaginationStatus = (() => { /** * The data needed to perform authorization using OAuth 2.0. */ -export interface OAuthAuthorizationDataInterface { +export interface OAuthAuthorizationDataLike { /** * The login URL to use for authorization. */ loginUrl(): string; } +/** + * @deprecated Use `OAuthAuthorizationDataLike` instead. + */ +export type OAuthAuthorizationDataInterface = OAuthAuthorizationDataLike; /** * The data needed to perform authorization using OAuth 2.0. */ export class OAuthAuthorizationData extends UniffiAbstractObject - implements OAuthAuthorizationDataInterface + implements OAuthAuthorizationDataLike { readonly [uniffiTypeNameSymbol] = 'OAuthAuthorizationData'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -1776,7 +1731,7 @@ export class OAuthAuthorizationData /** * The login URL to use for authorization. */ - public loginUrl(): string { + loginUrl(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -1809,12 +1764,10 @@ export class OAuthAuthorizationData } } -const uniffiTypeOAuthAuthorizationDataObjectFactory: UniffiObjectFactory = +const uniffiTypeOAuthAuthorizationDataObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): OAuthAuthorizationDataInterface { + create(pointer: UniffiHandle): OAuthAuthorizationDataLike { const instance = Object.create(OAuthAuthorizationData.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -1822,7 +1775,7 @@ const uniffiTypeOAuthAuthorizationDataObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_oauthauthorizationdata_ffi__bless_pointer( @@ -1833,20 +1786,18 @@ const uniffiTypeOAuthAuthorizationDataObjectFactory: UniffiObjectFactory @@ -1858,7 +1809,7 @@ const uniffiTypeOAuthAuthorizationDataObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_fn_free_oauthauthorizationdata( @@ -1869,7 +1820,7 @@ const uniffiTypeOAuthAuthorizationDataObjectFactory: UniffiObjectFactory void; -type UniffiForeignFutureFree = (handle: bigint) => void; +export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void; type UniffiCallbackInterfaceFree = (handle: bigint) => void; -export type UniffiForeignFuture = { +type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult; +export type UniffiForeignFutureDroppedCallbackStruct = { handle: bigint; - free: UniffiForeignFutureFree; + free: UniffiForeignFutureDroppedCallback; }; -export type UniffiForeignFutureStructU8 = { +export type UniffiForeignFutureResultU8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU8 = ( callbackData: bigint, - result: UniffiForeignFutureStructU8 + result: UniffiForeignFutureResultU8 ) => void; -export type UniffiForeignFutureStructI8 = { +export type UniffiForeignFutureResultI8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI8 = ( callbackData: bigint, - result: UniffiForeignFutureStructI8 + result: UniffiForeignFutureResultI8 ) => void; -export type UniffiForeignFutureStructU16 = { +export type UniffiForeignFutureResultU16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU16 = ( callbackData: bigint, - result: UniffiForeignFutureStructU16 + result: UniffiForeignFutureResultU16 ) => void; -export type UniffiForeignFutureStructI16 = { +export type UniffiForeignFutureResultI16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI16 = ( callbackData: bigint, - result: UniffiForeignFutureStructI16 + result: UniffiForeignFutureResultI16 ) => void; -export type UniffiForeignFutureStructU32 = { +export type UniffiForeignFutureResultU32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU32 = ( callbackData: bigint, - result: UniffiForeignFutureStructU32 + result: UniffiForeignFutureResultU32 ) => void; -export type UniffiForeignFutureStructI32 = { +export type UniffiForeignFutureResultI32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI32 = ( callbackData: bigint, - result: UniffiForeignFutureStructI32 + result: UniffiForeignFutureResultI32 ) => void; -export type UniffiForeignFutureStructU64 = { +export type UniffiForeignFutureResultU64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU64 = ( callbackData: bigint, - result: UniffiForeignFutureStructU64 + result: UniffiForeignFutureResultU64 ) => void; -export type UniffiForeignFutureStructI64 = { +export type UniffiForeignFutureResultI64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI64 = ( callbackData: bigint, - result: UniffiForeignFutureStructI64 + result: UniffiForeignFutureResultI64 ) => void; -export type UniffiForeignFutureStructF32 = { +export type UniffiForeignFutureResultF32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF32 = ( callbackData: bigint, - result: UniffiForeignFutureStructF32 + result: UniffiForeignFutureResultF32 ) => void; -export type UniffiForeignFutureStructF64 = { +export type UniffiForeignFutureResultF64 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF64 = ( callbackData: bigint, - result: UniffiForeignFutureStructF64 -) => void; -export type UniffiForeignFutureStructPointer = { - returnValue: bigint; - callStatus: UniffiRustCallStatus; -}; -export type UniffiForeignFutureCompletePointer = ( - callbackData: bigint, - result: UniffiForeignFutureStructPointer + result: UniffiForeignFutureResultF64 ) => void; -export type UniffiForeignFutureStructRustBuffer = { +export type UniffiForeignFutureResultRustBuffer = { returnValue: Uint8Array; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteRustBuffer = ( callbackData: bigint, - result: UniffiForeignFutureStructRustBuffer + result: UniffiForeignFutureResultRustBuffer ) => void; -export type UniffiForeignFutureStructVoid = { +export type UniffiForeignFutureResultVoid = { callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteVoid = ( callbackData: bigint, - result: UniffiForeignFutureStructVoid + result: UniffiForeignFutureResultVoid ) => void; // UniffiRustFutureContinuationCallback is generated as part of the component interface's diff --git a/src/generated/matrix_sdk_base.ts b/src/generated/matrix_sdk_base.ts index 744128e..0024b85 100644 --- a/src/generated/matrix_sdk_base.ts +++ b/src/generated/matrix_sdk_base.ts @@ -1,33 +1,36 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck import nativeModule, { type UniffiRustFutureContinuationCallback, - type UniffiForeignFuture, - type UniffiForeignFutureStructU8, + type UniffiForeignFutureDroppedCallback, + type UniffiForeignFutureDroppedCallbackStruct, + type UniffiForeignFutureResultU8, type UniffiForeignFutureCompleteU8, - type UniffiForeignFutureStructI8, + type UniffiForeignFutureResultI8, type UniffiForeignFutureCompleteI8, - type UniffiForeignFutureStructU16, + type UniffiForeignFutureResultU16, type UniffiForeignFutureCompleteU16, - type UniffiForeignFutureStructI16, + type UniffiForeignFutureResultI16, type UniffiForeignFutureCompleteI16, - type UniffiForeignFutureStructU32, + type UniffiForeignFutureResultU32, type UniffiForeignFutureCompleteU32, - type UniffiForeignFutureStructI32, + type UniffiForeignFutureResultI32, type UniffiForeignFutureCompleteI32, - type UniffiForeignFutureStructU64, + type UniffiForeignFutureResultU64, type UniffiForeignFutureCompleteU64, - type UniffiForeignFutureStructI64, + type UniffiForeignFutureResultI64, type UniffiForeignFutureCompleteI64, - type UniffiForeignFutureStructF32, + type UniffiForeignFutureResultF32, type UniffiForeignFutureCompleteF32, - type UniffiForeignFutureStructF64, + type UniffiForeignFutureResultF64, type UniffiForeignFutureCompleteF64, - type UniffiForeignFutureStructPointer, - type UniffiForeignFutureCompletePointer, - type UniffiForeignFutureStructRustBuffer, + type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleteRustBuffer, - type UniffiForeignFutureStructVoid, + type UniffiForeignFutureResultVoid, type UniffiForeignFutureCompleteVoid, } from './matrix_sdk_base-ffi'; import { @@ -79,7 +82,7 @@ export type MediaRetentionPolicy = { * * Defaults to 400 MiB. */ - maxCacheSize: /*u64*/ bigint | undefined; + maxCacheSize?: /*u64*/ bigint; /** * The maximum authorized size of a single media content, in bytes. * @@ -97,7 +100,7 @@ export type MediaRetentionPolicy = { * * Defaults to 20 MiB. */ - maxFileSize: /*u64*/ bigint | undefined; + maxFileSize?: /*u64*/ bigint; /** * The duration after which unaccessed media content is considered * expired. @@ -107,7 +110,7 @@ export type MediaRetentionPolicy = { * * Defaults to 60 days. */ - lastAccessExpiry: UniffiDuration | undefined; + lastAccessExpiry?: UniffiDuration; /** * The duration between two automatic media cache cleanups. * @@ -118,7 +121,7 @@ export type MediaRetentionPolicy = { * * Defaults to running cleanups daily. */ - cleanupFrequency: UniffiDuration | undefined; + cleanupFrequency?: UniffiDuration; }; /** @@ -133,21 +136,8 @@ export const MediaRetentionPolicy = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link MediaRetentionPolicy}, with defaults specified - * in Rust, in the {@link matrix_sdk_base} crate. - */ create, - - /** - * Create a frozen instance of {@link MediaRetentionPolicy}, with defaults specified - * in Rust, in the {@link matrix_sdk_base} crate. - */ new: create, - - /** - * Defaults specified in the {@link matrix_sdk_base} crate. - */ defaults: () => Object.freeze(defaults()) as Partial, }); })(); @@ -278,7 +268,7 @@ const FfiConverterOptionalUInt64 = new FfiConverterOptional(FfiConverterUInt64); */ function uniffiEnsureInitialized() { // Get the bindings contract version from our ComponentInterface - const bindingsContractVersion = 29; + const bindingsContractVersion = 30; // Get the scaffolding contract version by calling the into the dylib const scaffoldingContractVersion = nativeModule().ubrn_ffi_matrix_sdk_base_uniffi_contract_version(); diff --git a/src/generated/matrix_sdk_common-ffi.ts b/src/generated/matrix_sdk_common-ffi.ts index e2ee4f9..f030a93 100644 --- a/src/generated/matrix_sdk_common-ffi.ts +++ b/src/generated/matrix_sdk_common-ffi.ts @@ -1,11 +1,15 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + import { type StructuralEquality as UniffiStructuralEquality, type UniffiForeignFuture as RuntimeUniffiForeignFuture, type UniffiRustCallStatus, - type UniffiRustArcPtr, + type UniffiGcObject, type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback, type UniffiResult, } from 'uniffi-bindgen-react-native'; @@ -40,114 +44,107 @@ export type UniffiRustFutureContinuationCallback = ( data: bigint, pollResult: number ) => void; -type UniffiForeignFutureFree = (handle: bigint) => void; +export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void; type UniffiCallbackInterfaceFree = (handle: bigint) => void; -export type UniffiForeignFuture = { +type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult; +export type UniffiForeignFutureDroppedCallbackStruct = { handle: bigint; - free: UniffiForeignFutureFree; + free: UniffiForeignFutureDroppedCallback; }; -export type UniffiForeignFutureStructU8 = { +export type UniffiForeignFutureResultU8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU8 = ( callbackData: bigint, - result: UniffiForeignFutureStructU8 + result: UniffiForeignFutureResultU8 ) => void; -export type UniffiForeignFutureStructI8 = { +export type UniffiForeignFutureResultI8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI8 = ( callbackData: bigint, - result: UniffiForeignFutureStructI8 + result: UniffiForeignFutureResultI8 ) => void; -export type UniffiForeignFutureStructU16 = { +export type UniffiForeignFutureResultU16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU16 = ( callbackData: bigint, - result: UniffiForeignFutureStructU16 + result: UniffiForeignFutureResultU16 ) => void; -export type UniffiForeignFutureStructI16 = { +export type UniffiForeignFutureResultI16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI16 = ( callbackData: bigint, - result: UniffiForeignFutureStructI16 + result: UniffiForeignFutureResultI16 ) => void; -export type UniffiForeignFutureStructU32 = { +export type UniffiForeignFutureResultU32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU32 = ( callbackData: bigint, - result: UniffiForeignFutureStructU32 + result: UniffiForeignFutureResultU32 ) => void; -export type UniffiForeignFutureStructI32 = { +export type UniffiForeignFutureResultI32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI32 = ( callbackData: bigint, - result: UniffiForeignFutureStructI32 + result: UniffiForeignFutureResultI32 ) => void; -export type UniffiForeignFutureStructU64 = { +export type UniffiForeignFutureResultU64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU64 = ( callbackData: bigint, - result: UniffiForeignFutureStructU64 + result: UniffiForeignFutureResultU64 ) => void; -export type UniffiForeignFutureStructI64 = { +export type UniffiForeignFutureResultI64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI64 = ( callbackData: bigint, - result: UniffiForeignFutureStructI64 + result: UniffiForeignFutureResultI64 ) => void; -export type UniffiForeignFutureStructF32 = { +export type UniffiForeignFutureResultF32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF32 = ( callbackData: bigint, - result: UniffiForeignFutureStructF32 + result: UniffiForeignFutureResultF32 ) => void; -export type UniffiForeignFutureStructF64 = { +export type UniffiForeignFutureResultF64 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF64 = ( callbackData: bigint, - result: UniffiForeignFutureStructF64 -) => void; -export type UniffiForeignFutureStructPointer = { - returnValue: bigint; - callStatus: UniffiRustCallStatus; -}; -export type UniffiForeignFutureCompletePointer = ( - callbackData: bigint, - result: UniffiForeignFutureStructPointer + result: UniffiForeignFutureResultF64 ) => void; -export type UniffiForeignFutureStructRustBuffer = { +export type UniffiForeignFutureResultRustBuffer = { returnValue: Uint8Array; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteRustBuffer = ( callbackData: bigint, - result: UniffiForeignFutureStructRustBuffer + result: UniffiForeignFutureResultRustBuffer ) => void; -export type UniffiForeignFutureStructVoid = { +export type UniffiForeignFutureResultVoid = { callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteVoid = ( callbackData: bigint, - result: UniffiForeignFutureStructVoid + result: UniffiForeignFutureResultVoid ) => void; // UniffiRustFutureContinuationCallback is generated as part of the component interface's diff --git a/src/generated/matrix_sdk_common.ts b/src/generated/matrix_sdk_common.ts index 2fd375c..bb0d75e 100644 --- a/src/generated/matrix_sdk_common.ts +++ b/src/generated/matrix_sdk_common.ts @@ -1,33 +1,36 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck import nativeModule, { type UniffiRustFutureContinuationCallback, - type UniffiForeignFuture, - type UniffiForeignFutureStructU8, + type UniffiForeignFutureDroppedCallback, + type UniffiForeignFutureDroppedCallbackStruct, + type UniffiForeignFutureResultU8, type UniffiForeignFutureCompleteU8, - type UniffiForeignFutureStructI8, + type UniffiForeignFutureResultI8, type UniffiForeignFutureCompleteI8, - type UniffiForeignFutureStructU16, + type UniffiForeignFutureResultU16, type UniffiForeignFutureCompleteU16, - type UniffiForeignFutureStructI16, + type UniffiForeignFutureResultI16, type UniffiForeignFutureCompleteI16, - type UniffiForeignFutureStructU32, + type UniffiForeignFutureResultU32, type UniffiForeignFutureCompleteU32, - type UniffiForeignFutureStructI32, + type UniffiForeignFutureResultI32, type UniffiForeignFutureCompleteI32, - type UniffiForeignFutureStructU64, + type UniffiForeignFutureResultU64, type UniffiForeignFutureCompleteU64, - type UniffiForeignFutureStructI64, + type UniffiForeignFutureResultI64, type UniffiForeignFutureCompleteI64, - type UniffiForeignFutureStructF32, + type UniffiForeignFutureResultF32, type UniffiForeignFutureCompleteF32, - type UniffiForeignFutureStructF64, + type UniffiForeignFutureResultF64, type UniffiForeignFutureCompleteF64, - type UniffiForeignFutureStructPointer, - type UniffiForeignFutureCompletePointer, - type UniffiForeignFutureStructRustBuffer, + type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleteRustBuffer, - type UniffiForeignFutureStructVoid, + type UniffiForeignFutureResultVoid, type UniffiForeignFutureCompleteVoid, } from './matrix_sdk_common-ffi'; import { @@ -172,7 +175,7 @@ const FfiConverterTypeShieldStateCode = (() => { */ function uniffiEnsureInitialized() { // Get the bindings contract version from our ComponentInterface - const bindingsContractVersion = 29; + const bindingsContractVersion = 30; // Get the scaffolding contract version by calling the into the dylib const scaffoldingContractVersion = nativeModule().ubrn_ffi_matrix_sdk_common_uniffi_contract_version(); diff --git a/src/generated/matrix_sdk_crypto-ffi.ts b/src/generated/matrix_sdk_crypto-ffi.ts index 7d22c0e..0123823 100644 --- a/src/generated/matrix_sdk_crypto-ffi.ts +++ b/src/generated/matrix_sdk_crypto-ffi.ts @@ -1,11 +1,15 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + import { type StructuralEquality as UniffiStructuralEquality, type UniffiForeignFuture as RuntimeUniffiForeignFuture, type UniffiRustCallStatus, - type UniffiRustArcPtr, + type UniffiGcObject, type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback, type UniffiResult, } from 'uniffi-bindgen-react-native'; @@ -40,114 +44,107 @@ export type UniffiRustFutureContinuationCallback = ( data: bigint, pollResult: number ) => void; -type UniffiForeignFutureFree = (handle: bigint) => void; +export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void; type UniffiCallbackInterfaceFree = (handle: bigint) => void; -export type UniffiForeignFuture = { +type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult; +export type UniffiForeignFutureDroppedCallbackStruct = { handle: bigint; - free: UniffiForeignFutureFree; + free: UniffiForeignFutureDroppedCallback; }; -export type UniffiForeignFutureStructU8 = { +export type UniffiForeignFutureResultU8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU8 = ( callbackData: bigint, - result: UniffiForeignFutureStructU8 + result: UniffiForeignFutureResultU8 ) => void; -export type UniffiForeignFutureStructI8 = { +export type UniffiForeignFutureResultI8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI8 = ( callbackData: bigint, - result: UniffiForeignFutureStructI8 + result: UniffiForeignFutureResultI8 ) => void; -export type UniffiForeignFutureStructU16 = { +export type UniffiForeignFutureResultU16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU16 = ( callbackData: bigint, - result: UniffiForeignFutureStructU16 + result: UniffiForeignFutureResultU16 ) => void; -export type UniffiForeignFutureStructI16 = { +export type UniffiForeignFutureResultI16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI16 = ( callbackData: bigint, - result: UniffiForeignFutureStructI16 + result: UniffiForeignFutureResultI16 ) => void; -export type UniffiForeignFutureStructU32 = { +export type UniffiForeignFutureResultU32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU32 = ( callbackData: bigint, - result: UniffiForeignFutureStructU32 + result: UniffiForeignFutureResultU32 ) => void; -export type UniffiForeignFutureStructI32 = { +export type UniffiForeignFutureResultI32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI32 = ( callbackData: bigint, - result: UniffiForeignFutureStructI32 + result: UniffiForeignFutureResultI32 ) => void; -export type UniffiForeignFutureStructU64 = { +export type UniffiForeignFutureResultU64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU64 = ( callbackData: bigint, - result: UniffiForeignFutureStructU64 + result: UniffiForeignFutureResultU64 ) => void; -export type UniffiForeignFutureStructI64 = { +export type UniffiForeignFutureResultI64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI64 = ( callbackData: bigint, - result: UniffiForeignFutureStructI64 + result: UniffiForeignFutureResultI64 ) => void; -export type UniffiForeignFutureStructF32 = { +export type UniffiForeignFutureResultF32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF32 = ( callbackData: bigint, - result: UniffiForeignFutureStructF32 + result: UniffiForeignFutureResultF32 ) => void; -export type UniffiForeignFutureStructF64 = { +export type UniffiForeignFutureResultF64 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF64 = ( callbackData: bigint, - result: UniffiForeignFutureStructF64 -) => void; -export type UniffiForeignFutureStructPointer = { - returnValue: bigint; - callStatus: UniffiRustCallStatus; -}; -export type UniffiForeignFutureCompletePointer = ( - callbackData: bigint, - result: UniffiForeignFutureStructPointer + result: UniffiForeignFutureResultF64 ) => void; -export type UniffiForeignFutureStructRustBuffer = { +export type UniffiForeignFutureResultRustBuffer = { returnValue: Uint8Array; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteRustBuffer = ( callbackData: bigint, - result: UniffiForeignFutureStructRustBuffer + result: UniffiForeignFutureResultRustBuffer ) => void; -export type UniffiForeignFutureStructVoid = { +export type UniffiForeignFutureResultVoid = { callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteVoid = ( callbackData: bigint, - result: UniffiForeignFutureStructVoid + result: UniffiForeignFutureResultVoid ) => void; // UniffiRustFutureContinuationCallback is generated as part of the component interface's diff --git a/src/generated/matrix_sdk_crypto.ts b/src/generated/matrix_sdk_crypto.ts index 03240cb..06bcc9a 100644 --- a/src/generated/matrix_sdk_crypto.ts +++ b/src/generated/matrix_sdk_crypto.ts @@ -1,33 +1,36 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck import nativeModule, { type UniffiRustFutureContinuationCallback, - type UniffiForeignFuture, - type UniffiForeignFutureStructU8, + type UniffiForeignFutureDroppedCallback, + type UniffiForeignFutureDroppedCallbackStruct, + type UniffiForeignFutureResultU8, type UniffiForeignFutureCompleteU8, - type UniffiForeignFutureStructI8, + type UniffiForeignFutureResultI8, type UniffiForeignFutureCompleteI8, - type UniffiForeignFutureStructU16, + type UniffiForeignFutureResultU16, type UniffiForeignFutureCompleteU16, - type UniffiForeignFutureStructI16, + type UniffiForeignFutureResultI16, type UniffiForeignFutureCompleteI16, - type UniffiForeignFutureStructU32, + type UniffiForeignFutureResultU32, type UniffiForeignFutureCompleteU32, - type UniffiForeignFutureStructI32, + type UniffiForeignFutureResultI32, type UniffiForeignFutureCompleteI32, - type UniffiForeignFutureStructU64, + type UniffiForeignFutureResultU64, type UniffiForeignFutureCompleteU64, - type UniffiForeignFutureStructI64, + type UniffiForeignFutureResultI64, type UniffiForeignFutureCompleteI64, - type UniffiForeignFutureStructF32, + type UniffiForeignFutureResultF32, type UniffiForeignFutureCompleteF32, - type UniffiForeignFutureStructF64, + type UniffiForeignFutureResultF64, type UniffiForeignFutureCompleteF64, - type UniffiForeignFutureStructPointer, - type UniffiForeignFutureCompletePointer, - type UniffiForeignFutureStructRustBuffer, + type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleteRustBuffer, - type UniffiForeignFutureStructVoid, + type UniffiForeignFutureResultVoid, type UniffiForeignFutureCompleteVoid, } from './matrix_sdk_crypto-ffi'; import { @@ -78,21 +81,8 @@ export const DecryptionSettings = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link DecryptionSettings}, with defaults specified - * in Rust, in the {@link matrix_sdk_crypto} crate. - */ create, - - /** - * Create a frozen instance of {@link DecryptionSettings}, with defaults specified - * in Rust, in the {@link matrix_sdk_crypto} crate. - */ new: create, - - /** - * Defaults specified in the {@link matrix_sdk_crypto} crate. - */ defaults: () => Object.freeze(defaults()) as Partial, }); })(); @@ -383,7 +373,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = LoginQrCodeDecodeError_Tags.NotEnoughData; + readonly tag = LoginQrCodeDecodeError_Tags.NotEnoughData; constructor(message: string) { super('LoginQrCodeDecodeError', 'NotEnoughData', message); @@ -408,7 +398,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = LoginQrCodeDecodeError_Tags.NotUtf8; + readonly tag = LoginQrCodeDecodeError_Tags.NotUtf8; constructor(message: string) { super('LoginQrCodeDecodeError', 'NotUtf8', message); @@ -433,7 +423,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = LoginQrCodeDecodeError_Tags.UrlParse; + readonly tag = LoginQrCodeDecodeError_Tags.UrlParse; constructor(message: string) { super('LoginQrCodeDecodeError', 'UrlParse', message); @@ -459,7 +449,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = LoginQrCodeDecodeError_Tags.InvalidMode; + readonly tag = LoginQrCodeDecodeError_Tags.InvalidMode; constructor(message: string) { super('LoginQrCodeDecodeError', 'InvalidMode', message); @@ -484,7 +474,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = LoginQrCodeDecodeError_Tags.InvalidVersion; + readonly tag = LoginQrCodeDecodeError_Tags.InvalidVersion; constructor(message: string) { super('LoginQrCodeDecodeError', 'InvalidVersion', message); @@ -510,7 +500,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 6; - public readonly tag = LoginQrCodeDecodeError_Tags.Base64; + readonly tag = LoginQrCodeDecodeError_Tags.Base64; constructor(message: string) { super('LoginQrCodeDecodeError', 'Base64', message); @@ -535,7 +525,7 @@ export const LoginQrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 7; - public readonly tag = LoginQrCodeDecodeError_Tags.InvalidPrefix; + readonly tag = LoginQrCodeDecodeError_Tags.InvalidPrefix; constructor(message: string) { super('LoginQrCodeDecodeError', 'InvalidPrefix', message); @@ -903,7 +893,7 @@ const FfiConverterTypeUtdCause = (() => { */ function uniffiEnsureInitialized() { // Get the bindings contract version from our ComponentInterface - const bindingsContractVersion = 29; + const bindingsContractVersion = 30; // Get the scaffolding contract version by calling the into the dylib const scaffoldingContractVersion = nativeModule().ubrn_ffi_matrix_sdk_crypto_uniffi_contract_version(); diff --git a/src/generated/matrix_sdk_ffi-ffi.ts b/src/generated/matrix_sdk_ffi-ffi.ts index 5968f65..5b2ba30 100644 --- a/src/generated/matrix_sdk_ffi-ffi.ts +++ b/src/generated/matrix_sdk_ffi-ffi.ts @@ -1,11 +1,15 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + import { type StructuralEquality as UniffiStructuralEquality, type UniffiForeignFuture as RuntimeUniffiForeignFuture, type UniffiRustCallStatus, - type UniffiRustArcPtr, + type UniffiGcObject, type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback, type UniffiResult, } from 'uniffi-bindgen-react-native'; @@ -23,24 +27,73 @@ interface NativeModuleInterface { buffer: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): string; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender( + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( ptr: bigint, + mentions: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender( + ubrn_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( + 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 + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_ssohandler( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( + ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( ptr: bigint, - code: number + callbackUrl: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_client( + ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( ptr: bigint, uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_client( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_client( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( @@ -55,10 +108,6 @@ interface NativeModuleInterface { ptr: bigint, action: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( - ptr: bigint, - emoji: Uint8Array - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( ptr: bigint ): bigint; @@ -157,9 +206,6 @@ interface NativeModuleInterface { ptr: bigint, userId: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( - ptr: bigint - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( ptr: bigint ): bigint; @@ -442,12 +488,36 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_clientbuilder( + ubrn_uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( ptr: bigint, + emoji: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_clientbuilder( + ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( ptr: bigint, + path: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_clientbuilder( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_clientbuilder( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new( @@ -581,11 +651,11 @@ interface NativeModuleInterface { uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_encryption( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_encryption( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( @@ -668,61 +738,12 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( ptr: bigint ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( - ptr: bigint, - progressListener: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( - ptr: bigint, - qrCodeData: bigint, - progressListener: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( - 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 - ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_clone_identityresethandle( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_identityresethandle( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( @@ -736,171 +757,90 @@ interface NativeModuleInterface { ptr: bigint, auth: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_useridentity( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( + ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin(ptr: bigint): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( - ptr: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( - ptr: bigint, - reason: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( - ptr: bigint, - reason: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( ptr: bigint ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( ptr: bigint, - strict: number, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( - ptr: bigint, - roomIds: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_notificationclient( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_notificationclient( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( + ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( ptr: bigint, - progressListener: bigint + roomId: Uint8Array, + eventId: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( + ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( ptr: bigint, - qrCodeData: bigint, - progressListener: bigint + requests: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle( + ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( ptr: bigint, + roomId: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_notificationsettings( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( - ptr: bigint, - path: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediasource( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( - json: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( - url: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_notificationclient( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_notificationclient( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( - ptr: bigint, - roomId: Uint8Array, - eventId: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( - ptr: bigint, - requests: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( - ptr: bigint, - roomId: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_notificationsettings( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_notificationsettings( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_notificationsettings( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( @@ -995,12 +935,58 @@ interface NativeModuleInterface { isEncrypted: number, isOneToOne: number ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_qrcodedata( + ubrn_uniffi_matrix_sdk_ffi_fn_clone_checkcodesender( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( ptr: bigint, + code: number + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( + ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( + ptr: bigint, + progressListener: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( + ptr: bigint, + qrCodeData: bigint, + progressListener: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( + ptr: bigint, + progressListener: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( ptr: bigint, + qrCodeData: bigint, + progressListener: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_qrcodedata( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_constructor_qrcodedata_from_bytes( @@ -1011,12 +997,34 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_room( + ubrn_uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( + ptr: bigint, + reason: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( ptr: bigint, + reason: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_room( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_room( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( @@ -1389,270 +1397,277 @@ interface NativeModuleInterface { userIds: Uint8Array, sendHandle: bigint ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( - ptr: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( - ptr: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( - ptr: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( - ptr: bigint, - listener: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( ptr: bigint, - filter: Uint8Array, - batchSize: number, - viaServerName: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlist( + uniffi_out_err: UniffiRustCallStatus + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( ptr: bigint, + chunkSize: number, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlist( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( ptr: bigint, - pageSize: number, - listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( ptr: bigint, - pageSize: number, - enableLatestEventSorter: number, - listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( ptr: bigint, - listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_room( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( ptr: bigint, - roomId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( ptr: bigint, + message: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( ptr: bigint, + stateEvent: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( ptr: bigint, - kind: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( ptr: bigint, + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( ptr: bigint, + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( ptr: bigint, + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( ptr: bigint, + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( ptr: bigint, + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( ptr: bigint, + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( - ptr: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( ptr: bigint, - roomId: Uint8Array, + userId: Uint8Array, + message: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( ptr: bigint, - listener: bigint, + userId: Uint8Array, + stateEvent: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( ptr: bigint, - roomIds: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( + userId: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( ptr: bigint, - delayBeforeShowingInMs: number, - delayBeforeHidingInMs: number, - listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator( + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( ptr: bigint, uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( ptr: bigint, + listener: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( + ptr: bigint, + filter: Uint8Array, + batchSize: number, + viaServerName: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlist( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlist( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( ptr: bigint, - chunkSize: number, + pageSize: number, + listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation( + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( ptr: bigint, + pageSize: number, + enableLatestEventSorter: number, + listener: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( ptr: bigint, + listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlist_room( ptr: bigint, - mentions: Uint8Array, + roomId: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( ptr: bigint, + kind: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( - ptr: bigint, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( ptr: bigint, - message: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( - ptr: bigint, - stateEvent: Uint8Array, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_roomlistservice( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( - ptr: bigint, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( ptr: bigint, - userId: Uint8Array, + roomId: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( ptr: bigint, - userId: Uint8Array, + listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( ptr: bigint, - userId: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( + roomIds: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( ptr: bigint, - userId: Uint8Array, + delayBeforeShowingInMs: number, + delayBeforeHidingInMs: number, + listener: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( - ptr: bigint, - userId: Uint8Array, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( - ptr: bigint, - userId: Uint8Array, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( ptr: bigint, - userId: Uint8Array, - message: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( + ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( ptr: bigint, - userId: Uint8Array, - stateEvent: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( + ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( ptr: bigint, - userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_clone_roompreview( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_roompreview( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_roompreview_forget(ptr: bigint): bigint; @@ -1665,54 +1680,36 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( ptr: bigint ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_mediasource( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( - ptr: bigint - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_json( + json: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_constructor_mediasource_from_url( + url: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( - ptr: bigint ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendhandle( + ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle( + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_mediasource_url( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort(ptr: bigint): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( - ptr: bigint - ): bigint; + ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request( @@ -1748,11 +1745,11 @@ interface NativeModuleInterface { ptr: bigint ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( @@ -1763,12 +1760,28 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + ubrn_uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( ptr: bigint, + roomIds: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( @@ -1802,11 +1815,11 @@ interface NativeModuleInterface { uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_spaceservice( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceservice( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( @@ -1841,49 +1854,12 @@ interface NativeModuleInterface { ptr: bigint, listener: bigint ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_span( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_span( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_current( - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new( - file: Uint8Array, - line: Uint8Array, - level: Uint8Array, - target: Uint8Array, - name: Uint8Array, - bridgeTraceId: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( - target: Uint8Array, - parentTraceId: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_span_is_none( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): number; ubrn_uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new( @@ -1915,28 +1891,12 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_ssohandler( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( - ptr: bigint, - callbackUrl: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_clone_syncservice( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_syncservice( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( @@ -1954,11 +1914,11 @@ interface NativeModuleInterface { ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservice_stop(ptr: bigint): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( @@ -1978,11 +1938,11 @@ interface NativeModuleInterface { uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_taskhandle( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_taskhandle( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( @@ -1993,28 +1953,64 @@ interface NativeModuleInterface { ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_threadsummary( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): number; + ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + ptr: bigint, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( ptr: bigint, + strict: number, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_timeline( + ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( ptr: bigint, uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendhandle( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort(ptr: bigint): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_timeline( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_timeline( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( @@ -2103,12 +2099,6 @@ interface NativeModuleInterface { fileInfo: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( - ptr: bigint, - params: Uint8Array, - itemInfos: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( ptr: bigint, params: Uint8Array, @@ -2167,40 +2157,42 @@ interface NativeModuleInterface { ptr: bigint, eventId: Uint8Array ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineevent( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( ptr: bigint, + params: Uint8Array, + itemInfos: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( + handle: bigint, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( + ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( - ptr: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_constructor_timelineeventtypefilter_exclude( @@ -2211,84 +2203,96 @@ interface NativeModuleInterface { eventTypes: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_timelineitem( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( + ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( - ptr: bigint, + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( + ptr: bigint + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_threadsummary( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( - ptr: bigint, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount( + ubrn_uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( - ptr: bigint, + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( + handle: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_clone_useridentity( - ptr: bigint, + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_clone_span( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_free_span( + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( - ptr: bigint, + ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_current( uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new( + file: Uint8Array, + line: Uint8Array, + level: Uint8Array, + target: Uint8Array, + name: Uint8Array, + bridgeTraceId: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_constructor_span_new_bridge_span( + target: Uint8Array, + parentTraceId: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit( ptr: bigint, uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_pin(ptr: bigint): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_method_span_is_none( ptr: bigint, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( - ptr: bigint - ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_widgetdriver( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_widgetdriver( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( @@ -2297,11 +2301,11 @@ interface NativeModuleInterface { capabilitiesProvider: bigint ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle( - ptr: bigint, + handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; ubrn_uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( @@ -2314,23 +2318,50 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener( vtable: UniffiVTableCallbackInterfaceAccountDataListener ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( + vtable: UniffiVTableCallbackInterfaceClientDelegate + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( + vtable: UniffiVTableCallbackInterfaceClientSessionDelegate + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( + vtable: UniffiVTableCallbackInterfaceIgnoredUsersListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( + vtable: UniffiVTableCallbackInterfaceMediaPreviewConfigListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( + vtable: UniffiVTableCallbackInterfaceProgressWatcher + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( + vtable: UniffiVTableCallbackInterfaceRoomAccountDataListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( + vtable: UniffiVTableCallbackInterfaceSendQueueRoomErrorListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( + vtable: UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( + vtable: UniffiVTableCallbackInterfaceSyncNotificationListener + ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( vtable: UniffiVTableCallbackInterfaceBackupStateListener ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( vtable: UniffiVTableCallbackInterfaceBackupSteadyStateListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( - vtable: UniffiVTableCallbackInterfaceCallDeclineListener + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( + vtable: UniffiVTableCallbackInterfaceEnableRecoveryProgressListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( - vtable: UniffiVTableCallbackInterfaceClientDelegate + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( + vtable: UniffiVTableCallbackInterfaceRecoveryStateListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( - vtable: UniffiVTableCallbackInterfaceClientSessionDelegate + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( + vtable: UniffiVTableCallbackInterfaceVerificationStateListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( - vtable: UniffiVTableCallbackInterfaceEnableRecoveryProgressListener + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate( + vtable: UniffiVTableCallbackInterfaceNotificationSettingsDelegate ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( vtable: UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener @@ -2341,45 +2372,33 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( vtable: UniffiVTableCallbackInterfaceGrantQrLoginProgressListener ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener( + vtable: UniffiVTableCallbackInterfaceQrLoginProgressListener + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( + vtable: UniffiVTableCallbackInterfaceCallDeclineListener + ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( vtable: UniffiVTableCallbackInterfaceIdentityStatusChangeListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( - vtable: UniffiVTableCallbackInterfaceIgnoredUsersListener - ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( vtable: UniffiVTableCallbackInterfaceKnockRequestsListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( - vtable: UniffiVTableCallbackInterfaceLiveLocationShareListener - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( - vtable: UniffiVTableCallbackInterfaceMediaPreviewConfigListener - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate( - vtable: UniffiVTableCallbackInterfaceNotificationSettingsDelegate - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( - vtable: UniffiVTableCallbackInterfacePaginationStatusListener - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( - vtable: UniffiVTableCallbackInterfaceProgressWatcher + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( + vtable: UniffiVTableCallbackInterfaceLiveLocationShareListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener( - vtable: UniffiVTableCallbackInterfaceQrLoginProgressListener + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener( + vtable: UniffiVTableCallbackInterfaceRoomInfoListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( - vtable: UniffiVTableCallbackInterfaceRecoveryStateListener + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( + vtable: UniffiVTableCallbackInterfaceSendQueueListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( - vtable: UniffiVTableCallbackInterfaceRoomAccountDataListener + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( + vtable: UniffiVTableCallbackInterfaceTypingNotificationsListener ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( vtable: UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener( - vtable: UniffiVTableCallbackInterfaceRoomInfoListener - ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( vtable: UniffiVTableCallbackInterfaceRoomListEntriesListener ): void; @@ -2392,15 +2411,6 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( vtable: UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( - vtable: UniffiVTableCallbackInterfaceSendQueueListener - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( - vtable: UniffiVTableCallbackInterfaceSendQueueRoomErrorListener - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( - vtable: UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener - ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate( vtable: UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate ): void; @@ -2416,79 +2426,64 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( vtable: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( - vtable: UniffiVTableCallbackInterfaceSyncNotificationListener - ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( vtable: UniffiVTableCallbackInterfaceSyncServiceStateObserver ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( + vtable: UniffiVTableCallbackInterfacePaginationStatusListener + ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener( vtable: UniffiVTableCallbackInterfaceTimelineListener ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( - vtable: UniffiVTableCallbackInterfaceTypingNotificationsListener - ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate( vtable: UniffiVTableCallbackInterfaceUnableToDecryptDelegate ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( - vtable: UniffiVTableCallbackInterfaceVerificationStateListener - ): void; ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider( vtable: UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - message: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( - caption: Uint8Array, - formattedCaption: Uint8Array, - mentions: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( uniffi_out_err: UniffiRustCallStatus ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_func_gen_transaction_id( uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( - widgetSettings: Uint8Array, - room: bigint, - props: Uint8Array - ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( - ownUserId: Uint8Array, - ownDeviceId: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_func_init_platform( config: Uint8Array, useLightweightTokioRuntime: number, uniffi_out_err: UniffiRustCallStatus ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + configuration: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + roomAlias: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_func_is_room_alias_format_valid( alias: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event( - file: Uint8Array, - line: Uint8Array, - level: Uint8Array, - target: Uint8Array, - message: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + roomName: Uint8Array, uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( - settings: Uint8Array, + ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( + userId: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( - roomAlias: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( + role: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( - userId: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + powerLevel: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; + ubrn_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( + message: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): bigint; ubrn_uniffi_matrix_sdk_ffi_fn_func_message_event_content_from_html( body: Uint8Array, htmlBody: Uint8Array, @@ -2511,32 +2506,41 @@ interface NativeModuleInterface { msgtype: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): bigint; - ubrn_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( - props: Uint8Array, - config: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): Uint8Array; ubrn_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( uri: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( - configuration: Uint8Array, - uniffi_out_err: UniffiRustCallStatus - ): void; - ubrn_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( - roomName: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + caption: Uint8Array, + formattedCaption: Uint8Array, + mentions: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( + ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event( + file: Uint8Array, + line: Uint8Array, + level: Uint8Array, + target: Uint8Array, + message: Uint8Array, + uniffi_out_err: UniffiRustCallStatus + ): void; + ubrn_uniffi_matrix_sdk_ffi_fn_func_generate_webview_url( + widgetSettings: Uint8Array, + room: bigint, + props: Uint8Array + ): bigint; + ubrn_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + ownUserId: Uint8Array, + ownDeviceId: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( - role: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + settings: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; - ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - powerLevel: Uint8Array, + ubrn_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( + props: Uint8Array, + config: Uint8Array, uniffi_out_err: UniffiRustCallStatus ): Uint8Array; ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u8( @@ -2649,17 +2653,6 @@ interface NativeModuleInterface { handle: bigint, uniffi_out_err: UniffiRustCallStatus ): number; - ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer( - handle: bigint, - callback: UniffiRustFutureContinuationCallback, - callbackData: bigint - ): void; - ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer(handle: bigint): void; - ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer(handle: bigint): void; - ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer( - handle: bigint, - uniffi_out_err: UniffiRustCallStatus - ): bigint; ubrn_ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer( handle: bigint, callback: UniffiRustFutureContinuationCallback, @@ -2682,34 +2675,41 @@ interface NativeModuleInterface { handle: bigint, uniffi_out_err: UniffiRustCallStatus ): void; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_event(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_event(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version(): number; + 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_ssohandler_finish(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_account_data(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_account_url(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo(): number; @@ -2735,7 +2735,6 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_profile(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_room(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias(): number; @@ -2801,6 +2800,10 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_user_id(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing(): number; @@ -2849,35 +2852,20 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version(): number; - 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; ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification(): 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; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room(): number; @@ -2903,7 +2891,16 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases(): number; @@ -2992,38 +2989,18 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick(): number; @@ -3044,17 +3021,35 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_info(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification(): number; @@ -3066,6 +3061,8 @@ 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_leavespacehandle_leave(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms(): 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; @@ -3081,16 +3078,11 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space(): 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_sqlitestorebuilder_cache_size(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained(): 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; @@ -3102,8 +3094,14 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll(): number; @@ -3123,7 +3121,6 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response(): number; @@ -3134,68 +3131,66 @@ 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_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; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id(): 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_widgetdriver_run(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_current(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_current(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification(): number; @@ -3207,210 +3202,208 @@ interface NativeModuleInterface { ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update(): number; + ubrn_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd(): number; - ubrn_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update(): number; ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities(): number; ubrn_ffi_matrix_sdk_ffi_uniffi_contract_version(): number; - ubrn_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( + ubrn_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_client_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_clientbuilder_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_encryption_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_identityresethandle_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_useridentity_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_identityresethandle_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_notificationclient_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_notificationclient_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_room_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_room_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_roomdirectorysearch_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_roomlist_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_roomlistdynamicentriescontroller_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_roomlistentrieswithdynamicadaptersresult_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_roomlistservice_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_roompreview_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_sessionverificationcontroller_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_span_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_sqlitestorebuilder_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( - pointer: bigint, - uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_syncservice_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_syncservicebuilder_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_taskhandle_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_timeline_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_timelineeventtypefilter_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; - ubrn_uniffi_internal_fn_method_useridentity_ffi__bless_pointer( + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer( + pointer: bigint, + uniffi_out_err: UniffiRustCallStatus + ): UniffiGcObject; + ubrn_uniffi_internal_fn_method_span_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_widgetdriver_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; ubrn_uniffi_internal_fn_method_widgetdriverhandle_ffi__bless_pointer( pointer: bigint, uniffi_out_err: UniffiRustCallStatus - ): UniffiRustArcPtr; + ): UniffiGcObject; } // Casting globalThis to any allows us to look for `NativeMatrixSdkFfi` @@ -3427,118 +3420,155 @@ export type UniffiRustFutureContinuationCallback = ( data: bigint, pollResult: number ) => void; -type UniffiForeignFutureFree = (handle: bigint) => void; +export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void; type UniffiCallbackInterfaceFree = (handle: bigint) => void; -export type UniffiForeignFuture = { +type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult; +export type UniffiForeignFutureDroppedCallbackStruct = { handle: bigint; - free: UniffiForeignFutureFree; + free: UniffiForeignFutureDroppedCallback; }; -export type UniffiForeignFutureStructU8 = { +export type UniffiForeignFutureResultU8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU8 = ( callbackData: bigint, - result: UniffiForeignFutureStructU8 + result: UniffiForeignFutureResultU8 ) => void; -export type UniffiForeignFutureStructI8 = { +export type UniffiForeignFutureResultI8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI8 = ( callbackData: bigint, - result: UniffiForeignFutureStructI8 + result: UniffiForeignFutureResultI8 ) => void; -export type UniffiForeignFutureStructU16 = { +export type UniffiForeignFutureResultU16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU16 = ( callbackData: bigint, - result: UniffiForeignFutureStructU16 + result: UniffiForeignFutureResultU16 ) => void; -export type UniffiForeignFutureStructI16 = { +export type UniffiForeignFutureResultI16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI16 = ( callbackData: bigint, - result: UniffiForeignFutureStructI16 + result: UniffiForeignFutureResultI16 ) => void; -export type UniffiForeignFutureStructU32 = { +export type UniffiForeignFutureResultU32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU32 = ( callbackData: bigint, - result: UniffiForeignFutureStructU32 + result: UniffiForeignFutureResultU32 ) => void; -export type UniffiForeignFutureStructI32 = { +export type UniffiForeignFutureResultI32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI32 = ( callbackData: bigint, - result: UniffiForeignFutureStructI32 + result: UniffiForeignFutureResultI32 ) => void; -export type UniffiForeignFutureStructU64 = { +export type UniffiForeignFutureResultU64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU64 = ( callbackData: bigint, - result: UniffiForeignFutureStructU64 + result: UniffiForeignFutureResultU64 ) => void; -export type UniffiForeignFutureStructI64 = { +export type UniffiForeignFutureResultI64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI64 = ( callbackData: bigint, - result: UniffiForeignFutureStructI64 + result: UniffiForeignFutureResultI64 ) => void; -export type UniffiForeignFutureStructF32 = { +export type UniffiForeignFutureResultF32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF32 = ( callbackData: bigint, - result: UniffiForeignFutureStructF32 + result: UniffiForeignFutureResultF32 ) => void; -export type UniffiForeignFutureStructF64 = { +export type UniffiForeignFutureResultF64 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF64 = ( callbackData: bigint, - result: UniffiForeignFutureStructF64 -) => void; -export type UniffiForeignFutureStructPointer = { - returnValue: bigint; - callStatus: UniffiRustCallStatus; -}; -export type UniffiForeignFutureCompletePointer = ( - callbackData: bigint, - result: UniffiForeignFutureStructPointer + result: UniffiForeignFutureResultF64 ) => void; -export type UniffiForeignFutureStructRustBuffer = { +export type UniffiForeignFutureResultRustBuffer = { returnValue: Uint8Array; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteRustBuffer = ( callbackData: bigint, - result: UniffiForeignFutureStructRustBuffer + result: UniffiForeignFutureResultRustBuffer ) => void; -export type UniffiForeignFutureStructVoid = { +export type UniffiForeignFutureResultVoid = { callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteVoid = ( callbackData: bigint, - result: UniffiForeignFutureStructVoid + result: UniffiForeignFutureResultVoid ) => void; type UniffiCallbackInterfaceAccountDataListenerMethod0 = ( uniffiHandle: bigint, - event: Uint8Array + event: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceClientDelegateMethod0 = ( + uniffiHandle: bigint, + isSoftLogout: number +) => UniffiResult; +type UniffiCallbackInterfaceClientSessionDelegateMethod0 = ( + uniffiHandle: bigint, + userId: Uint8Array +) => Uint8Array; +type UniffiCallbackInterfaceClientSessionDelegateMethod1 = ( + uniffiHandle: bigint, + session: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceIgnoredUsersListenerMethod0 = ( + uniffiHandle: bigint, + ignoredUserIds: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 = ( + uniffiHandle: bigint, + mediaPreviewConfig: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceProgressWatcherMethod0 = ( + uniffiHandle: bigint, + progress: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceRoomAccountDataListenerMethod0 = ( + uniffiHandle: bigint, + event: Uint8Array, + roomId: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 = ( + uniffiHandle: bigint, + roomId: Uint8Array, + error: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 = ( + uniffiHandle: bigint, + roomId: Uint8Array, + update: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceSyncNotificationListenerMethod0 = ( + uniffiHandle: bigint, + notification: Uint8Array, + roomId: Uint8Array ) => UniffiResult; type UniffiCallbackInterfaceBackupStateListenerMethod0 = ( uniffiHandle: bigint, @@ -3548,26 +3578,21 @@ type UniffiCallbackInterfaceBackupSteadyStateListenerMethod0 = ( uniffiHandle: bigint, status: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceCallDeclineListenerMethod0 = ( - uniffiHandle: bigint, - declinerUserId: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceClientDelegateMethod0 = ( +type UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 = ( uniffiHandle: bigint, - isSoftLogout: number + status: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceClientSessionDelegateMethod0 = ( - uniffiHandle: bigint, - userId: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceClientSessionDelegateMethod1 = ( +type UniffiCallbackInterfaceRecoveryStateListenerMethod0 = ( uniffiHandle: bigint, - session: Uint8Array + status: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0 = ( +type UniffiCallbackInterfaceVerificationStateListenerMethod0 = ( uniffiHandle: bigint, status: Uint8Array ) => UniffiResult; +type UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 = ( + uniffiHandle: bigint +) => UniffiResult; type UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0 = ( uniffiHandle: bigint, state: Uint8Array @@ -3580,13 +3605,17 @@ type UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0 = ( uniffiHandle: bigint, state: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 = ( +type UniffiCallbackInterfaceQrLoginProgressListenerMethod0 = ( uniffiHandle: bigint, - identityStatusChange: Uint8Array + state: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceIgnoredUsersListenerMethod0 = ( +type UniffiCallbackInterfaceCallDeclineListenerMethod0 = ( uniffiHandle: bigint, - ignoredUserIds: Uint8Array + declinerUserId: Uint8Array +) => UniffiResult; +type UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0 = ( + uniffiHandle: bigint, + identityStatusChange: Uint8Array ) => UniffiResult; type UniffiCallbackInterfaceKnockRequestsListenerMethod0 = ( uniffiHandle: bigint, @@ -3596,42 +3625,22 @@ type UniffiCallbackInterfaceLiveLocationShareListenerMethod0 = ( uniffiHandle: bigint, liveLocationShares: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0 = ( - uniffiHandle: bigint, - mediaPreviewConfig: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceNotificationSettingsDelegateMethod0 = ( - uniffiHandle: bigint -) => UniffiResult; -type UniffiCallbackInterfacePaginationStatusListenerMethod0 = ( - uniffiHandle: bigint, - status: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceProgressWatcherMethod0 = ( - uniffiHandle: bigint, - progress: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceQrLoginProgressListenerMethod0 = ( +type UniffiCallbackInterfaceRoomInfoListenerMethod0 = ( uniffiHandle: bigint, - state: Uint8Array + roomInfo: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceRecoveryStateListenerMethod0 = ( +type UniffiCallbackInterfaceSendQueueListenerMethod0 = ( uniffiHandle: bigint, - status: Uint8Array + update: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceRoomAccountDataListenerMethod0 = ( +type UniffiCallbackInterfaceTypingNotificationsListenerMethod0 = ( uniffiHandle: bigint, - event: Uint8Array, - roomId: Uint8Array + typingUserIds: Uint8Array ) => UniffiResult; type UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0 = ( uniffiHandle: bigint, roomEntriesUpdate: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceRoomInfoListenerMethod0 = ( - uniffiHandle: bigint, - roomInfo: Uint8Array -) => UniffiResult; type UniffiCallbackInterfaceRoomListEntriesListenerMethod0 = ( uniffiHandle: bigint, roomEntriesUpdate: Uint8Array @@ -3648,20 +3657,6 @@ type UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0 = ( uniffiHandle: bigint, syncIndicator: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceSendQueueListenerMethod0 = ( - uniffiHandle: bigint, - update: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0 = ( - uniffiHandle: bigint, - roomId: Uint8Array, - error: Uint8Array -) => UniffiResult; -type UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0 = ( - uniffiHandle: bigint, - roomId: Uint8Array, - update: Uint8Array -) => UniffiResult; type UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0 = ( uniffiHandle: bigint, details: Uint8Array @@ -3701,160 +3696,193 @@ type UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 = ( uniffiHandle: bigint, roomUpdates: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceSyncNotificationListenerMethod0 = ( - uniffiHandle: bigint, - notification: Uint8Array, - roomId: Uint8Array -) => UniffiResult; type UniffiCallbackInterfaceSyncServiceStateObserverMethod0 = ( uniffiHandle: bigint, state: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceTimelineListenerMethod0 = ( +type UniffiCallbackInterfacePaginationStatusListenerMethod0 = ( uniffiHandle: bigint, - diff: Uint8Array + status: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceTypingNotificationsListenerMethod0 = ( +type UniffiCallbackInterfaceTimelineListenerMethod0 = ( uniffiHandle: bigint, - typingUserIds: Uint8Array + diff: Uint8Array ) => UniffiResult; type UniffiCallbackInterfaceUnableToDecryptDelegateMethod0 = ( uniffiHandle: bigint, info: Uint8Array ) => UniffiResult; -type UniffiCallbackInterfaceVerificationStateListenerMethod0 = ( - uniffiHandle: bigint, - status: Uint8Array -) => UniffiResult; type UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0 = ( uniffiHandle: bigint, capabilities: Uint8Array -) => UniffiResult; +) => Uint8Array; export type UniffiVTableCallbackInterfaceAccountDataListener = { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; onChange: UniffiCallbackInterfaceAccountDataListenerMethod0; +}; +export type UniffiVTableCallbackInterfaceClientDelegate = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + didReceiveAuthError: UniffiCallbackInterfaceClientDelegateMethod0; }; -export type UniffiVTableCallbackInterfaceBackupStateListener = { - onUpdate: UniffiCallbackInterfaceBackupStateListenerMethod0; +export type UniffiVTableCallbackInterfaceClientSessionDelegate = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + retrieveSessionFromKeychain: UniffiCallbackInterfaceClientSessionDelegateMethod0; + saveSessionInKeychain: UniffiCallbackInterfaceClientSessionDelegateMethod1; }; -export type UniffiVTableCallbackInterfaceBackupSteadyStateListener = { - onUpdate: UniffiCallbackInterfaceBackupSteadyStateListenerMethod0; +export type UniffiVTableCallbackInterfaceIgnoredUsersListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + call: UniffiCallbackInterfaceIgnoredUsersListenerMethod0; }; -export type UniffiVTableCallbackInterfaceCallDeclineListener = { - call: UniffiCallbackInterfaceCallDeclineListenerMethod0; +export type UniffiVTableCallbackInterfaceMediaPreviewConfigListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onChange: UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0; }; -export type UniffiVTableCallbackInterfaceClientDelegate = { - didReceiveAuthError: UniffiCallbackInterfaceClientDelegateMethod0; +export type UniffiVTableCallbackInterfaceProgressWatcher = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + transmissionProgress: UniffiCallbackInterfaceProgressWatcherMethod0; }; -export type UniffiVTableCallbackInterfaceClientSessionDelegate = { - retrieveSessionFromKeychain: UniffiCallbackInterfaceClientSessionDelegateMethod0; - saveSessionInKeychain: UniffiCallbackInterfaceClientSessionDelegateMethod1; +export type UniffiVTableCallbackInterfaceRoomAccountDataListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onChange: UniffiCallbackInterfaceRoomAccountDataListenerMethod0; }; -export type UniffiVTableCallbackInterfaceEnableRecoveryProgressListener = { - onUpdate: UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0; +export type UniffiVTableCallbackInterfaceSendQueueRoomErrorListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onError: UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0; }; -export type UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener = { - onUpdate: UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0; +export type UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0; }; -export type UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener = - { - onUpdate: UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0; - uniffiFree: UniffiCallbackInterfaceFree; - }; -export type UniffiVTableCallbackInterfaceGrantQrLoginProgressListener = { - onUpdate: UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0; +export type UniffiVTableCallbackInterfaceSyncNotificationListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onNotification: UniffiCallbackInterfaceSyncNotificationListenerMethod0; }; -export type UniffiVTableCallbackInterfaceIdentityStatusChangeListener = { - call: UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0; +export type UniffiVTableCallbackInterfaceBackupStateListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceBackupStateListenerMethod0; }; -export type UniffiVTableCallbackInterfaceIgnoredUsersListener = { - call: UniffiCallbackInterfaceIgnoredUsersListenerMethod0; +export type UniffiVTableCallbackInterfaceBackupSteadyStateListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceBackupSteadyStateListenerMethod0; }; -export type UniffiVTableCallbackInterfaceKnockRequestsListener = { - call: UniffiCallbackInterfaceKnockRequestsListenerMethod0; +export type UniffiVTableCallbackInterfaceEnableRecoveryProgressListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceEnableRecoveryProgressListenerMethod0; }; -export type UniffiVTableCallbackInterfaceLiveLocationShareListener = { - call: UniffiCallbackInterfaceLiveLocationShareListenerMethod0; +export type UniffiVTableCallbackInterfaceRecoveryStateListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceRecoveryStateListenerMethod0; }; -export type UniffiVTableCallbackInterfaceMediaPreviewConfigListener = { - onChange: UniffiCallbackInterfaceMediaPreviewConfigListenerMethod0; +export type UniffiVTableCallbackInterfaceVerificationStateListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceVerificationStateListenerMethod0; }; export type UniffiVTableCallbackInterfaceNotificationSettingsDelegate = { - settingsDidChange: UniffiCallbackInterfaceNotificationSettingsDelegateMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + settingsDidChange: UniffiCallbackInterfaceNotificationSettingsDelegateMethod0; }; -export type UniffiVTableCallbackInterfacePaginationStatusListener = { - onUpdate: UniffiCallbackInterfacePaginationStatusListenerMethod0; +export type UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceGeneratedQrLoginProgressListenerMethod0; }; -export type UniffiVTableCallbackInterfaceProgressWatcher = { - transmissionProgress: UniffiCallbackInterfaceProgressWatcherMethod0; +export type UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener = + { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListenerMethod0; + }; +export type UniffiVTableCallbackInterfaceGrantQrLoginProgressListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceGrantQrLoginProgressListenerMethod0; }; export type UniffiVTableCallbackInterfaceQrLoginProgressListener = { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; onUpdate: UniffiCallbackInterfaceQrLoginProgressListenerMethod0; +}; +export type UniffiVTableCallbackInterfaceCallDeclineListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + call: UniffiCallbackInterfaceCallDeclineListenerMethod0; }; -export type UniffiVTableCallbackInterfaceRecoveryStateListener = { - onUpdate: UniffiCallbackInterfaceRecoveryStateListenerMethod0; +export type UniffiVTableCallbackInterfaceIdentityStatusChangeListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + call: UniffiCallbackInterfaceIdentityStatusChangeListenerMethod0; }; -export type UniffiVTableCallbackInterfaceRoomAccountDataListener = { - onChange: UniffiCallbackInterfaceRoomAccountDataListenerMethod0; +export type UniffiVTableCallbackInterfaceKnockRequestsListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + call: UniffiCallbackInterfaceKnockRequestsListenerMethod0; }; -export type UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener = { - onUpdate: UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0; +export type UniffiVTableCallbackInterfaceLiveLocationShareListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + call: UniffiCallbackInterfaceLiveLocationShareListenerMethod0; }; export type UniffiVTableCallbackInterfaceRoomInfoListener = { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; call: UniffiCallbackInterfaceRoomInfoListenerMethod0; +}; +export type UniffiVTableCallbackInterfaceSendQueueListener = { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSendQueueListenerMethod0; +}; +export type UniffiVTableCallbackInterfaceTypingNotificationsListener = { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + call: UniffiCallbackInterfaceTypingNotificationsListenerMethod0; +}; +export type UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceRoomDirectorySearchEntriesListenerMethod0; }; export type UniffiVTableCallbackInterfaceRoomListEntriesListener = { - onUpdate: UniffiCallbackInterfaceRoomListEntriesListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceRoomListEntriesListenerMethod0; }; export type UniffiVTableCallbackInterfaceRoomListLoadingStateListener = { - onUpdate: UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceRoomListLoadingStateListenerMethod0; }; export type UniffiVTableCallbackInterfaceRoomListServiceStateListener = { - onUpdate: UniffiCallbackInterfaceRoomListServiceStateListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceRoomListServiceStateListenerMethod0; }; export type UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener = { - onUpdate: UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceRoomListServiceSyncIndicatorListenerMethod0; }; -export type UniffiVTableCallbackInterfaceSendQueueListener = { - onUpdate: UniffiCallbackInterfaceSendQueueListenerMethod0; - uniffiFree: UniffiCallbackInterfaceFree; -}; -export type UniffiVTableCallbackInterfaceSendQueueRoomErrorListener = { - onError: UniffiCallbackInterfaceSendQueueRoomErrorListenerMethod0; - uniffiFree: UniffiCallbackInterfaceFree; -}; -export type UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener = { - onUpdate: UniffiCallbackInterfaceSendQueueRoomUpdateListenerMethod0; - uniffiFree: UniffiCallbackInterfaceFree; -}; export type UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate = { + uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; didReceiveVerificationRequest: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod0; didAcceptVerificationRequest: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod1; didStartSasVerification: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod2; @@ -3862,52 +3890,52 @@ export type UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate = didFail: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod4; didCancel: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod5; didFinish: UniffiCallbackInterfaceSessionVerificationControllerDelegateMethod6; - uniffiFree: UniffiCallbackInterfaceFree; }; export type UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener = { - onUpdate: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0; }; export type UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener = { - onUpdate: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0; }; export type UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener = { - onUpdate: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0; }; export type UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener = { - onUpdate: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0; - uniffiFree: UniffiCallbackInterfaceFree; -}; -export type UniffiVTableCallbackInterfaceSyncNotificationListener = { - onNotification: UniffiCallbackInterfaceSyncNotificationListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0; }; export type UniffiVTableCallbackInterfaceSyncServiceStateObserver = { - onUpdate: UniffiCallbackInterfaceSyncServiceStateObserverMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceSyncServiceStateObserverMethod0; }; -export type UniffiVTableCallbackInterfaceTimelineListener = { - onUpdate: UniffiCallbackInterfaceTimelineListenerMethod0; +export type UniffiVTableCallbackInterfacePaginationStatusListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfacePaginationStatusListenerMethod0; }; -export type UniffiVTableCallbackInterfaceTypingNotificationsListener = { - call: UniffiCallbackInterfaceTypingNotificationsListenerMethod0; +export type UniffiVTableCallbackInterfaceTimelineListener = { uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUpdate: UniffiCallbackInterfaceTimelineListenerMethod0; }; export type UniffiVTableCallbackInterfaceUnableToDecryptDelegate = { - onUtd: UniffiCallbackInterfaceUnableToDecryptDelegateMethod0; - uniffiFree: UniffiCallbackInterfaceFree; -}; -export type UniffiVTableCallbackInterfaceVerificationStateListener = { - onUpdate: UniffiCallbackInterfaceVerificationStateListenerMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + onUtd: UniffiCallbackInterfaceUnableToDecryptDelegateMethod0; }; export type UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider = { - acquireCapabilities: UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0; uniffiFree: UniffiCallbackInterfaceFree; + uniffiClone: UniffiCallbackInterfaceClone; + acquireCapabilities: UniffiCallbackInterfaceWidgetCapabilitiesProviderMethod0; }; // UniffiRustFutureContinuationCallback is generated as part of the component interface's diff --git a/src/generated/matrix_sdk_ffi.ts b/src/generated/matrix_sdk_ffi.ts index 5f9d22c..cd85fd4 100644 --- a/src/generated/matrix_sdk_ffi.ts +++ b/src/generated/matrix_sdk_ffi.ts @@ -1,79 +1,82 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck import nativeModule, { type UniffiRustFutureContinuationCallback, - type UniffiForeignFuture, - type UniffiForeignFutureStructU8, + type UniffiForeignFutureDroppedCallback, + type UniffiForeignFutureDroppedCallbackStruct, + type UniffiForeignFutureResultU8, type UniffiForeignFutureCompleteU8, - type UniffiForeignFutureStructI8, + type UniffiForeignFutureResultI8, type UniffiForeignFutureCompleteI8, - type UniffiForeignFutureStructU16, + type UniffiForeignFutureResultU16, type UniffiForeignFutureCompleteU16, - type UniffiForeignFutureStructI16, + type UniffiForeignFutureResultI16, type UniffiForeignFutureCompleteI16, - type UniffiForeignFutureStructU32, + type UniffiForeignFutureResultU32, type UniffiForeignFutureCompleteU32, - type UniffiForeignFutureStructI32, + type UniffiForeignFutureResultI32, type UniffiForeignFutureCompleteI32, - type UniffiForeignFutureStructU64, + type UniffiForeignFutureResultU64, type UniffiForeignFutureCompleteU64, - type UniffiForeignFutureStructI64, + type UniffiForeignFutureResultI64, type UniffiForeignFutureCompleteI64, - type UniffiForeignFutureStructF32, + type UniffiForeignFutureResultF32, type UniffiForeignFutureCompleteF32, - type UniffiForeignFutureStructF64, + type UniffiForeignFutureResultF64, type UniffiForeignFutureCompleteF64, - type UniffiForeignFutureStructPointer, - type UniffiForeignFutureCompletePointer, - type UniffiForeignFutureStructRustBuffer, + type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleteRustBuffer, - type UniffiForeignFutureStructVoid, + type UniffiForeignFutureResultVoid, type UniffiForeignFutureCompleteVoid, type UniffiVTableCallbackInterfaceAccountDataListener, - type UniffiVTableCallbackInterfaceBackupStateListener, - type UniffiVTableCallbackInterfaceBackupSteadyStateListener, - type UniffiVTableCallbackInterfaceCallDeclineListener, type UniffiVTableCallbackInterfaceClientDelegate, type UniffiVTableCallbackInterfaceClientSessionDelegate, + type UniffiVTableCallbackInterfaceIgnoredUsersListener, + type UniffiVTableCallbackInterfaceMediaPreviewConfigListener, + type UniffiVTableCallbackInterfaceProgressWatcher, + type UniffiVTableCallbackInterfaceRoomAccountDataListener, + type UniffiVTableCallbackInterfaceSendQueueRoomErrorListener, + type UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener, + type UniffiVTableCallbackInterfaceSyncNotificationListener, + type UniffiVTableCallbackInterfaceBackupStateListener, + type UniffiVTableCallbackInterfaceBackupSteadyStateListener, type UniffiVTableCallbackInterfaceEnableRecoveryProgressListener, + type UniffiVTableCallbackInterfaceRecoveryStateListener, + type UniffiVTableCallbackInterfaceVerificationStateListener, + type UniffiVTableCallbackInterfaceNotificationSettingsDelegate, type UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener, type UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener, type UniffiVTableCallbackInterfaceGrantQrLoginProgressListener, + type UniffiVTableCallbackInterfaceQrLoginProgressListener, + type UniffiVTableCallbackInterfaceCallDeclineListener, type UniffiVTableCallbackInterfaceIdentityStatusChangeListener, - type UniffiVTableCallbackInterfaceIgnoredUsersListener, type UniffiVTableCallbackInterfaceKnockRequestsListener, type UniffiVTableCallbackInterfaceLiveLocationShareListener, - type UniffiVTableCallbackInterfaceMediaPreviewConfigListener, - type UniffiVTableCallbackInterfaceNotificationSettingsDelegate, - type UniffiVTableCallbackInterfacePaginationStatusListener, - type UniffiVTableCallbackInterfaceProgressWatcher, - type UniffiVTableCallbackInterfaceQrLoginProgressListener, - type UniffiVTableCallbackInterfaceRecoveryStateListener, - type UniffiVTableCallbackInterfaceRoomAccountDataListener, - type UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener, type UniffiVTableCallbackInterfaceRoomInfoListener, + type UniffiVTableCallbackInterfaceSendQueueListener, + type UniffiVTableCallbackInterfaceTypingNotificationsListener, + type UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener, type UniffiVTableCallbackInterfaceRoomListEntriesListener, type UniffiVTableCallbackInterfaceRoomListLoadingStateListener, type UniffiVTableCallbackInterfaceRoomListServiceStateListener, type UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener, - type UniffiVTableCallbackInterfaceSendQueueListener, - type UniffiVTableCallbackInterfaceSendQueueRoomErrorListener, - type UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener, type UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate, type UniffiVTableCallbackInterfaceSpaceRoomListEntriesListener, type UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener, type UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener, type UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener, - type UniffiVTableCallbackInterfaceSyncNotificationListener, type UniffiVTableCallbackInterfaceSyncServiceStateObserver, + type UniffiVTableCallbackInterfacePaginationStatusListener, type UniffiVTableCallbackInterfaceTimelineListener, - type UniffiVTableCallbackInterfaceTypingNotificationsListener, type UniffiVTableCallbackInterfaceUnableToDecryptDelegate, - type UniffiVTableCallbackInterfaceVerificationStateListener, type UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider, } from './matrix_sdk_ffi-ffi'; import { - type OAuthAuthorizationDataInterface, + type OAuthAuthorizationDataLike, type RoomPowerLevelChanges, type ServerVendorInfo, type VirtualElementCallWidgetConfig, @@ -100,12 +103,11 @@ import { type FfiConverter, type UniffiByteArray, type UniffiDuration, + type UniffiGcObject, type UniffiHandle, type UniffiObjectFactory, type UniffiReferenceHolder, - type UniffiRustArcPtr, type UniffiRustCallStatus, - type UnsafeMutableRawPointer, AbstractFfiConverterByteArray, FfiConverterArray, FfiConverterArrayBuffer, @@ -185,46 +187,11 @@ const uniffiIsDebug = false; // Public interface members begin here. -/** - * Creates a [`RoomMessageEventContentWithoutRelation`] given a - * [`MessageContent`] value. - */ -export function contentWithoutRelationFromMessage( - message: MessageContent -): RoomMessageEventContentWithoutRelationInterface /*throws*/ { - return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( - uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError - ), - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - FfiConverterTypeMessageContent.lower(message), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); -} -/** - * Create a caption edit. - * - * If no `formatted_caption` is provided, then it's assumed the `caption` - * represents valid Markdown that can be used as the formatted caption. - */ -export function createCaptionEdit( - caption: string | undefined, - formattedCaption: FormattedBody | undefined, - mentions: Mentions | undefined -): EditedContent { - return FfiConverterTypeEditedContent.lift( +export function sdkGitSha(): string { + return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( - FfiConverterOptionalString.lower(caption), - FfiConverterOptionalTypeFormattedBody.lower(formattedCaption), - FfiConverterOptionalTypeMentions.lower(mentions), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( callStatus ); }, @@ -244,86 +211,6 @@ export function genTransactionId(): string { ) ); } -/** - * Create the actual url that can be used to setup the WebView or IFrame - * that contains the widget. - * - * # Arguments - * * `widget_settings` - The widget settings to generate the url for. - * * `room` - A Matrix room which is used to query the logged in username - * * `props` - Properties from the client that can be used by a widget to adapt - * to the client. e.g. language, font-scale... - */ -export async function generateWebviewUrl( - widgetSettings: WidgetSettings, - room: RoomInterface, - props: ClientProperties, - 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_func_generate_webview_url( - FfiConverterTypeWidgetSettings.lower(widgetSettings), - FfiConverterTypeRoom.lower(room), - FfiConverterTypeClientProperties.lower(props) - ); - }, - /*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:*/ FfiConverterString.lift.bind(FfiConverterString), - /*liftString:*/ FfiConverterString.lift, - /*asyncOpts:*/ asyncOpts_, - /*errorHandler:*/ FfiConverterTypeParseError.lift.bind( - FfiConverterTypeParseError - ) - ); - } catch (__error: any) { - if (uniffiIsDebug && __error instanceof Error) { - __error.stack = __stack; - } - throw __error; - } -} -/** - * The Capabilities required to run a element call widget. - * - * This is intended to be used in combination with: `acquire_capabilities` of - * the `CapabilitiesProvider`. - * - * `acquire_capabilities` can simply return the `WidgetCapabilities` from this - * function. Even if there are non intersecting permissions to what the widget - * requested. - * - * Editing and extending the capabilities from this function is also possible, - * but should only be done as temporal workarounds until this function is - * adjusted - */ -export function getElementCallRequiredPermissions( - ownUserId: string, - ownDeviceId: string -): WidgetCapabilities { - return FfiConverterTypeWidgetCapabilities.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( - FfiConverterString.lower(ownUserId), - FfiConverterString.lower(ownDeviceId), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); -} /** * Sets up logs and the tokio runtime for the current application. * @@ -350,6 +237,50 @@ export function initPlatform( /*liftString:*/ FfiConverterString.lift ); } +/** + * Updates the tracing subscriber with a new file writer based on the provided + * configuration. + * + * This method will throw if `init_platform` hasn't been called, or if it was + * called with `write_to_files` set to `None`. + */ +export function reloadTracingFileWriter( + configuration: TracingFileConfiguration +): void /*throws*/ { + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ), + /*caller:*/ (callStatus) => { + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + FfiConverterTypeTracingFileConfiguration.lower(configuration), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ); +} +/** + * Generates a `matrix.to` permalink to the given room alias. + */ +export function matrixToRoomAliasPermalink( + roomAlias: string +): string /*throws*/ { + return FfiConverterString.lift( + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ), + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + FfiConverterString.lower(roomAlias), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); +} /** * Verifies the passed `String` matches the expected room alias format: * @@ -371,51 +302,33 @@ export function isRoomAliasFormatValid(alias: string): boolean { ); } /** - * Log an event. - * - * The target should be something like a module path, and can be referenced in - * the filter string given to `init_platform`. `level` and `target` for a - * callsite are fixed at the first `log_event` call for that callsite and can - * not be changed afterwards, i.e. the level and target passed for second and - * following `log_event`s with the same callsite will be ignored. - * - * This function leaks a little bit of memory for each unique (file + line + - * level + target) 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. + * Transforms a Room's display name into a valid room alias name. */ -export function logEvent( - file: string, - line: /*u32*/ number | undefined, - level: LogLevel, - target: string, - message: string -): void { - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event( - FfiConverterString.lower(file), - FfiConverterOptionalUInt32.lower(line), - FfiConverterTypeLogLevel.lower(level), - FfiConverterString.lower(target), - FfiConverterString.lower(message), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift +export function roomAliasNameFromRoomDisplayName(roomName: string): string { + return FfiConverterString.lift( + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + FfiConverterString.lower(roomName), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) ); } -export function makeWidgetDriver( - settings: WidgetSettings -): WidgetDriverAndHandle /*throws*/ { - return FfiConverterTypeWidgetDriverAndHandle.lift( +/** + * Generates a `matrix.to` permalink to the given userID. + */ +export function matrixToUserPermalink(userId: string): string /*throws*/ { + return FfiConverterString.lift( uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeParseError.lift.bind( - FfiConverterTypeParseError + /*liftError:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError ), /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( - FfiConverterTypeWidgetSettings.lower(settings), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( + FfiConverterString.lower(userId), callStatus ); }, @@ -424,19 +337,21 @@ export function makeWidgetDriver( ); } /** - * Generates a `matrix.to` permalink to the given room alias. + * Get the suggested power level for the given role. + * + * Returns an error if the value of the power level is unsupported. */ -export function matrixToRoomAliasPermalink( - roomAlias: string -): string /*throws*/ { - return FfiConverterString.lift( +export function suggestedPowerLevelForRole( + role: RoomMemberRole +): PowerLevel /*throws*/ { + return FfiConverterTypePowerLevel.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( FfiConverterTypeClientError ), /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( - FfiConverterString.lower(roomAlias), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( + FfiConverterTypeRoomMemberRole.lower(role), callStatus ); }, @@ -445,17 +360,44 @@ export function matrixToRoomAliasPermalink( ); } /** - * Generates a `matrix.to` permalink to the given userID. + * 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 matrixToUserPermalink(userId: string): string /*throws*/ { - return FfiConverterString.lift( +export function suggestedRoleForPowerLevel( + powerLevel: PowerLevel +): RoomMemberRole /*throws*/ { + return FfiConverterTypeRoomMemberRole.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( FfiConverterTypeClientError ), /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( - FfiConverterString.lower(userId), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( + FfiConverterTypePowerLevel.lower(powerLevel), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); +} +/** + * Creates a [`RoomMessageEventContentWithoutRelation`] given a + * [`MessageContent`] value. + */ +export function contentWithoutRelationFromMessage( + message: MessageContent +): RoomMessageEventContentWithoutRelationLike /*throws*/ { + return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ), + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( + FfiConverterTypeMessageContent.lower(message), callStatus ); }, @@ -466,7 +408,7 @@ export function matrixToUserPermalink(userId: string): string /*throws*/ { export function messageEventContentFromHtml( body: string, htmlBody: string -): RoomMessageEventContentWithoutRelationInterface { +): RoomMessageEventContentWithoutRelationLike { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -483,7 +425,7 @@ export function messageEventContentFromHtml( export function messageEventContentFromHtmlAsEmote( body: string, htmlBody: string -): RoomMessageEventContentWithoutRelationInterface { +): RoomMessageEventContentWithoutRelationLike { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -499,7 +441,7 @@ export function messageEventContentFromHtmlAsEmote( } export function messageEventContentFromMarkdown( md: string -): RoomMessageEventContentWithoutRelationInterface { +): RoomMessageEventContentWithoutRelationLike { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -514,7 +456,7 @@ export function messageEventContentFromMarkdown( } export function messageEventContentFromMarkdownAsEmote( md: string -): RoomMessageEventContentWithoutRelationInterface { +): RoomMessageEventContentWithoutRelationLike { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -529,7 +471,7 @@ export function messageEventContentFromMarkdownAsEmote( } export function messageEventContentNew( msgtype: MessageType -): RoomMessageEventContentWithoutRelationInterface /*throws*/ { +): RoomMessageEventContentWithoutRelationLike /*throws*/ { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -546,33 +488,15 @@ export function messageEventContentNew( ); } /** - * `WidgetSettings` are usually created from a state event. - * (currently unimplemented) - * - * In some cases the client wants to create custom `WidgetSettings` - * for specific rooms based on other conditions. - * This function returns a `WidgetSettings` object which can be used - * to setup a widget using `run_client_widget_api` - * and to generate the correct url for the widget. - * - * # Arguments - * - * * `props` - A struct containing the configuration parameters for a element - * call widget. + * Parse a matrix entity from a given URI, be it either + * a `matrix.to` link or a `matrix:` URI */ -export function newVirtualElementCallWidget( - props: VirtualElementCallWidgetProperties, - config: VirtualElementCallWidgetConfig -): WidgetSettings /*throws*/ { - return FfiConverterTypeWidgetSettings.lift( - uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeParseError.lift.bind( - FfiConverterTypeParseError - ), +export function parseMatrixEntityFrom(uri: string): MatrixEntity | undefined { + return FfiConverterOptionalTypeMatrixEntity.lift( + uniffiCaller.rustCall( /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( - FfiConverterTypeVirtualElementCallWidgetProperties.lower(props), - FfiConverterTypeVirtualElementCallWidgetConfig.lower(config), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( + FfiConverterString.lower(uri), callStatus ); }, @@ -581,15 +505,23 @@ export function newVirtualElementCallWidget( ); } /** - * Parse a matrix entity from a given URI, be it either - * a `matrix.to` link or a `matrix:` URI + * Create a caption edit. + * + * If no `formatted_caption` is provided, then it's assumed the `caption` + * represents valid Markdown that can be used as the formatted caption. */ -export function parseMatrixEntityFrom(uri: string): MatrixEntity | undefined { - return FfiConverterOptionalTypeMatrixEntity.lift( +export function createCaptionEdit( + caption: string | undefined, + formattedCaption: FormattedBody | undefined, + mentions: Mentions | undefined +): EditedContent { + return FfiConverterTypeEditedContent.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_parse_matrix_entity_from( - FfiConverterString.lower(uri), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + FfiConverterOptionalString.lower(caption), + FfiConverterOptionalTypeFormattedBody.lower(formattedCaption), + FfiConverterOptionalTypeMentions.lower(mentions), callStatus ); }, @@ -598,22 +530,34 @@ export function parseMatrixEntityFrom(uri: string): MatrixEntity | undefined { ); } /** - * Updates the tracing subscriber with a new file writer based on the provided - * configuration. + * Log an event. * - * This method will throw if `init_platform` hasn't been called, or if it was - * called with `write_to_files` set to `None`. + * The target should be something like a module path, and can be referenced in + * the filter string given to `init_platform`. `level` and `target` for a + * callsite are fixed at the first `log_event` call for that callsite and can + * not be changed afterwards, i.e. the level and target passed for second and + * following `log_event`s with the same callsite will be ignored. + * + * This function leaks a little bit of memory for each unique (file + line + + * level + target) 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. */ -export function reloadTracingFileWriter( - configuration: TracingFileConfiguration -): void /*throws*/ { - uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError - ), +export function logEvent( + file: string, + line: /*u32*/ number | undefined, + level: LogLevel, + target: string, + message: string +): void { + uniffiCaller.rustCall( /*caller:*/ (callStatus) => { - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( - FfiConverterTypeTracingFileConfiguration.lower(configuration), + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_log_event( + FfiConverterString.lower(file), + FfiConverterOptionalUInt32.lower(line), + FfiConverterTypeLogLevel.lower(level), + FfiConverterString.lower(target), + FfiConverterString.lower(message), callStatus ); }, @@ -621,26 +565,78 @@ export function reloadTracingFileWriter( ); } /** - * Transforms a Room's display name into a valid room alias name. + * Create the actual url that can be used to setup the WebView or IFrame + * that contains the widget. + * + * # Arguments + * * `widget_settings` - The widget settings to generate the url for. + * * `room` - A Matrix room which is used to query the logged in username + * * `props` - Properties from the client that can be used by a widget to adapt + * to the client. e.g. language, font-scale... */ -export function roomAliasNameFromRoomDisplayName(roomName: string): string { - return FfiConverterString.lift( - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( - FfiConverterString.lower(roomName), - callStatus +export async function generateWebviewUrl( + widgetSettings: WidgetSettings, + room: RoomLike, + props: ClientProperties, + 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_func_generate_webview_url( + FfiConverterTypeWidgetSettings.lower(widgetSettings), + FfiConverterTypeRoom.lower(room), + FfiConverterTypeClientProperties.lower(props) ); }, - /*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:*/ FfiConverterString.lift.bind(FfiConverterString), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeParseError.lift.bind( + FfiConverterTypeParseError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } } -export function sdkGitSha(): string { - return FfiConverterString.lift( +/** + * The Capabilities required to run a element call widget. + * + * This is intended to be used in combination with: `acquire_capabilities` of + * the `CapabilitiesProvider`. + * + * `acquire_capabilities` can simply return the `WidgetCapabilities` from this + * function. Even if there are non intersecting permissions to what the widget + * requested. + * + * Editing and extending the capabilities from this function is also possible, + * but should only be done as temporal workarounds until this function is + * adjusted + */ +export function getElementCallRequiredPermissions( + ownUserId: string, + ownDeviceId: string +): WidgetCapabilities { + return FfiConverterTypeWidgetCapabilities.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha( + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + FfiConverterString.lower(ownUserId), + FfiConverterString.lower(ownDeviceId), callStatus ); }, @@ -648,22 +644,17 @@ 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 -): PowerLevel /*throws*/ { - return FfiConverterTypePowerLevel.lift( +export function makeWidgetDriver( + settings: WidgetSettings +): WidgetDriverAndHandle /*throws*/ { + return FfiConverterTypeWidgetDriverAndHandle.lift( uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError + /*liftError:*/ FfiConverterTypeParseError.lift.bind( + FfiConverterTypeParseError ), /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_power_level_for_role( - FfiConverterTypeRoomMemberRole.lower(role), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + FfiConverterTypeWidgetSettings.lower(settings), callStatus ); }, @@ -672,22 +663,33 @@ export function suggestedPowerLevelForRole( ); } /** - * Get the suggested role for the given power level. + * `WidgetSettings` are usually created from a state event. + * (currently unimplemented) * - * Returns an error if the value of the power level is out of range for numbers - * accepted in canonical JSON. + * In some cases the client wants to create custom `WidgetSettings` + * for specific rooms based on other conditions. + * This function returns a `WidgetSettings` object which can be used + * to setup a widget using `run_client_widget_api` + * and to generate the correct url for the widget. + * + * # Arguments + * + * * `props` - A struct containing the configuration parameters for a element + * call widget. */ -export function suggestedRoleForPowerLevel( - powerLevel: PowerLevel -): RoomMemberRole /*throws*/ { - return FfiConverterTypeRoomMemberRole.lift( +export function newVirtualElementCallWidget( + props: VirtualElementCallWidgetProperties, + config: VirtualElementCallWidgetConfig +): WidgetSettings /*throws*/ { + return FfiConverterTypeWidgetSettings.lift( uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError + /*liftError:*/ FfiConverterTypeParseError.lift.bind( + FfiConverterTypeParseError ), /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_suggested_role_for_power_level( - FfiConverterTypePowerLevel.lower(powerLevel), + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( + FfiConverterTypeVirtualElementCallWidgetProperties.lower(props), + FfiConverterTypeVirtualElementCallWidgetConfig.lower(config), callStatus ); }, @@ -739,6 +741,9 @@ const uniffiCallbackInterfaceAccountDataListener: { // AccountDataListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeAccountDataListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeAccountDataListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_accountdatalistener( @@ -786,6 +791,9 @@ const uniffiCallbackInterfaceBackupStateListener: { // BackupStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeBackupStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeBackupStateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupstatelistener( @@ -835,6 +843,9 @@ const uniffiCallbackInterfaceBackupSteadyStateListener: { // BackupSteadyStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeBackupSteadyStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeBackupSteadyStateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_backupsteadystatelistener( @@ -885,6 +896,9 @@ const uniffiCallbackInterfaceCallDeclineListener: { // CallDeclineListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeCallDeclineListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeCallDeclineListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_calldeclinelistener( @@ -933,6 +947,9 @@ const uniffiCallbackInterfaceClientDelegate: { // ClientDelegate: this will throw a stale handle error if the handle isn't found. FfiConverterTypeClientDelegate.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeClientDelegate.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientdelegate( @@ -1013,6 +1030,9 @@ const uniffiCallbackInterfaceClientSessionDelegate: { // ClientSessionDelegate: this will throw a stale handle error if the handle isn't found. FfiConverterTypeClientSessionDelegate.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeClientSessionDelegate.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_clientsessiondelegate( @@ -1062,6 +1082,9 @@ const uniffiCallbackInterfaceEnableRecoveryProgressListener: { // EnableRecoveryProgressListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeEnableRecoveryProgressListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeEnableRecoveryProgressListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_enablerecoveryprogresslistener( @@ -1111,6 +1134,11 @@ const uniffiCallbackInterfaceGeneratedQrLoginProgressListener: { // GeneratedQrLoginProgressListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeGeneratedQrLoginProgressListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeGeneratedQrLoginProgressListener.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_generatedqrloginprogresslistener( @@ -1162,6 +1190,11 @@ const uniffiCallbackInterfaceGrantGeneratedQrLoginProgressListener: { // GrantGeneratedQrLoginProgressListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeGrantGeneratedQrLoginProgressListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeGrantGeneratedQrLoginProgressListener.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantgeneratedqrloginprogresslistener( @@ -1211,6 +1244,9 @@ const uniffiCallbackInterfaceGrantQrLoginProgressListener: { // GrantQrLoginProgressListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeGrantQrLoginProgressListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeGrantQrLoginProgressListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_grantqrloginprogresslistener( @@ -1260,6 +1296,9 @@ const uniffiCallbackInterfaceIdentityStatusChangeListener: { // IdentityStatusChangeListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeIdentityStatusChangeListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeIdentityStatusChangeListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_identitystatuschangelistener( @@ -1307,6 +1346,9 @@ const uniffiCallbackInterfaceIgnoredUsersListener: { // IgnoredUsersListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeIgnoredUsersListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeIgnoredUsersListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_ignoreduserslistener( @@ -1359,6 +1401,9 @@ const uniffiCallbackInterfaceKnockRequestsListener: { // KnockRequestsListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeKnockRequestsListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeKnockRequestsListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_knockrequestslistener( @@ -1411,6 +1456,9 @@ const uniffiCallbackInterfaceLiveLocationShareListener: { // LiveLocationShareListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeLiveLocationShareListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeLiveLocationShareListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_livelocationsharelistener( @@ -1460,6 +1508,9 @@ const uniffiCallbackInterfaceMediaPreviewConfigListener: { // MediaPreviewConfigListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeMediaPreviewConfigListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeMediaPreviewConfigListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_mediapreviewconfiglistener( @@ -1510,6 +1561,9 @@ const uniffiCallbackInterfaceNotificationSettingsDelegate: { // NotificationSettingsDelegate: this will throw a stale handle error if the handle isn't found. FfiConverterTypeNotificationSettingsDelegate.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeNotificationSettingsDelegate.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_notificationsettingsdelegate( @@ -1559,6 +1613,9 @@ const uniffiCallbackInterfacePaginationStatusListener: { // PaginationStatusListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypePaginationStatusListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypePaginationStatusListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_paginationstatuslistener( @@ -1607,6 +1664,9 @@ const uniffiCallbackInterfaceProgressWatcher: { // ProgressWatcher: this will throw a stale handle error if the handle isn't found. FfiConverterTypeProgressWatcher.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeProgressWatcher.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_progresswatcher( @@ -1654,6 +1714,9 @@ const uniffiCallbackInterfaceQrLoginProgressListener: { // QrLoginProgressListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeQrLoginProgressListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeQrLoginProgressListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_qrloginprogresslistener( @@ -1701,6 +1764,9 @@ const uniffiCallbackInterfaceRecoveryStateListener: { // RecoveryStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRecoveryStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRecoveryStateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_recoverystatelistener( @@ -1757,6 +1823,9 @@ const uniffiCallbackInterfaceRoomAccountDataListener: { // RoomAccountDataListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomAccountDataListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomAccountDataListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomaccountdatalistener( @@ -1808,6 +1877,11 @@ const uniffiCallbackInterfaceRoomDirectorySearchEntriesListener: { // RoomDirectorySearchEntriesListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomDirectorySearchEntriesListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomDirectorySearchEntriesListener.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomdirectorysearchentrieslistener( @@ -1854,6 +1928,9 @@ const uniffiCallbackInterfaceRoomInfoListener: { // RoomInfoListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomInfoListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomInfoListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roominfolistener( @@ -1903,6 +1980,9 @@ const uniffiCallbackInterfaceRoomListEntriesListener: { // RoomListEntriesListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomListEntriesListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomListEntriesListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistentrieslistener( @@ -1952,6 +2032,9 @@ const uniffiCallbackInterfaceRoomListLoadingStateListener: { // RoomListLoadingStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomListLoadingStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomListLoadingStateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistloadingstatelistener( @@ -2001,6 +2084,9 @@ const uniffiCallbackInterfaceRoomListServiceStateListener: { // RoomListServiceStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomListServiceStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomListServiceStateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicestatelistener( @@ -2052,6 +2138,11 @@ const uniffiCallbackInterfaceRoomListServiceSyncIndicatorListener: { // RoomListServiceSyncIndicatorListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeRoomListServiceSyncIndicatorListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeRoomListServiceSyncIndicatorListener.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_roomlistservicesyncindicatorlistener( @@ -2107,6 +2198,9 @@ const uniffiCallbackInterfaceSendQueueListener: { // SendQueueListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSendQueueListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSendQueueListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueuelistener( @@ -2164,6 +2258,9 @@ const uniffiCallbackInterfaceSendQueueRoomErrorListener: { // SendQueueRoomErrorListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSendQueueRoomErrorListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSendQueueRoomErrorListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomerrorlistener( @@ -2224,6 +2321,9 @@ const uniffiCallbackInterfaceSendQueueRoomUpdateListener: { // SendQueueRoomUpdateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSendQueueRoomUpdateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSendQueueRoomUpdateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sendqueueroomupdatelistener( @@ -2414,6 +2514,11 @@ const uniffiCallbackInterfaceSessionVerificationControllerDelegate: { // SessionVerificationControllerDelegate: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSessionVerificationControllerDelegate.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSessionVerificationControllerDelegate.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_sessionverificationcontrollerdelegate( @@ -2463,6 +2568,9 @@ const uniffiCallbackInterfaceSpaceRoomListEntriesListener: { // SpaceRoomListEntriesListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSpaceRoomListEntriesListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSpaceRoomListEntriesListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistentrieslistener( @@ -2514,6 +2622,11 @@ const uniffiCallbackInterfaceSpaceRoomListPaginationStateListener: { // SpaceRoomListPaginationStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSpaceRoomListPaginationStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSpaceRoomListPaginationStateListener.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener( @@ -2563,6 +2676,9 @@ const uniffiCallbackInterfaceSpaceRoomListSpaceListener: { // SpaceRoomListSpaceListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSpaceRoomListSpaceListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSpaceRoomListSpaceListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener( @@ -2612,6 +2728,11 @@ const uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener: { // SpaceServiceJoinedSpacesListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSpaceServiceJoinedSpacesListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSpaceServiceJoinedSpacesListener.clone( + uniffiHandle + ); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener( @@ -2675,6 +2796,9 @@ const uniffiCallbackInterfaceSyncNotificationListener: { // SyncNotificationListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSyncNotificationListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSyncNotificationListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncnotificationlistener( @@ -2724,6 +2848,9 @@ const uniffiCallbackInterfaceSyncServiceStateObserver: { // SyncServiceStateObserver: this will throw a stale handle error if the handle isn't found. FfiConverterTypeSyncServiceStateObserver.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeSyncServiceStateObserver.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver( @@ -2772,6 +2899,9 @@ const uniffiCallbackInterfaceTimelineListener: { // TimelineListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeTimelineListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeTimelineListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_timelinelistener( @@ -2819,6 +2949,9 @@ const uniffiCallbackInterfaceTypingNotificationsListener: { // TypingNotificationsListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeTypingNotificationsListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeTypingNotificationsListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_typingnotificationslistener( @@ -2866,6 +2999,9 @@ const uniffiCallbackInterfaceUnableToDecryptDelegate: { // UnableToDecryptDelegate: this will throw a stale handle error if the handle isn't found. FfiConverterTypeUnableToDecryptDelegate.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeUnableToDecryptDelegate.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_unabletodecryptdelegate( @@ -2915,6 +3051,9 @@ const uniffiCallbackInterfaceVerificationStateListener: { // VerificationStateListener: this will throw a stale handle error if the handle isn't found. FfiConverterTypeVerificationStateListener.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeVerificationStateListener.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener( @@ -2969,6 +3108,9 @@ const uniffiCallbackInterfaceWidgetCapabilitiesProvider: { // WidgetCapabilitiesProvider: this will throw a stale handle error if the handle isn't found. FfiConverterTypeWidgetCapabilitiesProvider.drop(uniffiHandle); }, + uniffiClone: (uniffiHandle: UniffiHandle): UniffiHandle => { + return FfiConverterTypeWidgetCapabilitiesProvider.clone(uniffiHandle); + }, }, register: () => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_init_callback_vtable_widgetcapabilitiesprovider( @@ -3012,21 +3154,8 @@ export const AbstractProgress = (() => { ); })(); 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, }); })(); @@ -3055,9 +3184,9 @@ const FfiConverterTypeAbstractProgress = (() => { })(); export type AudioInfo = { - duration: UniffiDuration | undefined; - size: /*u64*/ bigint | undefined; - mimetype: string | undefined; + duration?: UniffiDuration; + size?: /*u64*/ bigint; + mimetype?: string; }; /** @@ -3069,21 +3198,8 @@ export const AudioInfo = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link AudioInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link AudioInfo}, 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, }); })(); @@ -3119,12 +3235,12 @@ export type AudioMessageContent = { * The computed filename, for use in a client. */ filename: string; - caption: string | undefined; - formattedCaption: FormattedBody | undefined; - source: MediaSourceInterface; - info: AudioInfo | undefined; - audio: UnstableAudioDetailsContent | undefined; - voice: UnstableVoiceContent | undefined; + caption?: string; + formattedCaption?: FormattedBody; + source: MediaSourceLike; + info?: AudioInfo; + audio?: UnstableAudioDetailsContent; + voice?: UnstableVoiceContent; }; /** @@ -3138,21 +3254,8 @@ export const AudioMessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link AudioMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link AudioMessageContent}, 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, }); })(); @@ -3225,21 +3328,8 @@ export const AuthDataPasswordDetails = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link AuthDataPasswordDetails}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link AuthDataPasswordDetails}, 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, }); @@ -3278,12 +3368,12 @@ export type ClientProperties = { * The language tag the client is set to e.g. en-us. (Undefined and invalid * becomes: `en-US`) */ - languageTag: string | undefined; + languageTag?: string; /** * A string describing the theme (dark, light) or org.example.dark. * (default: `light`) */ - theme: string | undefined; + theme?: string; }; /** @@ -3297,21 +3387,8 @@ export const ClientProperties = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ClientProperties}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ClientProperties}, 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, }); })(); @@ -3354,7 +3431,7 @@ export type ComposerDraft = { * If the message is formatted in HTML, the HTML representation of the * message. */ - htmlText: string | undefined; + htmlText?: string; /** * The type of draft. */ @@ -3376,21 +3453,8 @@ export const ComposerDraft = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ComposerDraft}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ComposerDraft}, 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, }); })(); @@ -3465,21 +3529,8 @@ export const ConditionalPushRule = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ConditionalPushRule}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ConditionalPushRule}, 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, }); })(); @@ -3517,18 +3568,18 @@ const FfiConverterTypeConditionalPushRule = (() => { })(); export type CreateRoomParameters = { - name: string | undefined; - topic: string | undefined; + name?: string; + topic?: string; isEncrypted: boolean; isDirect: boolean; visibility: RoomVisibility; preset: RoomPreset; - invite: Array | undefined; - avatar: string | undefined; - powerLevelContentOverride: PowerLevels | undefined; - joinRuleOverride: JoinRule | undefined; - historyVisibilityOverride: RoomHistoryVisibility | undefined; - canonicalAlias: string | undefined; + invite?: Array; + avatar?: string; + powerLevelContentOverride?: PowerLevels; + joinRuleOverride?: JoinRule; + historyVisibilityOverride?: RoomHistoryVisibility; + canonicalAlias?: string; }; /** @@ -3552,21 +3603,8 @@ export const CreateRoomParameters = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link CreateRoomParameters}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link CreateRoomParameters}, 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, }); })(); @@ -3640,7 +3678,7 @@ const FfiConverterTypeCreateRoomParameters = (() => { export type EmoteMessageContent = { body: string; - formatted: FormattedBody | undefined; + formatted?: FormattedBody; }; /** @@ -3654,21 +3692,8 @@ export const EmoteMessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link EmoteMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link EmoteMessageContent}, 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, }); })(); @@ -3708,12 +3733,12 @@ export type EventTimelineItem = { isEditable: boolean; content: TimelineItemContent; timestamp: Timestamp; - localSendState: EventSendState | undefined; - localCreatedAt: /*u64*/ bigint | undefined; + localSendState?: EventSendState; + localCreatedAt?: /*u64*/ bigint; readReceipts: Map; - origin: EventItemOrigin | undefined; + origin?: EventItemOrigin; canBeRepliedTo: boolean; - lazyProvider: LazyTimelineItemProviderInterface; + lazyProvider: LazyTimelineItemProviderLike; }; /** @@ -3727,21 +3752,8 @@ export const EventTimelineItem = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link EventTimelineItem}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link EventTimelineItem}, 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, }); })(); @@ -3816,8 +3828,8 @@ const FfiConverterTypeEventTimelineItem = (() => { export type EventTimelineItemDebugInfo = { model: string; - originalJson: string | undefined; - latestEditJson: string | undefined; + originalJson?: string; + latestEditJson?: string; }; /** @@ -3832,21 +3844,8 @@ export const EventTimelineItemDebugInfo = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link EventTimelineItemDebugInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link EventTimelineItemDebugInfo}, 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, }); @@ -3879,10 +3878,10 @@ const FfiConverterTypeEventTimelineItemDebugInfo = (() => { })(); export type FileInfo = { - mimetype: string | undefined; - size: /*u64*/ bigint | undefined; - thumbnailInfo: ThumbnailInfo | undefined; - thumbnailSource: MediaSourceInterface | undefined; + mimetype?: string; + size?: /*u64*/ bigint; + thumbnailInfo?: ThumbnailInfo; + thumbnailSource?: MediaSourceLike; }; /** @@ -3894,21 +3893,8 @@ export const FileInfo = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link FileInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link FileInfo}, 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, }); })(); @@ -3951,10 +3937,10 @@ export type FileMessageContent = { * The computed filename, for use in a client. */ filename: string; - caption: string | undefined; - formattedCaption: FormattedBody | undefined; - source: MediaSourceInterface; - info: FileInfo | undefined; + caption?: string; + formattedCaption?: FormattedBody; + source: MediaSourceLike; + info?: FileInfo; }; /** @@ -3968,21 +3954,8 @@ export const FileMessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link FileMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link FileMessageContent}, 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, }); })(); @@ -4037,21 +4010,8 @@ export const FormattedBody = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link FormattedBody}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link FormattedBody}, 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, }); })(); @@ -4081,7 +4041,7 @@ const FfiConverterTypeFormattedBody = (() => { export type GalleryMessageContent = { body: string; - formatted: FormattedBody | undefined; + formatted?: FormattedBody; itemtypes: Array; }; @@ -4097,21 +4057,8 @@ export const GalleryMessageContent = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link GalleryMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link GalleryMessageContent}, 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, }); })(); @@ -4146,19 +4093,19 @@ export type GalleryUploadParameters = { /** * Optional non-formatted caption, for clients that support it. */ - caption: string | undefined; + caption?: string; /** * Optional HTML-formatted caption, for clients that support it. */ - formattedCaption: FormattedBody | undefined; + formattedCaption?: FormattedBody; /** * Optional intentional mentions to be sent with the gallery. */ - mentions: Mentions | undefined; + mentions?: Mentions; /** * Optional Event ID to reply to. */ - inReplyTo: string | undefined; + inReplyTo?: string; }; /** @@ -4173,21 +4120,8 @@ export const GalleryUploadParameters = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link GalleryUploadParameters}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link GalleryUploadParameters}, 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, }); @@ -4226,8 +4160,8 @@ const FfiConverterTypeGalleryUploadParameters = (() => { export type HttpPusherData = { url: string; - format: PushFormat | undefined; - defaultPayload: string | undefined; + format?: PushFormat; + defaultPayload?: string; }; /** @@ -4241,21 +4175,8 @@ export const HttpPusherData = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link HttpPusherData}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link HttpPusherData}, 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, }); })(); @@ -4309,21 +4230,8 @@ export const IdentityStatusChange = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link IdentityStatusChange}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link IdentityStatusChange}, 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, }); })(); @@ -4369,21 +4277,8 @@ export const IgnoredUser = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link IgnoredUser}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link IgnoredUser}, 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, }); })(); @@ -4403,14 +4298,14 @@ const FfiConverterTypeIgnoredUser = (() => { })(); export type ImageInfo = { - height: /*u64*/ bigint | undefined; - width: /*u64*/ bigint | undefined; - mimetype: string | undefined; - size: /*u64*/ bigint | undefined; - thumbnailInfo: ThumbnailInfo | undefined; - thumbnailSource: MediaSourceInterface | undefined; - blurhash: string | undefined; - isAnimated: boolean | undefined; + height?: /*u64*/ bigint; + width?: /*u64*/ bigint; + mimetype?: string; + size?: /*u64*/ bigint; + thumbnailInfo?: ThumbnailInfo; + thumbnailSource?: MediaSourceLike; + blurhash?: string; + isAnimated?: boolean; }; /** @@ -4422,21 +4317,8 @@ export const ImageInfo = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ImageInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ImageInfo}, 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, }); })(); @@ -4491,10 +4373,10 @@ export type ImageMessageContent = { * The computed filename, for use in a client. */ filename: string; - caption: string | undefined; - formattedCaption: FormattedBody | undefined; - source: MediaSourceInterface; - info: ImageInfo | undefined; + caption?: string; + formattedCaption?: FormattedBody; + source: MediaSourceLike; + info?: ImageInfo; }; /** @@ -4508,21 +4390,8 @@ export const ImageMessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ImageMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ImageMessageContent}, 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, }); })(); @@ -4580,19 +4449,19 @@ export type KnockRequest = { /** * The optional display name of the user who's requesting to join the room. */ - displayName: string | undefined; + displayName?: string; /** * The optional avatar url of the user who's requesting to join the room. */ - avatarUrl: string | undefined; + avatarUrl?: string; /** * An optional reason why the user wants join the room. */ - reason: string | undefined; + reason?: string; /** * The timestamp when this request was created. */ - timestamp: /*u64*/ bigint | undefined; + timestamp?: /*u64*/ bigint; /** * Whether the knock request has been marked as `seen` so it can be * filtered by the client. @@ -4601,7 +4470,7 @@ export type KnockRequest = { /** * A set of actions to perform for this knock request. */ - actions: KnockRequestActionsInterface; + actions: KnockRequestActionsLike; }; /** @@ -4615,21 +4484,8 @@ export const KnockRequest = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link KnockRequest}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link KnockRequest}, 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, }); })(); @@ -4701,21 +4557,8 @@ export const LastLocation = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link LastLocation}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link LastLocation}, 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, }); })(); @@ -4770,21 +4613,8 @@ export const LeaveSpaceRoom = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link LeaveSpaceRoom}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link LeaveSpaceRoom}, 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, }); })(); @@ -4841,21 +4671,8 @@ export const LiveLocationShare = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link LiveLocationShare}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link LiveLocationShare}, 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, }); })(); @@ -4889,9 +4706,9 @@ const FfiConverterTypeLiveLocationShare = (() => { export type LocationContent = { body: string; geoUri: string; - description: string | undefined; - zoomLevel: /*u8*/ number | undefined; - asset: AssetType | undefined; + description?: string; + zoomLevel?: /*u8*/ number; + asset?: AssetType; }; /** @@ -4905,21 +4722,8 @@ export const LocationContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link LocationContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link LocationContent}, 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, }); })(); @@ -4976,21 +4780,8 @@ export const MatrixEntity = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link MatrixEntity}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link MatrixEntity}, 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, }); })(); @@ -5028,11 +4819,11 @@ export type MediaPreviewConfig = { /** * The media previews setting for the user. */ - mediaPreviews: MediaPreviews | undefined; + mediaPreviews?: MediaPreviews; /** * The invite avatars setting for the user. */ - inviteAvatars: InviteAvatars | undefined; + inviteAvatars?: InviteAvatars; }; /** @@ -5046,21 +4837,8 @@ export const MediaPreviewConfig = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link MediaPreviewConfig}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link MediaPreviewConfig}, 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, }); })(); @@ -5121,21 +4899,8 @@ export const MediaUploadProgress = (() => { ); })(); 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, }); })(); @@ -5177,21 +4942,8 @@ export const Mentions = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link Mentions}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link Mentions}, 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, }); })(); @@ -5223,7 +4975,7 @@ export type MessageContent = { msgType: MessageType; body: string; isEdited: boolean; - mentions: Mentions | undefined; + mentions?: Mentions; }; /** @@ -5237,21 +4989,8 @@ export const MessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link MessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link MessageContent}, 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, }); })(); @@ -5296,15 +5035,15 @@ export type MsgLikeContent = { /** * The event this message is replying to, if any. */ - inReplyTo: InReplyToDetailsInterface | undefined; + inReplyTo?: InReplyToDetailsLike; /** * Event ID of the thread root, if this is a message in a thread. */ - threadRoot: string | undefined; + threadRoot?: string; /** * Details about the thread this message is the root of. */ - threadSummary: ThreadSummaryInterface | undefined; + threadSummary?: ThreadSummaryLike; }; /** @@ -5318,21 +5057,8 @@ export const MsgLikeContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link MsgLikeContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link MsgLikeContent}, 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, }); })(); @@ -5375,7 +5101,7 @@ const FfiConverterTypeMsgLikeContent = (() => { export type NoticeMessageContent = { body: string; - formatted: FormattedBody | undefined; + formatted?: FormattedBody; }; /** @@ -5390,21 +5116,8 @@ export const NoticeMessageContent = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link NoticeMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link NoticeMessageContent}, 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, }); })(); @@ -5441,13 +5154,13 @@ export type NotificationItem = { * Can be `None` if we couldn't determine this, because we lacked * information to create a push context. */ - isNoisy: boolean | undefined; - hasMention: boolean | undefined; - threadId: string | undefined; + isNoisy?: boolean; + hasMention?: boolean; + threadId?: string; /** * The push actions for this notification (notify, sound, highlight, etc.). */ - actions: Array | undefined; + actions?: Array; }; /** @@ -5461,21 +5174,8 @@ export const NotificationItem = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link NotificationItem}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link NotificationItem}, 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, }); })(); @@ -5540,21 +5240,8 @@ export const NotificationItemsRequest = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link NotificationItemsRequest}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link NotificationItemsRequest}, 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, }); @@ -5599,21 +5286,8 @@ export const NotificationPowerLevels = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link NotificationPowerLevels}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link NotificationPowerLevels}, 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, }); @@ -5639,12 +5313,12 @@ const FfiConverterTypeNotificationPowerLevels = (() => { export type NotificationRoomInfo = { displayName: string; - avatarUrl: string | undefined; - canonicalAlias: string | undefined; - topic: string | undefined; - joinRule: JoinRule | undefined; + avatarUrl?: string; + canonicalAlias?: string; + topic?: string; + joinRule?: JoinRule; joinedMembersCount: /*u64*/ bigint; - isEncrypted: boolean | undefined; + isEncrypted?: boolean; isDirect: boolean; isSpace: boolean; }; @@ -5661,21 +5335,8 @@ export const NotificationRoomInfo = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link NotificationRoomInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link NotificationRoomInfo}, 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, }); })(); @@ -5725,8 +5386,8 @@ const FfiConverterTypeNotificationRoomInfo = (() => { })(); export type NotificationSenderInfo = { - displayName: string | undefined; - avatarUrl: string | undefined; + displayName?: string; + avatarUrl?: string; isNameAmbiguous: boolean; }; @@ -5742,21 +5403,8 @@ export const NotificationSenderInfo = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link NotificationSenderInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link NotificationSenderInfo}, 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, }); @@ -5795,7 +5443,7 @@ export type OidcConfiguration = { /** * The name of the client that will be shown during OIDC authentication. */ - clientName: string | undefined; + clientName?: string; /** * The redirect URI that will be used when OIDC authentication is * successful. @@ -5808,15 +5456,15 @@ export type OidcConfiguration = { /** * A URI that contains the client's logo. */ - logoUri: string | undefined; + logoUri?: string; /** * A URI that contains the client's terms of service. */ - tosUri: string | undefined; + tosUri?: string; /** * A URI that contains the client's privacy policy. */ - policyUri: string | undefined; + policyUri?: string; /** * Pre-configured registrations for use with homeservers that don't support * dynamic client registration. @@ -5838,21 +5486,8 @@ export const OidcConfiguration = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link OidcConfiguration}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link OidcConfiguration}, 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, }); })(); @@ -5914,21 +5549,8 @@ export const OidcCrossSigningResetInfo = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link OidcCrossSigningResetInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link OidcCrossSigningResetInfo}, 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, }); @@ -5989,21 +5611,8 @@ export const PassPhrase = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PassPhrase}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PassPhrase}, 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, }); })(); @@ -6075,21 +5684,8 @@ export const PatternedPushRule = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PatternedPushRule}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PatternedPushRule}, 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, }); })(); @@ -6142,21 +5738,8 @@ export const PollAnswer = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PollAnswer}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PollAnswer}, 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, }); })(); @@ -6200,21 +5783,8 @@ export const PollData = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PollData}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PollData}, 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, }); })(); @@ -6249,14 +5819,14 @@ const FfiConverterTypePollData = (() => { })(); export type PowerLevels = { - usersDefault: /*i32*/ number | undefined; - eventsDefault: /*i32*/ number | undefined; - stateDefault: /*i32*/ number | undefined; - ban: /*i32*/ number | undefined; - kick: /*i32*/ number | undefined; - redact: /*i32*/ number | undefined; - invite: /*i32*/ number | undefined; - notifications: NotificationPowerLevels | undefined; + usersDefault?: /*i32*/ number; + eventsDefault?: /*i32*/ number; + stateDefault?: /*i32*/ number; + ban?: /*i32*/ number; + kick?: /*i32*/ number; + redact?: /*i32*/ number; + invite?: /*i32*/ number; + notifications?: NotificationPowerLevels; users: Map; events: Map; }; @@ -6272,21 +5842,8 @@ export const PowerLevels = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PowerLevels}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PowerLevels}, 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, }); })(); @@ -6372,21 +5929,8 @@ export const PredecessorRoom = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PredecessorRoom}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PredecessorRoom}, 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, }); })(); @@ -6425,21 +5969,8 @@ export const PusherIdentifiers = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link PusherIdentifiers}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link PusherIdentifiers}, 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, }); })(); @@ -6481,21 +6012,8 @@ export const Reaction = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link Reaction}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link Reaction}, 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, }); })(); @@ -6539,21 +6057,8 @@ export const ReactionSenderData = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ReactionSenderData}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ReactionSenderData}, 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, }); })(); @@ -6582,7 +6087,7 @@ const FfiConverterTypeReactionSenderData = (() => { })(); export type Receipt = { - timestamp: Timestamp | undefined; + timestamp?: Timestamp; }; /** @@ -6594,21 +6099,8 @@ export const Receipt = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link Receipt}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link Receipt}, 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, }); })(); @@ -6656,21 +6148,8 @@ export const RecentEmoji = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RecentEmoji}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RecentEmoji}, 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, }); })(); @@ -6705,19 +6184,19 @@ export type RequestConfig = { /** * Max number of retries. */ - retryLimit: /*u64*/ bigint | undefined; + retryLimit?: /*u64*/ bigint; /** * Timeout for a request in milliseconds. */ - timeout: /*u64*/ bigint | undefined; + timeout?: /*u64*/ bigint; /** * Max number of concurrent requests. No value means no limits. */ - maxConcurrentRequests: /*u64*/ bigint | undefined; + maxConcurrentRequests?: /*u64*/ bigint; /** * Base delay between retries. */ - maxRetryTime: /*u64*/ bigint | undefined; + maxRetryTime?: /*u64*/ bigint; }; /** @@ -6731,21 +6210,8 @@ export const RequestConfig = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RequestConfig}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RequestConfig}, 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, }); })(); @@ -6804,21 +6270,8 @@ export const ResolvedRoomAlias = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ResolvedRoomAlias}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ResolvedRoomAlias}, 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, }); })(); @@ -6848,11 +6301,11 @@ const FfiConverterTypeResolvedRoomAlias = (() => { export type RoomDescription = { roomId: string; - name: string | undefined; - topic: string | undefined; - alias: string | undefined; - avatarUrl: string | undefined; - joinRule: PublicRoomJoinRule | undefined; + name?: string; + topic?: string; + alias?: string; + avatarUrl?: string; + joinRule?: PublicRoomJoinRule; isWorldReadable: boolean; joinedMembers: /*u64*/ bigint; }; @@ -6868,21 +6321,8 @@ export const RoomDescription = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomDescription}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomDescription}, 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, }); })(); @@ -6941,11 +6381,11 @@ export type RoomHero = { /** * The display name of the hero. */ - displayName: string | undefined; + displayName?: string; /** * The avatar URL of the hero. */ - avatarUrl: string | undefined; + avatarUrl?: string; }; /** @@ -6957,21 +6397,8 @@ export const RoomHero = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomHero}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomHero}, 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, }); })(); @@ -7005,18 +6432,18 @@ const FfiConverterTypeRoomHero = (() => { export type RoomInfo = { id: string; encryptionState: EncryptionState; - creators: Array | undefined; + creators?: Array; /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. */ - displayName: string | undefined; + displayName?: string; /** * Room name as defined by the room state event only. */ - rawName: string | undefined; - topic: string | undefined; - avatarUrl: string | undefined; + rawName?: string; + topic?: string; + avatarUrl?: string; isDirect: boolean; /** * Whether the room is public or not, based on the join rules. @@ -7024,14 +6451,14 @@ export type RoomInfo = { * Can be `None` if the join rules state event is not available for this * room. */ - isPublic: boolean | undefined; + isPublic?: boolean; isSpace: boolean; /** * If present, it means the room has been archived/upgraded. */ - successorRoom: SuccessorRoom | undefined; + successorRoom?: SuccessorRoom; isFavourite: boolean; - canonicalAlias: string | undefined; + canonicalAlias?: string; alternativeAliases: Array; membership: Membership; /** @@ -7041,14 +6468,14 @@ export type RoomInfo = { * Can be missing if the room membership invite event is missing from the * store. */ - inviter: RoomMember | undefined; + inviter?: RoomMember; heroes: Array; activeMembersCount: /*u64*/ bigint; invitedMembersCount: /*u64*/ bigint; joinedMembersCount: /*u64*/ bigint; highlightCount: /*u64*/ bigint; notificationCount: /*u64*/ bigint; - cachedUserDefinedNotificationMode: RoomNotificationMode | undefined; + cachedUserDefinedNotificationMode?: RoomNotificationMode; hasRoomCall: boolean; activeRoomCallParticipants: Array; /** @@ -7077,7 +6504,7 @@ export type RoomInfo = { /** * The join rule for this room, if known. */ - joinRule: JoinRule | undefined; + joinRule?: JoinRule; /** * The history visibility for this room, if known. */ @@ -7087,11 +6514,11 @@ export type RoomInfo = { * * Can be missing if the room power levels event is missing from the store. */ - powerLevels: RoomPowerLevelsInterface | undefined; + powerLevels?: RoomPowerLevelsLike; /** * This room's version. */ - roomVersion: string | undefined; + roomVersion?: string; /** * Whether creators are privileged over every other user (have infinite * power level). @@ -7108,21 +6535,8 @@ export const RoomInfo = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomInfo}, 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, }); })(); @@ -7268,7 +6682,7 @@ const FfiConverterTypeRoomInfo = (() => { export type RoomListLoadingStateResult = { state: RoomListLoadingState; - stateStream: TaskHandleInterface; + stateStream: TaskHandleLike; }; /** @@ -7283,21 +6697,8 @@ export const RoomListLoadingStateResult = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomListLoadingStateResult}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomListLoadingStateResult}, 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, }); @@ -7328,14 +6729,14 @@ const FfiConverterTypeRoomListLoadingStateResult = (() => { export type RoomMember = { userId: string; - displayName: string | undefined; - avatarUrl: string | undefined; + displayName?: string; + avatarUrl?: string; membership: MembershipState; isNameAmbiguous: boolean; powerLevel: PowerLevel; isIgnored: boolean; suggestedRoleForPowerLevel: RoomMemberRole; - membershipChangeReason: string | undefined; + membershipChangeReason?: string; }; /** @@ -7349,21 +6750,8 @@ export const RoomMember = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomMember}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomMember}, 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, }); })(); @@ -7430,7 +6818,7 @@ export type RoomMemberWithSenderInfo = { * The info of the sender of the event `room_member` is based on, if * available. */ - senderInfo: RoomMember | undefined; + senderInfo?: RoomMember; }; /** @@ -7445,21 +6833,8 @@ export const RoomMemberWithSenderInfo = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomMemberWithSenderInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomMemberWithSenderInfo}, 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, }); @@ -7514,21 +6889,8 @@ export const RoomNotificationSettings = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomNotificationSettings}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomNotificationSettings}, 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, }); @@ -7620,21 +6982,8 @@ export const RoomPowerLevelsValues = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomPowerLevelsValues}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomPowerLevelsValues}, 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, }); })(); @@ -7700,19 +7049,19 @@ export type RoomPreviewInfo = { /** * The canonical alias for the room. */ - canonicalAlias: string | undefined; + canonicalAlias?: string; /** * The room's name, if set. */ - name: string | undefined; + name?: string; /** * The room's topic, if set. */ - topic: string | undefined; + topic?: string; /** * The MXC URI to the room's avatar, if set. */ - avatarUrl: string | undefined; + avatarUrl?: string; /** * The number of joined members. */ @@ -7720,7 +7069,7 @@ export type RoomPreviewInfo = { /** * The number of active members, if known (joined + invited). */ - numActiveMembers: /*u64*/ bigint | undefined; + numActiveMembers?: /*u64*/ bigint; /** * The room type (space, custom) or nothing, if it's a regular room. */ @@ -7728,23 +7077,23 @@ export type RoomPreviewInfo = { /** * Is the history world-readable for this room? */ - isHistoryWorldReadable: boolean | undefined; + isHistoryWorldReadable?: boolean; /** * The membership state for the current user, if known. */ - membership: Membership | undefined; + membership?: Membership; /** * The join rule for this room (private, public, knock, etc.). */ - joinRule: JoinRule | undefined; + joinRule?: JoinRule; /** * Whether the room is direct or not, if known. */ - isDirect: boolean | undefined; + isDirect?: boolean; /** * Room heroes. */ - heroes: Array | undefined; + heroes?: Array; }; /** @@ -7758,21 +7107,8 @@ export const RoomPreviewInfo = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link RoomPreviewInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link RoomPreviewInfo}, 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, }); })(); @@ -7874,21 +7210,8 @@ export const Ruleset = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link Ruleset}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link Ruleset}, 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, }); })(); @@ -7943,21 +7266,8 @@ export const SearchUsersResults = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link SearchUsersResults}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link SearchUsersResults}, 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, }); })(); @@ -7992,11 +7302,11 @@ export type SecretStorageV1AesHmacSha2Properties = { /** * The 16-byte initialization vector, encoded as base64. */ - iv: string | undefined; + iv?: string; /** * The MAC, encoded as base64. */ - mac: string | undefined; + mac?: string; }; /** @@ -8011,21 +7321,8 @@ export const SecretStorageV1AesHmacSha2Properties = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link SecretStorageV1AesHmacSha2Properties}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link SecretStorageV1AesHmacSha2Properties}, 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() @@ -8066,7 +7363,7 @@ export type Session = { * * [refreshing the access token]: https://spec.matrix.org/v1.3/client-server-api/#refreshing-access-tokens */ - refreshToken: string | undefined; + refreshToken?: string; /** * The user the access token was issued for. */ @@ -8083,7 +7380,7 @@ export type Session = { * Additional data for this session if OpenID Connect was used for * authentication. */ - oidcData: string | undefined; + oidcData?: string; /** * The sliding sync version used for this session. */ @@ -8099,21 +7396,8 @@ export const Session = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link Session}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link Session}, 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, }); })(); @@ -8165,7 +7449,7 @@ export type SessionVerificationRequestDetails = { senderProfile: UserProfile; flowId: string; deviceId: string; - deviceDisplayName: string | undefined; + deviceDisplayName?: string; /** * First time this device was seen in milliseconds since epoch. */ @@ -8184,21 +7468,8 @@ export const SessionVerificationRequestDetails = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link SessionVerificationRequestDetails}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link SessionVerificationRequestDetails}, 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, }); @@ -8274,21 +7545,8 @@ export const SimplePushRule = (() => { ); })(); return Object.freeze({ - /** - * 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 SimplePushRule}, 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, }); })(); @@ -8334,7 +7592,7 @@ export type SpaceRoom = { /** * The canonical alias of the room, if any. */ - canonicalAlias: string | undefined; + canonicalAlias?: string; /** * The room's name from the room state event if received from sync, or one * that's been computed otherwise. @@ -8343,15 +7601,15 @@ export type SpaceRoom = { /** * Room name as defined by the room state event only. */ - rawName: string | undefined; + rawName?: string; /** * The topic of the room, if any. */ - topic: string | undefined; + topic?: string; /** * The URL for the room's avatar, if one is set. */ - avatarUrl: string | undefined; + avatarUrl?: string; /** * The type of room from `m.room.create`, if any. */ @@ -8363,11 +7621,11 @@ export type SpaceRoom = { /** * The join rule of the room. */ - joinRule: JoinRule | undefined; + joinRule?: JoinRule; /** * Whether the room may be viewed by users without joining. */ - worldReadable: boolean | undefined; + worldReadable?: boolean; /** * Whether guest users may join the room and participate in it. */ @@ -8378,7 +7636,7 @@ export type SpaceRoom = { * Only set if the room is known to the client otherwise we * assume DMs shouldn't be exposed publicly in spaces. */ - isDirect: boolean | undefined; + isDirect?: boolean; /** * The number of children room this has, if a space. */ @@ -8386,11 +7644,11 @@ export type SpaceRoom = { /** * Whether this room is joined, left etc. */ - state: Membership | undefined; + state?: Membership; /** * A list of room members considered to be heroes. */ - heroes: Array | undefined; + heroes?: Array; /** * The via parameters of the room. */ @@ -8406,21 +7664,8 @@ export const SpaceRoom = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * 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 SpaceRoom}, 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, }); })(); @@ -8498,19 +7743,19 @@ export type StoreSizes = { /** * The size of the CryptoStore. */ - cryptoStore: /*u64*/ bigint | undefined; + cryptoStore?: /*u64*/ bigint; /** * The size of the StateStore. */ - stateStore: /*u64*/ bigint | undefined; + stateStore?: /*u64*/ bigint; /** * The size of the EventCacheStore. */ - eventCacheStore: /*u64*/ bigint | undefined; + eventCacheStore?: /*u64*/ bigint; /** * The size of the MediaStore. */ - mediaStore: /*u64*/ bigint | undefined; + mediaStore?: /*u64*/ bigint; }; /** @@ -8524,21 +7769,8 @@ export const StoreSizes = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link StoreSizes}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link StoreSizes}, 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, }); })(); @@ -8589,7 +7821,7 @@ export type SuccessorRoom = { /** * The message explaining why the room has been tombstoned. */ - reason: string | undefined; + reason?: string; }; /** @@ -8603,21 +7835,8 @@ export const SuccessorRoom = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link SuccessorRoom}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link SuccessorRoom}, 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, }); })(); @@ -8652,7 +7871,7 @@ export type TagInfo = { /** * Value to use for lexicographically ordering rooms with this tag. */ - order: /*f64*/ number | undefined; + order?: /*f64*/ number; }; /** @@ -8664,21 +7883,8 @@ export const TagInfo = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TagInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TagInfo}, 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, }); })(); @@ -8703,7 +7909,7 @@ const FfiConverterTypeTagInfo = (() => { export type TextMessageContent = { body: string; - formatted: FormattedBody | undefined; + formatted?: FormattedBody; }; /** @@ -8717,21 +7923,8 @@ export const TextMessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TextMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TextMessageContent}, 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, }); })(); @@ -8781,21 +7974,8 @@ export const ThreadSubscription = (() => { ); })(); 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, }); })(); @@ -8819,10 +7999,10 @@ const FfiConverterTypeThreadSubscription = (() => { })(); export type ThumbnailInfo = { - height: /*u64*/ bigint | undefined; - width: /*u64*/ bigint | undefined; - mimetype: string | undefined; - size: /*u64*/ bigint | undefined; + height?: /*u64*/ bigint; + width?: /*u64*/ bigint; + mimetype?: string; + size?: /*u64*/ bigint; }; /** @@ -8836,21 +8016,8 @@ export const ThumbnailInfo = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link ThumbnailInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link ThumbnailInfo}, 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, }); })(); @@ -8901,7 +8068,7 @@ export type TimelineConfiguration = { * all the timeline item's internal IDs, making it possible to * distinguish different timeline instances from each other. */ - internalIdPrefix: string | undefined; + internalIdPrefix?: string; /** * How often to insert date dividers */ @@ -8933,21 +8100,8 @@ export const TimelineConfiguration = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TimelineConfiguration}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TimelineConfiguration}, 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, }); })(); @@ -9008,21 +8162,8 @@ export const TimelineUniqueId = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TimelineUniqueId}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TimelineUniqueId}, 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, }); })(); @@ -9069,7 +8210,7 @@ export type TracingConfiguration = { /** * If set, configures rotated log files where to write additional logs. */ - writeToFiles: TracingFileConfiguration | undefined; + writeToFiles?: TracingFileConfiguration; }; /** @@ -9084,21 +8225,8 @@ export const TracingConfiguration = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TracingConfiguration}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TracingConfiguration}, 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, }); })(); @@ -9156,14 +8284,14 @@ export type TracingFileConfiguration = { /** * Optional suffix for the log file's names. */ - fileSuffix: string | undefined; + fileSuffix?: string; /** * Maximum number of rotated files. * * If not set, there's no max limit, i.e. the number of log files is * unlimited. */ - maxFiles: /*u64*/ bigint | undefined; + maxFiles?: /*u64*/ bigint; }; /** @@ -9178,21 +8306,8 @@ export const TracingFileConfiguration = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TracingFileConfiguration}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TracingFileConfiguration}, 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, }); @@ -9244,21 +8359,8 @@ export const TransmissionProgress = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link TransmissionProgress}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link TransmissionProgress}, 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, }); })(); @@ -9299,7 +8401,7 @@ export type UnableToDecryptInfo = { * * If set, this is in milliseconds. */ - timeToDecryptMs: /*u64*/ bigint | undefined; + timeToDecryptMs?: /*u64*/ bigint; /** * What we know about what caused this UTD. E.g. was this event sent when * we were not a member of this room? @@ -9324,7 +8426,7 @@ export type UnableToDecryptInfo = { * Our local user's own homeserver, or `None` if the client is not logged * in. */ - ownHomeserver: string | undefined; + ownHomeserver?: string; }; /** @@ -9338,21 +8440,8 @@ export const UnableToDecryptInfo = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UnableToDecryptInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UnableToDecryptInfo}, 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, }); })(); @@ -9412,21 +8501,8 @@ export const UnstableAudioDetailsContent = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UnstableAudioDetailsContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UnstableAudioDetailsContent}, 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, }); @@ -9469,21 +8545,8 @@ export const UnstableVoiceContent = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UnstableVoiceContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UnstableVoiceContent}, 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, }); })(); @@ -9510,19 +8573,19 @@ export type UploadParameters = { /** * Optional non-formatted caption, for clients that support it. */ - caption: string | undefined; + caption?: string; /** * Optional HTML-formatted caption, for clients that support it. */ - formattedCaption: FormattedBody | undefined; + formattedCaption?: FormattedBody; /** * Optional intentional mentions to be sent with the media. */ - mentions: Mentions | undefined; + mentions?: Mentions; /** * Optional Event ID to reply to. */ - inReplyTo: string | undefined; + inReplyTo?: string; }; /** @@ -9536,21 +8599,8 @@ export const UploadParameters = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UploadParameters}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UploadParameters}, 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, }); })(); @@ -9615,21 +8665,8 @@ export const UserPowerLevelUpdate = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UserPowerLevelUpdate}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UserPowerLevelUpdate}, 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, }); })(); @@ -9659,8 +8696,8 @@ const FfiConverterTypeUserPowerLevelUpdate = (() => { export type UserProfile = { userId: string; - displayName: string | undefined; - avatarUrl: string | undefined; + displayName?: string; + avatarUrl?: string; }; /** @@ -9674,21 +8711,8 @@ export const UserProfile = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UserProfile}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UserProfile}, 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, }); })(); @@ -9737,21 +8761,8 @@ export const UserTagName = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link UserTagName}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link UserTagName}, 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, }); })(); @@ -9775,14 +8786,14 @@ const FfiConverterTypeUserTagName = (() => { })(); export type VideoInfo = { - duration: UniffiDuration | undefined; - height: /*u64*/ bigint | undefined; - width: /*u64*/ bigint | undefined; - mimetype: string | undefined; - size: /*u64*/ bigint | undefined; - thumbnailInfo: ThumbnailInfo | undefined; - thumbnailSource: MediaSourceInterface | undefined; - blurhash: string | undefined; + duration?: UniffiDuration; + height?: /*u64*/ bigint; + width?: /*u64*/ bigint; + mimetype?: string; + size?: /*u64*/ bigint; + thumbnailInfo?: ThumbnailInfo; + thumbnailSource?: MediaSourceLike; + blurhash?: string; }; /** @@ -9794,21 +8805,8 @@ export const VideoInfo = (() => { return uniffiCreateRecord>(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link VideoInfo}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link VideoInfo}, 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, }); })(); @@ -9863,10 +8861,10 @@ export type VideoMessageContent = { * The computed filename, for use in a client. */ filename: string; - caption: string | undefined; - formattedCaption: FormattedBody | undefined; - source: MediaSourceInterface; - info: VideoInfo | undefined; + caption?: string; + formattedCaption?: FormattedBody; + source: MediaSourceLike; + info?: VideoInfo; }; /** @@ -9880,21 +8878,8 @@ export const VideoMessageContent = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link VideoMessageContent}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link VideoMessageContent}, 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, }); })(); @@ -9974,21 +8959,8 @@ export const WidgetCapabilities = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link WidgetCapabilities}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link WidgetCapabilities}, 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, }); })(); @@ -10026,8 +8998,8 @@ const FfiConverterTypeWidgetCapabilities = (() => { })(); export type WidgetDriverAndHandle = { - driver: WidgetDriverInterface; - handle: WidgetDriverHandleInterface; + driver: WidgetDriverLike; + handle: WidgetDriverHandleLike; }; /** @@ -10042,21 +9014,8 @@ export const WidgetDriverAndHandle = (() => { >(defaults); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link WidgetDriverAndHandle}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link WidgetDriverAndHandle}, 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, }); })(); @@ -10123,21 +9082,8 @@ export const WidgetSettings = (() => { ); })(); return Object.freeze({ - /** - * Create a frozen instance of {@link WidgetSettings}, with defaults specified - * in Rust, in the {@link matrix_sdk_ffi} crate. - */ create, - - /** - * Create a frozen instance of {@link WidgetSettings}, 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, }); })(); @@ -12115,7 +11061,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = ClientBuildError_Tags.InvalidServerName; + readonly tag = ClientBuildError_Tags.InvalidServerName; constructor(message: string) { super('ClientBuildError', 'InvalidServerName', message); @@ -12137,7 +11083,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = ClientBuildError_Tags.ServerUnreachable; + readonly tag = ClientBuildError_Tags.ServerUnreachable; constructor(message: string) { super('ClientBuildError', 'ServerUnreachable', message); @@ -12159,7 +11105,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = ClientBuildError_Tags.WellKnownLookupFailed; + readonly tag = ClientBuildError_Tags.WellKnownLookupFailed; constructor(message: string) { super('ClientBuildError', 'WellKnownLookupFailed', message); @@ -12181,7 +11127,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = ClientBuildError_Tags.WellKnownDeserializationError; + readonly tag = ClientBuildError_Tags.WellKnownDeserializationError; constructor(message: string) { super('ClientBuildError', 'WellKnownDeserializationError', message); @@ -12203,7 +11149,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = ClientBuildError_Tags.SlidingSync; + readonly tag = ClientBuildError_Tags.SlidingSync; constructor(message: string) { super('ClientBuildError', 'SlidingSync', message); @@ -12225,7 +11171,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 6; - public readonly tag = ClientBuildError_Tags.SlidingSyncVersion; + readonly tag = ClientBuildError_Tags.SlidingSyncVersion; constructor(message: string) { super('ClientBuildError', 'SlidingSyncVersion', message); @@ -12247,7 +11193,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 7; - public readonly tag = ClientBuildError_Tags.Sdk; + readonly tag = ClientBuildError_Tags.Sdk; constructor(message: string) { super('ClientBuildError', 'Sdk', message); @@ -12269,7 +11215,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 8; - public readonly tag = ClientBuildError_Tags.EventCache; + readonly tag = ClientBuildError_Tags.EventCache; constructor(message: string) { super('ClientBuildError', 'EventCache', message); @@ -12291,7 +11237,7 @@ export const ClientBuildError = (() => { */ readonly [variantOrdinalSymbol] = 9; - public readonly tag = ClientBuildError_Tags.Generic; + readonly tag = ClientBuildError_Tags.Generic; constructor(message: string) { super('ClientBuildError', 'Generic', message); @@ -13319,9 +12265,7 @@ export enum EditedContent_Tags { export const EditedContent = (() => { type RoomMessage__interface = { tag: EditedContent_Tags.RoomMessage; - inner: Readonly<{ - content: RoomMessageEventContentWithoutRelationInterface; - }>; + inner: Readonly<{ content: RoomMessageEventContentWithoutRelationLike }>; }; class RoomMessage_ extends UniffiEnum implements RoomMessage__interface { @@ -13332,17 +12276,17 @@ export const EditedContent = (() => { readonly [uniffiTypeNameSymbol] = 'EditedContent'; readonly tag = EditedContent_Tags.RoomMessage; readonly inner: Readonly<{ - content: RoomMessageEventContentWithoutRelationInterface; + content: RoomMessageEventContentWithoutRelationLike; }>; constructor(inner: { - content: RoomMessageEventContentWithoutRelationInterface; + content: RoomMessageEventContentWithoutRelationLike; }) { super('EditedContent', 'RoomMessage'); this.inner = Object.freeze(inner); } static new(inner: { - content: RoomMessageEventContentWithoutRelationInterface; + content: RoomMessageEventContentWithoutRelationLike; }): RoomMessage_ { return new RoomMessage_(inner); } @@ -18000,7 +16944,7 @@ export const GeneratedQrLoginProgress = (() => { type QrReady__interface = { tag: GeneratedQrLoginProgress_Tags.QrReady; - inner: Readonly<{ qrCode: QrCodeDataInterface }>; + inner: Readonly<{ qrCode: QrCodeDataLike }>; }; /** @@ -18014,13 +16958,13 @@ export const GeneratedQrLoginProgress = (() => { */ readonly [uniffiTypeNameSymbol] = 'GeneratedQrLoginProgress'; readonly tag = GeneratedQrLoginProgress_Tags.QrReady; - readonly inner: Readonly<{ qrCode: QrCodeDataInterface }>; - constructor(inner: { qrCode: QrCodeDataInterface }) { + readonly inner: Readonly<{ qrCode: QrCodeDataLike }>; + constructor(inner: { qrCode: QrCodeDataLike }) { super('GeneratedQrLoginProgress', 'QrReady'); this.inner = Object.freeze(inner); } - static new(inner: { qrCode: QrCodeDataInterface }): QrReady_ { + static new(inner: { qrCode: QrCodeDataLike }): QrReady_ { return new QrReady_(inner); } @@ -18031,7 +16975,7 @@ export const GeneratedQrLoginProgress = (() => { type QrScanned__interface = { tag: GeneratedQrLoginProgress_Tags.QrScanned; - inner: Readonly<{ checkCodeSender: CheckCodeSenderInterface }>; + inner: Readonly<{ checkCodeSender: CheckCodeSenderLike }>; }; /** @@ -18046,15 +16990,13 @@ export const GeneratedQrLoginProgress = (() => { */ readonly [uniffiTypeNameSymbol] = 'GeneratedQrLoginProgress'; readonly tag = GeneratedQrLoginProgress_Tags.QrScanned; - readonly inner: Readonly<{ checkCodeSender: CheckCodeSenderInterface }>; - constructor(inner: { checkCodeSender: CheckCodeSenderInterface }) { + readonly inner: Readonly<{ checkCodeSender: CheckCodeSenderLike }>; + constructor(inner: { checkCodeSender: CheckCodeSenderLike }) { super('GeneratedQrLoginProgress', 'QrScanned'); this.inner = Object.freeze(inner); } - static new(inner: { - checkCodeSender: CheckCodeSenderInterface; - }): QrScanned_ { + static new(inner: { checkCodeSender: CheckCodeSenderLike }): QrScanned_ { return new QrScanned_(inner); } @@ -18329,7 +17271,7 @@ export const GrantGeneratedQrLoginProgress = (() => { type QrReady__interface = { tag: GrantGeneratedQrLoginProgress_Tags.QrReady; - inner: Readonly<{ qrCode: QrCodeDataInterface }>; + inner: Readonly<{ qrCode: QrCodeDataLike }>; }; /** @@ -18343,13 +17285,13 @@ export const GrantGeneratedQrLoginProgress = (() => { */ readonly [uniffiTypeNameSymbol] = 'GrantGeneratedQrLoginProgress'; readonly tag = GrantGeneratedQrLoginProgress_Tags.QrReady; - readonly inner: Readonly<{ qrCode: QrCodeDataInterface }>; - constructor(inner: { qrCode: QrCodeDataInterface }) { + readonly inner: Readonly<{ qrCode: QrCodeDataLike }>; + constructor(inner: { qrCode: QrCodeDataLike }) { super('GrantGeneratedQrLoginProgress', 'QrReady'); this.inner = Object.freeze(inner); } - static new(inner: { qrCode: QrCodeDataInterface }): QrReady_ { + static new(inner: { qrCode: QrCodeDataLike }): QrReady_ { return new QrReady_(inner); } @@ -18360,7 +17302,7 @@ export const GrantGeneratedQrLoginProgress = (() => { type QrScanned__interface = { tag: GrantGeneratedQrLoginProgress_Tags.QrScanned; - inner: Readonly<{ checkCodeSender: CheckCodeSenderInterface }>; + inner: Readonly<{ checkCodeSender: CheckCodeSenderLike }>; }; /** @@ -18375,15 +17317,13 @@ export const GrantGeneratedQrLoginProgress = (() => { */ readonly [uniffiTypeNameSymbol] = 'GrantGeneratedQrLoginProgress'; readonly tag = GrantGeneratedQrLoginProgress_Tags.QrScanned; - readonly inner: Readonly<{ checkCodeSender: CheckCodeSenderInterface }>; - constructor(inner: { checkCodeSender: CheckCodeSenderInterface }) { + readonly inner: Readonly<{ checkCodeSender: CheckCodeSenderLike }>; + constructor(inner: { checkCodeSender: CheckCodeSenderLike }) { super('GrantGeneratedQrLoginProgress', 'QrScanned'); this.inner = Object.freeze(inner); } - static new(inner: { - checkCodeSender: CheckCodeSenderInterface; - }): QrScanned_ { + static new(inner: { checkCodeSender: CheckCodeSenderLike }): QrScanned_ { return new QrScanned_(inner); } @@ -19225,7 +18165,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = HumanQrGrantLoginError_Tags.DeviceIdAlreadyInUse; + readonly tag = HumanQrGrantLoginError_Tags.DeviceIdAlreadyInUse; constructor(message: string) { super('HumanQrGrantLoginError', 'DeviceIdAlreadyInUse', message); @@ -19250,7 +18190,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = HumanQrGrantLoginError_Tags.InvalidCheckCode; + readonly tag = HumanQrGrantLoginError_Tags.InvalidCheckCode; constructor(message: string) { super('HumanQrGrantLoginError', 'InvalidCheckCode', message); @@ -19275,7 +18215,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = HumanQrGrantLoginError_Tags.UnsupportedProtocol; + readonly tag = HumanQrGrantLoginError_Tags.UnsupportedProtocol; constructor(message: string) { super('HumanQrGrantLoginError', 'UnsupportedProtocol', message); @@ -19300,7 +18240,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = HumanQrGrantLoginError_Tags.MissingSecretsBackup; + readonly tag = HumanQrGrantLoginError_Tags.MissingSecretsBackup; constructor(message: string) { super('HumanQrGrantLoginError', 'MissingSecretsBackup', message); @@ -19325,7 +18265,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = HumanQrGrantLoginError_Tags.NotFound; + readonly tag = HumanQrGrantLoginError_Tags.NotFound; constructor(message: string) { super('HumanQrGrantLoginError', 'NotFound', message); @@ -19350,7 +18290,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 6; - public readonly tag = HumanQrGrantLoginError_Tags.UnableToCreateDevice; + readonly tag = HumanQrGrantLoginError_Tags.UnableToCreateDevice; constructor(message: string) { super('HumanQrGrantLoginError', 'UnableToCreateDevice', message); @@ -19375,7 +18315,7 @@ export const HumanQrGrantLoginError = (() => { */ readonly [variantOrdinalSymbol] = 7; - public readonly tag = HumanQrGrantLoginError_Tags.Unknown; + readonly tag = HumanQrGrantLoginError_Tags.Unknown; constructor(message: string) { super('HumanQrGrantLoginError', 'Unknown', message); @@ -21269,7 +20209,7 @@ export const MediaInfoError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = MediaInfoError_Tags.MissingField; + readonly tag = MediaInfoError_Tags.MissingField; constructor(message: string) { super('MediaInfoError', 'MissingField', message); @@ -21291,7 +20231,7 @@ export const MediaInfoError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = MediaInfoError_Tags.InvalidField; + readonly tag = MediaInfoError_Tags.InvalidField; constructor(message: string) { super('MediaInfoError', 'InvalidField', message); @@ -24268,11 +23208,7 @@ export const MsgLikeKind = (() => { type Sticker__interface = { tag: MsgLikeKind_Tags.Sticker; - inner: Readonly<{ - body: string; - info: ImageInfo; - source: MediaSourceInterface; - }>; + inner: Readonly<{ body: string; info: ImageInfo; source: MediaSourceLike }>; }; /** @@ -24288,12 +23224,12 @@ export const MsgLikeKind = (() => { readonly inner: Readonly<{ body: string; info: ImageInfo; - source: MediaSourceInterface; + source: MediaSourceLike; }>; constructor(inner: { body: string; info: ImageInfo; - source: MediaSourceInterface; + source: MediaSourceLike; }) { super('MsgLikeKind', 'Sticker'); this.inner = Object.freeze(inner); @@ -24302,7 +23238,7 @@ export const MsgLikeKind = (() => { static new(inner: { body: string; info: ImageInfo; - source: MediaSourceInterface; + source: MediaSourceLike; }): Sticker_ { return new Sticker_(inner); } @@ -24636,7 +23572,7 @@ export enum NotificationEvent_Tags { export const NotificationEvent = (() => { type Timeline__interface = { tag: NotificationEvent_Tags.Timeline; - inner: Readonly<{ event: TimelineEventInterface }>; + inner: Readonly<{ event: TimelineEventLike }>; }; class Timeline_ extends UniffiEnum implements Timeline__interface { @@ -24646,13 +23582,13 @@ export const NotificationEvent = (() => { */ readonly [uniffiTypeNameSymbol] = 'NotificationEvent'; readonly tag = NotificationEvent_Tags.Timeline; - readonly inner: Readonly<{ event: TimelineEventInterface }>; - constructor(inner: { event: TimelineEventInterface }) { + readonly inner: Readonly<{ event: TimelineEventLike }>; + constructor(inner: { event: TimelineEventLike }) { super('NotificationEvent', 'Timeline'); this.inner = Object.freeze(inner); } - static new(inner: { event: TimelineEventInterface }): Timeline_ { + static new(inner: { event: TimelineEventLike }): Timeline_ { return new Timeline_(inner); } @@ -24798,7 +23734,7 @@ export const NotificationProcessSetup = (() => { type SingleProcess__interface = { tag: NotificationProcessSetup_Tags.SingleProcess; - inner: Readonly<{ syncService: SyncServiceInterface }>; + inner: Readonly<{ syncService: SyncServiceLike }>; }; class SingleProcess_ extends UniffiEnum implements SingleProcess__interface { @@ -24808,13 +23744,13 @@ export const NotificationProcessSetup = (() => { */ readonly [uniffiTypeNameSymbol] = 'NotificationProcessSetup'; readonly tag = NotificationProcessSetup_Tags.SingleProcess; - readonly inner: Readonly<{ syncService: SyncServiceInterface }>; - constructor(inner: { syncService: SyncServiceInterface }) { + readonly inner: Readonly<{ syncService: SyncServiceLike }>; + constructor(inner: { syncService: SyncServiceLike }) { super('NotificationProcessSetup', 'SingleProcess'); this.inner = Object.freeze(inner); } - static new(inner: { syncService: SyncServiceInterface }): SingleProcess_ { + static new(inner: { syncService: SyncServiceLike }): SingleProcess_ { return new SingleProcess_(inner); } @@ -25546,7 +24482,7 @@ export const OidcError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = OidcError_Tags.NotSupported; + readonly tag = OidcError_Tags.NotSupported; constructor(message: string) { super('OidcError', 'NotSupported', message); @@ -25568,7 +24504,7 @@ export const OidcError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = OidcError_Tags.MetadataInvalid; + readonly tag = OidcError_Tags.MetadataInvalid; constructor(message: string) { super('OidcError', 'MetadataInvalid', message); @@ -25590,7 +24526,7 @@ export const OidcError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = OidcError_Tags.CallbackUrlInvalid; + readonly tag = OidcError_Tags.CallbackUrlInvalid; constructor(message: string) { super('OidcError', 'CallbackUrlInvalid', message); @@ -25612,7 +24548,7 @@ export const OidcError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = OidcError_Tags.Cancelled; + readonly tag = OidcError_Tags.Cancelled; constructor(message: string) { super('OidcError', 'Cancelled', message); @@ -25634,7 +24570,7 @@ export const OidcError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = OidcError_Tags.Generic; + readonly tag = OidcError_Tags.Generic; constructor(message: string) { super('OidcError', 'Generic', message); @@ -26886,7 +25822,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = ParseError_Tags.EmptyHost; + readonly tag = ParseError_Tags.EmptyHost; constructor(message: string) { super('ParseError', 'EmptyHost', message); @@ -26908,7 +25844,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = ParseError_Tags.IdnaError; + readonly tag = ParseError_Tags.IdnaError; constructor(message: string) { super('ParseError', 'IdnaError', message); @@ -26930,7 +25866,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = ParseError_Tags.InvalidPort; + readonly tag = ParseError_Tags.InvalidPort; constructor(message: string) { super('ParseError', 'InvalidPort', message); @@ -26952,7 +25888,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = ParseError_Tags.InvalidIpv4Address; + readonly tag = ParseError_Tags.InvalidIpv4Address; constructor(message: string) { super('ParseError', 'InvalidIpv4Address', message); @@ -26974,7 +25910,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = ParseError_Tags.InvalidIpv6Address; + readonly tag = ParseError_Tags.InvalidIpv6Address; constructor(message: string) { super('ParseError', 'InvalidIpv6Address', message); @@ -26996,7 +25932,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 6; - public readonly tag = ParseError_Tags.InvalidDomainCharacter; + readonly tag = ParseError_Tags.InvalidDomainCharacter; constructor(message: string) { super('ParseError', 'InvalidDomainCharacter', message); @@ -27018,7 +25954,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 7; - public readonly tag = ParseError_Tags.RelativeUrlWithoutBase; + readonly tag = ParseError_Tags.RelativeUrlWithoutBase; constructor(message: string) { super('ParseError', 'RelativeUrlWithoutBase', message); @@ -27040,7 +25976,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 8; - public readonly tag = ParseError_Tags.RelativeUrlWithCannotBeABaseBase; + readonly tag = ParseError_Tags.RelativeUrlWithCannotBeABaseBase; constructor(message: string) { super('ParseError', 'RelativeUrlWithCannotBeABaseBase', message); @@ -27062,7 +25998,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 9; - public readonly tag = ParseError_Tags.SetHostOnCannotBeABaseUrl; + readonly tag = ParseError_Tags.SetHostOnCannotBeABaseUrl; constructor(message: string) { super('ParseError', 'SetHostOnCannotBeABaseUrl', message); @@ -27084,7 +26020,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 10; - public readonly tag = ParseError_Tags.Overflow; + readonly tag = ParseError_Tags.Overflow; constructor(message: string) { super('ParseError', 'Overflow', message); @@ -27106,7 +26042,7 @@ export const ParseError = (() => { */ readonly [variantOrdinalSymbol] = 11; - public readonly tag = ParseError_Tags.Other; + readonly tag = ParseError_Tags.Other; constructor(message: string) { super('ParseError', 'Other', message); @@ -28262,7 +27198,7 @@ export const QrCodeDecodeError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = QrCodeDecodeError_Tags.Crypto; + readonly tag = QrCodeDecodeError_Tags.Crypto; constructor(message: string) { super('QrCodeDecodeError', 'Crypto', message); @@ -30226,7 +29162,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = RoomError_Tags.InvalidAttachmentData; + readonly tag = RoomError_Tags.InvalidAttachmentData; constructor(message: string) { super('RoomError', 'InvalidAttachmentData', message); @@ -30248,7 +29184,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = RoomError_Tags.InvalidAttachmentMimeType; + readonly tag = RoomError_Tags.InvalidAttachmentMimeType; constructor(message: string) { super('RoomError', 'InvalidAttachmentMimeType', message); @@ -30270,7 +29206,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = RoomError_Tags.InvalidMediaInfo; + readonly tag = RoomError_Tags.InvalidMediaInfo; constructor(message: string) { super('RoomError', 'InvalidMediaInfo', message); @@ -30292,7 +29228,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 4; - public readonly tag = RoomError_Tags.TimelineUnavailable; + readonly tag = RoomError_Tags.TimelineUnavailable; constructor(message: string) { super('RoomError', 'TimelineUnavailable', message); @@ -30314,7 +29250,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 5; - public readonly tag = RoomError_Tags.InvalidThumbnailData; + readonly tag = RoomError_Tags.InvalidThumbnailData; constructor(message: string) { super('RoomError', 'InvalidThumbnailData', message); @@ -30336,7 +29272,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 6; - public readonly tag = RoomError_Tags.InvalidRepliedToEventId; + readonly tag = RoomError_Tags.InvalidRepliedToEventId; constructor(message: string) { super('RoomError', 'InvalidRepliedToEventId', message); @@ -30358,7 +29294,7 @@ export const RoomError = (() => { */ readonly [variantOrdinalSymbol] = 7; - public readonly tag = RoomError_Tags.FailedSendingAttachment; + readonly tag = RoomError_Tags.FailedSendingAttachment; constructor(message: string) { super('RoomError', 'FailedSendingAttachment', message); @@ -31425,7 +30361,7 @@ export enum RoomListEntriesUpdate_Tags { export const RoomListEntriesUpdate = (() => { type Append__interface = { tag: RoomListEntriesUpdate_Tags.Append; - inner: Readonly<{ values: Array }>; + inner: Readonly<{ values: Array }>; }; class Append_ extends UniffiEnum implements Append__interface { @@ -31435,13 +30371,13 @@ export const RoomListEntriesUpdate = (() => { */ readonly [uniffiTypeNameSymbol] = 'RoomListEntriesUpdate'; readonly tag = RoomListEntriesUpdate_Tags.Append; - readonly inner: Readonly<{ values: Array }>; - constructor(inner: { values: Array }) { + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { super('RoomListEntriesUpdate', 'Append'); this.inner = Object.freeze(inner); } - static new(inner: { values: Array }): Append_ { + static new(inner: { values: Array }): Append_ { return new Append_(inner); } @@ -31476,7 +30412,7 @@ export const RoomListEntriesUpdate = (() => { type PushFront__interface = { tag: RoomListEntriesUpdate_Tags.PushFront; - inner: Readonly<{ value: RoomInterface }>; + inner: Readonly<{ value: RoomLike }>; }; class PushFront_ extends UniffiEnum implements PushFront__interface { @@ -31486,13 +30422,13 @@ export const RoomListEntriesUpdate = (() => { */ readonly [uniffiTypeNameSymbol] = 'RoomListEntriesUpdate'; readonly tag = RoomListEntriesUpdate_Tags.PushFront; - readonly inner: Readonly<{ value: RoomInterface }>; - constructor(inner: { value: RoomInterface }) { + readonly inner: Readonly<{ value: RoomLike }>; + constructor(inner: { value: RoomLike }) { super('RoomListEntriesUpdate', 'PushFront'); this.inner = Object.freeze(inner); } - static new(inner: { value: RoomInterface }): PushFront_ { + static new(inner: { value: RoomLike }): PushFront_ { return new PushFront_(inner); } @@ -31503,7 +30439,7 @@ export const RoomListEntriesUpdate = (() => { type PushBack__interface = { tag: RoomListEntriesUpdate_Tags.PushBack; - inner: Readonly<{ value: RoomInterface }>; + inner: Readonly<{ value: RoomLike }>; }; class PushBack_ extends UniffiEnum implements PushBack__interface { @@ -31513,13 +30449,13 @@ export const RoomListEntriesUpdate = (() => { */ readonly [uniffiTypeNameSymbol] = 'RoomListEntriesUpdate'; readonly tag = RoomListEntriesUpdate_Tags.PushBack; - readonly inner: Readonly<{ value: RoomInterface }>; - constructor(inner: { value: RoomInterface }) { + readonly inner: Readonly<{ value: RoomLike }>; + constructor(inner: { value: RoomLike }) { super('RoomListEntriesUpdate', 'PushBack'); this.inner = Object.freeze(inner); } - static new(inner: { value: RoomInterface }): PushBack_ { + static new(inner: { value: RoomLike }): PushBack_ { return new PushBack_(inner); } @@ -31578,7 +30514,7 @@ export const RoomListEntriesUpdate = (() => { type Insert__interface = { tag: RoomListEntriesUpdate_Tags.Insert; - inner: Readonly<{ index: /*u32*/ number; value: RoomInterface }>; + inner: Readonly<{ index: /*u32*/ number; value: RoomLike }>; }; class Insert_ extends UniffiEnum implements Insert__interface { @@ -31588,16 +30524,13 @@ export const RoomListEntriesUpdate = (() => { */ readonly [uniffiTypeNameSymbol] = 'RoomListEntriesUpdate'; readonly tag = RoomListEntriesUpdate_Tags.Insert; - readonly inner: Readonly<{ index: /*u32*/ number; value: RoomInterface }>; - constructor(inner: { index: /*u32*/ number; value: RoomInterface }) { + readonly inner: Readonly<{ index: /*u32*/ number; value: RoomLike }>; + constructor(inner: { index: /*u32*/ number; value: RoomLike }) { super('RoomListEntriesUpdate', 'Insert'); this.inner = Object.freeze(inner); } - static new(inner: { - index: /*u32*/ number; - value: RoomInterface; - }): Insert_ { + static new(inner: { index: /*u32*/ number; value: RoomLike }): Insert_ { return new Insert_(inner); } @@ -31608,7 +30541,7 @@ export const RoomListEntriesUpdate = (() => { type Set__interface = { tag: RoomListEntriesUpdate_Tags.Set; - inner: Readonly<{ index: /*u32*/ number; value: RoomInterface }>; + inner: Readonly<{ index: /*u32*/ number; value: RoomLike }>; }; class Set_ extends UniffiEnum implements Set__interface { @@ -31618,13 +30551,13 @@ export const RoomListEntriesUpdate = (() => { */ readonly [uniffiTypeNameSymbol] = 'RoomListEntriesUpdate'; readonly tag = RoomListEntriesUpdate_Tags.Set; - readonly inner: Readonly<{ index: /*u32*/ number; value: RoomInterface }>; - constructor(inner: { index: /*u32*/ number; value: RoomInterface }) { + readonly inner: Readonly<{ index: /*u32*/ number; value: RoomLike }>; + constructor(inner: { index: /*u32*/ number; value: RoomLike }) { super('RoomListEntriesUpdate', 'Set'); this.inner = Object.freeze(inner); } - static new(inner: { index: /*u32*/ number; value: RoomInterface }): Set_ { + static new(inner: { index: /*u32*/ number; value: RoomLike }): Set_ { return new Set_(inner); } @@ -31689,7 +30622,7 @@ export const RoomListEntriesUpdate = (() => { type Reset__interface = { tag: RoomListEntriesUpdate_Tags.Reset; - inner: Readonly<{ values: Array }>; + inner: Readonly<{ values: Array }>; }; class Reset_ extends UniffiEnum implements Reset__interface { @@ -31699,13 +30632,13 @@ export const RoomListEntriesUpdate = (() => { */ readonly [uniffiTypeNameSymbol] = 'RoomListEntriesUpdate'; readonly tag = RoomListEntriesUpdate_Tags.Reset; - readonly inner: Readonly<{ values: Array }>; - constructor(inner: { values: Array }) { + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { super('RoomListEntriesUpdate', 'Reset'); this.inner = Object.freeze(inner); } - static new(inner: { values: Array }): Reset_ { + static new(inner: { values: Array }): Reset_ { return new Reset_(inner); } @@ -33237,7 +32170,7 @@ export const RoomSendQueueUpdate = (() => { tag: RoomSendQueueUpdate_Tags.MediaUpload; inner: Readonly<{ relatedTo: string; - file: MediaSourceInterface | undefined; + file: MediaSourceLike | undefined; index: /*u64*/ bigint; progress: AbstractProgress; }>; @@ -33256,7 +32189,7 @@ export const RoomSendQueueUpdate = (() => { readonly tag = RoomSendQueueUpdate_Tags.MediaUpload; readonly inner: Readonly<{ relatedTo: string; - file: MediaSourceInterface | undefined; + file: MediaSourceLike | undefined; index: /*u64*/ bigint; progress: AbstractProgress; }>; @@ -33266,7 +32199,7 @@ export const RoomSendQueueUpdate = (() => { */ relatedTo: string; /** * The final media source for the file if it has finished uploading. - */ file: MediaSourceInterface | undefined; + */ file: MediaSourceLike | undefined; /** * The index of the media within the transaction. A file and its * thumbnail share the same index. Will always be 0 for non-gallery @@ -33288,7 +32221,7 @@ export const RoomSendQueueUpdate = (() => { */ relatedTo: string; /** * The final media source for the file if it has finished uploading. - */ file: MediaSourceInterface | undefined; + */ file: MediaSourceLike | undefined; /** * The index of the media within the transaction. A file and its * thumbnail share the same index. Will always be 0 for non-gallery @@ -34278,7 +33211,7 @@ export const SessionVerificationData = (() => { type Emojis__interface = { tag: SessionVerificationData_Tags.Emojis; inner: Readonly<{ - emojis: Array; + emojis: Array; indices: ArrayBuffer; }>; }; @@ -34291,11 +33224,11 @@ export const SessionVerificationData = (() => { readonly [uniffiTypeNameSymbol] = 'SessionVerificationData'; readonly tag = SessionVerificationData_Tags.Emojis; readonly inner: Readonly<{ - emojis: Array; + emojis: Array; indices: ArrayBuffer; }>; constructor(inner: { - emojis: Array; + emojis: Array; indices: ArrayBuffer; }) { super('SessionVerificationData', 'Emojis'); @@ -34303,7 +33236,7 @@ export const SessionVerificationData = (() => { } static new(inner: { - emojis: Array; + emojis: Array; indices: ArrayBuffer; }): Emojis_ { return new Emojis_(inner); @@ -35231,7 +34164,7 @@ export const SsoError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = SsoError_Tags.CallbackUrlInvalid; + readonly tag = SsoError_Tags.CallbackUrlInvalid; constructor(message: string) { super('SsoError', 'CallbackUrlInvalid', message); @@ -35253,7 +34186,7 @@ export const SsoError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = SsoError_Tags.LoginWithTokenFailed; + readonly tag = SsoError_Tags.LoginWithTokenFailed; constructor(message: string) { super('SsoError', 'LoginWithTokenFailed', message); @@ -35275,7 +34208,7 @@ export const SsoError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = SsoError_Tags.Generic; + readonly tag = SsoError_Tags.Generic; constructor(message: string) { super('SsoError', 'Generic', message); @@ -36334,7 +35267,7 @@ export const SteadyStateError = (() => { */ readonly [variantOrdinalSymbol] = 1; - public readonly tag = SteadyStateError_Tags.BackupDisabled; + readonly tag = SteadyStateError_Tags.BackupDisabled; constructor(message: string) { super('SteadyStateError', 'BackupDisabled', message); @@ -36356,7 +35289,7 @@ export const SteadyStateError = (() => { */ readonly [variantOrdinalSymbol] = 2; - public readonly tag = SteadyStateError_Tags.Connection; + readonly tag = SteadyStateError_Tags.Connection; constructor(message: string) { super('SteadyStateError', 'Connection', message); @@ -36378,7 +35311,7 @@ export const SteadyStateError = (() => { */ readonly [variantOrdinalSymbol] = 3; - public readonly tag = SteadyStateError_Tags.Lagged; + readonly tag = SteadyStateError_Tags.Lagged; constructor(message: string) { super('SteadyStateError', 'Lagged', message); @@ -36721,7 +35654,7 @@ export enum TimelineDiff_Tags { export const TimelineDiff = (() => { type Append__interface = { tag: TimelineDiff_Tags.Append; - inner: Readonly<{ values: Array }>; + inner: Readonly<{ values: Array }>; }; class Append_ extends UniffiEnum implements Append__interface { @@ -36731,13 +35664,13 @@ export const TimelineDiff = (() => { */ readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; readonly tag = TimelineDiff_Tags.Append; - readonly inner: Readonly<{ values: Array }>; - constructor(inner: { values: Array }) { + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { super('TimelineDiff', 'Append'); this.inner = Object.freeze(inner); } - static new(inner: { values: Array }): Append_ { + static new(inner: { values: Array }): Append_ { return new Append_(inner); } @@ -36772,7 +35705,7 @@ export const TimelineDiff = (() => { type PushFront__interface = { tag: TimelineDiff_Tags.PushFront; - inner: Readonly<{ value: TimelineItemInterface }>; + inner: Readonly<{ value: TimelineItemLike }>; }; class PushFront_ extends UniffiEnum implements PushFront__interface { @@ -36782,13 +35715,13 @@ export const TimelineDiff = (() => { */ readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; readonly tag = TimelineDiff_Tags.PushFront; - readonly inner: Readonly<{ value: TimelineItemInterface }>; - constructor(inner: { value: TimelineItemInterface }) { + readonly inner: Readonly<{ value: TimelineItemLike }>; + constructor(inner: { value: TimelineItemLike }) { super('TimelineDiff', 'PushFront'); this.inner = Object.freeze(inner); } - static new(inner: { value: TimelineItemInterface }): PushFront_ { + static new(inner: { value: TimelineItemLike }): PushFront_ { return new PushFront_(inner); } @@ -36799,7 +35732,7 @@ export const TimelineDiff = (() => { type PushBack__interface = { tag: TimelineDiff_Tags.PushBack; - inner: Readonly<{ value: TimelineItemInterface }>; + inner: Readonly<{ value: TimelineItemLike }>; }; class PushBack_ extends UniffiEnum implements PushBack__interface { @@ -36809,13 +35742,13 @@ export const TimelineDiff = (() => { */ readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; readonly tag = TimelineDiff_Tags.PushBack; - readonly inner: Readonly<{ value: TimelineItemInterface }>; - constructor(inner: { value: TimelineItemInterface }) { + readonly inner: Readonly<{ value: TimelineItemLike }>; + constructor(inner: { value: TimelineItemLike }) { super('TimelineDiff', 'PushBack'); this.inner = Object.freeze(inner); } - static new(inner: { value: TimelineItemInterface }): PushBack_ { + static new(inner: { value: TimelineItemLike }): PushBack_ { return new PushBack_(inner); } @@ -36874,7 +35807,7 @@ export const TimelineDiff = (() => { type Insert__interface = { tag: TimelineDiff_Tags.Insert; - inner: Readonly<{ index: /*u32*/ number; value: TimelineItemInterface }>; + inner: Readonly<{ index: /*u32*/ number; value: TimelineItemLike }>; }; class Insert_ extends UniffiEnum implements Insert__interface { @@ -36886,19 +35819,16 @@ export const TimelineDiff = (() => { readonly tag = TimelineDiff_Tags.Insert; readonly inner: Readonly<{ index: /*u32*/ number; - value: TimelineItemInterface; + value: TimelineItemLike; }>; - constructor(inner: { - index: /*u32*/ number; - value: TimelineItemInterface; - }) { + constructor(inner: { index: /*u32*/ number; value: TimelineItemLike }) { super('TimelineDiff', 'Insert'); this.inner = Object.freeze(inner); } static new(inner: { index: /*u32*/ number; - value: TimelineItemInterface; + value: TimelineItemLike; }): Insert_ { return new Insert_(inner); } @@ -36910,7 +35840,7 @@ export const TimelineDiff = (() => { type Set__interface = { tag: TimelineDiff_Tags.Set; - inner: Readonly<{ index: /*u32*/ number; value: TimelineItemInterface }>; + inner: Readonly<{ index: /*u32*/ number; value: TimelineItemLike }>; }; class Set_ extends UniffiEnum implements Set__interface { @@ -36922,19 +35852,16 @@ export const TimelineDiff = (() => { readonly tag = TimelineDiff_Tags.Set; readonly inner: Readonly<{ index: /*u32*/ number; - value: TimelineItemInterface; + value: TimelineItemLike; }>; - constructor(inner: { - index: /*u32*/ number; - value: TimelineItemInterface; - }) { + constructor(inner: { index: /*u32*/ number; value: TimelineItemLike }) { super('TimelineDiff', 'Set'); this.inner = Object.freeze(inner); } static new(inner: { index: /*u32*/ number; - value: TimelineItemInterface; + value: TimelineItemLike; }): Set_ { return new Set_(inner); } @@ -37000,7 +35927,7 @@ export const TimelineDiff = (() => { type Reset__interface = { tag: TimelineDiff_Tags.Reset; - inner: Readonly<{ values: Array }>; + inner: Readonly<{ values: Array }>; }; class Reset_ extends UniffiEnum implements Reset__interface { @@ -37010,13 +35937,13 @@ export const TimelineDiff = (() => { */ readonly [uniffiTypeNameSymbol] = 'TimelineDiff'; readonly tag = TimelineDiff_Tags.Reset; - readonly inner: Readonly<{ values: Array }>; - constructor(inner: { values: Array }) { + readonly inner: Readonly<{ values: Array }>; + constructor(inner: { values: Array }) { super('TimelineDiff', 'Reset'); this.inner = Object.freeze(inner); } - static new(inner: { values: Array }): Reset_ { + static new(inner: { values: Array }): Reset_ { return new Reset_(inner); } @@ -37457,7 +36384,7 @@ export const TimelineFilter = (() => { type EventTypeFilter__interface = { tag: TimelineFilter_Tags.EventTypeFilter; - inner: Readonly<{ filter: TimelineEventTypeFilterInterface }>; + inner: Readonly<{ filter: TimelineEventTypeFilterLike }>; }; /** @@ -37473,14 +36400,14 @@ export const TimelineFilter = (() => { */ readonly [uniffiTypeNameSymbol] = 'TimelineFilter'; readonly tag = TimelineFilter_Tags.EventTypeFilter; - readonly inner: Readonly<{ filter: TimelineEventTypeFilterInterface }>; - constructor(inner: { filter: TimelineEventTypeFilterInterface }) { + readonly inner: Readonly<{ filter: TimelineEventTypeFilterLike }>; + constructor(inner: { filter: TimelineEventTypeFilterLike }) { super('TimelineFilter', 'EventTypeFilter'); this.inner = Object.freeze(inner); } static new(inner: { - filter: TimelineEventTypeFilterInterface; + filter: TimelineEventTypeFilterLike; }): EventTypeFilter_ { return new EventTypeFilter_(inner); } @@ -39391,7 +38318,7 @@ const FfiConverterMapStringString = new FfiConverterMap( * Used to pass back the [`CheckCode`] entered by the user to verify that the * secure channel is indeed secure. */ -export interface CheckCodeSenderInterface { +export interface CheckCodeSenderLike { /** * Send the [`CheckCode`]. * @@ -39406,6 +38333,10 @@ export interface CheckCodeSenderInterface { asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; } +/** + * @deprecated Use `CheckCodeSenderLike` instead. + */ +export type CheckCodeSenderInterface = CheckCodeSenderLike; /** * Used to pass back the [`CheckCode`] entered by the user to verify that the @@ -39413,13 +38344,13 @@ export interface CheckCodeSenderInterface { */ export class CheckCodeSender extends UniffiAbstractObject - implements CheckCodeSenderInterface + implements CheckCodeSenderLike { readonly [uniffiTypeNameSymbol] = 'CheckCodeSender'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -39435,7 +38366,7 @@ export class CheckCodeSender * * * `check_code` - The check code in digits representation. */ - public async send( + async send( code: /*u8*/ number, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -39490,10 +38421,10 @@ export class CheckCodeSender } } -const uniffiTypeCheckCodeSenderObjectFactory: UniffiObjectFactory = +const uniffiTypeCheckCodeSenderObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): CheckCodeSenderInterface { + create(pointer: UniffiHandle): CheckCodeSenderLike { const instance = Object.create(CheckCodeSender.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -39501,7 +38432,7 @@ const uniffiTypeCheckCodeSenderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_checkcodesender_ffi__bless_pointer( @@ -39512,18 +38443,18 @@ const uniffiTypeCheckCodeSenderObjectFactory: UniffiObjectFactory @@ -39535,7 +38466,7 @@ const uniffiTypeCheckCodeSenderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_checkcodesender( @@ -39546,7 +38477,7 @@ const uniffiTypeCheckCodeSenderObjectFactory: UniffiObjectFactory; /** @@ -39582,14 +38513,6 @@ export interface ClientInterface { action: AccountManagementAction | undefined, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; - /** - * Adds a recently used emoji to the list and uploads the updated - * `io.element.recent_emoji` content to the global account data. - */ - addRecentEmoji( - emoji: string, - asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; /** * Find all sliding sync versions that are available. * @@ -39619,7 +38542,7 @@ export interface ClientInterface { awaitRoomRemoteEcho( roomId: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Retrieves an avatar cached from a previous call to [`Self::avatar_url`]. */ @@ -39656,7 +38579,7 @@ export interface ClientInterface { * retention policy. */ clearCaches( - syncService: SyncServiceInterface | undefined, + syncService: SyncServiceLike | undefined, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; createRoom( @@ -39720,14 +38643,14 @@ export interface ClientInterface { * queue. */ enableSendQueueUploadProgress(enable: boolean): void; - encryption(): EncryptionInterface; + encryption(): EncryptionLike; /** * Fetch the media preview configuration from the server. */ fetchMediaPreviewConfig(asyncOpts_?: { signal: AbortSignal; }) /*throws*/ : Promise; - getDmRoom(userId: string) /*throws*/ : RoomInterface | undefined; + getDmRoom(userId: string) /*throws*/ : RoomLike | undefined; /** * Get the invite request avatars display policy * currently stored in the cache. @@ -39743,7 +38666,7 @@ export interface ClientInterface { signal: AbortSignal; }) /*throws*/ : Promise; getMediaContent( - mediaSource: MediaSourceInterface, + mediaSource: MediaSourceLike, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; /** @@ -39752,13 +38675,13 @@ export interface ClientInterface { * Not available on Wasm platforms, due to lack of accessible file system. */ getMediaFile( - mediaSource: MediaSourceInterface, + mediaSource: MediaSourceLike, filename: string | undefined, mimeType: string, useCache: boolean, tempDir: string | undefined, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Get the media previews timeline display policy * currently stored in the cache. @@ -39767,25 +38690,18 @@ export interface ClientInterface { signal: AbortSignal; }) /*throws*/ : Promise; getMediaThumbnail( - mediaSource: MediaSourceInterface, + mediaSource: MediaSourceLike, width: /*u64*/ bigint, height: /*u64*/ bigint, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; getNotificationSettings(asyncOpts_?: { signal: AbortSignal; - }): Promise; + }): Promise; getProfile( userId: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; - /** - * Gets the list of recently used emojis from the - * `io.element.recent_emoji` global account data. - */ - getRecentEmojis(asyncOpts_?: { - signal: AbortSignal; - }) /*throws*/ : Promise>; getRecentlyVisitedRooms(asyncOpts_?: { signal: AbortSignal; }) /*throws*/ : Promise>; @@ -39802,14 +38718,14 @@ export interface ClientInterface { * This method will not initialize the room's timeline or populate it with * events. */ - getRoom(roomId: string) /*throws*/ : RoomInterface | undefined; + getRoom(roomId: string) /*throws*/ : RoomLike | undefined; /** * Given a room alias, get the preview of a room, to interact with it. */ getRoomPreviewFromRoomAlias( roomAlias: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Given a room id, get the preview of a room, to interact with it. * @@ -39821,10 +38737,10 @@ export interface ClientInterface { roomId: string, viaServers: Array, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; getSessionVerificationController(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; /** * Returns the sizes of the existing stores, if known. */ @@ -39854,7 +38770,7 @@ export interface ClientInterface { */ homeserverLoginDetails(asyncOpts_?: { signal: AbortSignal; - }): Promise; + }): Promise; ignoreUser( userId: string, asyncOpts_?: { signal: AbortSignal } @@ -39897,7 +38813,7 @@ export interface ClientInterface { joinRoomById( roomId: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Join a room by its ID or alias. * @@ -39910,7 +38826,7 @@ export interface ClientInterface { roomIdOrAlias: string, serverNames: Array, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Knock on a room to join it using its ID or alias. */ @@ -39919,7 +38835,7 @@ export interface ClientInterface { reason: string | undefined, serverNames: Array, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Login using a username and password. */ @@ -39955,7 +38871,7 @@ export interface ClientInterface { * Create a handler for granting login from this device to a new device by * way of a QR code. */ - newGrantLoginWithQrCodeHandler(): GrantLoginWithQrCodeHandlerInterface; + newGrantLoginWithQrCodeHandler(): GrantLoginWithQrCodeHandlerLike; /** * Create a handler for requesting an existing device to grant login to * this device by way of a QR code. @@ -39967,11 +38883,11 @@ export interface ClientInterface { */ newLoginWithQrCodeHandler( oidcConfiguration: OidcConfiguration - ): LoginWithQrCodeHandlerInterface; + ): LoginWithQrCodeHandlerLike; notificationClient( processSetup: NotificationProcessSetup, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Subscribe to updates of global account data events. * @@ -39982,7 +38898,7 @@ export interface ClientInterface { observeAccountDataEvent( eventType: AccountDataEventType, listener: AccountDataListener - ): TaskHandleInterface; + ): TaskHandleLike; /** * Subscribe to updates of room account data events. * @@ -39994,7 +38910,7 @@ export interface ClientInterface { roomId: string, eventType: RoomAccountDataEventType, listener: RoomAccountDataListener - ) /*throws*/ : TaskHandleInterface; + ) /*throws*/ : TaskHandleLike; /** * Perform database optimizations if any are available, i.e. vacuuming in * SQLite. @@ -40077,8 +38993,8 @@ export interface ClientInterface { roomAlias: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; - roomDirectorySearch(): RoomDirectorySearchInterface; - rooms(): Array; + roomDirectorySearch(): RoomDirectorySearchLike; + rooms(): Array; searchUsers( searchTerm: string, limit: /*u64*/ bigint, @@ -40124,7 +39040,7 @@ export interface ClientInterface { */ setDelegate( delegate: ClientDelegate | undefined - ) /*throws*/ : TaskHandleInterface | undefined; + ) /*throws*/ : TaskHandleLike | undefined; setDisplayName( name: string, asyncOpts_?: { signal: AbortSignal } @@ -40174,7 +39090,7 @@ export interface ClientInterface { * The sliding sync version. */ slidingSyncVersion(): SlidingSyncVersion; - spaceService(): SpaceServiceInterface; + spaceService(): SpaceServiceLike; /** * Returns a handler to start the SSO login process. */ @@ -40182,15 +39098,15 @@ export interface ClientInterface { redirectUrl: string, idpId: string | undefined, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; - subscribeToIgnoredUsers(listener: IgnoredUsersListener): TaskHandleInterface; + ) /*throws*/ : Promise; + subscribeToIgnoredUsers(listener: IgnoredUsersListener): TaskHandleLike; /** * Subscribe to changes in the media preview configuration. */ subscribeToMediaPreviewConfig( listener: MediaPreviewConfigListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Subscribe to [`RoomInfo`] updates given a provided [`RoomId`]. * @@ -40207,7 +39123,7 @@ export interface ClientInterface { roomId: string, listener: RoomInfoListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Subscribe to the global enablement status of the send queue, at the * client-wide level. @@ -40217,7 +39133,7 @@ export interface ClientInterface { */ subscribeToSendQueueStatus( listener: SendQueueRoomErrorListener - ): TaskHandleInterface; + ): TaskHandleLike; /** * Subscribe to the global send queue update reporter, at the * client-wide level. @@ -40229,8 +39145,8 @@ export interface ClientInterface { subscribeToSendQueueUpdates( listener: SendQueueRoomUpdateListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; - syncService(): SyncServiceBuilderInterface; + ) /*throws*/ : Promise; + syncService(): SyncServiceBuilderLike; trackRecentlyVisitedRoom( room: string, asyncOpts_?: { signal: AbortSignal } @@ -40291,20 +39207,39 @@ export interface ClientInterface { deviceId: string | undefined, additionalScopes: Array | undefined, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; userId() /*throws*/ : string; /** * The server name part of the current user ID */ userIdServerName() /*throws*/ : string; + /** + * Adds a recently used emoji to the list and uploads the updated + * `io.element.recent_emoji` content to the global account data. + */ + addRecentEmoji( + emoji: string, + asyncOpts_?: { signal: AbortSignal } + ) /*throws*/ : Promise; + /** + * Gets the list of recently used emojis from the + * `io.element.recent_emoji` global account data. + */ + getRecentEmojis(asyncOpts_?: { + signal: AbortSignal; + }) /*throws*/ : Promise>; } +/** + * @deprecated Use `ClientLike` instead. + */ +export type ClientInterface = ClientLike; -export class Client extends UniffiAbstractObject implements ClientInterface { +export class Client extends UniffiAbstractObject implements ClientLike { readonly [uniffiTypeNameSymbol] = 'Client'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeClientObjectFactory.bless(pointer); @@ -40314,8 +39249,8 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Aborts an existing OIDC login operation that might have been cancelled, * failed etc. */ - public async abortOidcAuth( - authorizationData: OAuthAuthorizationDataInterface, + async abortOidcAuth( + authorizationData: OAuthAuthorizationDataLike, asyncOpts_?: { signal: AbortSignal } ): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -40354,7 +39289,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * * It will be returned as a JSON string. */ - public async accountData( + async accountData( eventType: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -40393,7 +39328,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async accountUrl( + async accountUrl( action: AccountManagementAction | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -40432,47 +39367,6 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - /** - * Adds a recently used emoji to the list and uploads the updated - * `io.element.recent_emoji` content to the global account data. - */ - public async addRecentEmoji( - emoji: 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_client_add_recent_emoji( - uniffiTypeClientObjectFactory.clonePointer(this), - FfiConverterString.lower(emoji) - ); - }, - /*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; - } - } - /** * Find all sliding sync versions that are available. * @@ -40482,7 +39376,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * If `.well-known` or `/versions` is unreachable, it will simply move * potential sliding sync versions aside. No error will be reported. */ - public async availableSlidingSyncVersions(asyncOpts_?: { + async availableSlidingSyncVersions(asyncOpts_?: { signal: AbortSignal; }): Promise> { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -40520,7 +39414,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Sends a request to retrieve the avatar URL. Will fill the cache used by * [`Self::cached_avatar_url`] on success. */ - public async avatarUrl(asyncOpts_?: { + async avatarUrl(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -40564,10 +39458,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * **Note: this function will loop endlessly until either it finds the room * or an externally set timeout happens.** */ - public async awaitRoomRemoteEcho( + async awaitRoomRemoteEcho( roomId: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -40579,13 +39473,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoom.lift.bind(FfiConverterTypeRoom), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, @@ -40604,7 +39498,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Retrieves an avatar cached from a previous call to [`Self::avatar_url`]. */ - public async cachedAvatarUrl(asyncOpts_?: { + async cachedAvatarUrl(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -40645,7 +39539,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Lets the user know whether this is an `m.login.password` based * auth and if the account can actually be deactivated */ - public canDeactivateAccount(): boolean { + canDeactivateAccount(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -40683,8 +39577,8 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * - This will empty the media cache according to the current media * retention policy. */ - public async clearCaches( - syncService: SyncServiceInterface | undefined, + async clearCaches( + syncService: SyncServiceLike | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -40720,7 +39614,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async createRoom( + async createRoom( request: CreateRoomParameters, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -40762,7 +39656,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * This is an implementation of the custom_login https://docs.rs/matrix-sdk/latest/matrix_sdk/matrix_auth/struct.MatrixAuth.html#method.login_custom * For more information on logging in with JWT: https://element-hq.github.io/synapse/latest/jwt.html */ - public async customLoginWithJwt( + async customLoginWithJwt( jwt: string, initialDeviceName: string | undefined, deviceId: string | undefined, @@ -40815,7 +39709,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * always fail and the same request needs to be made but this time with * some `auth_data` provided. */ - public async deactivateAccount( + async deactivateAccount( authData: AuthData | undefined, eraseData: boolean, asyncOpts_?: { signal: AbortSignal } @@ -40857,7 +39751,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Deletes a pusher of given pusher ids */ - public async deletePusher( + async deletePusher( identifiers: PusherIdentifiers, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -40894,7 +39788,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public deviceId(): string /*throws*/ { + deviceId(): string /*throws*/ { return FfiConverterString.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -40911,7 +39805,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public async displayName(asyncOpts_?: { + async displayName(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -40955,7 +39849,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * This can be controlled for individual rooms, using * [`Room::enable_send_queue`]. */ - public async enableAllSendQueues( + async enableAllSendQueues( enable: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise { @@ -40993,7 +39887,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Enables or disables progress reporting for media uploads in the send * queue. */ - public enableSendQueueUploadProgress(enable: boolean): void { + enableSendQueueUploadProgress(enable: boolean): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( @@ -41006,7 +39900,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public encryption(): EncryptionInterface { + encryption(): EncryptionLike { return FfiConverterTypeEncryption.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -41023,7 +39917,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Fetch the media preview configuration from the server. */ - public async fetchMediaPreviewConfig(asyncOpts_?: { + async fetchMediaPreviewConfig(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41060,7 +39954,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public getDmRoom(userId: string): RoomInterface | undefined /*throws*/ { + getDmRoom(userId: string): RoomLike | undefined /*throws*/ { return FfiConverterOptionalTypeRoom.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -41082,7 +39976,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Get the invite request avatars display policy * currently stored in the cache. */ - public async getInviteAvatarsDisplayPolicy(asyncOpts_?: { + async getInviteAvatarsDisplayPolicy(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41123,7 +40017,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Gets the `max_upload_size` value from the homeserver, which controls the * max size a media upload request can have. */ - public async getMaxMediaUploadSize(asyncOpts_?: { + async getMaxMediaUploadSize(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41158,8 +40052,8 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async getMediaContent( - mediaSource: MediaSourceInterface, + async getMediaContent( + mediaSource: MediaSourceLike, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41202,14 +40096,14 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * * Not available on Wasm platforms, due to lack of accessible file system. */ - public async getMediaFile( - mediaSource: MediaSourceInterface, + async getMediaFile( + mediaSource: MediaSourceLike, filename: string | undefined, mimeType: string, useCache: boolean, tempDir: string | undefined, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -41225,13 +40119,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeMediaFileHandle.lift.bind( FfiConverterTypeMediaFileHandle ), @@ -41253,7 +40147,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Get the media previews timeline display policy * currently stored in the cache. */ - public async getMediaPreviewDisplayPolicy(asyncOpts_?: { + async getMediaPreviewDisplayPolicy(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41290,8 +40184,8 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async getMediaThumbnail( - mediaSource: MediaSourceInterface, + async getMediaThumbnail( + mediaSource: MediaSourceLike, width: /*u64*/ bigint, height: /*u64*/ bigint, asyncOpts_?: { signal: AbortSignal } @@ -41333,9 +40227,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async getNotificationSettings(asyncOpts_?: { + async getNotificationSettings(asyncOpts_?: { signal: AbortSignal; - }): Promise { + }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -41346,13 +40240,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeNotificationSettings.lift.bind( FfiConverterTypeNotificationSettings ), @@ -41367,7 +40261,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async getProfile( + async getProfile( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -41406,48 +40300,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - /** - * Gets the list of recently used emojis from the - * `io.element.recent_emoji` global account data. - */ - public async getRecentEmojis(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_get_recent_emojis( - 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:*/ FfiConverterArrayTypeRecentEmoji.lift.bind( - FfiConverterArrayTypeRecentEmoji - ), - /*liftString:*/ FfiConverterString.lift, - /*asyncOpts:*/ asyncOpts_, - /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( - FfiConverterTypeClientError - ) - ); - } catch (__error: any) { - if (uniffiIsDebug && __error instanceof Error) { - __error.stack = __stack; - } - throw __error; - } - } - - public async getRecentlyVisitedRooms(asyncOpts_?: { + async getRecentlyVisitedRooms(asyncOpts_?: { signal: AbortSignal; }): Promise> /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41497,7 +40350,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * This method will not initialize the room's timeline or populate it with * events. */ - public getRoom(roomId: string): RoomInterface | undefined /*throws*/ { + getRoom(roomId: string): RoomLike | undefined /*throws*/ { return FfiConverterOptionalTypeRoom.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -41518,10 +40371,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Given a room alias, get the preview of a room, to interact with it. */ - public async getRoomPreviewFromRoomAlias( + async getRoomPreviewFromRoomAlias( roomAlias: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -41533,13 +40386,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomPreview.lift.bind( FfiConverterTypeRoomPreview ), @@ -41564,11 +40417,11 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * about the room and can resolve it, and that may appear as a `via` * parameter in e.g. a permalink URL. This list can be empty. */ - public async getRoomPreviewFromRoomId( + async getRoomPreviewFromRoomId( roomId: string, viaServers: Array, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -41581,13 +40434,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomPreview.lift.bind( FfiConverterTypeRoomPreview ), @@ -41605,9 +40458,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async getSessionVerificationController(asyncOpts_?: { + async getSessionVerificationController(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -41618,13 +40471,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeSessionVerificationController.lift.bind( FfiConverterTypeSessionVerificationController ), @@ -41645,7 +40498,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Returns the sizes of the existing stores, if known. */ - public async getStoreSizes(asyncOpts_?: { + async getStoreSizes(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41692,7 +40545,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Note: When an HTTP error occurs, the error response can be found in the * `ClientError::Generic`'s `details` field. */ - public async getUrl( + async getUrl( url: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -41734,7 +40587,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * The homeserver this client is configured to use. */ - public homeserver(): string { + homeserver(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -41751,9 +40604,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Information about login options for the client's homeserver. */ - public async homeserverLoginDetails(asyncOpts_?: { + async homeserverLoginDetails(asyncOpts_?: { signal: AbortSignal; - }): Promise { + }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -41764,13 +40617,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeHomeserverLoginDetails.lift.bind( FfiConverterTypeHomeserverLoginDetails ), @@ -41785,7 +40638,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async ignoreUser( + async ignoreUser( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -41822,7 +40675,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async ignoredUsers(asyncOpts_?: { + async ignoredUsers(asyncOpts_?: { signal: AbortSignal; }): Promise> /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41862,7 +40715,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Checks if the server supports the LiveKit RTC focus for placing calls. */ - public async isLivekitRtcSupported(asyncOpts_?: { + async isLivekitRtcSupported(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41900,7 +40753,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Checks if the server supports the report room API. */ - public async isReportRoomApiSupported(asyncOpts_?: { + async isReportRoomApiSupported(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -41944,7 +40797,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * status code). * - An `Err` otherwise. */ - public async isRoomAliasAvailable( + async isRoomAliasAvailable( alias: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -41988,10 +40841,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Otherwise use `join_room_by_id_or_alias` so you can pass a list of * server names for the homeserver to find the room. */ - public async joinRoomById( + async joinRoomById( roomId: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -42003,13 +40856,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoom.lift.bind(FfiConverterTypeRoom), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, @@ -42033,11 +40886,11 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * come from a permalink's `via` parameters, or from resolving a room's * alias into an ID. */ - public async joinRoomByIdOrAlias( + async joinRoomByIdOrAlias( roomIdOrAlias: string, serverNames: Array, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -42050,13 +40903,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoom.lift.bind(FfiConverterTypeRoom), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, @@ -42075,12 +40928,12 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Knock on a room to join it using its ID or alias. */ - public async knock( + async knock( roomIdOrAlias: string, reason: string | undefined, serverNames: Array, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -42094,13 +40947,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoom.lift.bind(FfiConverterTypeRoom), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, @@ -42119,7 +40972,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Login using a username and password. */ - public async login( + async login( username: string, password: string, initialDeviceName: string | undefined, @@ -42165,7 +41018,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Login using an email and password. */ - public async loginWithEmail( + async loginWithEmail( email: string, password: string, initialDeviceName: string | undefined, @@ -42211,7 +41064,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Completes the OIDC login process. */ - public async loginWithOidcCallback( + async loginWithOidcCallback( callbackUrl: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -42251,9 +41104,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Log the current user out. */ - public async logout(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async logout(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -42290,7 +41141,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Create a handler for granting login from this device to a new device by * way of a QR code. */ - public newGrantLoginWithQrCodeHandler(): GrantLoginWithQrCodeHandlerInterface { + newGrantLoginWithQrCodeHandler(): GrantLoginWithQrCodeHandlerLike { return FfiConverterTypeGrantLoginWithQrCodeHandler.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -42313,9 +41164,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * * `oidc_configuration` - The data to restore or register the client with * the server. */ - public newLoginWithQrCodeHandler( + newLoginWithQrCodeHandler( oidcConfiguration: OidcConfiguration - ): LoginWithQrCodeHandlerInterface { + ): LoginWithQrCodeHandlerLike { return FfiConverterTypeLoginWithQrCodeHandler.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -42330,10 +41181,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public async notificationClient( + async notificationClient( processSetup: NotificationProcessSetup, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -42345,13 +41196,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeNotificationClient.lift.bind( FfiConverterTypeNotificationClient ), @@ -42376,10 +41227,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * are notified when a new value is sent, but there is no guarantee that * they will see all values. */ - public observeAccountDataEvent( + observeAccountDataEvent( eventType: AccountDataEventType, listener: AccountDataListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -42402,11 +41253,11 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * are notified when a new value is sent, but there is no guarantee that * they will see all values. */ - public observeRoomAccountDataEvent( + observeRoomAccountDataEvent( roomId: string, eventType: RoomAccountDataEventType, listener: RoomAccountDataListener - ): TaskHandleInterface /*throws*/ { + ): TaskHandleLike /*throws*/ { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -42430,7 +41281,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Perform database optimizations if any are available, i.e. vacuuming in * SQLite. */ - public async optimizeStores(asyncOpts_?: { + async optimizeStores(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -42478,7 +41329,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * This is useful for implementing custom notification logic, such as * displaying local notifications or updating notification badges. */ - public async registerNotificationHandler( + async registerNotificationHandler( listener: SyncNotificationListener, asyncOpts_?: { signal: AbortSignal } ): Promise { @@ -42512,7 +41363,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async removeAvatar(asyncOpts_?: { + async removeAvatar(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -42554,7 +41405,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * stale entry in the cache. This functions makes it possible to force * reset it. */ - public async resetSupportedVersions(asyncOpts_?: { + async resetSupportedVersions(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -42596,7 +41447,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * entry in the cache. This functions makes it possible to force reset * it. */ - public async resetWellKnown(asyncOpts_?: { + async resetWellKnown(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -42635,7 +41486,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Resolves the given room alias to a room ID (and a list of servers), if * possible. */ - public async resolveRoomAlias( + async resolveRoomAlias( roomAlias: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -42682,7 +41533,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * If you want to control the amount of rooms to reloads, check * [`Client::restore_session_with`]. */ - public async restoreSession( + async restoreSession( session: Session, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -42724,7 +41575,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * * It reloads a set of rooms controlled by [`RoomLoadSettings`]. */ - public async restoreSessionWith( + async restoreSessionWith( session: Session, roomLoadSettings: RoomLoadSettings, asyncOpts_?: { signal: AbortSignal } @@ -42766,7 +41617,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Checks if a room alias exists in the current homeserver. */ - public async roomAliasExists( + async roomAliasExists( roomAlias: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -42803,7 +41654,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public roomDirectorySearch(): RoomDirectorySearchInterface { + roomDirectorySearch(): RoomDirectorySearchLike { return FfiConverterTypeRoomDirectorySearch.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -42817,7 +41668,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public rooms(): Array { + rooms(): Array { return FfiConverterArrayTypeRoom.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -42831,7 +41682,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public async searchUsers( + async searchUsers( searchTerm: string, limit: /*u64*/ bigint, asyncOpts_?: { signal: AbortSignal } @@ -42885,7 +41736,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * server. However, if the `Client` has been built from a server URL or * name, then the homeserver has been discovered, and we know both. */ - public server(): string | undefined { + server(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -42905,7 +41756,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * This method retrieves information about the server's name and version * by calling the `/_matrix/federation/v1/version` endpoint. */ - public async serverVendorInfo(asyncOpts_?: { + async serverVendorInfo(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -42942,7 +41793,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public session(): Session /*throws*/ { + session(): Session /*throws*/ { return FfiConverterTypeSession.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -42964,7 +41815,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * * It should be supplied as a JSON string. */ - public async setAccountData( + async setAccountData( eventType: string, content: string, asyncOpts_?: { signal: AbortSignal } @@ -43007,9 +41858,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Sets the [ClientDelegate] which will inform about authentication errors. * Returns an error if the delegate was already set. */ - public setDelegate( + setDelegate( delegate: ClientDelegate | undefined - ): TaskHandleInterface | undefined /*throws*/ { + ): TaskHandleLike | undefined /*throws*/ { return FfiConverterOptionalTypeTaskHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -43027,7 +41878,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public async setDisplayName( + async setDisplayName( name: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43067,7 +41918,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Set the invite request avatars display policy */ - public async setInviteAvatarsDisplayPolicy( + async setInviteAvatarsDisplayPolicy( policy: InviteAvatars, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43107,7 +41958,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Set the media previews timeline display policy */ - public async setMediaPreviewDisplayPolicy( + async setMediaPreviewDisplayPolicy( policy: MediaPreviews, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43147,7 +41998,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Set the media retention policy. */ - public async setMediaRetentionPolicy( + async setMediaRetentionPolicy( policy: MediaRetentionPolicy, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43187,7 +42038,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Registers a pusher with given parameters */ - public async setPusher( + async setPusher( identifiers: PusherIdentifiers, kind: PusherKind, appDisplayName: string, @@ -43238,7 +42089,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * Sets the [UnableToDecryptDelegate] which will inform about UTDs. * Returns an error if the delegate was already set. */ - public async setUtdDelegate( + async setUtdDelegate( utdDelegate: UnableToDecryptDelegate, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43278,7 +42129,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * The sliding sync version. */ - public slidingSyncVersion(): SlidingSyncVersion { + slidingSyncVersion(): SlidingSyncVersion { return FfiConverterTypeSlidingSyncVersion.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -43292,7 +42143,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public spaceService(): SpaceServiceInterface { + spaceService(): SpaceServiceLike { return FfiConverterTypeSpaceService.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -43309,11 +42160,11 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Returns a handler to start the SSO login process. */ - public async startSsoLogin( + async startSsoLogin( redirectUrl: string, idpId: string | undefined, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -43326,13 +42177,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeSsoHandler.lift.bind( FfiConverterTypeSsoHandler ), @@ -43350,9 +42201,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public subscribeToIgnoredUsers( - listener: IgnoredUsersListener - ): TaskHandleInterface { + subscribeToIgnoredUsers(listener: IgnoredUsersListener): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -43370,10 +42219,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * Subscribe to changes in the media preview configuration. */ - public async subscribeToMediaPreviewConfig( + async subscribeToMediaPreviewConfig( listener: MediaPreviewConfigListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -43385,13 +42234,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -43421,11 +42270,11 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * time. Usages of this method should be short-lived and dropped as * soon as possible. */ - public async subscribeToRoomInfo( + async subscribeToRoomInfo( roomId: string, listener: RoomInfoListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -43438,13 +42287,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -43469,9 +42318,9 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * The given listener will be immediately called with the initial value of * the enablement status. */ - public subscribeToSendQueueStatus( + subscribeToSendQueueStatus( listener: SendQueueRoomErrorListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -43494,10 +42343,10 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * `RoomSendQueueUpdate::NewLocalEvent` for each local echo existing in * the queue. */ - public async subscribeToSendQueueUpdates( + async subscribeToSendQueueUpdates( listener: SendQueueRoomUpdateListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -43509,13 +42358,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -43533,7 +42382,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public syncService(): SyncServiceBuilderInterface { + syncService(): SyncServiceBuilderLike { return FfiConverterTypeSyncServiceBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -43547,7 +42396,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } - public async trackRecentlyVisitedRoom( + async trackRecentlyVisitedRoom( room: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43584,7 +42433,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async unignoreUser( + async unignoreUser( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -43621,7 +42470,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async uploadAvatar( + async uploadAvatar( mimeType: string, data: ArrayBuffer, asyncOpts_?: { signal: AbortSignal } @@ -43660,7 +42509,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public async uploadMedia( + async uploadMedia( mimeType: string, data: ArrayBuffer, progressWatcher: ProgressWatcher | undefined, @@ -43735,14 +42584,14 @@ export class Client extends UniffiAbstractObject implements ClientInterface { * [specification](https://spec.matrix.org/v1.15/client-server-api/#allocated-scope-tokens) * are always requested. */ - public async urlForOidc( + async urlForOidc( oidcConfiguration: OidcConfiguration, prompt: OidcPrompt | undefined, loginHint: string | undefined, deviceId: string | undefined, additionalScopes: Array | undefined, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -43758,13 +42607,13 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeOAuthAuthorizationData.lift.bind( FfiConverterTypeOAuthAuthorizationData ), @@ -43782,7 +42631,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } - public userId(): string /*throws*/ { + userId(): string /*throws*/ { return FfiConverterString.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -43802,7 +42651,7 @@ export class Client extends UniffiAbstractObject implements ClientInterface { /** * The server name part of the current user ID */ - public userIdServerName(): string /*throws*/ { + userIdServerName(): string /*throws*/ { return FfiConverterString.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -43819,6 +42668,88 @@ export class Client extends UniffiAbstractObject implements ClientInterface { ); } + /** + * Adds a recently used emoji to the list and uploads the updated + * `io.element.recent_emoji` content to the global account data. + */ + async addRecentEmoji( + emoji: 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_client_add_recent_emoji( + uniffiTypeClientObjectFactory.clonePointer(this), + FfiConverterString.lower(emoji) + ); + }, + /*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; + } + } + + /** + * Gets the list of recently used emojis from the + * `io.element.recent_emoji` global account data. + */ + async getRecentEmojis(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_get_recent_emojis( + 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:*/ FfiConverterArrayTypeRecentEmoji.lift.bind( + FfiConverterArrayTypeRecentEmoji + ), + /*liftString:*/ FfiConverterString.lift, + /*asyncOpts:*/ asyncOpts_, + /*errorHandler:*/ FfiConverterTypeClientError.lift.bind( + FfiConverterTypeClientError + ) + ); + } catch (__error: any) { + if (uniffiIsDebug && __error instanceof Error) { + __error.stack = __stack; + } + throw __error; + } + } + /** * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} */ @@ -43837,83 +42768,80 @@ export class Client extends UniffiAbstractObject implements ClientInterface { } } -const uniffiTypeClientObjectFactory: UniffiObjectFactory = - (() => { - return { - create(pointer: UnsafeMutableRawPointer): ClientInterface { - const instance = Object.create(Client.prototype); - instance[pointerLiteralSymbol] = pointer; - instance[destructorGuardSymbol] = this.bless(pointer); - instance[uniffiTypeNameSymbol] = 'Client'; - return instance; - }, +const uniffiTypeClientObjectFactory: UniffiObjectFactory = (() => { + return { + create(pointer: UniffiHandle): ClientLike { + const instance = Object.create(Client.prototype); + instance[pointerLiteralSymbol] = pointer; + instance[destructorGuardSymbol] = this.bless(pointer); + instance[uniffiTypeNameSymbol] = 'Client'; + return instance; + }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { - return uniffiCaller.rustCall( - /*caller:*/ (status) => - nativeModule().ubrn_uniffi_internal_fn_method_client_ffi__bless_pointer( - p, - status - ), - /*liftString:*/ FfiConverterString.lift - ); - }, + bless(p: UniffiHandle): UniffiGcObject { + return uniffiCaller.rustCall( + /*caller:*/ (status) => + nativeModule().ubrn_uniffi_internal_fn_method_client_ffi__bless_pointer( + p, + status + ), + /*liftString:*/ FfiConverterString.lift + ); + }, - unbless(ptr: UniffiRustArcPtr) { - ptr.markDestroyed(); - }, + unbless(ptr: UniffiGcObject) { + ptr.markDestroyed(); + }, - pointer(obj: ClientInterface): UnsafeMutableRawPointer { - if ((obj as any)[destructorGuardSymbol] === undefined) { - throw new UniffiInternalError.UnexpectedNullPointer(); - } - return (obj as any)[pointerLiteralSymbol]; - }, + pointer(obj: ClientLike): UniffiHandle { + if ((obj as any)[destructorGuardSymbol] === undefined) { + throw new UniffiInternalError.UnexpectedNullPointer(); + } + return (obj as any)[pointerLiteralSymbol]; + }, - clonePointer(obj: ClientInterface): UnsafeMutableRawPointer { - const pointer = this.pointer(obj); - return uniffiCaller.rustCall( - /*caller:*/ (callStatus) => - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_client( - pointer, - callStatus - ), - /*liftString:*/ FfiConverterString.lift - ); - }, + clonePointer(obj: ClientLike): UniffiHandle { + const pointer = this.pointer(obj); + return uniffiCaller.rustCall( + /*caller:*/ (callStatus) => + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_clone_client( + pointer, + callStatus + ), + /*liftString:*/ FfiConverterString.lift + ); + }, - freePointer(pointer: UnsafeMutableRawPointer): void { - uniffiCaller.rustCall( - /*caller:*/ (callStatus) => - nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_client( - pointer, - callStatus - ), - /*liftString:*/ FfiConverterString.lift - ); - }, + freePointer(pointer: UniffiHandle): void { + uniffiCaller.rustCall( + /*caller:*/ (callStatus) => + nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_client( + pointer, + callStatus + ), + /*liftString:*/ FfiConverterString.lift + ); + }, - isConcreteType(obj: any): obj is ClientInterface { - return ( - obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'Client' - ); - }, - }; - })(); -// FfiConverter for ClientInterface + isConcreteType(obj: any): obj is ClientLike { + return ( + obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'Client' + ); + }, + }; +})(); +// FfiConverter for ClientLike const FfiConverterTypeClient = new FfiConverterObject( uniffiTypeClientObjectFactory ); -export interface ClientBuilderInterface { - addRootCertificates(certificates: Array): ClientBuilderInterface; +export interface ClientBuilderLike { + addRootCertificates(certificates: Array): ClientBuilderLike; /** * Automatically create a backup version if no backup exists. */ - autoEnableBackups(autoEnableBackups: boolean): ClientBuilderInterface; - autoEnableCrossSigning( - autoEnableCrossSigning: boolean - ): ClientBuilderInterface; + autoEnableBackups(autoEnableBackups: boolean): ClientBuilderLike; + autoEnableCrossSigning(autoEnableCrossSigning: boolean): ClientBuilderLike; /** * Select a strategy to download room keys from the backup. By default * we download after a decryption failure. @@ -43922,26 +42850,22 @@ export interface ClientBuilderInterface { */ backupDownloadStrategy( backupDownloadStrategy: BackupDownloadStrategy - ): ClientBuilderInterface; - build(asyncOpts_?: { - signal: AbortSignal; - }) /*throws*/ : Promise; - crossProcessStoreLocksHolderName(holderName: string): ClientBuilderInterface; + ): ClientBuilderLike; + build(asyncOpts_?: { signal: AbortSignal }) /*throws*/ : Promise; + crossProcessStoreLocksHolderName(holderName: string): ClientBuilderLike; /** * Set the trust requirement to be used when decrypting events. */ - decryptionSettings( - decryptionSettings: DecryptionSettings - ): ClientBuilderInterface; - disableAutomaticTokenRefresh(): ClientBuilderInterface; + decryptionSettings(decryptionSettings: DecryptionSettings): ClientBuilderLike; + disableAutomaticTokenRefresh(): ClientBuilderLike; /** * Don't trust any system root certificates, only trust the certificates * provided through * [`add_root_certificates`][ClientBuilder::add_root_certificates]. */ - disableBuiltInRootCertificates(): ClientBuilderInterface; - disableSslVerification(): ClientBuilderInterface; - enableOidcRefreshLock(): ClientBuilderInterface; + disableBuiltInRootCertificates(): ClientBuilderLike; + disableSslVerification(): ClientBuilderLike; + enableOidcRefreshLock(): ClientBuilderLike; /** * Set whether to enable the experimental support for sending and receiving * encrypted room history on invite, per [MSC4268]. @@ -43950,24 +42874,24 @@ export interface ClientBuilderInterface { */ enableShareHistoryOnInvite( enableShareHistoryOnInvite: boolean - ): ClientBuilderInterface; - homeserverUrl(url: string): ClientBuilderInterface; + ): ClientBuilderLike; + homeserverUrl(url: string): ClientBuilderLike; /** * Use in-memory session storage. */ - inMemoryStore(): ClientBuilderInterface; - proxy(url: string): ClientBuilderInterface; + inMemoryStore(): ClientBuilderLike; + proxy(url: string): ClientBuilderLike; /** * Add a default request config to this client. */ - requestConfig(config: RequestConfig): ClientBuilderInterface; + requestConfig(config: RequestConfig): ClientBuilderLike; /** * Set the strategy to be used for picking recipient devices when sending * an encrypted message. */ - roomKeyRecipientStrategy(strategy: CollectStrategy): ClientBuilderInterface; - serverName(serverName: string): ClientBuilderInterface; - serverNameOrHomeserverUrl(serverNameOrUrl: string): ClientBuilderInterface; + roomKeyRecipientStrategy(strategy: CollectStrategy): ClientBuilderLike; + serverName(serverName: string): ClientBuilderLike; + serverNameOrHomeserverUrl(serverNameOrUrl: string): ClientBuilderLike; /** * Sets the paths that the client will use to store its data and caches * with SQLite. @@ -43976,17 +42900,15 @@ export interface ClientBuilderInterface { * stores aren't capable of handling multiple users, however it is * valid to use the same path for both stores on a single session. */ - sessionPaths(dataPath: string, cachePath: string): ClientBuilderInterface; - setSessionDelegate( - sessionDelegate: ClientSessionDelegate - ): ClientBuilderInterface; + sessionPaths(dataPath: string, cachePath: string): ClientBuilderLike; + setSessionDelegate(sessionDelegate: ClientSessionDelegate): ClientBuilderLike; slidingSyncVersionBuilder( versionBuilder: SlidingSyncVersionBuilder - ): ClientBuilderInterface; + ): ClientBuilderLike; /** * Use SQLite as the session storage. */ - sqliteStore(config: SqliteStoreBuilderInterface): ClientBuilderInterface; + sqliteStore(config: SqliteStoreBuilderLike): ClientBuilderLike; /** * Tell the client that the system is memory constrained, like in a push * notification process for example. @@ -43996,7 +42918,7 @@ export interface ClientBuilderInterface { * Please check * `matrix_sdk::SqliteStoreConfig::with_low_memory_config`. */ - systemIsMemoryConstrained(): ClientBuilderInterface; + systemIsMemoryConstrained(): ClientBuilderLike; /** * Whether the client should support threads client-side or not, and enable * experimental support for MSC4306 (threads subscriptions) or not. @@ -44004,18 +42926,22 @@ export interface ClientBuilderInterface { threadsEnabled( enabled: boolean, threadSubscriptions: boolean - ): ClientBuilderInterface; - userAgent(userAgent: string): ClientBuilderInterface; - username(username: string): ClientBuilderInterface; + ): ClientBuilderLike; + userAgent(userAgent: string): ClientBuilderLike; + username(username: string): ClientBuilderLike; } +/** + * @deprecated Use `ClientBuilderLike` instead. + */ +export type ClientBuilderInterface = ClientBuilderLike; export class ClientBuilder extends UniffiAbstractObject - implements ClientBuilderInterface + implements ClientBuilderLike { readonly [uniffiTypeNameSymbol] = 'ClientBuilder'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; constructor() { super(); const pointer = uniffiCaller.rustCall( @@ -44031,9 +42957,7 @@ export class ClientBuilder uniffiTypeClientBuilderObjectFactory.bless(pointer); } - public addRootCertificates( - certificates: Array - ): ClientBuilderInterface { + addRootCertificates(certificates: Array): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44051,7 +42975,7 @@ export class ClientBuilder /** * Automatically create a backup version if no backup exists. */ - public autoEnableBackups(autoEnableBackups: boolean): ClientBuilderInterface { + autoEnableBackups(autoEnableBackups: boolean): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44066,9 +42990,7 @@ export class ClientBuilder ); } - public autoEnableCrossSigning( - autoEnableCrossSigning: boolean - ): ClientBuilderInterface { + autoEnableCrossSigning(autoEnableCrossSigning: boolean): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44089,9 +43011,9 @@ export class ClientBuilder * * Take a look at the [`BackupDownloadStrategy`] enum for more options. */ - public backupDownloadStrategy( + backupDownloadStrategy( backupDownloadStrategy: BackupDownloadStrategy - ): ClientBuilderInterface { + ): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44108,9 +43030,9 @@ export class ClientBuilder ); } - public async build(asyncOpts_?: { + async build(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -44121,13 +43043,13 @@ export class ClientBuilder ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeClient.lift.bind(FfiConverterTypeClient), /*liftString:*/ FfiConverterString.lift, /*asyncOpts:*/ asyncOpts_, @@ -44143,9 +43065,7 @@ export class ClientBuilder } } - public crossProcessStoreLocksHolderName( - holderName: string - ): ClientBuilderInterface { + crossProcessStoreLocksHolderName(holderName: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44163,9 +43083,9 @@ export class ClientBuilder /** * Set the trust requirement to be used when decrypting events. */ - public decryptionSettings( + decryptionSettings( decryptionSettings: DecryptionSettings - ): ClientBuilderInterface { + ): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44180,7 +43100,7 @@ export class ClientBuilder ); } - public disableAutomaticTokenRefresh(): ClientBuilderInterface { + disableAutomaticTokenRefresh(): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44199,7 +43119,7 @@ export class ClientBuilder * provided through * [`add_root_certificates`][ClientBuilder::add_root_certificates]. */ - public disableBuiltInRootCertificates(): ClientBuilderInterface { + disableBuiltInRootCertificates(): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44213,7 +43133,7 @@ export class ClientBuilder ); } - public disableSslVerification(): ClientBuilderInterface { + disableSslVerification(): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44227,7 +43147,7 @@ export class ClientBuilder ); } - public enableOidcRefreshLock(): ClientBuilderInterface { + enableOidcRefreshLock(): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44247,9 +43167,9 @@ export class ClientBuilder * * [MSC4268]: https://github.com/matrix-org/matrix-spec-proposals/pull/4268 */ - public enableShareHistoryOnInvite( + enableShareHistoryOnInvite( enableShareHistoryOnInvite: boolean - ): ClientBuilderInterface { + ): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44264,7 +43184,7 @@ export class ClientBuilder ); } - public homeserverUrl(url: string): ClientBuilderInterface { + homeserverUrl(url: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44282,7 +43202,7 @@ export class ClientBuilder /** * Use in-memory session storage. */ - public inMemoryStore(): ClientBuilderInterface { + inMemoryStore(): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44296,7 +43216,7 @@ export class ClientBuilder ); } - public proxy(url: string): ClientBuilderInterface { + proxy(url: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44314,7 +43234,7 @@ export class ClientBuilder /** * Add a default request config to this client. */ - public requestConfig(config: RequestConfig): ClientBuilderInterface { + requestConfig(config: RequestConfig): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44333,9 +43253,7 @@ export class ClientBuilder * Set the strategy to be used for picking recipient devices when sending * an encrypted message. */ - public roomKeyRecipientStrategy( - strategy: CollectStrategy - ): ClientBuilderInterface { + roomKeyRecipientStrategy(strategy: CollectStrategy): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44350,7 +43268,7 @@ export class ClientBuilder ); } - public serverName(serverName: string): ClientBuilderInterface { + serverName(serverName: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44365,9 +43283,7 @@ export class ClientBuilder ); } - public serverNameOrHomeserverUrl( - serverNameOrUrl: string - ): ClientBuilderInterface { + serverNameOrHomeserverUrl(serverNameOrUrl: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44390,10 +43306,7 @@ export class ClientBuilder * stores aren't capable of handling multiple users, however it is * valid to use the same path for both stores on a single session. */ - public sessionPaths( - dataPath: string, - cachePath: string - ): ClientBuilderInterface { + sessionPaths(dataPath: string, cachePath: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44409,9 +43322,9 @@ export class ClientBuilder ); } - public setSessionDelegate( + setSessionDelegate( sessionDelegate: ClientSessionDelegate - ): ClientBuilderInterface { + ): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44426,9 +43339,9 @@ export class ClientBuilder ); } - public slidingSyncVersionBuilder( + slidingSyncVersionBuilder( versionBuilder: SlidingSyncVersionBuilder - ): ClientBuilderInterface { + ): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44446,9 +43359,7 @@ export class ClientBuilder /** * Use SQLite as the session storage. */ - public sqliteStore( - config: SqliteStoreBuilderInterface - ): ClientBuilderInterface { + sqliteStore(config: SqliteStoreBuilderLike): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44472,7 +43383,7 @@ export class ClientBuilder * Please check * `matrix_sdk::SqliteStoreConfig::with_low_memory_config`. */ - public systemIsMemoryConstrained(): ClientBuilderInterface { + systemIsMemoryConstrained(): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44490,10 +43401,10 @@ export class ClientBuilder * Whether the client should support threads client-side or not, and enable * experimental support for MSC4306 (threads subscriptions) or not. */ - public threadsEnabled( + threadsEnabled( enabled: boolean, threadSubscriptions: boolean - ): ClientBuilderInterface { + ): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44509,7 +43420,7 @@ export class ClientBuilder ); } - public userAgent(userAgent: string): ClientBuilderInterface { + userAgent(userAgent: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44524,7 +43435,7 @@ export class ClientBuilder ); } - public username(username: string): ClientBuilderInterface { + username(username: string): ClientBuilderLike { return FfiConverterTypeClientBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44557,10 +43468,10 @@ export class ClientBuilder } } -const uniffiTypeClientBuilderObjectFactory: UniffiObjectFactory = +const uniffiTypeClientBuilderObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): ClientBuilderInterface { + create(pointer: UniffiHandle): ClientBuilderLike { const instance = Object.create(ClientBuilder.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -44568,7 +43479,7 @@ const uniffiTypeClientBuilderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_clientbuilder_ffi__bless_pointer( @@ -44579,18 +43490,18 @@ const uniffiTypeClientBuilderObjectFactory: UniffiObjectFactory @@ -44602,7 +43513,7 @@ const uniffiTypeClientBuilderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_clientbuilder( @@ -44613,7 +43524,7 @@ const uniffiTypeClientBuilderObjectFactory: UniffiObjectFactory; backupState(): BackupState; - backupStateListener(listener: BackupStateListener): TaskHandleInterface; + backupStateListener(listener: BackupStateListener): TaskHandleLike; /** * Get the public curve25519 key of our own device in base64. This is * usually what is called the identity key of the device. @@ -44689,14 +43600,14 @@ export interface EncryptionInterface { asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; recoveryState(): RecoveryState; - recoveryStateListener(listener: RecoveryStateListener): TaskHandleInterface; + recoveryStateListener(listener: RecoveryStateListener): TaskHandleLike; /** * Completely reset the current user's crypto identity: reset the cross * signing keys, delete the existing backup and recovery key. */ resetIdentity(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; resetRecoveryKey(asyncOpts_?: { signal: AbortSignal; }) /*throws*/ : Promise; @@ -44724,11 +43635,11 @@ export interface EncryptionInterface { userId: string, fallbackToServer: boolean, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; verificationState(): VerificationState; verificationStateListener( listener: VerificationStateListener - ): TaskHandleInterface; + ): TaskHandleLike; waitForBackupUploadSteadyState( progressListener: BackupSteadyStateListener | undefined, asyncOpts_?: { signal: AbortSignal } @@ -44741,16 +43652,17 @@ export interface EncryptionInterface { signal: AbortSignal; }): Promise; } +/** + * @deprecated Use `EncryptionLike` instead. + */ +export type EncryptionInterface = EncryptionLike; -export class Encryption - extends UniffiAbstractObject - implements EncryptionInterface -{ +export class Encryption extends UniffiAbstractObject implements EncryptionLike { readonly [uniffiTypeNameSymbol] = 'Encryption'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -44768,7 +43680,7 @@ export class Encryption * Therefore it is necessary to poll the server for an answer every time * you want to differentiate between those two states. */ - public async backupExistsOnServer(asyncOpts_?: { + async backupExistsOnServer(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44803,7 +43715,7 @@ export class Encryption } } - public backupState(): BackupState { + backupState(): BackupState { return FfiConverterTypeBackupState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44817,9 +43729,7 @@ export class Encryption ); } - public backupStateListener( - listener: BackupStateListener - ): TaskHandleInterface { + backupStateListener(listener: BackupStateListener): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -44838,7 +43748,7 @@ export class Encryption * Get the public curve25519 key of our own device in base64. This is * usually what is called the identity key of the device. */ - public async curve25519Key(asyncOpts_?: { + async curve25519Key(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44872,7 +43782,7 @@ export class Encryption } } - public async disableRecovery(asyncOpts_?: { + async disableRecovery(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44911,7 +43821,7 @@ export class Encryption * Get the public ed25519 key of our own device. This is usually what is * called the fingerprint of the device. */ - public async ed25519Key(asyncOpts_?: { + async ed25519Key(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44945,7 +43855,7 @@ export class Encryption } } - public async enableBackups(asyncOpts_?: { + async enableBackups(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -44980,7 +43890,7 @@ export class Encryption } } - public async enableRecovery( + async enableRecovery( waitForBackupsToUpload: boolean, passphrase: string | undefined, progressListener: EnableRecoveryProgressListener, @@ -45030,7 +43940,7 @@ export class Encryption * The device must be signed by the user's cross-signing key, must have an * identity, and must not be a dehydrated device. */ - public async hasDevicesToVerifyAgainst(asyncOpts_?: { + async hasDevicesToVerifyAgainst(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -45065,7 +43975,7 @@ export class Encryption } } - public async isLastDevice(asyncOpts_?: { + async isLastDevice(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -45100,7 +44010,7 @@ export class Encryption } } - public async recover( + async recover( recoveryKey: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -45137,7 +44047,7 @@ export class Encryption } } - public async recoverAndReset( + async recoverAndReset( oldRecoveryKey: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -45174,7 +44084,7 @@ export class Encryption } } - public recoveryState(): RecoveryState { + recoveryState(): RecoveryState { return FfiConverterTypeRecoveryState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45188,9 +44098,7 @@ export class Encryption ); } - public recoveryStateListener( - listener: RecoveryStateListener - ): TaskHandleInterface { + recoveryStateListener(listener: RecoveryStateListener): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45209,9 +44117,9 @@ export class Encryption * Completely reset the current user's crypto identity: reset the cross * signing keys, delete the existing backup and recovery key. */ - public async resetIdentity(asyncOpts_?: { + async resetIdentity(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -45246,7 +44154,7 @@ export class Encryption } } - public async resetRecoveryKey(asyncOpts_?: { + async resetRecoveryKey(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -45301,11 +44209,11 @@ export class Encryption * * This will always return `None` if the client hasn't been logged in. */ - public async userIdentity( + async userIdentity( userId: string, fallbackToServer: boolean, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -45342,7 +44250,7 @@ export class Encryption } } - public verificationState(): VerificationState { + verificationState(): VerificationState { return FfiConverterTypeVerificationState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45356,9 +44264,9 @@ export class Encryption ); } - public verificationStateListener( + verificationStateListener( listener: VerificationStateListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45373,7 +44281,7 @@ export class Encryption ); } - public async waitForBackupUploadSteadyState( + async waitForBackupUploadSteadyState( progressListener: BackupSteadyStateListener | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -45416,7 +44324,7 @@ export class Encryption * Waits for end-to-end encryption initialization tasks to finish, if any * was running in the background. */ - public async waitForE2eeInitializationTasks(asyncOpts_?: { + async waitForE2eeInitializationTasks(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -45466,10 +44374,10 @@ export class Encryption } } -const uniffiTypeEncryptionObjectFactory: UniffiObjectFactory = +const uniffiTypeEncryptionObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): EncryptionInterface { + create(pointer: UniffiHandle): EncryptionLike { const instance = Object.create(Encryption.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -45477,7 +44385,7 @@ const uniffiTypeEncryptionObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_encryption_ffi__bless_pointer( @@ -45488,18 +44396,18 @@ const uniffiTypeEncryptionObjectFactory: UniffiObjectFactory @@ -45511,7 +44419,7 @@ const uniffiTypeEncryptionObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_encryption( @@ -45522,7 +44430,7 @@ const uniffiTypeEncryptionObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `GrantLoginWithQrCodeHandlerLike` instead. + */ +export type GrantLoginWithQrCodeHandlerInterface = + GrantLoginWithQrCodeHandlerLike; /** * Handler for granting login in with a QR code. */ export class GrantLoginWithQrCodeHandler extends UniffiAbstractObject - implements GrantLoginWithQrCodeHandlerInterface + implements GrantLoginWithQrCodeHandlerLike { readonly [uniffiTypeNameSymbol] = 'GrantLoginWithQrCodeHandler'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -45627,7 +44540,7 @@ export class GrantLoginWithQrCodeHandler * * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 */ - public async generate( + async generate( progressListener: GrantGeneratedQrLoginProgressListener, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -45689,8 +44602,8 @@ export class GrantLoginWithQrCodeHandler * * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 */ - public async scan( - qrCodeData: QrCodeDataInterface, + async scan( + qrCodeData: QrCodeDataLike, progressListener: GrantQrLoginProgressListener, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -45751,12 +44664,10 @@ export class GrantLoginWithQrCodeHandler } } -const uniffiTypeGrantLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory = +const uniffiTypeGrantLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): GrantLoginWithQrCodeHandlerInterface { + create(pointer: UniffiHandle): GrantLoginWithQrCodeHandlerLike { const instance = Object.create(GrantLoginWithQrCodeHandler.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -45764,7 +44675,7 @@ const uniffiTypeGrantLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_grantloginwithqrcodehandler_ffi__bless_pointer( @@ -45775,22 +44686,18 @@ const uniffiTypeGrantLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory @@ -45802,7 +44709,7 @@ const uniffiTypeGrantLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler( @@ -45813,7 +44720,7 @@ const uniffiTypeGrantLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory { @@ -45890,7 +44801,7 @@ export class HomeserverLoginDetails * The prompts advertised by the authentication issuer for use in the login * URL. */ - public supportedOidcPrompts(): Array { + supportedOidcPrompts(): Array { return FfiConverterArrayTypeOidcPrompt.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45907,7 +44818,7 @@ export class HomeserverLoginDetails /** * Whether the current homeserver supports login using OIDC. */ - public supportsOidcLogin(): boolean { + supportsOidcLogin(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45924,7 +44835,7 @@ export class HomeserverLoginDetails /** * Whether the current homeserver supports the password login flow. */ - public supportsPasswordLogin(): boolean { + supportsPasswordLogin(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45941,7 +44852,7 @@ export class HomeserverLoginDetails /** * Whether the current homeserver supports login using legacy SSO. */ - public supportsSsoLogin(): boolean { + supportsSsoLogin(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45958,7 +44869,7 @@ export class HomeserverLoginDetails /** * The URL of the currently configured homeserver. */ - public url(): string { + url(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -45991,12 +44902,10 @@ export class HomeserverLoginDetails } } -const uniffiTypeHomeserverLoginDetailsObjectFactory: UniffiObjectFactory = +const uniffiTypeHomeserverLoginDetailsObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): HomeserverLoginDetailsInterface { + create(pointer: UniffiHandle): HomeserverLoginDetailsLike { const instance = Object.create(HomeserverLoginDetails.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -46004,7 +44913,7 @@ const uniffiTypeHomeserverLoginDetailsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_homeserverlogindetails_ffi__bless_pointer( @@ -46015,20 +44924,18 @@ const uniffiTypeHomeserverLoginDetailsObjectFactory: UniffiObjectFactory @@ -46040,7 +44947,7 @@ const uniffiTypeHomeserverLoginDetailsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails( @@ -46051,7 +44958,7 @@ const uniffiTypeHomeserverLoginDetailsObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `IdentityResetHandleLike` instead. + */ +export type IdentityResetHandleInterface = IdentityResetHandleLike; export class IdentityResetHandle extends UniffiAbstractObject - implements IdentityResetHandleInterface + implements IdentityResetHandleLike { readonly [uniffiTypeNameSymbol] = 'IdentityResetHandle'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -46105,7 +45016,7 @@ export class IdentityResetHandle * Get the underlying [`CrossSigningResetAuthType`] this identity reset * process is using. */ - public authType(): CrossSigningResetAuthType { + authType(): CrossSigningResetAuthType { return FfiConverterTypeCrossSigningResetAuthType.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -46119,7 +45030,7 @@ export class IdentityResetHandle ); } - public async cancel(asyncOpts_?: { signal: AbortSignal }): Promise { + async cancel(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -46158,7 +45069,7 @@ export class IdentityResetHandle * 3. Go through the cross-signing key reset flow * 4. Finally, re-enable key backups only if they were enabled before */ - public async reset( + async reset( auth: AuthData | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -46213,10 +45124,10 @@ export class IdentityResetHandle } } -const uniffiTypeIdentityResetHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeIdentityResetHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): IdentityResetHandleInterface { + create(pointer: UniffiHandle): IdentityResetHandleLike { const instance = Object.create(IdentityResetHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -46224,7 +45135,7 @@ const uniffiTypeIdentityResetHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_identityresethandle_ffi__bless_pointer( @@ -46235,18 +45146,18 @@ const uniffiTypeIdentityResetHandleObjectFactory: UniffiObjectFactory @@ -46258,7 +45169,7 @@ const uniffiTypeIdentityResetHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_identityresethandle( @@ -46269,7 +45180,7 @@ const uniffiTypeIdentityResetHandleObjectFactory: UniffiObjectFactory { @@ -46316,7 +45231,7 @@ export class InReplyToDetails ); } - public eventId(): string { + eventId(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -46348,10 +45263,10 @@ export class InReplyToDetails } } -const uniffiTypeInReplyToDetailsObjectFactory: UniffiObjectFactory = +const uniffiTypeInReplyToDetailsObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): InReplyToDetailsInterface { + create(pointer: UniffiHandle): InReplyToDetailsLike { const instance = Object.create(InReplyToDetails.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -46359,7 +45274,7 @@ const uniffiTypeInReplyToDetailsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_inreplytodetails_ffi__bless_pointer( @@ -46370,18 +45285,18 @@ const uniffiTypeInReplyToDetailsObjectFactory: UniffiObjectFactory @@ -46393,7 +45308,7 @@ const uniffiTypeInReplyToDetailsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_inreplytodetails( @@ -46404,7 +45319,7 @@ const uniffiTypeInReplyToDetailsObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `KnockRequestActionsLike` instead. + */ +export type KnockRequestActionsInterface = KnockRequestActionsLike; /** * A set of actions to perform for a knock request. */ export class KnockRequestActions extends UniffiAbstractObject - implements KnockRequestActionsInterface + implements KnockRequestActionsLike { readonly [uniffiTypeNameSymbol] = 'KnockRequestActions'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -46471,9 +45390,7 @@ export class KnockRequestActions /** * Accepts the knock request by inviting the user to the room. */ - public async accept(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async accept(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -46510,7 +45427,7 @@ export class KnockRequestActions * Declines the knock request by kicking the user from the room with an * optional reason. */ - public async decline( + async decline( reason: string | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -46551,7 +45468,7 @@ export class KnockRequestActions * Declines the knock request by banning the user from the room with an * optional reason. */ - public async declineAndBan( + async declineAndBan( reason: string | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -46594,7 +45511,7 @@ export class KnockRequestActions * **IMPORTANT**: this won't update the current reference to this request, * a new one with the updated value should be emitted instead. */ - public async markAsSeen(asyncOpts_?: { + async markAsSeen(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -46647,10 +45564,10 @@ export class KnockRequestActions } } -const uniffiTypeKnockRequestActionsObjectFactory: UniffiObjectFactory = +const uniffiTypeKnockRequestActionsObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): KnockRequestActionsInterface { + create(pointer: UniffiHandle): KnockRequestActionsLike { const instance = Object.create(KnockRequestActions.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -46658,7 +45575,7 @@ const uniffiTypeKnockRequestActionsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_knockrequestactions_ffi__bless_pointer( @@ -46669,18 +45586,18 @@ const uniffiTypeKnockRequestActionsObjectFactory: UniffiObjectFactory @@ -46692,7 +45609,7 @@ const uniffiTypeKnockRequestActionsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_knockrequestactions( @@ -46703,7 +45620,7 @@ const uniffiTypeKnockRequestActionsObjectFactory: UniffiObjectFactory { @@ -46771,7 +45692,7 @@ export class LazyTimelineItemProvider /** * Returns some debug information for this event timeline item. */ - public debugInfo(): EventTimelineItemDebugInfo { + debugInfo(): EventTimelineItemDebugInfo { return FfiConverterTypeEventTimelineItemDebugInfo.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -46789,7 +45710,7 @@ export class LazyTimelineItemProvider * For local echoes, return the associated send handle; returns `None` for * remote echoes. */ - public getSendHandle(): SendHandleInterface | undefined { + getSendHandle(): SendHandleLike | undefined { return FfiConverterOptionalTypeSendHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -46806,7 +45727,7 @@ export class LazyTimelineItemProvider /** * Returns the shields for this event timeline item. */ - public getShields(strict: boolean): ShieldState | undefined { + getShields(strict: boolean): ShieldState | undefined { return FfiConverterOptionalTypeShieldState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -46840,12 +45761,10 @@ export class LazyTimelineItemProvider } } -const uniffiTypeLazyTimelineItemProviderObjectFactory: UniffiObjectFactory = +const uniffiTypeLazyTimelineItemProviderObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): LazyTimelineItemProviderInterface { + create(pointer: UniffiHandle): LazyTimelineItemProviderLike { const instance = Object.create(LazyTimelineItemProvider.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -46853,7 +45772,7 @@ const uniffiTypeLazyTimelineItemProviderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_lazytimelineitemprovider_ffi__bless_pointer( @@ -46864,20 +45783,18 @@ const uniffiTypeLazyTimelineItemProviderObjectFactory: UniffiObjectFactory @@ -46889,7 +45806,7 @@ const uniffiTypeLazyTimelineItemProviderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider( @@ -46900,7 +45817,7 @@ const uniffiTypeLazyTimelineItemProviderObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `LeaveSpaceHandleLike` instead. + */ +export type LeaveSpaceHandleInterface = LeaveSpaceHandleLike; /** * The `LeaveSpaceHandle` processes rooms to be left in the order they were @@ -46946,13 +45867,13 @@ export interface LeaveSpaceHandleInterface { */ export class LeaveSpaceHandle extends UniffiAbstractObject - implements LeaveSpaceHandleInterface + implements LeaveSpaceHandleLike { readonly [uniffiTypeNameSymbol] = 'LeaveSpaceHandle'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -46962,7 +45883,7 @@ export class LeaveSpaceHandle /** * Bulk leave the given rooms. Stops when encountering an error. */ - public async leave( + async leave( roomIds: Array, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -47003,7 +45924,7 @@ export class LeaveSpaceHandle * A list of rooms to be left which next to normal [`SpaceRoom`] data also * include leave specific information. */ - public rooms(): Array { + rooms(): Array { return FfiConverterArrayTypeLeaveSpaceRoom.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -47035,10 +45956,10 @@ export class LeaveSpaceHandle } } -const uniffiTypeLeaveSpaceHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeLeaveSpaceHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): LeaveSpaceHandleInterface { + create(pointer: UniffiHandle): LeaveSpaceHandleLike { const instance = Object.create(LeaveSpaceHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -47046,7 +45967,7 @@ const uniffiTypeLeaveSpaceHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_leavespacehandle_ffi__bless_pointer( @@ -47057,18 +45978,18 @@ const uniffiTypeLeaveSpaceHandleObjectFactory: UniffiObjectFactory @@ -47080,7 +46001,7 @@ const uniffiTypeLeaveSpaceHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_leavespacehandle( @@ -47091,7 +46012,7 @@ const uniffiTypeLeaveSpaceHandleObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `LoginWithQrCodeHandlerLike` instead. + */ +export type LoginWithQrCodeHandlerInterface = LoginWithQrCodeHandlerLike; /** * Handler for logging in with a QR code. */ export class LoginWithQrCodeHandler extends UniffiAbstractObject - implements LoginWithQrCodeHandlerInterface + implements LoginWithQrCodeHandlerLike { readonly [uniffiTypeNameSymbol] = 'LoginWithQrCodeHandler'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -47201,7 +46126,7 @@ export class LoginWithQrCodeHandler * * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 */ - public async generate( + async generate( progressListener: GeneratedQrLoginProgressListener, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -47264,8 +46189,8 @@ export class LoginWithQrCodeHandler * * [MSC4108]: https://github.com/matrix-org/matrix-spec-proposals/pull/4108 */ - public async scan( - qrCodeData: QrCodeDataInterface, + async scan( + qrCodeData: QrCodeDataLike, progressListener: QrLoginProgressListener, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -47322,12 +46247,10 @@ export class LoginWithQrCodeHandler } } -const uniffiTypeLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory = +const uniffiTypeLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): LoginWithQrCodeHandlerInterface { + create(pointer: UniffiHandle): LoginWithQrCodeHandlerLike { const instance = Object.create(LoginWithQrCodeHandler.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -47335,7 +46258,7 @@ const uniffiTypeLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_loginwithqrcodehandler_ffi__bless_pointer( @@ -47346,20 +46269,18 @@ const uniffiTypeLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory @@ -47371,7 +46292,7 @@ const uniffiTypeLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler( @@ -47382,7 +46303,7 @@ const uniffiTypeLoginWithQrCodeHandlerObjectFactory: UniffiObjectFactory = +const uniffiTypeMediaFileHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): MediaFileHandleInterface { + create(pointer: UniffiHandle): MediaFileHandleLike { const instance = Object.create(MediaFileHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -47493,7 +46418,7 @@ const uniffiTypeMediaFileHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_mediafilehandle_ffi__bless_pointer( @@ -47504,18 +46429,18 @@ const uniffiTypeMediaFileHandleObjectFactory: UniffiObjectFactory @@ -47527,7 +46452,7 @@ const uniffiTypeMediaFileHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_mediafilehandle( @@ -47538,7 +46463,7 @@ const uniffiTypeMediaFileHandleObjectFactory: UniffiObjectFactory { @@ -47619,7 +46548,7 @@ export class MediaSource ); } - public url(): string { + url(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -47651,10 +46580,10 @@ export class MediaSource } } -const uniffiTypeMediaSourceObjectFactory: UniffiObjectFactory = +const uniffiTypeMediaSourceObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): MediaSourceInterface { + create(pointer: UniffiHandle): MediaSourceLike { const instance = Object.create(MediaSource.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -47662,7 +46591,7 @@ const uniffiTypeMediaSourceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_mediasource_ffi__bless_pointer( @@ -47673,18 +46602,18 @@ const uniffiTypeMediaSourceObjectFactory: UniffiObjectFactory @@ -47696,7 +46625,7 @@ const uniffiTypeMediaSourceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_mediasource( @@ -47707,7 +46636,7 @@ const uniffiTypeMediaSourceObjectFactory: UniffiObjectFactory, asyncOpts_?: { signal: AbortSignal } ): Promise> /*throws*/ { @@ -47878,7 +46811,7 @@ export class NotificationClient * Useful to retrieve room information after running the limited * notification client sliding sync loop. */ - public getRoom(roomId: string): RoomInterface | undefined /*throws*/ { + getRoom(roomId: string): RoomLike | undefined /*throws*/ { return FfiConverterOptionalTypeRoom.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -47914,10 +46847,10 @@ export class NotificationClient } } -const uniffiTypeNotificationClientObjectFactory: UniffiObjectFactory = +const uniffiTypeNotificationClientObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): NotificationClientInterface { + create(pointer: UniffiHandle): NotificationClientLike { const instance = Object.create(NotificationClient.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -47925,7 +46858,7 @@ const uniffiTypeNotificationClientObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_notificationclient_ffi__bless_pointer( @@ -47936,18 +46869,18 @@ const uniffiTypeNotificationClientObjectFactory: UniffiObjectFactory @@ -47959,7 +46892,7 @@ const uniffiTypeNotificationClientObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_notificationclient( @@ -47970,7 +46903,7 @@ const uniffiTypeNotificationClientObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `NotificationSettingsLike` instead. + */ +export type NotificationSettingsInterface = NotificationSettingsLike; export class NotificationSettings extends UniffiAbstractObject - implements NotificationSettingsInterface + implements NotificationSettingsLike { readonly [uniffiTypeNameSymbol] = 'NotificationSettings'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -48189,7 +47126,7 @@ export class NotificationSettings * * [rule]: https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md */ - public async canHomeserverPushEncryptedEventToDevice(asyncOpts_?: { + async canHomeserverPushEncryptedEventToDevice(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48226,7 +47163,7 @@ export class NotificationSettings * * [rule]: https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md */ - public async canPushEncryptedEventToDevice(asyncOpts_?: { + async canPushEncryptedEventToDevice(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48261,7 +47198,7 @@ export class NotificationSettings /** * Get whether some enabled keyword rules exist. */ - public async containsKeywordsRules(asyncOpts_?: { + async containsKeywordsRules(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48305,7 +47242,7 @@ export class NotificationSettings * * `is_one_to_one` - whether the room is a direct chats involving two * people */ - public async getDefaultRoomNotificationMode( + async getDefaultRoomNotificationMode( isEncrypted: boolean, isOneToOne: boolean, asyncOpts_?: { signal: AbortSignal } @@ -48346,7 +47283,7 @@ export class NotificationSettings /** * Returns the raw push rules in JSON format. */ - public async getRawPushRules(asyncOpts_?: { + async getRawPushRules(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48393,7 +47330,7 @@ export class NotificationSettings * * `is_one_to_one` - whether the room is a direct chat involving two * people */ - public async getRoomNotificationSettings( + async getRoomNotificationSettings( roomId: string, isEncrypted: boolean, isOneToOne: boolean, @@ -48439,7 +47376,7 @@ export class NotificationSettings /** * Get all room IDs for which a user-defined rule exists. */ - public async getRoomsWithUserDefinedRules( + async getRoomsWithUserDefinedRules( enabled: boolean | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise> { @@ -48478,7 +47415,7 @@ export class NotificationSettings /** * Get the user defined room notification mode */ - public async getUserDefinedRoomNotificationMode( + async getUserDefinedRoomNotificationMode( roomId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -48520,7 +47457,7 @@ export class NotificationSettings /** * Get whether the `.m.rule.call` push rule is enabled */ - public async isCallEnabled(asyncOpts_?: { + async isCallEnabled(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48558,7 +47495,7 @@ export class NotificationSettings /** * Get whether the `.m.rule.invite_for_me` push rule is enabled */ - public async isInviteForMeEnabled(asyncOpts_?: { + async isInviteForMeEnabled(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48596,7 +47533,7 @@ export class NotificationSettings /** * Get whether room mentions are enabled. */ - public async isRoomMentionEnabled(asyncOpts_?: { + async isRoomMentionEnabled(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48634,7 +47571,7 @@ export class NotificationSettings /** * Get whether user mentions are enabled. */ - public async isUserMentionEnabled(asyncOpts_?: { + async isUserMentionEnabled(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -48672,7 +47609,7 @@ export class NotificationSettings /** * Restore the default notification mode for a room */ - public async restoreDefaultRoomNotificationMode( + async restoreDefaultRoomNotificationMode( roomId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -48712,7 +47649,7 @@ export class NotificationSettings /** * Set whether the `.m.rule.call` push rule is enabled */ - public async setCallEnabled( + async setCallEnabled( enabled: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -48752,7 +47689,7 @@ export class NotificationSettings /** * Sets a custom push rule with the given actions and conditions. */ - public async setCustomPushRule( + async setCustomPushRule( ruleId: string, ruleKind: RuleKind, actions: Array, @@ -48805,7 +47742,7 @@ export class NotificationSettings * people * * `mode` - the new default mode */ - public async setDefaultRoomNotificationMode( + async setDefaultRoomNotificationMode( isEncrypted: boolean, isOneToOne: boolean, mode: RoomNotificationMode, @@ -48846,7 +47783,7 @@ export class NotificationSettings } } - public setDelegate(delegate: NotificationSettingsDelegate | undefined): void { + setDelegate(delegate: NotificationSettingsDelegate | undefined): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate( @@ -48862,7 +47799,7 @@ export class NotificationSettings /** * Set whether the `.m.rule.invite_for_me` push rule is enabled */ - public async setInviteForMeEnabled( + async setInviteForMeEnabled( enabled: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -48902,7 +47839,7 @@ export class NotificationSettings /** * Set whether room mentions are enabled. */ - public async setRoomMentionEnabled( + async setRoomMentionEnabled( enabled: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -48942,7 +47879,7 @@ export class NotificationSettings /** * Set the notification mode for a room. */ - public async setRoomNotificationMode( + async setRoomNotificationMode( roomId: string, mode: RoomNotificationMode, asyncOpts_?: { signal: AbortSignal } @@ -48984,7 +47921,7 @@ export class NotificationSettings /** * Set whether user mentions are enabled. */ - public async setUserMentionEnabled( + async setUserMentionEnabled( enabled: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -49031,7 +47968,7 @@ export class NotificationSettings * * `is_one_to_one` - whether the room is a direct chat involving two * people */ - public async unmuteRoom( + async unmuteRoom( roomId: string, isEncrypted: boolean, isOneToOne: boolean, @@ -49090,10 +48027,10 @@ export class NotificationSettings } } -const uniffiTypeNotificationSettingsObjectFactory: UniffiObjectFactory = +const uniffiTypeNotificationSettingsObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): NotificationSettingsInterface { + create(pointer: UniffiHandle): NotificationSettingsLike { const instance = Object.create(NotificationSettings.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -49101,7 +48038,7 @@ const uniffiTypeNotificationSettingsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_notificationsettings_ffi__bless_pointer( @@ -49112,20 +48049,18 @@ const uniffiTypeNotificationSettingsObjectFactory: UniffiObjectFactory @@ -49137,7 +48072,7 @@ const uniffiTypeNotificationSettingsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_notificationsettings( @@ -49148,7 +48083,7 @@ const uniffiTypeNotificationSettingsObjectFactory: UniffiObjectFactory { @@ -49260,10 +48196,10 @@ export class QrCodeData } } -const uniffiTypeQrCodeDataObjectFactory: UniffiObjectFactory = +const uniffiTypeQrCodeDataObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): QrCodeDataInterface { + create(pointer: UniffiHandle): QrCodeDataLike { const instance = Object.create(QrCodeData.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -49271,7 +48207,7 @@ const uniffiTypeQrCodeDataObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_qrcodedata_ffi__bless_pointer( @@ -49282,18 +48218,18 @@ const uniffiTypeQrCodeDataObjectFactory: UniffiObjectFactory @@ -49305,7 +48241,7 @@ const uniffiTypeQrCodeDataObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_qrcodedata( @@ -49316,7 +48252,7 @@ const uniffiTypeQrCodeDataObjectFactory: UniffiObjectFactory; /** @@ -49444,7 +48380,7 @@ export interface RoomInterface { forget(asyncOpts_?: { signal: AbortSignal }) /*throws*/ : Promise; getPowerLevels(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; /** * Returns the visibility for this room in the room directory. * @@ -49478,7 +48414,7 @@ export interface RoomInterface { */ ignoreDeviceTrustAndResend( devices: Map>, - sendHandle: SendHandleInterface, + sendHandle: SendHandleLike, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; /** @@ -49561,7 +48497,7 @@ export interface RoomInterface { loadOrFetchEvent( eventId: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Mark a room as fully read, by attaching a read receipt to the provided * `event_id`. @@ -49622,10 +48558,10 @@ export interface RoomInterface { ) /*throws*/ : Promise; members(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; membersNoSync(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; /** * The room's current membership state. */ @@ -49656,7 +48592,7 @@ export interface RoomInterface { previewRoom( via: Array, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Publish a new room alias for this room in the room directory. * @@ -49740,7 +48676,7 @@ export interface RoomInterface { ) /*throws*/ : Promise; resetPowerLevels(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; /** * Return a debug representation for the internal room events data * structure, one line per entry in the resulting vector. @@ -49852,11 +48788,11 @@ export interface RoomInterface { subscribeToCallDeclineEvents( rtcNotificationEventId: string, listener: CallDeclineListener - ) /*throws*/ : TaskHandleInterface; + ) /*throws*/ : TaskHandleLike; subscribeToIdentityStatusChanges( listener: IdentityStatusChangeListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Subscribes to requests to join this room (knock member events), using a * `listener` to be notified of the changes. @@ -49868,7 +48804,7 @@ export interface RoomInterface { subscribeToKnockRequests( listener: KnockRequestsListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Subscribes to live location shares in this room, using a `listener` to * be notified of the changes. @@ -49878,8 +48814,8 @@ export interface RoomInterface { */ subscribeToLiveLocationShares( listener: LiveLocationShareListener - ): TaskHandleInterface; - subscribeToRoomInfoUpdates(listener: RoomInfoListener): TaskHandleInterface; + ): TaskHandleLike; + subscribeToRoomInfoUpdates(listener: RoomInfoListener): TaskHandleLike; /** * Subscribe to all send queue updates in this room. * @@ -49890,10 +48826,10 @@ export interface RoomInterface { subscribeToSendQueueUpdates( listener: SendQueueListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; subscribeToTypingNotifications( listener: TypingNotificationsListener - ): TaskHandleInterface; + ): TaskHandleLike; /** * If this room is tombstoned, return the “reference” to the successor room * —i.e. the room replacing this one. @@ -49914,14 +48850,14 @@ export interface RoomInterface { */ timeline(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; + }) /*throws*/ : Promise; /** * Build a new timeline instance with the given configuration. */ timelineWithConfiguration( configuration: TimelineConfiguration, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; topic(): string | undefined; typingNotice( isTyping: boolean, @@ -50002,23 +48938,27 @@ export interface RoomInterface { */ withdrawVerificationAndResend( userIds: Array, - sendHandle: SendHandleInterface, + sendHandle: SendHandleLike, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; } +/** + * @deprecated Use `RoomLike` instead. + */ +export type RoomInterface = RoomLike; -export class Room extends UniffiAbstractObject implements RoomInterface { +export class Room extends UniffiAbstractObject implements RoomLike { readonly [uniffiTypeNameSymbol] = 'Room'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeRoomObjectFactory.bless(pointer); } - public activeMembersCount(): /*u64*/ bigint { + activeMembersCount(): /*u64*/ bigint { return FfiConverterUInt64.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50042,7 +48982,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * The vector is ordered by oldest membership user to newest. */ - public activeRoomCallParticipants(): Array { + activeRoomCallParticipants(): Array { return FfiConverterArrayString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50056,7 +48996,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public alternativeAliases(): Array { + alternativeAliases(): Array { return FfiConverterArrayString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50070,7 +49010,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async applyPowerLevelChanges( + async applyPowerLevelChanges( changes: RoomPowerLevelChanges, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -50107,7 +49047,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public avatarUrl(): string | undefined { + avatarUrl(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50121,7 +49061,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async banUser( + async banUser( userId: string, reason: string | undefined, asyncOpts_?: { signal: AbortSignal } @@ -50160,7 +49100,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public canonicalAlias(): string | undefined { + canonicalAlias(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50177,7 +49117,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Remove the `ComposerDraft` stored in the state store for this room. */ - public async clearComposerDraft( + async clearComposerDraft( threadRoot: string | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -50220,7 +49160,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * This will remove all the information related to the event cache, in * memory and in the persisted storage, if enabled. */ - public async clearEventCacheStorage(asyncOpts_?: { + async clearEventCacheStorage(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50263,7 +49203,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * `rtc_notification_event_id` - the event id of the m.rtc.notification * event. */ - public async declineCall( + async declineCall( rtcNotificationEventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -50309,7 +49249,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * room keys will be rotated automatically when necessary. This method is * still useful for debugging purposes. */ - public async discardRoomKey(asyncOpts_?: { + async discardRoomKey(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50349,7 +49289,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * compute a room name based on the room's nature (DM or not) and number of * members. */ - public displayName(): string | undefined { + displayName(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50369,9 +49309,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Useful outside the context of a timeline, or when a timeline doesn't * have the full content of an event. */ - public async edit( + async edit( eventId: string, - newContent: RoomMessageEventContentWithoutRelationInterface, + newContent: RoomMessageEventContentWithoutRelationLike, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50413,7 +49353,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Enable End-to-end encryption in this room. */ - public async enableEncryption(asyncOpts_?: { + async enableEncryption(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50451,7 +49391,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Enable or disable the send queue for that particular room. */ - public enableSendQueue(enable: boolean): void { + enableSendQueue(enable: boolean): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( @@ -50464,7 +49404,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public encryptionState(): EncryptionState { + encryptionState(): EncryptionState { return FfiConverterTypeEncryptionState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50486,7 +49426,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * the server can't handle MSC4306; otherwise, returns the thread * subscription status. */ - public async fetchThreadSubscription( + async fetchThreadSubscription( threadRootEventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -50532,9 +49472,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * Only left or banned-from rooms can be forgotten. */ - public async forget(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async forget(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -50567,9 +49505,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async getPowerLevels(asyncOpts_?: { + async getPowerLevels(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -50580,13 +49518,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomPowerLevels.lift.bind( FfiConverterTypeRoomPowerLevels ), @@ -50610,7 +49548,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * [Public](`RoomVisibility::Public`) rooms are listed in the room * directory and can be found using it. */ - public async getRoomVisibility(asyncOpts_?: { + async getRoomVisibility(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50651,7 +49589,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Is there a non expired membership with application "m.call" and scope * "m.room" in this room. */ - public hasActiveRoomCall(): boolean { + hasActiveRoomCall(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50668,7 +49606,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Returns the room heroes for this room. */ - public heroes(): Array { + heroes(): Array { return FfiConverterArrayTypeRoomHero.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50682,7 +49620,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public id(): string { + id(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50708,9 +49646,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * `transaction_id` - The send queue transaction identifier of the local * echo the send error applies to */ - public async ignoreDeviceTrustAndResend( + async ignoreDeviceTrustAndResend( devices: Map>, - sendHandle: SendHandleInterface, + sendHandle: SendHandleLike, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50754,7 +49692,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * * `user_id` - The ID of the user to ignore. */ - public async ignoreUser( + async ignoreUser( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -50791,7 +49729,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async inviteUserById( + async inviteUserById( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -50828,7 +49766,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public invitedMembersCount(): /*u64*/ bigint { + invitedMembersCount(): /*u64*/ bigint { return FfiConverterUInt64.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50845,7 +49783,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Get the user who created the invite, if any. */ - public async inviter(asyncOpts_?: { + async inviter(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -50882,9 +49820,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async isDirect(asyncOpts_?: { - signal: AbortSignal; - }): Promise { + async isDirect(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -50920,9 +49856,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * **Note**: this info may not be reliable if you don't set up * `m.room.encryption` as required state. */ - public async isEncrypted(asyncOpts_?: { - signal: AbortSignal; - }): Promise { + async isEncrypted(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -50957,7 +49891,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * Can return `None` if the join rule state event is missing. */ - public isPublic(): boolean | undefined { + isPublic(): boolean | undefined { return FfiConverterOptionalBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50975,7 +49909,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Returns whether the send queue for that particular room is enabled or * not. */ - public isSendQueueEnabled(): boolean { + isSendQueueEnabled(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -50989,7 +49923,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public isSpace(): boolean { + isSpace(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -51008,9 +49942,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * Only invited and left rooms can be joined via this method. */ - public async join(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async join(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -51043,7 +49975,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public joinedMembersCount(): /*u64*/ bigint { + joinedMembersCount(): /*u64*/ bigint { return FfiConverterUInt64.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -51057,7 +49989,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async kickUser( + async kickUser( userId: string, reason: string | undefined, asyncOpts_?: { signal: AbortSignal } @@ -51096,7 +50028,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async latestEncryptionState(asyncOpts_?: { + async latestEncryptionState(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51133,7 +50065,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async latestEvent(asyncOpts_?: { + async latestEvent(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51172,9 +50104,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * Only invited and joined rooms can be left. */ - public async leave(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async leave(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -51210,7 +50140,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Retrieve the `ComposerDraft` stored in the state store for this room. */ - public async loadComposerDraft( + async loadComposerDraft( threadRoot: string | undefined, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51253,10 +50183,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Either loads the event associated with the `event_id` from the event * cache or fetches it from the homeserver. */ - public async loadOrFetchEvent( + async loadOrFetchEvent( eventId: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -51268,13 +50198,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTimelineEvent.lift.bind( FfiConverterTypeTimelineEvent ), @@ -51303,7 +50233,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * [`Timeline`]. For any other case use [`Timeline::mark_as_read`] * instead. */ - public async markAsFullyReadUnchecked( + async markAsFullyReadUnchecked( eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51346,7 +50276,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Note: this does NOT unset the unread flag; it's the caller's * responsibility to do so, if need be. */ - public async markAsRead( + async markAsRead( receiptType: ReceiptType, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51383,7 +50313,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async matrixToEventPermalink( + async matrixToEventPermalink( eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51420,7 +50350,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async matrixToPermalink(asyncOpts_?: { + async matrixToPermalink(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51455,7 +50385,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async member( + async member( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51494,7 +50424,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async memberAvatarUrl( + async memberAvatarUrl( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51533,7 +50463,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async memberDisplayName( + async memberDisplayName( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51582,7 +50512,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * event. * - If the current user is not present, an error. */ - public async memberWithSenderInfo( + async memberWithSenderInfo( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51621,9 +50551,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async members(asyncOpts_?: { + async members(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -51634,13 +50564,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomMembersIterator.lift.bind( FfiConverterTypeRoomMembersIterator ), @@ -51658,9 +50588,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async membersNoSync(asyncOpts_?: { + async membersNoSync(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -51671,13 +50601,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomMembersIterator.lift.bind( FfiConverterTypeRoomMembersIterator ), @@ -51698,7 +50628,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * The room's current membership state. */ - public membership(): Membership { + membership(): Membership { return FfiConverterTypeMembership.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -51712,7 +50642,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async newLatestEvent(asyncOpts_?: { + async newLatestEvent(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51746,7 +50676,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public ownUserId(): string { + ownUserId(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -51774,7 +50704,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * [`m.room.tombstone`]: https://spec.matrix.org/v1.14/client-server-api/#mroomtombstone * [`m.room.create`]: https://spec.matrix.org/v1.14/client-server-api/#mroomcreate */ - public predecessorRoom(): PredecessorRoom | undefined { + predecessorRoom(): PredecessorRoom | undefined { return FfiConverterOptionalTypePredecessorRoom.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -51792,10 +50722,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Builds a `RoomPreview` from a room list item. This is intended for * invited, knocked or banned rooms. */ - public async previewRoom( + async previewRoom( via: Array, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -51807,13 +50737,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomPreview.lift.bind( FfiConverterTypeRoomPreview ), @@ -51839,7 +50769,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * - `false` if the room alias was already present so it couldn't be * published. */ - public async publishRoomAliasInRoomDirectory( + async publishRoomAliasInRoomDirectory( alias: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -51879,7 +50809,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * The raw name as present in the room state event. */ - public rawName(): string | undefined { + rawName(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -51903,7 +50833,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * `reason` - The reason for the event being redacted (optional). its * transaction ID (optional). If not given one is created. */ - public async redact( + async redact( eventId: string, reason: string | undefined, asyncOpts_?: { signal: AbortSignal } @@ -51945,7 +50875,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Removes the current room avatar */ - public async removeAvatar(asyncOpts_?: { + async removeAvatar(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -51988,7 +50918,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * room directory. * - `false` if the room alias didn't exist so it couldn't be removed. */ - public async removeRoomAliasFromRoomDirectory( + async removeRoomAliasFromRoomDirectory( alias: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52037,7 +50967,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * `score` - The score to rate this content as where -100 is most * offensive and 0 is inoffensive (optional). */ - public async reportContent( + async reportContent( eventId: string, score: /*i32*/ number | undefined, reason: string | undefined, @@ -52090,7 +51020,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * Returns an error if the room is not found or on rate limit */ - public async reportRoom( + async reportRoom( reason: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52127,9 +51057,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async resetPowerLevels(asyncOpts_?: { + async resetPowerLevels(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -52140,13 +51070,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomPowerLevels.lift.bind( FfiConverterTypeRoomPowerLevels ), @@ -52168,7 +51098,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Return a debug representation for the internal room events data * structure, one line per entry in the resulting vector. */ - public async roomEventsDebugString(asyncOpts_?: { + async roomEventsDebugString(asyncOpts_?: { signal: AbortSignal; }): Promise> /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -52205,7 +51135,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async roomInfo(asyncOpts_?: { + async roomInfo(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -52246,7 +51176,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Store the given `ComposerDraft` in the state store using the current * room id, as identifier. */ - public async saveComposerDraft( + async saveComposerDraft( draft: ComposerDraft, threadRoot: string | undefined, asyncOpts_?: { signal: AbortSignal } @@ -52288,7 +51218,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Send the current users live location beacon in the room. */ - public async sendLiveLocation( + async sendLiveLocation( geoUri: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52334,7 +51264,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * * `content` - The content of the event to send encoded as JSON string. */ - public async sendRaw( + async sendRaw( eventType: string, content: string, asyncOpts_?: { signal: AbortSignal } @@ -52373,7 +51303,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async setIsFavourite( + async setIsFavourite( isFavourite: boolean, tagOrder: /*f64*/ number | undefined, asyncOpts_?: { signal: AbortSignal } @@ -52412,7 +51342,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async setIsLowPriority( + async setIsLowPriority( isLowPriority: boolean, tagOrder: /*f64*/ number | undefined, asyncOpts_?: { signal: AbortSignal } @@ -52454,7 +51384,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Sets a new name to the room. */ - public async setName( + async setName( name: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52504,7 +51434,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an * idempotent operation. */ - public async setThreadSubscription( + async setThreadSubscription( threadRootEventId: string, subscribed: boolean, asyncOpts_?: { signal: AbortSignal } @@ -52546,7 +51476,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Sets a new topic in the room. */ - public async setTopic( + async setTopic( topic: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52587,7 +51517,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Set (or unset) a flag on the room to indicate that the user has * explicitly marked it as unread. */ - public async setUnreadFlag( + async setUnreadFlag( newValue: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52627,7 +51557,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Start the current users live location share in the room. */ - public async startLiveLocationShare( + async startLiveLocationShare( durationMillis: /*u64*/ bigint, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52667,7 +51597,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Stop the current users live location share in the room. */ - public async stopLiveLocationShare(asyncOpts_?: { + async stopLiveLocationShare(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -52709,10 +51639,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Will error if `rtc_notification_event_id` is not a valid event id. * Use the [`TaskHandle`] to cancel the subscription. */ - public subscribeToCallDeclineEvents( + subscribeToCallDeclineEvents( rtcNotificationEventId: string, listener: CallDeclineListener - ): TaskHandleInterface /*throws*/ { + ): TaskHandleLike /*throws*/ { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -52731,10 +51661,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async subscribeToIdentityStatusChanges( + async subscribeToIdentityStatusChanges( listener: IdentityStatusChangeListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -52746,13 +51676,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -52778,10 +51708,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * when subscribing, along with a [`TaskHandle`] to cancel the * subscription. */ - public async subscribeToKnockRequests( + async subscribeToKnockRequests( listener: KnockRequestsListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -52793,13 +51723,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -52824,9 +51754,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * The current live location shares will be emitted immediately when * subscribing, along with a [`TaskHandle`] to cancel the subscription. */ - public subscribeToLiveLocationShares( + subscribeToLiveLocationShares( listener: LiveLocationShareListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -52841,9 +51771,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public subscribeToRoomInfoUpdates( - listener: RoomInfoListener - ): TaskHandleInterface { + subscribeToRoomInfoUpdates(listener: RoomInfoListener): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -52865,10 +51793,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * `RoomSendQueueUpdate::NewLocalEvent` for each local echo existing in * the queue. */ - public async subscribeToSendQueueUpdates( + async subscribeToSendQueueUpdates( listener: SendQueueListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -52880,13 +51808,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -52904,9 +51832,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public subscribeToTypingNotifications( + subscribeToTypingNotifications( listener: TypingNotificationsListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -52930,7 +51858,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * [`m.room.tombstone`]: https://spec.matrix.org/v1.14/client-server-api/#mroomtombstone */ - public successorRoom(): SuccessorRoom | undefined { + successorRoom(): SuccessorRoom | undefined { return FfiConverterOptionalTypeSuccessorRoom.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -52944,7 +51872,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async suggestedRoleForUser( + async suggestedRoleForUser( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -52987,9 +51915,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * Create a timeline with a default configuration, i.e. a live timeline * with read receipts and read marker tracking. */ - public async timeline(asyncOpts_?: { + async timeline(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -53000,13 +51928,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTimeline.lift.bind( FfiConverterTypeTimeline ), @@ -53027,10 +51955,10 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Build a new timeline instance with the given configuration. */ - public async timelineWithConfiguration( + async timelineWithConfiguration( configuration: TimelineConfiguration, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -53042,13 +51970,13 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTimeline.lift.bind( FfiConverterTypeTimeline ), @@ -53066,7 +51994,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public topic(): string | undefined { + topic(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -53080,7 +52008,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { ); } - public async typingNotice( + async typingNotice( isTyping: boolean, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -53117,7 +52045,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async unbanUser( + async unbanUser( userId: string, reason: string | undefined, asyncOpts_?: { signal: AbortSignal } @@ -53161,7 +52089,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * Note that publishing the alias in the room directory is done separately. */ - public async updateCanonicalAlias( + async updateCanonicalAlias( alias: string | undefined, altAliases: Array, asyncOpts_?: { signal: AbortSignal } @@ -53203,7 +52131,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Update room history visibility for this room. */ - public async updateHistoryVisibility( + async updateHistoryVisibility( visibility: RoomHistoryVisibility, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -53243,7 +52171,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Update the join rule for this room. */ - public async updateJoinRules( + async updateJoinRules( newRule: JoinRule, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -53280,7 +52208,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } - public async updatePowerLevelsForUsers( + async updatePowerLevelsForUsers( updates: Array, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -53320,7 +52248,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { /** * Update the room's visibility in the room directory. */ - public async updateRoomVisibility( + async updateRoomVisibility( visibility: RoomVisibility, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -53372,7 +52300,7 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * content repository * * `media_info` - The media info used as avatar image info. */ - public async uploadAvatar( + async uploadAvatar( mimeType: string, data: ArrayBuffer, mediaInfo: ImageInfo | undefined, @@ -53425,9 +52353,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { * * `transaction_id` - The send queue transaction identifier of the local * echo the send error applies to */ - public async withdrawVerificationAndResend( + async withdrawVerificationAndResend( userIds: Array, - sendHandle: SendHandleInterface, + sendHandle: SendHandleLike, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -53482,9 +52410,9 @@ export class Room extends UniffiAbstractObject implements RoomInterface { } } -const uniffiTypeRoomObjectFactory: UniffiObjectFactory = (() => { +const uniffiTypeRoomObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomInterface { + create(pointer: UniffiHandle): RoomLike { const instance = Object.create(Room.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -53492,7 +52420,7 @@ const uniffiTypeRoomObjectFactory: UniffiObjectFactory = (() => { return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_room_ffi__bless_pointer( @@ -53503,18 +52431,18 @@ const uniffiTypeRoomObjectFactory: UniffiObjectFactory = (() => { ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer(obj: RoomInterface): UnsafeMutableRawPointer { + pointer(obj: RoomLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer(obj: RoomInterface): UnsafeMutableRawPointer { + clonePointer(obj: RoomLike): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -53526,7 +52454,7 @@ const uniffiTypeRoomObjectFactory: UniffiObjectFactory = (() => { ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_room( @@ -53537,12 +52465,12 @@ const uniffiTypeRoomObjectFactory: UniffiObjectFactory = (() => { ); }, - isConcreteType(obj: any): obj is RoomInterface { + isConcreteType(obj: any): obj is RoomLike { return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'Room'; }, }; })(); -// FfiConverter for RoomInterface +// FfiConverter for RoomLike const FfiConverterTypeRoom = new FfiConverterObject( uniffiTypeRoomObjectFactory ); @@ -53555,7 +52483,7 @@ const FfiConverterTypeRoom = new FfiConverterObject( * 2. Start the room search with [`RoomDirectorySearch::search`]. * 3. To get more results, use [`RoomDirectorySearch::next_page`]. */ -export interface RoomDirectorySearchInterface { +export interface RoomDirectorySearchLike { /** * Get whether the search is at the last page. */ @@ -53579,7 +52507,7 @@ export interface RoomDirectorySearchInterface { results( listener: RoomDirectorySearchEntriesListener, asyncOpts_?: { signal: AbortSignal } - ): Promise; + ): Promise; /** * Starts a filtered search for the server. * @@ -53599,6 +52527,10 @@ export interface RoomDirectorySearchInterface { asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; } +/** + * @deprecated Use `RoomDirectorySearchLike` instead. + */ +export type RoomDirectorySearchInterface = RoomDirectorySearchLike; /** * A helper for performing room searches in the room directory. @@ -53610,13 +52542,13 @@ export interface RoomDirectorySearchInterface { */ export class RoomDirectorySearch extends UniffiAbstractObject - implements RoomDirectorySearchInterface + implements RoomDirectorySearchLike { readonly [uniffiTypeNameSymbol] = 'RoomDirectorySearch'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -53626,7 +52558,7 @@ export class RoomDirectorySearch /** * Get whether the search is at the last page. */ - public async isAtLastPage(asyncOpts_?: { + async isAtLastPage(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -53664,7 +52596,7 @@ export class RoomDirectorySearch /** * Get the number of pages that have been loaded so far. */ - public async loadedPages(asyncOpts_?: { + async loadedPages(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -53702,7 +52634,7 @@ export class RoomDirectorySearch /** * Asks the server for the next page of the current search. */ - public async nextPage(asyncOpts_?: { + async nextPage(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -53741,10 +52673,10 @@ export class RoomDirectorySearch * Registers a callback to receive new search results when starting a * search or getting new paginated results. */ - public async results( + async results( listener: RoomDirectorySearchEntriesListener, asyncOpts_?: { signal: AbortSignal } - ): Promise { + ): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -53756,13 +52688,13 @@ export class RoomDirectorySearch ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -53789,7 +52721,7 @@ export class RoomDirectorySearch * * This method will clear the current search results and start a new one. */ - public async search( + async search( filter: string | undefined, batchSize: /*u32*/ number, viaServerName: string | undefined, @@ -53848,10 +52780,10 @@ export class RoomDirectorySearch } } -const uniffiTypeRoomDirectorySearchObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomDirectorySearchObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomDirectorySearchInterface { + create(pointer: UniffiHandle): RoomDirectorySearchLike { const instance = Object.create(RoomDirectorySearch.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -53859,7 +52791,7 @@ const uniffiTypeRoomDirectorySearchObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_roomdirectorysearch_ffi__bless_pointer( @@ -53870,18 +52802,18 @@ const uniffiTypeRoomDirectorySearchObjectFactory: UniffiObjectFactory @@ -53893,7 +52825,7 @@ const uniffiTypeRoomDirectorySearchObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch( @@ -53904,7 +52836,7 @@ const uniffiTypeRoomDirectorySearchObjectFactory: UniffiObjectFactory { @@ -53967,11 +52900,11 @@ export class RoomList ); } - public entriesWithDynamicAdaptersWith( + entriesWithDynamicAdaptersWith( pageSize: /*u32*/ number, enableLatestEventSorter: boolean, listener: RoomListEntriesListener - ): RoomListEntriesWithDynamicAdaptersResultInterface { + ): RoomListEntriesWithDynamicAdaptersResultLike { return FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -53988,7 +52921,7 @@ export class RoomList ); } - public loadingState( + loadingState( listener: RoomListLoadingStateListener ): RoomListLoadingStateResult /*throws*/ { return FfiConverterTypeRoomListLoadingStateResult.lift( @@ -54008,7 +52941,7 @@ export class RoomList ); } - public room(roomId: string): RoomInterface /*throws*/ { + room(roomId: string): RoomLike /*throws*/ { return FfiConverterTypeRoom.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomListError.lift.bind( @@ -54044,10 +52977,10 @@ export class RoomList } } -const uniffiTypeRoomListObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomListObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomListInterface { + create(pointer: UniffiHandle): RoomListLike { const instance = Object.create(RoomList.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -54055,7 +52988,7 @@ const uniffiTypeRoomListObjectFactory: UniffiObjectFactory = return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_roomlist_ffi__bless_pointer( @@ -54066,18 +52999,18 @@ const uniffiTypeRoomListObjectFactory: UniffiObjectFactory = ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer(obj: RoomListInterface): UnsafeMutableRawPointer { + pointer(obj: RoomListLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer(obj: RoomListInterface): UnsafeMutableRawPointer { + clonePointer(obj: RoomListLike): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -54089,7 +53022,7 @@ const uniffiTypeRoomListObjectFactory: UniffiObjectFactory = ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlist( @@ -54100,40 +53033,45 @@ const uniffiTypeRoomListObjectFactory: UniffiObjectFactory = ); }, - isConcreteType(obj: any): obj is RoomListInterface { + isConcreteType(obj: any): obj is RoomListLike { return ( obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'RoomList' ); }, }; })(); -// FfiConverter for RoomListInterface +// FfiConverter for RoomListLike const FfiConverterTypeRoomList = new FfiConverterObject( uniffiTypeRoomListObjectFactory ); -export interface RoomListDynamicEntriesControllerInterface { +export interface RoomListDynamicEntriesControllerLike { addOnePage(): void; resetToOnePage(): void; setFilter(kind: RoomListEntriesDynamicFilterKind): boolean; } +/** + * @deprecated Use `RoomListDynamicEntriesControllerLike` instead. + */ +export type RoomListDynamicEntriesControllerInterface = + RoomListDynamicEntriesControllerLike; export class RoomListDynamicEntriesController extends UniffiAbstractObject - implements RoomListDynamicEntriesControllerInterface + implements RoomListDynamicEntriesControllerLike { readonly [uniffiTypeNameSymbol] = 'RoomListDynamicEntriesController'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeRoomListDynamicEntriesControllerObjectFactory.bless(pointer); } - public addOnePage(): void { + addOnePage(): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( @@ -54147,7 +53085,7 @@ export class RoomListDynamicEntriesController ); } - public resetToOnePage(): void { + resetToOnePage(): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( @@ -54161,7 +53099,7 @@ export class RoomListDynamicEntriesController ); } - public setFilter(kind: RoomListEntriesDynamicFilterKind): boolean { + setFilter(kind: RoomListEntriesDynamicFilterKind): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54201,12 +53139,10 @@ export class RoomListDynamicEntriesController } } -const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): RoomListDynamicEntriesControllerInterface { + create(pointer: UniffiHandle): RoomListDynamicEntriesControllerLike { const instance = Object.create( RoomListDynamicEntriesController.prototype ); @@ -54216,7 +53152,7 @@ const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFacto return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_roomlistdynamicentriescontroller_ffi__bless_pointer( @@ -54227,22 +53163,18 @@ const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFacto ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer( - obj: RoomListDynamicEntriesControllerInterface - ): UnsafeMutableRawPointer { + pointer(obj: RoomListDynamicEntriesControllerLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer( - obj: RoomListDynamicEntriesControllerInterface - ): UnsafeMutableRawPointer { + clonePointer(obj: RoomListDynamicEntriesControllerLike): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -54254,7 +53186,7 @@ const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFacto ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller( @@ -54265,9 +53197,7 @@ const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFacto ); }, - isConcreteType( - obj: any - ): obj is RoomListDynamicEntriesControllerInterface { + isConcreteType(obj: any): obj is RoomListDynamicEntriesControllerLike { return ( obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'RoomListDynamicEntriesController' @@ -54275,25 +53205,30 @@ const uniffiTypeRoomListDynamicEntriesControllerObjectFactory: UniffiObjectFacto }, }; })(); -// FfiConverter for RoomListDynamicEntriesControllerInterface +// FfiConverter for RoomListDynamicEntriesControllerLike const FfiConverterTypeRoomListDynamicEntriesController = new FfiConverterObject( uniffiTypeRoomListDynamicEntriesControllerObjectFactory ); -export interface RoomListEntriesWithDynamicAdaptersResultInterface { - controller(): RoomListDynamicEntriesControllerInterface; - entriesStream(): TaskHandleInterface; +export interface RoomListEntriesWithDynamicAdaptersResultLike { + controller(): RoomListDynamicEntriesControllerLike; + entriesStream(): TaskHandleLike; } +/** + * @deprecated Use `RoomListEntriesWithDynamicAdaptersResultLike` instead. + */ +export type RoomListEntriesWithDynamicAdaptersResultInterface = + RoomListEntriesWithDynamicAdaptersResultLike; export class RoomListEntriesWithDynamicAdaptersResult extends UniffiAbstractObject - implements RoomListEntriesWithDynamicAdaptersResultInterface + implements RoomListEntriesWithDynamicAdaptersResultLike { readonly [uniffiTypeNameSymbol] = 'RoomListEntriesWithDynamicAdaptersResult'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -54302,7 +53237,7 @@ export class RoomListEntriesWithDynamicAdaptersResult ); } - public controller(): RoomListDynamicEntriesControllerInterface { + controller(): RoomListDynamicEntriesControllerLike { return FfiConverterTypeRoomListDynamicEntriesController.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54318,7 +53253,7 @@ export class RoomListEntriesWithDynamicAdaptersResult ); } - public entriesStream(): TaskHandleInterface { + entriesStream(): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54361,12 +53296,12 @@ export class RoomListEntriesWithDynamicAdaptersResult } } -const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObjectFactory = (() => { return { create( - pointer: UnsafeMutableRawPointer - ): RoomListEntriesWithDynamicAdaptersResultInterface { + pointer: UniffiHandle + ): RoomListEntriesWithDynamicAdaptersResultLike { const instance = Object.create( RoomListEntriesWithDynamicAdaptersResult.prototype ); @@ -54377,7 +53312,7 @@ const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObj return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_roomlistentrieswithdynamicadaptersresult_ffi__bless_pointer( @@ -54388,13 +53323,11 @@ const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObj ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer( - obj: RoomListEntriesWithDynamicAdaptersResultInterface - ): UnsafeMutableRawPointer { + pointer(obj: RoomListEntriesWithDynamicAdaptersResultLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } @@ -54402,8 +53335,8 @@ const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObj }, clonePointer( - obj: RoomListEntriesWithDynamicAdaptersResultInterface - ): UnsafeMutableRawPointer { + obj: RoomListEntriesWithDynamicAdaptersResultLike + ): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -54415,7 +53348,7 @@ const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObj ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult( @@ -54428,7 +53361,7 @@ const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObj isConcreteType( obj: any - ): obj is RoomListEntriesWithDynamicAdaptersResultInterface { + ): obj is RoomListEntriesWithDynamicAdaptersResultLike { return ( obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === @@ -54437,18 +53370,18 @@ const uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory: UniffiObj }, }; })(); -// FfiConverter for RoomListEntriesWithDynamicAdaptersResultInterface +// FfiConverter for RoomListEntriesWithDynamicAdaptersResultLike const FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult = new FfiConverterObject( uniffiTypeRoomListEntriesWithDynamicAdaptersResultObjectFactory ); -export interface RoomListServiceInterface { +export interface RoomListServiceLike { allRooms(asyncOpts_?: { signal: AbortSignal; - }) /*throws*/ : Promise; - room(roomId: string) /*throws*/ : RoomInterface; - state(listener: RoomListServiceStateListener): TaskHandleInterface; + }) /*throws*/ : Promise; + room(roomId: string) /*throws*/ : RoomLike; + state(listener: RoomListServiceStateListener): TaskHandleLike; subscribeToRooms( roomIds: Array, asyncOpts_?: { signal: AbortSignal } @@ -54457,27 +53390,31 @@ export interface RoomListServiceInterface { delayBeforeShowingInMs: /*u32*/ number, delayBeforeHidingInMs: /*u32*/ number, listener: RoomListServiceSyncIndicatorListener - ): TaskHandleInterface; + ): TaskHandleLike; } +/** + * @deprecated Use `RoomListServiceLike` instead. + */ +export type RoomListServiceInterface = RoomListServiceLike; export class RoomListService extends UniffiAbstractObject - implements RoomListServiceInterface + implements RoomListServiceLike { readonly [uniffiTypeNameSymbol] = 'RoomListService'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeRoomListServiceObjectFactory.bless(pointer); } - public async allRooms(asyncOpts_?: { + async allRooms(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -54488,13 +53425,13 @@ export class RoomListService ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeRoomList.lift.bind( FfiConverterTypeRoomList ), @@ -54512,7 +53449,7 @@ export class RoomListService } } - public room(roomId: string): RoomInterface /*throws*/ { + room(roomId: string): RoomLike /*throws*/ { return FfiConverterTypeRoom.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomListError.lift.bind( @@ -54530,7 +53467,7 @@ export class RoomListService ); } - public state(listener: RoomListServiceStateListener): TaskHandleInterface { + state(listener: RoomListServiceStateListener): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54545,7 +53482,7 @@ export class RoomListService ); } - public async subscribeToRooms( + async subscribeToRooms( roomIds: Array, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -54582,11 +53519,11 @@ export class RoomListService } } - public syncIndicator( + syncIndicator( delayBeforeShowingInMs: /*u32*/ number, delayBeforeHidingInMs: /*u32*/ number, listener: RoomListServiceSyncIndicatorListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54623,10 +53560,10 @@ export class RoomListService } } -const uniffiTypeRoomListServiceObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomListServiceObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomListServiceInterface { + create(pointer: UniffiHandle): RoomListServiceLike { const instance = Object.create(RoomListService.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -54634,7 +53571,7 @@ const uniffiTypeRoomListServiceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_roomlistservice_ffi__bless_pointer( @@ -54645,18 +53582,18 @@ const uniffiTypeRoomListServiceObjectFactory: UniffiObjectFactory @@ -54668,7 +53605,7 @@ const uniffiTypeRoomListServiceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roomlistservice( @@ -54679,7 +53616,7 @@ const uniffiTypeRoomListServiceObjectFactory: UniffiObjectFactory | undefined; } +/** + * @deprecated Use `RoomMembersIteratorLike` instead. + */ +export type RoomMembersIteratorInterface = RoomMembersIteratorLike; export class RoomMembersIterator extends UniffiAbstractObject - implements RoomMembersIteratorInterface + implements RoomMembersIteratorLike { readonly [uniffiTypeNameSymbol] = 'RoomMembersIterator'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeRoomMembersIteratorObjectFactory.bless(pointer); } - public len(): /*u32*/ number { + len(): /*u32*/ number { return FfiConverterUInt32.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54726,7 +53667,7 @@ export class RoomMembersIterator ); } - public nextChunk(chunkSize: /*u32*/ number): Array | undefined { + nextChunk(chunkSize: /*u32*/ number): Array | undefined { return FfiConverterOptionalArrayTypeRoomMember.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -54759,10 +53700,10 @@ export class RoomMembersIterator } } -const uniffiTypeRoomMembersIteratorObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomMembersIteratorObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomMembersIteratorInterface { + create(pointer: UniffiHandle): RoomMembersIteratorLike { const instance = Object.create(RoomMembersIterator.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -54770,7 +53711,7 @@ const uniffiTypeRoomMembersIteratorObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_roommembersiterator_ffi__bless_pointer( @@ -54781,18 +53722,18 @@ const uniffiTypeRoomMembersIteratorObjectFactory: UniffiObjectFactory @@ -54804,7 +53745,7 @@ const uniffiTypeRoomMembersIteratorObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roommembersiterator( @@ -54815,7 +53756,7 @@ const uniffiTypeRoomMembersIteratorObjectFactory: UniffiObjectFactory { @@ -54897,12 +53839,12 @@ export class RoomMessageEventContentWithoutRelation } } -const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjectFactory = (() => { return { create( - pointer: UnsafeMutableRawPointer - ): RoomMessageEventContentWithoutRelationInterface { + pointer: UniffiHandle + ): RoomMessageEventContentWithoutRelationLike { const instance = Object.create( RoomMessageEventContentWithoutRelation.prototype ); @@ -54913,7 +53855,7 @@ const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjec return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_roommessageeventcontentwithoutrelation_ffi__bless_pointer( @@ -54924,13 +53866,11 @@ const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjec ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer( - obj: RoomMessageEventContentWithoutRelationInterface - ): UnsafeMutableRawPointer { + pointer(obj: RoomMessageEventContentWithoutRelationLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } @@ -54938,8 +53878,8 @@ const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjec }, clonePointer( - obj: RoomMessageEventContentWithoutRelationInterface - ): UnsafeMutableRawPointer { + obj: RoomMessageEventContentWithoutRelationLike + ): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -54951,7 +53891,7 @@ const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjec ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation( @@ -54964,7 +53904,7 @@ const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjec isConcreteType( obj: any - ): obj is RoomMessageEventContentWithoutRelationInterface { + ): obj is RoomMessageEventContentWithoutRelationLike { return ( obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'RoomMessageEventContentWithoutRelation' @@ -54972,13 +53912,13 @@ const uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory: UniffiObjec }, }; })(); -// FfiConverter for RoomMessageEventContentWithoutRelationInterface +// FfiConverter for RoomMessageEventContentWithoutRelationLike const FfiConverterTypeRoomMessageEventContentWithoutRelation = new FfiConverterObject( uniffiTypeRoomMessageEventContentWithoutRelationObjectFactory ); -export interface RoomPowerLevelsInterface { +export interface RoomPowerLevelsLike { /** * Returns true if the current user is able to ban in the room. */ @@ -55097,16 +54037,20 @@ export interface RoomPowerLevelsInterface { userPowerLevels(): Map; values(): RoomPowerLevelsValues; } +/** + * @deprecated Use `RoomPowerLevelsLike` instead. + */ +export type RoomPowerLevelsInterface = RoomPowerLevelsLike; export class RoomPowerLevels extends UniffiAbstractObject - implements RoomPowerLevelsInterface + implements RoomPowerLevelsLike { readonly [uniffiTypeNameSymbol] = 'RoomPowerLevels'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -55116,7 +54060,7 @@ export class RoomPowerLevels /** * Returns true if the current user is able to ban in the room. */ - public canOwnUserBan(): boolean { + canOwnUserBan(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55133,7 +54077,7 @@ export class RoomPowerLevels /** * Returns true if the current user is able to invite in the room. */ - public canOwnUserInvite(): boolean { + canOwnUserInvite(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55150,7 +54094,7 @@ export class RoomPowerLevels /** * Returns true if the current user is able to kick in the room. */ - public canOwnUserKick(): boolean { + canOwnUserKick(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55168,7 +54112,7 @@ export class RoomPowerLevels * Returns true if the current user is able to pin or unpin events in the * room. */ - public canOwnUserPinUnpin(): boolean { + canOwnUserPinUnpin(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55186,7 +54130,7 @@ export class RoomPowerLevels * Returns true if the current user user is able to redact messages of * other users in the room. */ - public canOwnUserRedactOther(): boolean { + canOwnUserRedactOther(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55204,7 +54148,7 @@ export class RoomPowerLevels * Returns true if the current user is able to redact their own messages in * the room. */ - public canOwnUserRedactOwn(): boolean { + canOwnUserRedactOwn(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55222,7 +54166,7 @@ export class RoomPowerLevels * Returns true if the current user is able to send a specific message type * in the room. */ - public canOwnUserSendMessage(message: MessageLikeEventType): boolean { + canOwnUserSendMessage(message: MessageLikeEventType): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55241,7 +54185,7 @@ export class RoomPowerLevels * Returns true if the current user is able to send a specific state event * type in the room. */ - public canOwnUserSendState(stateEvent: StateEventType): boolean { + canOwnUserSendState(stateEvent: StateEventType): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55260,7 +54204,7 @@ export class RoomPowerLevels * Returns true if the current user is able to trigger a notification in * the room. */ - public canOwnUserTriggerRoomNotification(): boolean { + canOwnUserTriggerRoomNotification(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55280,7 +54224,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserBan(userId: string): boolean /*throws*/ { + canUserBan(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55304,7 +54248,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserInvite(userId: string): boolean /*throws*/ { + canUserInvite(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55328,7 +54272,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserKick(userId: string): boolean /*throws*/ { + canUserKick(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55352,7 +54296,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserPinUnpin(userId: string): boolean /*throws*/ { + canUserPinUnpin(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55376,7 +54320,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserRedactOther(userId: string): boolean /*throws*/ { + canUserRedactOther(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55400,7 +54344,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserRedactOwn(userId: string): boolean /*throws*/ { + canUserRedactOwn(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55424,7 +54368,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserSendMessage( + canUserSendMessage( userId: string, message: MessageLikeEventType ): boolean /*throws*/ { @@ -55452,7 +54396,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserSendState( + canUserSendState( userId: string, stateEvent: StateEventType ): boolean /*throws*/ { @@ -55480,7 +54424,7 @@ export class RoomPowerLevels * * The call may fail if there is an error in getting the power levels. */ - public canUserTriggerRoomNotification(userId: string): boolean /*throws*/ { + canUserTriggerRoomNotification(userId: string): boolean /*throws*/ { return FfiConverterBool.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -55502,7 +54446,7 @@ export class RoomPowerLevels * Gets a map with the `UserId` of users with power levels other than `0` * and their power level. */ - public userPowerLevels(): Map { + userPowerLevels(): Map { return FfiConverterMapStringInt64.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55516,7 +54460,7 @@ export class RoomPowerLevels ); } - public values(): RoomPowerLevelsValues { + values(): RoomPowerLevelsValues { return FfiConverterTypeRoomPowerLevelsValues.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55548,10 +54492,10 @@ export class RoomPowerLevels } } -const uniffiTypeRoomPowerLevelsObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomPowerLevelsObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomPowerLevelsInterface { + create(pointer: UniffiHandle): RoomPowerLevelsLike { const instance = Object.create(RoomPowerLevels.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -55559,7 +54503,7 @@ const uniffiTypeRoomPowerLevelsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_roompowerlevels_ffi__bless_pointer( @@ -55570,18 +54514,18 @@ const uniffiTypeRoomPowerLevelsObjectFactory: UniffiObjectFactory @@ -55593,7 +54537,7 @@ const uniffiTypeRoomPowerLevelsObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roompowerlevels( @@ -55604,7 +54548,7 @@ const uniffiTypeRoomPowerLevelsObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `RoomPreviewLike` instead. + */ +export type RoomPreviewInterface = RoomPreviewLike; /** * A room preview for a room. It's intended to be used to represent rooms that @@ -55660,13 +54608,13 @@ export interface RoomPreviewInterface { */ export class RoomPreview extends UniffiAbstractObject - implements RoomPreviewInterface + implements RoomPreviewLike { readonly [uniffiTypeNameSymbol] = 'RoomPreview'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -55676,9 +54624,7 @@ export class RoomPreview /** * Forget the room if we had access to it, and it was left or banned. */ - public async forget(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async forget(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -55714,7 +54660,7 @@ export class RoomPreview /** * Returns the room info the preview contains. */ - public info(): RoomPreviewInfo { + info(): RoomPreviewInfo { return FfiConverterTypeRoomPreviewInfo.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -55731,7 +54677,7 @@ export class RoomPreview /** * Get the user who created the invite, if any. */ - public async inviter(asyncOpts_?: { + async inviter(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -55774,9 +54720,7 @@ export class RoomPreview * * Will return an error otherwise. */ - public async leave(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async leave(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -55812,7 +54756,7 @@ export class RoomPreview /** * Get the membership details for the current user. */ - public async ownMembershipDetails(asyncOpts_?: { + async ownMembershipDetails(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -55864,10 +54808,10 @@ export class RoomPreview } } -const uniffiTypeRoomPreviewObjectFactory: UniffiObjectFactory = +const uniffiTypeRoomPreviewObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): RoomPreviewInterface { + create(pointer: UniffiHandle): RoomPreviewLike { const instance = Object.create(RoomPreview.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -55875,7 +54819,7 @@ const uniffiTypeRoomPreviewObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_roompreview_ffi__bless_pointer( @@ -55886,18 +54830,18 @@ const uniffiTypeRoomPreviewObjectFactory: UniffiObjectFactory @@ -55909,7 +54853,7 @@ const uniffiTypeRoomPreviewObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_roompreview( @@ -55920,7 +54864,7 @@ const uniffiTypeRoomPreviewObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `SendAttachmentJoinHandleLike` instead. + */ +export type SendAttachmentJoinHandleInterface = SendAttachmentJoinHandleLike; export class SendAttachmentJoinHandle extends UniffiAbstractObject - implements SendAttachmentJoinHandleInterface + implements SendAttachmentJoinHandleLike { readonly [uniffiTypeNameSymbol] = 'SendAttachmentJoinHandle'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -55968,7 +54916,7 @@ export class SendAttachmentJoinHandle * * A subsequent call to [`Self::join`] will return immediately. */ - public cancel(): void { + cancel(): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( @@ -55985,9 +54933,7 @@ export class SendAttachmentJoinHandle * * If the sending had been cancelled, will return immediately. */ - public async join(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async join(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -56039,12 +54985,10 @@ export class SendAttachmentJoinHandle } } -const uniffiTypeSendAttachmentJoinHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeSendAttachmentJoinHandleObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): SendAttachmentJoinHandleInterface { + create(pointer: UniffiHandle): SendAttachmentJoinHandleLike { const instance = Object.create(SendAttachmentJoinHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -56052,7 +54996,7 @@ const uniffiTypeSendAttachmentJoinHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_sendattachmentjoinhandle_ffi__bless_pointer( @@ -56063,20 +55007,18 @@ const uniffiTypeSendAttachmentJoinHandleObjectFactory: UniffiObjectFactory @@ -56088,7 +55030,7 @@ const uniffiTypeSendAttachmentJoinHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle( @@ -56099,7 +55041,7 @@ const uniffiTypeSendAttachmentJoinHandleObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `SendGalleryJoinHandleLike` instead. + */ +export type SendGalleryJoinHandleInterface = SendGalleryJoinHandleLike; export class SendGalleryJoinHandle extends UniffiAbstractObject - implements SendGalleryJoinHandleInterface + implements SendGalleryJoinHandleLike { readonly [uniffiTypeNameSymbol] = 'SendGalleryJoinHandle'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -56147,7 +55093,7 @@ export class SendGalleryJoinHandle * * A subsequent call to [`Self::join`] will return immediately. */ - public cancel(): void { + cancel(): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( @@ -56164,9 +55110,7 @@ export class SendGalleryJoinHandle * * If the sending had been cancelled, will return immediately. */ - public async join(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async join(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -56218,10 +55162,10 @@ export class SendGalleryJoinHandle } } -const uniffiTypeSendGalleryJoinHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeSendGalleryJoinHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SendGalleryJoinHandleInterface { + create(pointer: UniffiHandle): SendGalleryJoinHandleLike { const instance = Object.create(SendGalleryJoinHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -56229,7 +55173,7 @@ const uniffiTypeSendGalleryJoinHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_sendgalleryjoinhandle_ffi__bless_pointer( @@ -56240,20 +55184,18 @@ const uniffiTypeSendGalleryJoinHandleObjectFactory: UniffiObjectFactory @@ -56265,7 +55207,7 @@ const uniffiTypeSendGalleryJoinHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle( @@ -56276,7 +55218,7 @@ const uniffiTypeSendGalleryJoinHandleObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `SendHandleLike` instead. + */ +export type SendHandleInterface = SendHandleLike; /** * A handle to perform actions onto a local echo. */ -export class SendHandle - extends UniffiAbstractObject - implements SendHandleInterface -{ +export class SendHandle extends UniffiAbstractObject implements SendHandleLike { readonly [uniffiTypeNameSymbol] = 'SendHandle'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -56349,7 +55292,7 @@ export class SendHandle * This has an effect only on the first call; subsequent calls will always * return `false`. */ - public async abort(asyncOpts_?: { + async abort(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56398,7 +55341,7 @@ export class SendHandle * * `transaction_id` - The send queue transaction identifier of the local * echo that should be unwedged. */ - public async tryResend(asyncOpts_?: { + async tryResend(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56451,10 +55394,10 @@ export class SendHandle } } -const uniffiTypeSendHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeSendHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SendHandleInterface { + create(pointer: UniffiHandle): SendHandleLike { const instance = Object.create(SendHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -56462,7 +55405,7 @@ const uniffiTypeSendHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_sendhandle_ffi__bless_pointer( @@ -56473,18 +55416,18 @@ const uniffiTypeSendHandleObjectFactory: UniffiObjectFactory @@ -56496,7 +55439,7 @@ const uniffiTypeSendHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sendhandle( @@ -56507,7 +55450,7 @@ const uniffiTypeSendHandleObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `SessionVerificationControllerLike` instead. + */ +export type SessionVerificationControllerInterface = + SessionVerificationControllerLike; export class SessionVerificationController extends UniffiAbstractObject - implements SessionVerificationControllerInterface + implements SessionVerificationControllerLike { readonly [uniffiTypeNameSymbol] = 'SessionVerificationController'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -56599,7 +55547,7 @@ export class SessionVerificationController /** * Accept the previously acknowledged verification request */ - public async acceptVerificationRequest(asyncOpts_?: { + async acceptVerificationRequest(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56642,7 +55590,7 @@ export class SessionVerificationController * * `sender_id` - The user requesting verification. * * `flow_id` - - The ID that uniquely identifies the verification flow. */ - public async acknowledgeVerificationRequest( + async acknowledgeVerificationRequest( senderId: string, flowId: string, asyncOpts_?: { signal: AbortSignal } @@ -56686,7 +55634,7 @@ export class SessionVerificationController /** * Confirm that the short auth strings match on both sides. */ - public async approveVerification(asyncOpts_?: { + async approveVerification(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56726,7 +55674,7 @@ export class SessionVerificationController /** * Cancel the current verification request */ - public async cancelVerification(asyncOpts_?: { + async cancelVerification(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56766,7 +55714,7 @@ export class SessionVerificationController /** * Reject the short auth string */ - public async declineVerification(asyncOpts_?: { + async declineVerification(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56806,7 +55754,7 @@ export class SessionVerificationController /** * Request verification for the current device */ - public async requestDeviceVerification(asyncOpts_?: { + async requestDeviceVerification(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56846,7 +55794,7 @@ export class SessionVerificationController /** * Request verification for the given user */ - public async requestUserVerification( + async requestUserVerification( userId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -56885,7 +55833,7 @@ export class SessionVerificationController } } - public setDelegate( + setDelegate( delegate: SessionVerificationControllerDelegate | undefined ): void { uniffiCaller.rustCall( @@ -56908,7 +55856,7 @@ export class SessionVerificationController * Transition the current verification request into a SAS verification * flow. */ - public async startSasVerification(asyncOpts_?: { + async startSasVerification(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -56966,12 +55914,10 @@ export class SessionVerificationController } } -const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory = +const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): SessionVerificationControllerInterface { + create(pointer: UniffiHandle): SessionVerificationControllerLike { const instance = Object.create(SessionVerificationController.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -56979,7 +55925,7 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_sessionverificationcontroller_ffi__bless_pointer( @@ -56990,22 +55936,18 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer( - obj: SessionVerificationControllerInterface - ): UnsafeMutableRawPointer { + pointer(obj: SessionVerificationControllerLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer( - obj: SessionVerificationControllerInterface - ): UnsafeMutableRawPointer { + clonePointer(obj: SessionVerificationControllerLike): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -57017,7 +55959,7 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller( @@ -57028,7 +55970,7 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< ); }, - isConcreteType(obj: any): obj is SessionVerificationControllerInterface { + isConcreteType(obj: any): obj is SessionVerificationControllerLike { return ( obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'SessionVerificationController' @@ -57036,32 +55978,36 @@ const uniffiTypeSessionVerificationControllerObjectFactory: UniffiObjectFactory< }, }; })(); -// FfiConverter for SessionVerificationControllerInterface +// FfiConverter for SessionVerificationControllerLike const FfiConverterTypeSessionVerificationController = new FfiConverterObject( uniffiTypeSessionVerificationControllerObjectFactory ); -export interface SessionVerificationEmojiInterface { +export interface SessionVerificationEmojiLike { description(): string; symbol(): string; } +/** + * @deprecated Use `SessionVerificationEmojiLike` instead. + */ +export type SessionVerificationEmojiInterface = SessionVerificationEmojiLike; export class SessionVerificationEmoji extends UniffiAbstractObject - implements SessionVerificationEmojiInterface + implements SessionVerificationEmojiLike { readonly [uniffiTypeNameSymbol] = 'SessionVerificationEmoji'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeSessionVerificationEmojiObjectFactory.bless(pointer); } - public description(): string { + description(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57075,7 +56021,7 @@ export class SessionVerificationEmoji ); } - public symbol(): string { + symbol(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57108,12 +56054,10 @@ export class SessionVerificationEmoji } } -const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory = +const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): SessionVerificationEmojiInterface { + create(pointer: UniffiHandle): SessionVerificationEmojiLike { const instance = Object.create(SessionVerificationEmoji.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -57121,7 +56065,7 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_sessionverificationemoji_ffi__bless_pointer( @@ -57132,20 +56076,18 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory @@ -57157,7 +56099,7 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji( @@ -57168,7 +56110,7 @@ const uniffiTypeSessionVerificationEmojiObjectFactory: UniffiObjectFactory /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -57298,7 +56240,7 @@ export class SpaceRoomList /** * Returns if the room list is currently paginating or not. */ - public paginationState(): SpaceRoomListPaginationState { + paginationState(): SpaceRoomListPaginationState { return FfiConverterTypeSpaceRoomListPaginationState.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57315,7 +56257,7 @@ export class SpaceRoomList /** * Return the current list of rooms. */ - public rooms(): Array { + rooms(): Array { return FfiConverterArrayTypeSpaceRoom.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57332,7 +56274,7 @@ export class SpaceRoomList /** * Returns the space of the room list if known. */ - public space(): SpaceRoom | undefined { + space(): SpaceRoom | undefined { return FfiConverterOptionalTypeSpaceRoom.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57349,9 +56291,9 @@ export class SpaceRoomList /** * Subscribe to pagination updates. */ - public subscribeToPaginationStateUpdates( + subscribeToPaginationStateUpdates( listener: SpaceRoomListPaginationStateListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57371,9 +56313,9 @@ export class SpaceRoomList /** * Subscribes to room list updates. */ - public subscribeToRoomUpdate( + subscribeToRoomUpdate( listener: SpaceRoomListEntriesListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57391,9 +56333,9 @@ export class SpaceRoomList /** * Subscribe to space updates. */ - public subscribeToSpaceUpdates( + subscribeToSpaceUpdates( listener: SpaceRoomListSpaceListener - ): TaskHandleInterface { + ): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -57426,10 +56368,10 @@ export class SpaceRoomList } } -const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory = +const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SpaceRoomListInterface { + create(pointer: UniffiHandle): SpaceRoomListLike { const instance = Object.create(SpaceRoomList.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -57437,7 +56379,7 @@ const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_spaceroomlist_ffi__bless_pointer( @@ -57448,18 +56390,18 @@ const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory @@ -57471,7 +56413,7 @@ const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceroomlist( @@ -57482,7 +56424,7 @@ const uniffiTypeSpaceRoomListObjectFactory: UniffiObjectFactory; + ) /*throws*/ : Promise; removeChildFromSpace( childId: string, spaceId: string, @@ -57555,7 +56497,7 @@ export interface SpaceServiceInterface { spaceRoomList( spaceId: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*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. @@ -57563,8 +56505,12 @@ export interface SpaceServiceInterface { subscribeToJoinedSpaces( listener: SpaceServiceJoinedSpacesListener, asyncOpts_?: { signal: AbortSignal } - ): Promise; + ): Promise; } +/** + * @deprecated Use `SpaceServiceLike` instead. + */ +export type SpaceServiceInterface = SpaceServiceLike; /** * The main entry point into the Spaces facilities. @@ -57575,20 +56521,20 @@ export interface SpaceServiceInterface { */ export class SpaceService extends UniffiAbstractObject - implements SpaceServiceInterface + implements SpaceServiceLike { readonly [uniffiTypeNameSymbol] = 'SpaceService'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeSpaceServiceObjectFactory.bless(pointer); } - public async addChildToSpace( + async addChildToSpace( childId: string, spaceId: string, asyncOpts_?: { signal: AbortSignal } @@ -57634,7 +56580,7 @@ export class SpaceService * Note: Unlike [`Self::joined_spaces()`], this method does not recompute * the space graph, nor does it notify subscribers about changes. */ - public async editableSpaces(asyncOpts_?: { + async editableSpaces(asyncOpts_?: { signal: AbortSignal; }): Promise> { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -57671,7 +56617,7 @@ export class SpaceService /** * Returns all known direct-parents of a given space room ID. */ - public async joinedParentsOfChild( + async joinedParentsOfChild( childId: string, asyncOpts_?: { signal: AbortSignal } ): Promise> /*throws*/ { @@ -57715,7 +56661,7 @@ export class SpaceService * compute the latest version and also notify subscribers if there were * any changes. */ - public async joinedSpaces(asyncOpts_?: { + async joinedSpaces(asyncOpts_?: { signal: AbortSignal; }): Promise> { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -57758,10 +56704,10 @@ export class SpaceService * Once the rooms to be left are chosen the handle can be used to leave * them. */ - public async leaveSpace( + async leaveSpace( spaceId: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -57773,13 +56719,13 @@ export class SpaceService ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeLeaveSpaceHandle.lift.bind( FfiConverterTypeLeaveSpaceHandle ), @@ -57797,7 +56743,7 @@ export class SpaceService } } - public async removeChildFromSpace( + async removeChildFromSpace( childId: string, spaceId: string, asyncOpts_?: { signal: AbortSignal } @@ -57839,10 +56785,10 @@ export class SpaceService /** * Returns a `SpaceRoomList` for the given space ID. */ - public async spaceRoomList( + async spaceRoomList( spaceId: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -57854,13 +56800,13 @@ export class SpaceService ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeSpaceRoomList.lift.bind( FfiConverterTypeSpaceRoomList ), @@ -57882,10 +56828,10 @@ export class SpaceService * 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( + async subscribeToJoinedSpaces( listener: SpaceServiceJoinedSpacesListener, asyncOpts_?: { signal: AbortSignal } - ): Promise { + ): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -57897,13 +56843,13 @@ export class SpaceService ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -57936,10 +56882,10 @@ export class SpaceService } } -const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory = +const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SpaceServiceInterface { + create(pointer: UniffiHandle): SpaceServiceLike { const instance = Object.create(SpaceService.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -57947,7 +56893,7 @@ const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_spaceservice_ffi__bless_pointer( @@ -57958,18 +56904,18 @@ const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory @@ -57981,7 +56927,7 @@ const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_spaceservice( @@ -57992,7 +56938,7 @@ const uniffiTypeSpaceServiceObjectFactory: UniffiObjectFactory { @@ -58087,10 +57037,10 @@ export class Span extends UniffiAbstractObject implements SpanInterface { * will only return a valid span if the `sentry` feature is enabled, * otherwise it will return a noop span. */ - public static newBridgeSpan( + static newBridgeSpan( target: string, parentTraceId: string | undefined - ): SpanInterface { + ): SpanLike { return FfiConverterTypeSpan.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58105,7 +57055,7 @@ export class Span extends UniffiAbstractObject implements SpanInterface { ); } - public enter(): void { + enter(): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_span_enter( @@ -58117,7 +57067,7 @@ export class Span extends UniffiAbstractObject implements SpanInterface { ); } - public exit(): void { + exit(): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_span_exit( @@ -58129,7 +57079,7 @@ export class Span extends UniffiAbstractObject implements SpanInterface { ); } - public isNone(): boolean { + isNone(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58161,9 +57111,9 @@ export class Span extends UniffiAbstractObject implements SpanInterface { } } -const uniffiTypeSpanObjectFactory: UniffiObjectFactory = (() => { +const uniffiTypeSpanObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SpanInterface { + create(pointer: UniffiHandle): SpanLike { const instance = Object.create(Span.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -58171,7 +57121,7 @@ const uniffiTypeSpanObjectFactory: UniffiObjectFactory = (() => { return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_span_ffi__bless_pointer( @@ -58182,18 +57132,18 @@ const uniffiTypeSpanObjectFactory: UniffiObjectFactory = (() => { ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer(obj: SpanInterface): UnsafeMutableRawPointer { + pointer(obj: SpanLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer(obj: SpanInterface): UnsafeMutableRawPointer { + clonePointer(obj: SpanLike): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -58205,7 +57155,7 @@ const uniffiTypeSpanObjectFactory: UniffiObjectFactory = (() => { ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_span( @@ -58216,12 +57166,12 @@ const uniffiTypeSpanObjectFactory: UniffiObjectFactory = (() => { ); }, - isConcreteType(obj: any): obj is SpanInterface { + isConcreteType(obj: any): obj is SpanLike { return obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'Span'; }, }; })(); -// FfiConverter for SpanInterface +// FfiConverter for SpanLike const FfiConverterTypeSpan = new FfiConverterObject( uniffiTypeSpanObjectFactory ); @@ -58229,7 +57179,7 @@ const FfiConverterTypeSpan = new FfiConverterObject( /** * A builder for configuring a Sqlite session store. */ -export interface SqliteStoreBuilderInterface { +export interface SqliteStoreBuilderLike { /** * Set the cache size for the stores. * @@ -58243,7 +57193,7 @@ export interface SqliteStoreBuilderInterface { * * See [`SqliteStoreConfig::cache_size`] to learn more. */ - cacheSize(cacheSize: /*u32*/ number | undefined): SqliteStoreBuilderInterface; + cacheSize(cacheSize: /*u32*/ number | undefined): SqliteStoreBuilderLike; /** * Set the size limit for the SQLite WAL files of stores. * @@ -58252,13 +57202,11 @@ export interface SqliteStoreBuilderInterface { * * See [`SqliteStoreConfig::journal_size_limit`] to learn more. */ - journalSizeLimit( - limit: /*u32*/ number | undefined - ): SqliteStoreBuilderInterface; + journalSizeLimit(limit: /*u32*/ number | undefined): SqliteStoreBuilderLike; /** * Set the passphrase for the stores. */ - passphrase(passphrase: string | undefined): SqliteStoreBuilderInterface; + passphrase(passphrase: string | undefined): SqliteStoreBuilderLike; /** * Set the pool max size for the stores. * @@ -58269,9 +57217,7 @@ export interface SqliteStoreBuilderInterface { * * See [`SqliteStoreConfig::pool_max_size`] to learn more. */ - poolMaxSize( - poolMaxSize: /*u32*/ number | undefined - ): SqliteStoreBuilderInterface; + poolMaxSize(poolMaxSize: /*u32*/ number | undefined): SqliteStoreBuilderLike; /** * Tell the client that the system is memory constrained, like in a * push notification process for example. @@ -58280,19 +57226,23 @@ export interface SqliteStoreBuilderInterface { * the defaults of [`SqliteStoreConfig`]. Please check * [`SqliteStoreConfig::with_low_memory_config`]. */ - systemIsMemoryConstrained(): SqliteStoreBuilderInterface; + systemIsMemoryConstrained(): SqliteStoreBuilderLike; } +/** + * @deprecated Use `SqliteStoreBuilderLike` instead. + */ +export type SqliteStoreBuilderInterface = SqliteStoreBuilderLike; /** * A builder for configuring a Sqlite session store. */ export class SqliteStoreBuilder extends UniffiAbstractObject - implements SqliteStoreBuilderInterface + implements SqliteStoreBuilderLike { readonly [uniffiTypeNameSymbol] = 'SqliteStoreBuilder'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; /** * Construct a [`SqliteStoreBuilder`] and set the paths that the client * will use to store its data and caches. @@ -58331,9 +57281,7 @@ export class SqliteStoreBuilder * * See [`SqliteStoreConfig::cache_size`] to learn more. */ - public cacheSize( - cacheSize: /*u32*/ number | undefined - ): SqliteStoreBuilderInterface { + cacheSize(cacheSize: /*u32*/ number | undefined): SqliteStoreBuilderLike { return FfiConverterTypeSqliteStoreBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58356,9 +57304,7 @@ export class SqliteStoreBuilder * * See [`SqliteStoreConfig::journal_size_limit`] to learn more. */ - public journalSizeLimit( - limit: /*u32*/ number | undefined - ): SqliteStoreBuilderInterface { + journalSizeLimit(limit: /*u32*/ number | undefined): SqliteStoreBuilderLike { return FfiConverterTypeSqliteStoreBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58376,9 +57322,7 @@ export class SqliteStoreBuilder /** * Set the passphrase for the stores. */ - public passphrase( - passphrase: string | undefined - ): SqliteStoreBuilderInterface { + passphrase(passphrase: string | undefined): SqliteStoreBuilderLike { return FfiConverterTypeSqliteStoreBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58403,9 +57347,7 @@ export class SqliteStoreBuilder * * See [`SqliteStoreConfig::pool_max_size`] to learn more. */ - public poolMaxSize( - poolMaxSize: /*u32*/ number | undefined - ): SqliteStoreBuilderInterface { + poolMaxSize(poolMaxSize: /*u32*/ number | undefined): SqliteStoreBuilderLike { return FfiConverterTypeSqliteStoreBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58428,7 +57370,7 @@ export class SqliteStoreBuilder * the defaults of [`SqliteStoreConfig`]. Please check * [`SqliteStoreConfig::with_low_memory_config`]. */ - public systemIsMemoryConstrained(): SqliteStoreBuilderInterface { + systemIsMemoryConstrained(): SqliteStoreBuilderLike { return FfiConverterTypeSqliteStoreBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58460,10 +57402,10 @@ export class SqliteStoreBuilder } } -const uniffiTypeSqliteStoreBuilderObjectFactory: UniffiObjectFactory = +const uniffiTypeSqliteStoreBuilderObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SqliteStoreBuilderInterface { + create(pointer: UniffiHandle): SqliteStoreBuilderLike { const instance = Object.create(SqliteStoreBuilder.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -58471,7 +57413,7 @@ const uniffiTypeSqliteStoreBuilderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_sqlitestorebuilder_ffi__bless_pointer( @@ -58482,18 +57424,18 @@ const uniffiTypeSqliteStoreBuilderObjectFactory: UniffiObjectFactory @@ -58505,7 +57447,7 @@ const uniffiTypeSqliteStoreBuilderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder( @@ -58516,7 +57458,7 @@ const uniffiTypeSqliteStoreBuilderObjectFactory: UniffiObjectFactory /*throws*/ { @@ -58611,7 +57554,7 @@ export class SsoHandler * opened in a web view. Once the web view succeeds, call `finish` with * the callback URL. */ - public url(): string { + url(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58643,10 +57586,10 @@ export class SsoHandler } } -const uniffiTypeSsoHandlerObjectFactory: UniffiObjectFactory = +const uniffiTypeSsoHandlerObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SsoHandlerInterface { + create(pointer: UniffiHandle): SsoHandlerLike { const instance = Object.create(SsoHandler.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -58654,7 +57597,7 @@ const uniffiTypeSsoHandlerObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_ssohandler_ffi__bless_pointer( @@ -58665,18 +57608,18 @@ const uniffiTypeSsoHandlerObjectFactory: UniffiObjectFactory @@ -58688,7 +57631,7 @@ const uniffiTypeSsoHandlerObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_ssohandler( @@ -58699,7 +57642,7 @@ const uniffiTypeSsoHandlerObjectFactory: UniffiObjectFactory; - roomListService(): RoomListServiceInterface; + roomListService(): RoomListServiceLike; start(asyncOpts_?: { signal: AbortSignal }): Promise; - state(listener: SyncServiceStateObserver): TaskHandleInterface; + state(listener: SyncServiceStateObserver): TaskHandleLike; stop(asyncOpts_?: { signal: AbortSignal }): Promise; } +/** + * @deprecated Use `SyncServiceLike` instead. + */ +export type SyncServiceInterface = SyncServiceLike; export class SyncService extends UniffiAbstractObject - implements SyncServiceInterface + implements SyncServiceLike { readonly [uniffiTypeNameSymbol] = 'SyncService'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -58749,9 +57696,7 @@ export class SyncService * 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 { + async expireSessions(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -58781,7 +57726,7 @@ export class SyncService } } - public roomListService(): RoomListServiceInterface { + roomListService(): RoomListServiceLike { return FfiConverterTypeRoomListService.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58795,7 +57740,7 @@ export class SyncService ); } - public async start(asyncOpts_?: { signal: AbortSignal }): Promise { + async start(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -58825,7 +57770,7 @@ export class SyncService } } - public state(listener: SyncServiceStateObserver): TaskHandleInterface { + state(listener: SyncServiceStateObserver): TaskHandleLike { return FfiConverterTypeTaskHandle.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -58840,7 +57785,7 @@ export class SyncService ); } - public async stop(asyncOpts_?: { signal: AbortSignal }): Promise { + async stop(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -58888,10 +57833,10 @@ export class SyncService } } -const uniffiTypeSyncServiceObjectFactory: UniffiObjectFactory = +const uniffiTypeSyncServiceObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SyncServiceInterface { + create(pointer: UniffiHandle): SyncServiceLike { const instance = Object.create(SyncService.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -58899,7 +57844,7 @@ const uniffiTypeSyncServiceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_syncservice_ffi__bless_pointer( @@ -58910,18 +57855,18 @@ const uniffiTypeSyncServiceObjectFactory: UniffiObjectFactory @@ -58933,7 +57878,7 @@ const uniffiTypeSyncServiceObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_syncservice( @@ -58944,7 +57889,7 @@ const uniffiTypeSyncServiceObjectFactory: UniffiObjectFactory; - withCrossProcessLock(): SyncServiceBuilderInterface; + }) /*throws*/ : Promise; + withCrossProcessLock(): SyncServiceBuilderLike; /** * Enable the "offline" mode for the [`SyncService`]. */ - withOfflineMode(): SyncServiceBuilderInterface; - withSharePos(enable: boolean): SyncServiceBuilderInterface; + withOfflineMode(): SyncServiceBuilderLike; + withSharePos(enable: boolean): SyncServiceBuilderLike; } +/** + * @deprecated Use `SyncServiceBuilderLike` instead. + */ +export type SyncServiceBuilderInterface = SyncServiceBuilderLike; export class SyncServiceBuilder extends UniffiAbstractObject - implements SyncServiceBuilderInterface + implements SyncServiceBuilderLike { readonly [uniffiTypeNameSymbol] = 'SyncServiceBuilder'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeSyncServiceBuilderObjectFactory.bless(pointer); } - public async finish(asyncOpts_?: { + async finish(asyncOpts_?: { signal: AbortSignal; - }): Promise /*throws*/ { + }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -58997,13 +57946,13 @@ export class SyncServiceBuilder ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeSyncService.lift.bind( FfiConverterTypeSyncService ), @@ -59021,7 +57970,7 @@ export class SyncServiceBuilder } } - public withCrossProcessLock(): SyncServiceBuilderInterface { + withCrossProcessLock(): SyncServiceBuilderLike { return FfiConverterTypeSyncServiceBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -59038,7 +57987,7 @@ export class SyncServiceBuilder /** * Enable the "offline" mode for the [`SyncService`]. */ - public withOfflineMode(): SyncServiceBuilderInterface { + withOfflineMode(): SyncServiceBuilderLike { return FfiConverterTypeSyncServiceBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -59052,7 +58001,7 @@ export class SyncServiceBuilder ); } - public withSharePos(enable: boolean): SyncServiceBuilderInterface { + withSharePos(enable: boolean): SyncServiceBuilderLike { return FfiConverterTypeSyncServiceBuilder.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -59085,10 +58034,10 @@ export class SyncServiceBuilder } } -const uniffiTypeSyncServiceBuilderObjectFactory: UniffiObjectFactory = +const uniffiTypeSyncServiceBuilderObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): SyncServiceBuilderInterface { + create(pointer: UniffiHandle): SyncServiceBuilderLike { const instance = Object.create(SyncServiceBuilder.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -59096,7 +58045,7 @@ const uniffiTypeSyncServiceBuilderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_syncservicebuilder_ffi__bless_pointer( @@ -59107,18 +58056,18 @@ const uniffiTypeSyncServiceBuilderObjectFactory: UniffiObjectFactory @@ -59130,7 +58079,7 @@ const uniffiTypeSyncServiceBuilderObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder( @@ -59141,7 +58090,7 @@ const uniffiTypeSyncServiceBuilderObjectFactory: UniffiObjectFactory { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( @@ -59204,7 +58154,7 @@ export class TaskHandle /** * Check whether the handle is finished. */ - public isFinished(): boolean { + isFinished(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -59236,10 +58186,10 @@ export class TaskHandle } } -const uniffiTypeTaskHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeTaskHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): TaskHandleInterface { + create(pointer: UniffiHandle): TaskHandleLike { const instance = Object.create(TaskHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -59247,7 +58197,7 @@ const uniffiTypeTaskHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_taskhandle_ffi__bless_pointer( @@ -59258,18 +58208,18 @@ const uniffiTypeTaskHandleObjectFactory: UniffiObjectFactory @@ -59281,7 +58231,7 @@ const uniffiTypeTaskHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_taskhandle( @@ -59292,7 +58242,7 @@ const uniffiTypeTaskHandleObjectFactory: UniffiObjectFactory { @@ -59339,7 +58293,7 @@ export class ThreadSummary ); } - public numReplies(): /*u64*/ bigint { + numReplies(): /*u64*/ bigint { return FfiConverterUInt64.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -59371,10 +58325,10 @@ export class ThreadSummary } } -const uniffiTypeThreadSummaryObjectFactory: UniffiObjectFactory = +const uniffiTypeThreadSummaryObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): ThreadSummaryInterface { + create(pointer: UniffiHandle): ThreadSummaryLike { const instance = Object.create(ThreadSummary.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -59382,7 +58336,7 @@ const uniffiTypeThreadSummaryObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_threadsummary_ffi__bless_pointer( @@ -59393,18 +58347,18 @@ const uniffiTypeThreadSummaryObjectFactory: UniffiObjectFactory @@ -59416,7 +58370,7 @@ const uniffiTypeThreadSummaryObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_threadsummary( @@ -59427,7 +58381,7 @@ const uniffiTypeThreadSummaryObjectFactory: UniffiObjectFactory; + ): Promise; createMessageContent( msgType: MessageType - ): RoomMessageEventContentWithoutRelationInterface | undefined; + ): RoomMessageEventContentWithoutRelationLike | undefined; createPoll( question: string, answers: Array, @@ -59509,7 +58463,7 @@ export interface TimelineInterface { loadReplyDetails( eventIdStr: string, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Mark the timeline as read by attempting to send a read receipt on the * latest visible event. @@ -59585,26 +58539,22 @@ export interface TimelineInterface { * happened yet. */ send( - msg: RoomMessageEventContentWithoutRelationInterface, + msg: RoomMessageEventContentWithoutRelationLike, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; sendAudio( params: UploadParameters, audioInfo: AudioInfo - ) /*throws*/ : SendAttachmentJoinHandleInterface; + ) /*throws*/ : SendAttachmentJoinHandleLike; sendFile( params: UploadParameters, fileInfo: FileInfo - ) /*throws*/ : SendAttachmentJoinHandleInterface; - sendGallery( - params: GalleryUploadParameters, - itemInfos: Array - ) /*throws*/ : SendGalleryJoinHandleInterface; + ) /*throws*/ : SendAttachmentJoinHandleLike; sendImage( params: UploadParameters, thumbnailSource: UploadSource | undefined, imageInfo: ImageInfo - ) /*throws*/ : SendAttachmentJoinHandleInterface; + ) /*throws*/ : SendAttachmentJoinHandleLike; sendLocation( body: string, geoUri: string, @@ -59632,7 +58582,7 @@ export interface TimelineInterface { * inside the thread. */ sendReply( - msg: RoomMessageEventContentWithoutRelationInterface, + msg: RoomMessageEventContentWithoutRelationLike, eventId: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; @@ -59640,16 +58590,16 @@ export interface TimelineInterface { params: UploadParameters, thumbnailSource: UploadSource | undefined, videoInfo: VideoInfo - ) /*throws*/ : SendAttachmentJoinHandleInterface; + ) /*throws*/ : SendAttachmentJoinHandleLike; sendVoiceMessage( params: UploadParameters, audioInfo: AudioInfo, waveform: Array - ) /*throws*/ : SendAttachmentJoinHandleInterface; + ) /*throws*/ : SendAttachmentJoinHandleLike; subscribeToBackPaginationStatus( listener: PaginationStatusListener, asyncOpts_?: { signal: AbortSignal } - ) /*throws*/ : Promise; + ) /*throws*/ : Promise; /** * Toggle a reaction on an event. * @@ -59681,27 +58631,32 @@ export interface TimelineInterface { eventId: string, asyncOpts_?: { signal: AbortSignal } ) /*throws*/ : Promise; + sendGallery( + params: GalleryUploadParameters, + itemInfos: Array + ) /*throws*/ : SendGalleryJoinHandleLike; } +/** + * @deprecated Use `TimelineLike` instead. + */ +export type TimelineInterface = TimelineLike; -export class Timeline - extends UniffiAbstractObject - implements TimelineInterface -{ +export class Timeline extends UniffiAbstractObject implements TimelineLike { readonly [uniffiTypeNameSymbol] = 'Timeline'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeTimelineObjectFactory.bless(pointer); } - public async addListener( + async addListener( listener: TimelineListener, asyncOpts_?: { signal: AbortSignal } - ): Promise { + ): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -59713,13 +58668,13 @@ export class Timeline ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -59734,9 +58689,9 @@ export class Timeline } } - public createMessageContent( + createMessageContent( msgType: MessageType - ): RoomMessageEventContentWithoutRelationInterface | undefined { + ): RoomMessageEventContentWithoutRelationLike | undefined { return FfiConverterOptionalTypeRoomMessageEventContentWithoutRelation.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -59751,7 +58706,7 @@ export class Timeline ); } - public async createPoll( + async createPoll( question: string, answers: Array, maxSelections: /*u8*/ number, @@ -59804,7 +58759,7 @@ export class Timeline * Returns whether the edit did happen. It can only return false for * local events that are being processed. */ - public async edit( + async edit( eventOrTransactionId: EventOrTransactionId, newContent: EditedContent, asyncOpts_?: { signal: AbortSignal } @@ -59843,7 +58798,7 @@ export class Timeline } } - public async endPoll( + async endPoll( pollStartEventId: string, text: string, asyncOpts_?: { signal: AbortSignal } @@ -59882,7 +58837,7 @@ export class Timeline } } - public async fetchDetailsForEvent( + async fetchDetailsForEvent( eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -59919,9 +58874,7 @@ export class Timeline } } - public async fetchMembers(asyncOpts_?: { - signal: AbortSignal; - }): Promise { + async fetchMembers(asyncOpts_?: { signal: AbortSignal }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -59961,7 +58914,7 @@ export class Timeline * possible, instead of just storing IDs and coming back to the timeline * object to look up items. */ - public async getEventTimelineItemByEventId( + async getEventTimelineItemByEventId( eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60003,7 +58956,7 @@ export class Timeline /** * Returns the latest [`EventId`] in the timeline. */ - public async latestEventId(asyncOpts_?: { + async latestEventId(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -60043,10 +58996,10 @@ export class Timeline * This will return an `InReplyToDetails` object that contains the details * which will either be ready or an error. */ - public async loadReplyDetails( + async loadReplyDetails( eventIdStr: string, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -60058,13 +59011,13 @@ export class Timeline ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeInReplyToDetails.lift.bind( FfiConverterTypeInReplyToDetails ), @@ -60099,7 +59052,7 @@ export class Timeline * reply also belongs to the unthreaded timeline. Otherwise the receipt * thread will be determined based on the timeline's focus kind. */ - public async markAsRead( + async markAsRead( receiptType: ReceiptType, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60141,7 +59094,7 @@ export class Timeline * * Returns whether we hit the start of the timeline or not. */ - public async paginateBackwards( + async paginateBackwards( numEvents: /*u16*/ number, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60183,7 +59136,7 @@ export class Timeline * * Returns whether we hit the end of the timeline or not. */ - public async paginateForwards( + async paginateForwards( numEvents: /*u16*/ number, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60227,7 +59180,7 @@ export class Timeline * Returns `true` if we sent the request, `false` if the event was already * pinned. */ - public async pinEvent( + async pinEvent( eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60275,7 +59228,7 @@ export class Timeline * * Will return an error if the event couldn't be redacted. */ - public async redactEvent( + async redactEvent( eventOrTransactionId: EventOrTransactionId, reason: string | undefined, asyncOpts_?: { signal: AbortSignal } @@ -60314,7 +59267,7 @@ export class Timeline } } - public retryDecryption(sessionIds: Array): void { + retryDecryption(sessionIds: Array): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => { nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( @@ -60334,10 +59287,10 @@ export class Timeline * Returns an abort handle that allows to abort sending, if it hasn't * happened yet. */ - public async send( - msg: RoomMessageEventContentWithoutRelationInterface, + async send( + msg: RoomMessageEventContentWithoutRelationLike, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -60349,13 +59302,13 @@ export class Timeline ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeSendHandle.lift.bind( FfiConverterTypeSendHandle ), @@ -60373,10 +59326,10 @@ export class Timeline } } - public sendAudio( + sendAudio( params: UploadParameters, audioInfo: AudioInfo - ): SendAttachmentJoinHandleInterface /*throws*/ { + ): SendAttachmentJoinHandleLike /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomError.lift.bind( @@ -60395,10 +59348,10 @@ export class Timeline ); } - public sendFile( + sendFile( params: UploadParameters, fileInfo: FileInfo - ): SendAttachmentJoinHandleInterface /*throws*/ { + ): SendAttachmentJoinHandleLike /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomError.lift.bind( @@ -60417,33 +59370,11 @@ export class Timeline ); } - public sendGallery( - params: GalleryUploadParameters, - itemInfos: Array - ): SendGalleryJoinHandleInterface /*throws*/ { - return FfiConverterTypeSendGalleryJoinHandle.lift( - uniffiCaller.rustCallWithError( - /*liftError:*/ FfiConverterTypeRoomError.lift.bind( - FfiConverterTypeRoomError - ), - /*caller:*/ (callStatus) => { - return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( - uniffiTypeTimelineObjectFactory.clonePointer(this), - FfiConverterTypeGalleryUploadParameters.lower(params), - FfiConverterArrayTypeGalleryItemInfo.lower(itemInfos), - callStatus - ); - }, - /*liftString:*/ FfiConverterString.lift - ) - ); - } - - public sendImage( + sendImage( params: UploadParameters, thumbnailSource: UploadSource | undefined, imageInfo: ImageInfo - ): SendAttachmentJoinHandleInterface /*throws*/ { + ): SendAttachmentJoinHandleLike /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomError.lift.bind( @@ -60463,7 +59394,7 @@ export class Timeline ); } - public async sendLocation( + async sendLocation( body: string, geoUri: string, description: string | undefined, @@ -60510,7 +59441,7 @@ export class Timeline } } - public async sendPollResponse( + async sendPollResponse( pollStartEventId: string, answers: Array, asyncOpts_?: { signal: AbortSignal } @@ -60549,7 +59480,7 @@ export class Timeline } } - public async sendReadReceipt( + async sendReadReceipt( receiptType: ReceiptType, eventId: string, asyncOpts_?: { signal: AbortSignal } @@ -60595,8 +59526,8 @@ export class Timeline * reply so that clients that support threads can render the reply * inside the thread. */ - public async sendReply( - msg: RoomMessageEventContentWithoutRelationInterface, + async sendReply( + msg: RoomMessageEventContentWithoutRelationLike, eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60634,11 +59565,11 @@ export class Timeline } } - public sendVideo( + sendVideo( params: UploadParameters, thumbnailSource: UploadSource | undefined, videoInfo: VideoInfo - ): SendAttachmentJoinHandleInterface /*throws*/ { + ): SendAttachmentJoinHandleLike /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomError.lift.bind( @@ -60658,11 +59589,11 @@ export class Timeline ); } - public sendVoiceMessage( + sendVoiceMessage( params: UploadParameters, audioInfo: AudioInfo, waveform: Array - ): SendAttachmentJoinHandleInterface /*throws*/ { + ): SendAttachmentJoinHandleLike /*throws*/ { return FfiConverterTypeSendAttachmentJoinHandle.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeRoomError.lift.bind( @@ -60682,10 +59613,10 @@ export class Timeline ); } - public async subscribeToBackPaginationStatus( + async subscribeToBackPaginationStatus( listener: PaginationStatusListener, asyncOpts_?: { signal: AbortSignal } - ): Promise /*throws*/ { + ): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -60697,13 +59628,13 @@ export class Timeline ); }, /*pollFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_poll_u64, /*cancelFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_cancel_u64, /*completeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_complete_u64, /*freeFunc:*/ nativeModule() - .ubrn_ffi_matrix_sdk_ffi_rust_future_free_pointer, + .ubrn_ffi_matrix_sdk_ffi_rust_future_free_u64, /*liftFunc:*/ FfiConverterTypeTaskHandle.lift.bind( FfiConverterTypeTaskHandle ), @@ -60736,7 +59667,7 @@ export class Timeline * * Returns `true` if the reaction was added, `false` if it was removed. */ - public async toggleReaction( + async toggleReaction( itemId: EventOrTransactionId, key: string, asyncOpts_?: { signal: AbortSignal } @@ -60782,7 +59713,7 @@ export class Timeline * Returns `true` if we sent the request, `false` if the event wasn't * pinned */ - public async unpinEvent( + async unpinEvent( eventId: string, asyncOpts_?: { signal: AbortSignal } ): Promise /*throws*/ { @@ -60819,6 +59750,28 @@ export class Timeline } } + sendGallery( + params: GalleryUploadParameters, + itemInfos: Array + ): SendGalleryJoinHandleLike /*throws*/ { + return FfiConverterTypeSendGalleryJoinHandle.lift( + uniffiCaller.rustCallWithError( + /*liftError:*/ FfiConverterTypeRoomError.lift.bind( + FfiConverterTypeRoomError + ), + /*caller:*/ (callStatus) => { + return nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( + uniffiTypeTimelineObjectFactory.clonePointer(this), + FfiConverterTypeGalleryUploadParameters.lower(params), + FfiConverterArrayTypeGalleryItemInfo.lower(itemInfos), + callStatus + ); + }, + /*liftString:*/ FfiConverterString.lift + ) + ); + } + /** * {@inheritDoc uniffi-bindgen-react-native#UniffiAbstractObject.uniffiDestroy} */ @@ -60837,10 +59790,10 @@ export class Timeline } } -const uniffiTypeTimelineObjectFactory: UniffiObjectFactory = +const uniffiTypeTimelineObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): TimelineInterface { + create(pointer: UniffiHandle): TimelineLike { const instance = Object.create(Timeline.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -60848,7 +59801,7 @@ const uniffiTypeTimelineObjectFactory: UniffiObjectFactory = return instance; }, - bless(p: UnsafeMutableRawPointer): UniffiRustArcPtr { + bless(p: UniffiHandle): UniffiGcObject { return uniffiCaller.rustCall( /*caller:*/ (status) => nativeModule().ubrn_uniffi_internal_fn_method_timeline_ffi__bless_pointer( @@ -60859,18 +59812,18 @@ const uniffiTypeTimelineObjectFactory: UniffiObjectFactory = ); }, - unbless(ptr: UniffiRustArcPtr) { + unbless(ptr: UniffiGcObject) { ptr.markDestroyed(); }, - pointer(obj: TimelineInterface): UnsafeMutableRawPointer { + pointer(obj: TimelineLike): UniffiHandle { if ((obj as any)[destructorGuardSymbol] === undefined) { throw new UniffiInternalError.UnexpectedNullPointer(); } return (obj as any)[pointerLiteralSymbol]; }, - clonePointer(obj: TimelineInterface): UnsafeMutableRawPointer { + clonePointer(obj: TimelineLike): UniffiHandle { const pointer = this.pointer(obj); return uniffiCaller.rustCall( /*caller:*/ (callStatus) => @@ -60882,7 +59835,7 @@ const uniffiTypeTimelineObjectFactory: UniffiObjectFactory = ); }, - freePointer(pointer: UnsafeMutableRawPointer): void { + freePointer(pointer: UniffiHandle): void { uniffiCaller.rustCall( /*caller:*/ (callStatus) => nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_timeline( @@ -60893,19 +59846,19 @@ const uniffiTypeTimelineObjectFactory: UniffiObjectFactory = ); }, - isConcreteType(obj: any): obj is TimelineInterface { + isConcreteType(obj: any): obj is TimelineLike { return ( obj[destructorGuardSymbol] && obj[uniffiTypeNameSymbol] === 'Timeline' ); }, }; })(); -// FfiConverter for TimelineInterface +// FfiConverter for TimelineLike const FfiConverterTypeTimeline = new FfiConverterObject( uniffiTypeTimelineObjectFactory ); -export interface TimelineEventInterface { +export interface TimelineEventLike { eventId(): string; eventType() /*throws*/ : TimelineEventType; senderId(): string; @@ -60916,23 +59869,27 @@ export interface TimelineEventInterface { threadRootEventId(): string | undefined; timestamp(): Timestamp; } +/** + * @deprecated Use `TimelineEventLike` instead. + */ +export type TimelineEventInterface = TimelineEventLike; export class TimelineEvent extends UniffiAbstractObject - implements TimelineEventInterface + implements TimelineEventLike { readonly [uniffiTypeNameSymbol] = 'TimelineEvent'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeTimelineEventObjectFactory.bless(pointer); } - public eventId(): string { + eventId(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -60946,7 +59903,7 @@ export class TimelineEvent ); } - public eventType(): TimelineEventType /*throws*/ { + eventType(): TimelineEventType /*throws*/ { return FfiConverterTypeTimelineEventType.lift( uniffiCaller.rustCallWithError( /*liftError:*/ FfiConverterTypeClientError.lift.bind( @@ -60963,7 +59920,7 @@ export class TimelineEvent ); } - public senderId(): string { + senderId(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -60981,7 +59938,7 @@ export class TimelineEvent * Returns the thread root event id for the event, if it's part of a * thread. */ - public threadRootEventId(): string | undefined { + threadRootEventId(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -60995,7 +59952,7 @@ export class TimelineEvent ); } - public timestamp(): Timestamp { + timestamp(): Timestamp { return FfiConverterTypeTimestamp.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61027,10 +59984,10 @@ export class TimelineEvent } } -const uniffiTypeTimelineEventObjectFactory: UniffiObjectFactory = +const uniffiTypeTimelineEventObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): TimelineEventInterface { + create(pointer: UniffiHandle): TimelineEventLike { const instance = Object.create(TimelineEvent.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -61038,7 +59995,7 @@ const uniffiTypeTimelineEventObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_timelineevent_ffi__bless_pointer( @@ -61049,18 +60006,18 @@ const uniffiTypeTimelineEventObjectFactory: UniffiObjectFactory @@ -61072,7 +60029,7 @@ const uniffiTypeTimelineEventObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineevent( @@ -61083,7 +60040,7 @@ const uniffiTypeTimelineEventObjectFactory: UniffiObjectFactory - ): TimelineEventTypeFilterInterface { + ): TimelineEventTypeFilterLike { return FfiConverterTypeTimelineEventTypeFilter.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61129,9 +60090,9 @@ export class TimelineEventTypeFilter ); } - public static include( + static include( eventTypes: Array - ): TimelineEventTypeFilterInterface { + ): TimelineEventTypeFilterLike { return FfiConverterTypeTimelineEventTypeFilter.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61164,12 +60125,10 @@ export class TimelineEventTypeFilter } } -const uniffiTypeTimelineEventTypeFilterObjectFactory: UniffiObjectFactory = +const uniffiTypeTimelineEventTypeFilterObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): TimelineEventTypeFilterInterface { + create(pointer: UniffiHandle): TimelineEventTypeFilterLike { const instance = Object.create(TimelineEventTypeFilter.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -61177,7 +60136,7 @@ const uniffiTypeTimelineEventTypeFilterObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_timelineeventtypefilter_ffi__bless_pointer( @@ -61188,20 +60147,18 @@ const uniffiTypeTimelineEventTypeFilterObjectFactory: UniffiObjectFactory @@ -61213,7 +60170,7 @@ const uniffiTypeTimelineEventTypeFilterObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter( @@ -61224,7 +60181,7 @@ const uniffiTypeTimelineEventTypeFilterObjectFactory: UniffiObjectFactory { @@ -61276,7 +60237,7 @@ export class TimelineItem ); } - public asVirtual(): VirtualTimelineItem | undefined { + asVirtual(): VirtualTimelineItem | undefined { return FfiConverterOptionalTypeVirtualTimelineItem.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61290,7 +60251,7 @@ export class TimelineItem ); } - public fmtDebug(): string { + fmtDebug(): string { return FfiConverterString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61307,7 +60268,7 @@ export class TimelineItem /** * An opaque unique identifier for this timeline item. */ - public uniqueId(): TimelineUniqueId { + uniqueId(): TimelineUniqueId { return FfiConverterTypeTimelineUniqueId.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61339,10 +60300,10 @@ export class TimelineItem } } -const uniffiTypeTimelineItemObjectFactory: UniffiObjectFactory = +const uniffiTypeTimelineItemObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): TimelineItemInterface { + create(pointer: UniffiHandle): TimelineItemLike { const instance = Object.create(TimelineItem.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -61350,7 +60311,7 @@ const uniffiTypeTimelineItemObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_timelineitem_ffi__bless_pointer( @@ -61361,18 +60322,18 @@ const uniffiTypeTimelineItemObjectFactory: UniffiObjectFactory @@ -61384,7 +60345,7 @@ const uniffiTypeTimelineItemObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_timelineitem( @@ -61395,7 +60356,7 @@ const uniffiTypeTimelineItemObjectFactory: UniffiObjectFactory { @@ -61443,7 +60408,7 @@ export class UnreadNotificationsCount ); } - public highlightCount(): /*u32*/ number { + highlightCount(): /*u32*/ number { return FfiConverterUInt32.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61457,7 +60422,7 @@ export class UnreadNotificationsCount ); } - public notificationCount(): /*u32*/ number { + notificationCount(): /*u32*/ number { return FfiConverterUInt32.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61490,12 +60455,10 @@ export class UnreadNotificationsCount } } -const uniffiTypeUnreadNotificationsCountObjectFactory: UniffiObjectFactory = +const uniffiTypeUnreadNotificationsCountObjectFactory: UniffiObjectFactory = (() => { return { - create( - pointer: UnsafeMutableRawPointer - ): UnreadNotificationsCountInterface { + create(pointer: UniffiHandle): UnreadNotificationsCountLike { const instance = Object.create(UnreadNotificationsCount.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -61503,7 +60466,7 @@ const uniffiTypeUnreadNotificationsCountObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_unreadnotificationscount_ffi__bless_pointer( @@ -61514,20 +60477,18 @@ const uniffiTypeUnreadNotificationsCountObjectFactory: UniffiObjectFactory @@ -61539,7 +60500,7 @@ const uniffiTypeUnreadNotificationsCountObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount( @@ -61550,7 +60511,7 @@ const uniffiTypeUnreadNotificationsCountObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `UserIdentityLike` instead. + */ +export type UserIdentityInterface = UserIdentityLike; /** * The E2EE identity of a user. */ export class UserIdentity extends UniffiAbstractObject - implements UserIdentityInterface + implements UserIdentityLike { readonly [uniffiTypeNameSymbol] = 'UserIdentity'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -61644,7 +60609,7 @@ export class UserIdentity /** * Was this identity previously verified, and is no longer? */ - public hasVerificationViolation(): boolean { + hasVerificationViolation(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61664,7 +60629,7 @@ export class UserIdentity * If the identity belongs to another user, our own user identity needs to * be verified as well for the identity to be considered to be verified. */ - public isVerified(): boolean { + isVerified(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61686,7 +60651,7 @@ export class UserIdentity * * Returns None if the master key does not actually contain any keys. */ - public masterKey(): string | undefined { + masterKey(): string | undefined { return FfiConverterOptionalString.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61716,9 +60681,7 @@ export class UserIdentity * UIs should display a warning to the user when encountering an identity * which is not verified and is in pin violation. */ - public async pin(asyncOpts_?: { - signal: AbortSignal; - }): Promise /*throws*/ { + async pin(asyncOpts_?: { signal: AbortSignal }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; try { return await uniffiRustCallAsync( @@ -61757,7 +60720,7 @@ export class UserIdentity * To reset this latch back to `false`, one must call * [`UserIdentity::withdraw_verification()`]. */ - public wasPreviouslyVerified(): boolean { + wasPreviouslyVerified(): boolean { return FfiConverterBool.lift( uniffiCaller.rustCall( /*caller:*/ (callStatus) => { @@ -61778,7 +60741,7 @@ export class UserIdentity * reported to the user. In order to remove this notice users have to * verify again or to withdraw the verification requirement. */ - public async withdrawVerification(asyncOpts_?: { + async withdrawVerification(asyncOpts_?: { signal: AbortSignal; }): Promise /*throws*/ { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -61831,10 +60794,10 @@ export class UserIdentity } } -const uniffiTypeUserIdentityObjectFactory: UniffiObjectFactory = +const uniffiTypeUserIdentityObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): UserIdentityInterface { + create(pointer: UniffiHandle): UserIdentityLike { const instance = Object.create(UserIdentity.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -61842,7 +60805,7 @@ const uniffiTypeUserIdentityObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_useridentity_ffi__bless_pointer( @@ -61853,18 +60816,18 @@ const uniffiTypeUserIdentityObjectFactory: UniffiObjectFactory @@ -61876,7 +60839,7 @@ const uniffiTypeUserIdentityObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_useridentity( @@ -61887,7 +60850,7 @@ const uniffiTypeUserIdentityObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `WidgetDriverLike` instead. + */ +export type WidgetDriverInterface = WidgetDriverLike; /** * An object that handles all interactions of a widget living inside a webview @@ -61918,21 +60885,21 @@ export interface WidgetDriverInterface { */ export class WidgetDriver extends UniffiAbstractObject - implements WidgetDriverInterface + implements WidgetDriverLike { readonly [uniffiTypeNameSymbol] = 'WidgetDriver'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = uniffiTypeWidgetDriverObjectFactory.bless(pointer); } - public async run( - room: RoomInterface, + async run( + room: RoomLike, capabilitiesProvider: WidgetCapabilitiesProvider, asyncOpts_?: { signal: AbortSignal } ): Promise { @@ -61987,10 +60954,10 @@ export class WidgetDriver } } -const uniffiTypeWidgetDriverObjectFactory: UniffiObjectFactory = +const uniffiTypeWidgetDriverObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): WidgetDriverInterface { + create(pointer: UniffiHandle): WidgetDriverLike { const instance = Object.create(WidgetDriver.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -61998,7 +60965,7 @@ const uniffiTypeWidgetDriverObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_widgetdriver_ffi__bless_pointer( @@ -62009,18 +60976,18 @@ const uniffiTypeWidgetDriverObjectFactory: UniffiObjectFactory @@ -62032,7 +60999,7 @@ const uniffiTypeWidgetDriverObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_widgetdriver( @@ -62043,7 +61010,7 @@ const uniffiTypeWidgetDriverObjectFactory: UniffiObjectFactory; } +/** + * @deprecated Use `WidgetDriverHandleLike` instead. + */ +export type WidgetDriverHandleInterface = WidgetDriverHandleLike; /** * A handle that encapsulates the communication between a widget driver and the @@ -62082,13 +61053,13 @@ export interface WidgetDriverHandleInterface { */ export class WidgetDriverHandle extends UniffiAbstractObject - implements WidgetDriverHandleInterface + implements WidgetDriverHandleLike { readonly [uniffiTypeNameSymbol] = 'WidgetDriverHandle'; - readonly [destructorGuardSymbol]: UniffiRustArcPtr; - readonly [pointerLiteralSymbol]: UnsafeMutableRawPointer; + readonly [destructorGuardSymbol]: UniffiGcObject; + readonly [pointerLiteralSymbol]: UniffiHandle; // No primary constructor declared for this class. - private constructor(pointer: UnsafeMutableRawPointer) { + private constructor(pointer: UniffiHandle) { super(); this[pointerLiteralSymbol] = pointer; this[destructorGuardSymbol] = @@ -62102,7 +61073,7 @@ export class WidgetDriverHandle * * Returns `None` if the widget driver is no longer running. */ - public async recv(asyncOpts_?: { + async recv(asyncOpts_?: { signal: AbortSignal; }): Promise { const __stack = uniffiIsDebug ? new Error().stack : undefined; @@ -62140,7 +61111,7 @@ export class WidgetDriverHandle * * Returns `false` if the widget driver is no longer running. */ - public async send( + async send( msg: string, asyncOpts_?: { signal: AbortSignal } ): Promise { @@ -62192,10 +61163,10 @@ export class WidgetDriverHandle } } -const uniffiTypeWidgetDriverHandleObjectFactory: UniffiObjectFactory = +const uniffiTypeWidgetDriverHandleObjectFactory: UniffiObjectFactory = (() => { return { - create(pointer: UnsafeMutableRawPointer): WidgetDriverHandleInterface { + create(pointer: UniffiHandle): WidgetDriverHandleLike { const instance = Object.create(WidgetDriverHandle.prototype); instance[pointerLiteralSymbol] = pointer; instance[destructorGuardSymbol] = this.bless(pointer); @@ -62203,7 +61174,7 @@ const uniffiTypeWidgetDriverHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_internal_fn_method_widgetdriverhandle_ffi__bless_pointer( @@ -62214,18 +61185,18 @@ const uniffiTypeWidgetDriverHandleObjectFactory: UniffiObjectFactory @@ -62237,7 +61208,7 @@ const uniffiTypeWidgetDriverHandleObjectFactory: UniffiObjectFactory nativeModule().ubrn_uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle( @@ -62248,7 +61219,7 @@ const uniffiTypeWidgetDriverHandleObjectFactory: UniffiObjectFactory +// FfiConverter for Array const FfiConverterArrayTypeRoom = new FfiConverterArray(FfiConverterTypeRoom); -// FfiConverter for Array +// FfiConverter for Array const FfiConverterArrayTypeSessionVerificationEmoji = new FfiConverterArray( FfiConverterTypeSessionVerificationEmoji ); -// FfiConverter for Array +// FfiConverter for Array const FfiConverterArrayTypeTimelineItem = new FfiConverterArray( FfiConverterTypeTimelineItem ); @@ -62852,7 +61823,7 @@ const FfiConverterOptionalArrayTypeAction = new FfiConverterOptional( */ function uniffiEnsureInitialized() { // Get the bindings contract version from our ComponentInterface - const bindingsContractVersion = 29; + const bindingsContractVersion = 30; // Get the scaffolding contract version by calling the into the dylib const scaffoldingContractVersion = nativeModule().ubrn_ffi_matrix_sdk_ffi_uniffi_contract_version(); @@ -62863,96 +61834,96 @@ function uniffiEnsureInitialized() { ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message() !== - 1366 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() !== + 4038 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message' + 'uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit() !== - 33992 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() !== + 50486 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit' + 'uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() !== - 15808 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform() !== + 14462 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id' + 'uniffi_matrix_sdk_ffi_checksum_func_init_platform' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url() !== - 48529 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() !== + 7613 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url' + 'uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions() !== - 30181 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink() !== + 4370 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions' + 'uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_init_platform() !== - 11113 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid() !== + 32456 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_init_platform' + 'uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid() !== - 54845 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() !== + 64531 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid' + 'uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_event() !== - 55646 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() !== + 8284 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_log_event' + 'uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver() !== - 34206 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() !== + 52982 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver' + 'uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink() !== - 13776 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() !== + 1141 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink' + 'uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() !== - 46473 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message() !== + 11794 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink' + 'uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html() !== - 37203 + 47401 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html' @@ -62960,7 +61931,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote() !== - 8938 + 56994 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote' @@ -62968,7 +61939,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown() !== - 58385 + 53788 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown' @@ -62976,7 +61947,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() !== - 20152 + 33485 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote' @@ -62984,79 +61955,143 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() !== - 57839 + 33472 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() !== + 43356 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit() !== + 57776 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_log_event() !== + 28696 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_func_log_event' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url() !== + 42271 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions() !== + 40493 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver() !== + 16495 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() !== - 7233 + 6216 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() !== - 49710 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions() !== + 23475 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from' + 'uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() !== - 1447 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version() !== + 8075 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer' + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() !== - 65010 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts() !== + 39919 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name' + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() !== - 4038 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login() !== + 22858 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha' + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() !== - 29703 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() !== + 1406 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role' + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() !== - 13856 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() !== + 19696 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level' + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send() !== - 50179 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() !== + 19766 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send' + 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish() !== + 56350 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() !== + 633 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth() !== - 53440 + 17052 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth' @@ -63064,7 +62099,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_account_data() !== - 50433 + 23790 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_account_data' @@ -63072,23 +62107,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_account_url() !== - 42373 + 53991 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_account_url' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() !== - 29688 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() !== - 35296 + 46726 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions' @@ -63096,7 +62123,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url() !== - 27867 + 26042 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url' @@ -63104,7 +62131,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo() !== - 18126 + 5412 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo' @@ -63112,7 +62139,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() !== - 50226 + 30527 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url' @@ -63120,7 +62147,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() !== - 39890 + 27747 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account' @@ -63128,7 +62155,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches() !== - 55711 + 61351 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches' @@ -63136,7 +62163,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_create_room() !== - 52700 + 12931 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_create_room' @@ -63144,7 +62171,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt() !== - 19710 + 16219 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt' @@ -63152,7 +62179,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() !== - 20658 + 7894 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account' @@ -63160,7 +62187,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() !== - 45990 + 20472 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher' @@ -63168,7 +62195,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_device_id() !== - 44340 + 63337 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_device_id' @@ -63176,7 +62203,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_display_name() !== - 56259 + 20054 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_display_name' @@ -63184,7 +62211,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() !== - 30834 + 53800 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues' @@ -63192,7 +62219,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() !== - 10688 + 30956 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress' @@ -63200,7 +62227,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_encryption() !== - 9657 + 13362 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_encryption' @@ -63208,7 +62235,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config() !== - 15595 + 53942 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config' @@ -63216,7 +62243,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room() !== - 5137 + 3705 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room' @@ -63224,7 +62251,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy() !== - 46953 + 16387 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy' @@ -63232,7 +62259,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size() !== - 12661 + 54634 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size' @@ -63240,7 +62267,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content() !== - 40308 + 30321 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content' @@ -63248,7 +62275,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file() !== - 20094 + 41198 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file' @@ -63256,7 +62283,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy() !== - 19264 + 62158 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy' @@ -63264,7 +62291,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail() !== - 52601 + 23704 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail' @@ -63272,7 +62299,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings() !== - 49769 + 625 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings' @@ -63280,23 +62307,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() !== - 60062 + 3999 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_profile' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() !== - 43545 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() !== - 22399 + 43351 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms' @@ -63304,7 +62323,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_room() !== - 30376 + 63699 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_room' @@ -63312,7 +62331,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias() !== - 7674 + 48007 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias' @@ -63320,7 +62339,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id() !== - 36348 + 58119 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id' @@ -63328,7 +62347,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() !== - 55934 + 64657 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller' @@ -63336,7 +62355,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes() !== - 30209 + 47046 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes' @@ -63344,7 +62363,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_url() !== - 32541 + 46254 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_get_url' @@ -63352,7 +62371,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_homeserver() !== - 26427 + 26707 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_homeserver' @@ -63360,7 +62379,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details() !== - 63487 + 63281 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details' @@ -63368,7 +62387,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user() !== - 14588 + 30519 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user' @@ -63376,7 +62395,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users() !== - 49620 + 57288 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users' @@ -63384,7 +62403,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported() !== - 34863 + 48327 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported' @@ -63392,7 +62411,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported() !== - 17934 + 48577 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported' @@ -63400,7 +62419,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available() !== - 23322 + 53090 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available' @@ -63408,7 +62427,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id() !== - 64032 + 28397 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id' @@ -63416,7 +62435,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias() !== - 18521 + 16138 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias' @@ -63424,7 +62443,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_knock() !== - 48652 + 40592 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_knock' @@ -63432,7 +62451,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login() !== - 33276 + 48373 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_login' @@ -63440,7 +62459,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email() !== - 11789 + 22630 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email' @@ -63448,7 +62467,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() !== - 32591 + 63441 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback' @@ -63456,7 +62475,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_logout() !== - 42911 + 54411 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_logout' @@ -63464,7 +62483,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler() !== - 48299 + 59558 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler' @@ -63472,7 +62491,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler() !== - 4124 + 37543 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler' @@ -63480,7 +62499,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_notification_client() !== - 37308 + 17687 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_notification_client' @@ -63488,7 +62507,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event() !== - 13906 + 40713 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event' @@ -63496,7 +62515,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event() !== - 15699 + 46899 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event' @@ -63504,7 +62523,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores() !== - 18852 + 53467 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores' @@ -63512,7 +62531,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler() !== - 47103 + 46860 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler' @@ -63520,7 +62539,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() !== - 29033 + 12536 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar' @@ -63528,7 +62547,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions() !== - 32820 + 12909 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions' @@ -63536,7 +62555,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known() !== - 61934 + 52054 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known' @@ -63544,7 +62563,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() !== - 3551 + 16053 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias' @@ -63552,7 +62571,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_restore_session() !== - 56125 + 56243 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_restore_session' @@ -63560,7 +62579,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with() !== - 20927 + 21462 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with' @@ -63568,7 +62587,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists() !== - 20359 + 5713 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists' @@ -63576,7 +62595,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search() !== - 39855 + 4257 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search' @@ -63584,7 +62603,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_rooms() !== - 29558 + 57092 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_rooms' @@ -63592,7 +62611,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_search_users() !== - 42927 + 23484 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_search_users' @@ -63600,7 +62619,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_server() !== - 63276 + 11140 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_server' @@ -63608,7 +62627,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() !== - 51933 + 25767 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info' @@ -63616,7 +62635,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_session() !== - 8085 + 47980 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_session' @@ -63624,7 +62643,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data() !== - 18256 + 56242 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data' @@ -63632,7 +62651,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate() !== - 46437 + 377 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate' @@ -63640,7 +62659,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name() !== - 15292 + 47937 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name' @@ -63648,7 +62667,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy() !== - 48457 + 57486 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy' @@ -63656,7 +62675,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy() !== - 24080 + 27881 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy' @@ -63664,7 +62683,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy() !== - 2414 + 45052 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy' @@ -63672,7 +62691,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() !== - 41975 + 51438 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher' @@ -63680,7 +62699,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate() !== - 37720 + 38853 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate' @@ -63688,7 +62707,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() !== - 4957 + 55440 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version' @@ -63696,7 +62715,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_space_service() !== - 31959 + 33556 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_space_service' @@ -63704,7 +62723,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() !== - 34571 + 11891 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login' @@ -63712,7 +62731,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users() !== - 23285 + 10184 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users' @@ -63720,7 +62739,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config() !== - 47047 + 11612 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config' @@ -63728,7 +62747,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info() !== - 41103 + 3308 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info' @@ -63736,7 +62755,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status() !== - 57403 + 39397 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status' @@ -63744,7 +62763,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates() !== - 33603 + 53470 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates' @@ -63752,7 +62771,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_sync_service() !== - 52812 + 47464 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_sync_service' @@ -63760,7 +62779,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room() !== - 56986 + 40498 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room' @@ -63768,7 +62787,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user() !== - 8489 + 2582 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user' @@ -63776,7 +62795,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar() !== - 64486 + 14839 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar' @@ -63784,7 +62803,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() !== - 51195 + 19621 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_upload_media' @@ -63792,7 +62811,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() !== - 19369 + 50450 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc' @@ -63800,7 +62819,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_user_id() !== - 40531 + 11375 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_user_id' @@ -63808,15 +62827,47 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name() !== - 57725 + 52727 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() !== + 15952 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() !== + 49975 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path() !== + 42046 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() !== + 34214 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates() !== - 14763 + 60910 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates' @@ -63824,7 +62875,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups() !== - 44502 + 19978 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups' @@ -63832,7 +62883,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing() !== - 37167 + 41588 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing' @@ -63840,7 +62891,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy() !== - 11959 + 5278 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy' @@ -63848,7 +62899,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() !== - 56018 + 21717 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build' @@ -63856,7 +62907,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() !== - 46627 + 56336 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name' @@ -63864,7 +62915,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings() !== - 34715 + 36533 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings' @@ -63872,7 +62923,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh() !== - 43839 + 60164 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh' @@ -63880,7 +62931,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates() !== - 47525 + 34380 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates' @@ -63888,7 +62939,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification() !== - 2334 + 17095 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification' @@ -63896,7 +62947,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock() !== - 42214 + 54805 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock' @@ -63904,7 +62955,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite() !== - 3856 + 47743 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite' @@ -63912,7 +62963,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url() !== - 28347 + 27846 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url' @@ -63920,7 +62971,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store() !== - 28117 + 7770 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store' @@ -63928,7 +62979,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy() !== - 5659 + 56894 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy' @@ -63936,7 +62987,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config() !== - 58783 + 41133 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config' @@ -63944,7 +62995,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy() !== - 41183 + 7083 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy' @@ -63952,7 +63003,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name() !== - 29096 + 27235 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name' @@ -63960,7 +63011,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url() !== - 30022 + 11561 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url' @@ -63968,7 +63019,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths() !== - 40778 + 52143 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths' @@ -63976,7 +63027,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate() !== - 8576 + 35713 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate' @@ -63984,7 +63035,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() !== - 39381 + 39928 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder' @@ -63992,7 +63043,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store() !== - 55579 + 54280 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store' @@ -64000,7 +63051,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() !== - 30452 + 64472 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained' @@ -64008,7 +63059,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() !== - 23935 + 10698 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled' @@ -64016,7 +63067,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() !== - 13719 + 31638 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent' @@ -64024,7 +63075,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username() !== - 45302 + 9349 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username' @@ -64032,7 +63083,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server() !== - 45490 + 16984 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server' @@ -64040,7 +63091,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state() !== - 51049 + 60707 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state' @@ -64048,7 +63099,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener() !== - 14246 + 14813 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener' @@ -64056,7 +63107,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key() !== - 58425 + 25462 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key' @@ -64064,7 +63115,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery() !== - 18699 + 43697 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery' @@ -64072,7 +63123,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key() !== - 11864 + 30741 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key' @@ -64080,7 +63131,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups() !== - 55446 + 61920 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups' @@ -64088,7 +63139,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery() !== - 64351 + 2033 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery' @@ -64096,7 +63147,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against() !== - 7561 + 50754 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against' @@ -64104,7 +63155,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device() !== - 27955 + 54322 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device' @@ -64112,7 +63163,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_recover() !== - 33712 + 14635 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_recover' @@ -64120,7 +63171,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset() !== - 12902 + 48062 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset' @@ -64128,7 +63179,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state() !== - 54051 + 28660 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state' @@ -64136,7 +63187,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener() !== - 36612 + 17926 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener' @@ -64144,7 +63195,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity() !== - 13780 + 47257 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity' @@ -64152,7 +63203,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() !== - 20380 + 15954 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key' @@ -64160,7 +63211,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() !== - 17575 + 39850 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity' @@ -64168,7 +63219,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() !== - 29114 + 29580 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state' @@ -64176,7 +63227,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() !== - 59806 + 30914 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener' @@ -64184,7 +63235,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() !== - 37503 + 28614 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state' @@ -64192,79 +63243,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks() !== - 41585 + 23168 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate() !== - 56670 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan() !== - 60730 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version() !== - 36573 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts() !== - 63396 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login() !== - 46090 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() !== - 33501 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - '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 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type() !== - 43501 + 21421 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type' @@ -64272,7 +63259,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel() !== - 57622 + 14034 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel' @@ -64280,159 +63267,103 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset() !== - 11997 + 29457 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event() !== - 36106 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id() !== - 5876 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept() !== - 25656 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline() !== - 65054 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban() !== - 26242 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen() !== - 36036 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis() !== - 5211 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info() !== - 55450 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation() !== + 36877 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info' + 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle() !== - 46057 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified() !== + 27675 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle' + 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields() !== - 12518 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key() !== + 44140 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields' + 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave() !== - 54036 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin() !== + 64915 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave' + 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms() !== - 50920 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified() !== + 10595 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms' + 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate() !== - 59689 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification() !== + 8452 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate' + 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() !== - 53560 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() !== + 64715 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan' + 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path() !== - 16357 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type() !== + 38023 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path' + 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() !== - 12883 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() !== + 16913 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist' + 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() !== - 23306 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id() !== + 3965 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json' + 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() !== - 62692 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() !== + 31754 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_mediasource_url' + 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() !== - 52873 + 47425 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification' @@ -64440,7 +63371,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications() !== - 64372 + 55817 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications' @@ -64448,7 +63379,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room() !== - 26581 + 22250 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room' @@ -64456,7 +63387,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() !== - 37323 + 46370 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device' @@ -64464,7 +63395,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() !== - 21251 + 24557 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device' @@ -64472,7 +63403,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules() !== - 60025 + 31603 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules' @@ -64480,7 +63411,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode() !== - 36211 + 44201 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode' @@ -64488,7 +63419,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules() !== - 17884 + 22761 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules' @@ -64496,7 +63427,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings() !== - 55295 + 44589 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings' @@ -64504,7 +63435,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules() !== - 19849 + 23908 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules' @@ -64512,7 +63443,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode() !== - 18228 + 13690 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode' @@ -64520,7 +63451,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled() !== - 12210 + 42573 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled' @@ -64528,7 +63459,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled() !== - 533 + 24945 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled' @@ -64536,7 +63467,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled() !== - 13304 + 4073 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled' @@ -64544,7 +63475,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled() !== - 49857 + 17837 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled' @@ -64552,7 +63483,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode() !== - 35399 + 12358 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode' @@ -64560,7 +63491,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled() !== - 16823 + 17088 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled' @@ -64568,7 +63499,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule() !== - 465 + 49373 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule' @@ -64576,7 +63507,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode() !== - 9426 + 29804 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode' @@ -64584,7 +63515,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate() !== - 57636 + 39042 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate' @@ -64592,7 +63523,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled() !== - 11988 + 34082 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled' @@ -64600,7 +63531,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled() !== - 31650 + 63495 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled' @@ -64608,7 +63539,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode() !== - 4135 + 21942 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode' @@ -64616,7 +63547,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled() !== - 56594 + 22017 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled' @@ -64624,23 +63555,95 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room() !== - 47580 + 54475 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send() !== + 2180 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate() !== + 59049 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan() !== + 35786 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate() !== + 27889 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() !== + 55947 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() !== - 30173 + 52906 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept() !== + 60529 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline() !== + 20051 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban() !== + 23767 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen() !== + 20986 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count() !== - 61905 + 10052 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count' @@ -64648,7 +63651,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants() !== - 41533 + 61411 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants' @@ -64656,7 +63659,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases() !== - 28555 + 30946 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases' @@ -64664,7 +63667,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes() !== - 44206 + 56335 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes' @@ -64672,7 +63675,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url() !== - 34637 + 4697 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url' @@ -64680,7 +63683,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_ban_user() !== - 35046 + 54282 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_ban_user' @@ -64688,7 +63691,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias() !== - 19786 + 5795 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias' @@ -64696,7 +63699,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft() !== - 59182 + 12270 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft' @@ -64704,7 +63707,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage() !== - 13838 + 14531 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage' @@ -64712,7 +63715,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_decline_call() !== - 36115 + 12323 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_decline_call' @@ -64720,7 +63723,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key() !== - 18081 + 57692 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key' @@ -64728,7 +63731,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_display_name() !== - 64194 + 45762 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_display_name' @@ -64736,7 +63739,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_edit() !== - 61956 + 6689 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_edit' @@ -64744,7 +63747,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption() !== - 14669 + 16452 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption' @@ -64752,7 +63755,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue() !== - 23914 + 32996 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue' @@ -64760,7 +63763,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() !== - 9101 + 35766 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state' @@ -64768,7 +63771,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() !== - 51696 + 37784 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription' @@ -64776,7 +63779,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_forget() !== - 37840 + 10622 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_forget' @@ -64784,7 +63787,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels() !== - 47640 + 33125 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels' @@ -64792,7 +63795,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility() !== - 412 + 49289 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility' @@ -64800,7 +63803,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() !== - 33588 + 1287 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call' @@ -64808,7 +63811,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_heroes() !== - 22313 + 38402 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_heroes' @@ -64816,7 +63819,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_id() !== - 61990 + 34667 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_id' @@ -64824,7 +63827,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend() !== - 39984 + 24786 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend' @@ -64832,7 +63835,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user() !== - 62239 + 45929 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user' @@ -64840,7 +63843,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id() !== - 41133 + 27806 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id' @@ -64848,7 +63851,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count() !== - 1023 + 44865 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count' @@ -64856,7 +63859,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_inviter() !== - 18103 + 7247 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_inviter' @@ -64864,7 +63867,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_is_direct() !== - 10462 + 61932 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_is_direct' @@ -64872,7 +63875,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted() !== - 63995 + 37204 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted' @@ -64880,7 +63883,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_is_public() !== - 57746 + 31529 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_is_public' @@ -64888,7 +63891,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled() !== - 36591 + 5651 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled' @@ -64896,7 +63899,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_is_space() !== - 16919 + 19377 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_is_space' @@ -64904,7 +63907,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_join() !== - 9240 + 65464 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_join' @@ -64912,7 +63915,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count() !== - 55835 + 55525 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count' @@ -64920,7 +63923,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_kick_user() !== - 28600 + 64949 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_kick_user' @@ -64928,7 +63931,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state() !== - 16843 + 9465 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state' @@ -64936,7 +63939,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_latest_event() !== - 39083 + 57709 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_latest_event' @@ -64944,7 +63947,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_leave() !== - 63688 + 3346 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_leave' @@ -64952,7 +63955,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft() !== - 62856 + 61910 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft' @@ -64960,7 +63963,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event() !== - 12703 + 47103 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event' @@ -64968,7 +63971,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked() !== - 24981 + 1608 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked' @@ -64976,7 +63979,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read() !== - 57806 + 38075 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read' @@ -64984,7 +63987,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink() !== - 36705 + 30684 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink' @@ -64992,7 +63995,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink() !== - 47781 + 10281 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink' @@ -65000,7 +64003,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_member() !== - 48980 + 58977 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_member' @@ -65008,7 +64011,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url() !== - 29492 + 44092 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url' @@ -65016,7 +64019,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name() !== - 33206 + 26431 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name' @@ -65024,7 +64027,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info() !== - 64964 + 36075 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info' @@ -65032,7 +64035,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_members() !== - 42691 + 13926 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_members' @@ -65040,7 +64043,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync() !== - 3255 + 8950 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync' @@ -65048,7 +64051,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_membership() !== - 45951 + 65038 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_membership' @@ -65056,7 +64059,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() !== - 11947 + 27925 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event' @@ -65064,7 +64067,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() !== - 39510 + 32346 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id' @@ -65072,7 +64075,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room() !== - 22093 + 21931 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room' @@ -65080,7 +64083,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_preview_room() !== - 60431 + 20509 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_preview_room' @@ -65088,7 +64091,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory() !== - 13924 + 2302 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory' @@ -65096,7 +64099,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_raw_name() !== - 15453 + 65346 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_raw_name' @@ -65104,7 +64107,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_redact() !== - 45810 + 56590 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_redact' @@ -65112,7 +64115,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar() !== - 7230 + 3551 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar' @@ -65120,7 +64123,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory() !== - 16926 + 26389 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory' @@ -65128,7 +64131,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_report_content() !== - 16529 + 27264 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_report_content' @@ -65136,7 +64139,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_report_room() !== - 6449 + 372 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_report_room' @@ -65144,7 +64147,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() !== - 5060 + 32610 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels' @@ -65152,7 +64155,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string() !== - 37832 + 35772 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string' @@ -65160,7 +64163,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_room_info() !== - 41146 + 62185 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_room_info' @@ -65168,7 +64171,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() !== - 27585 + 42915 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft' @@ -65176,7 +64179,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() !== - 34248 + 36351 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location' @@ -65184,7 +64187,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_send_raw() !== - 20486 + 63831 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_send_raw' @@ -65192,7 +64195,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite() !== - 64403 + 1289 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite' @@ -65200,7 +64203,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority() !== - 48070 + 44950 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority' @@ -65208,7 +64211,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_name() !== - 52127 + 33828 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_set_name' @@ -65216,7 +64219,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() !== - 48337 + 55986 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription' @@ -65224,7 +64227,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() !== - 5576 + 40525 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_set_topic' @@ -65232,7 +64235,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag() !== - 2381 + 38235 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag' @@ -65240,7 +64243,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share() !== - 11488 + 43479 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share' @@ -65248,7 +64251,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share() !== - 19983 + 19603 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share' @@ -65256,7 +64259,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events() !== - 62256 + 21456 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events' @@ -65264,7 +64267,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes() !== - 8526 + 49969 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes' @@ -65272,7 +64275,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests() !== - 30649 + 43535 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests' @@ -65280,7 +64283,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares() !== - 57037 + 48977 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares' @@ -65288,7 +64291,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates() !== - 48209 + 32254 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates' @@ -65296,7 +64299,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates() !== - 17661 + 36773 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates' @@ -65304,7 +64307,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications() !== - 38524 + 12198 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications' @@ -65312,7 +64315,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_successor_room() !== - 27360 + 17951 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_successor_room' @@ -65320,7 +64323,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user() !== - 47787 + 58040 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user' @@ -65328,7 +64331,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline() !== - 51477 + 51168 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_timeline' @@ -65336,7 +64339,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration() !== - 35159 + 46904 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration' @@ -65344,7 +64347,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_topic() !== - 59745 + 33844 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_topic' @@ -65352,7 +64355,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice() !== - 28642 + 26086 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice' @@ -65360,7 +64363,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_unban_user() !== - 1803 + 25834 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_unban_user' @@ -65368,7 +64371,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias() !== - 25065 + 35023 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias' @@ -65376,7 +64379,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility() !== - 26248 + 29249 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility' @@ -65384,7 +64387,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules() !== - 49303 + 62193 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules' @@ -65392,7 +64395,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users() !== - 52057 + 46007 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users' @@ -65400,7 +64403,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility() !== - 64724 + 46267 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility' @@ -65408,7 +64411,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar() !== - 19069 + 43932 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar' @@ -65416,167 +64419,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend() !== - 33485 + 13926 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page() !== - 34221 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages() !== - 2923 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page() !== - 29305 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results() !== - 30207 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search() !== - 24438 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters() !== - 36097 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with() !== - 21746 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() !== - 21585 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() !== - 62491 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_room' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() !== - 47748 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page() !== - 61352 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter() !== - 61202 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller() !== - 36258 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream() !== - 56632 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms() !== - 49704 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() !== - 60695 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() !== - 64650 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms() !== - 5528 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator() !== - 16821 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len() !== - 39835 + 59145 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len' @@ -65584,23 +64435,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk() !== - 23186 + 47532 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions() !== - 8867 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban() !== - 7183 + 52576 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban' @@ -65608,7 +64451,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite() !== - 57708 + 55467 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite' @@ -65616,7 +64459,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick() !== - 461 + 8759 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick' @@ -65624,7 +64467,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin() !== - 52852 + 64005 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin' @@ -65632,7 +64475,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other() !== - 60699 + 10630 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other' @@ -65640,7 +64483,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own() !== - 32905 + 10164 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own' @@ -65648,7 +64491,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message() !== - 2424 + 27531 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message' @@ -65656,7 +64499,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state() !== - 33539 + 17089 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state' @@ -65664,7 +64507,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification() !== - 64150 + 59279 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification' @@ -65672,7 +64515,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban() !== - 57457 + 12687 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban' @@ -65680,7 +64523,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite() !== - 41275 + 26290 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite' @@ -65688,7 +64531,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick() !== - 51066 + 3923 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick' @@ -65696,7 +64539,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin() !== - 4609 + 20659 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin' @@ -65704,7 +64547,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other() !== - 52543 + 54198 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other' @@ -65712,7 +64555,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own() !== - 2983 + 59218 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own' @@ -65720,7 +64563,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message() !== - 48291 + 45517 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message' @@ -65728,7 +64571,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state() !== - 14792 + 40995 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state' @@ -65736,7 +64579,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification() !== - 26319 + 35381 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification' @@ -65744,7 +64587,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels() !== - 16221 + 48829 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels' @@ -65752,103 +64595,247 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values() !== - 38774 + 62886 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() !== - 18179 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page() !== + 31168 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget' + 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() !== - 50237 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages() !== + 59827 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_info' + 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() !== - 1297 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page() !== + 14719 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter' + 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave() !== - 21886 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results() !== + 21645 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave' + 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details() !== - 46321 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search() !== + 38611 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details' + 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel() !== - 62384 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters() !== + 19021 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join() !== - 1903 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with() !== + 25653 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel() !== - 7014 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() !== + 2181 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join() !== - 57901 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() !== + 50761 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlist_room' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort() !== - 11570 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() !== + 47488 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend() !== - 28691 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page() !== + 4391 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter() !== + 8696 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller() !== + 21030 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream() !== + 22467 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms() !== + 4638 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() !== + 40756 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() !== + 41751 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms() !== + 1302 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator() !== + 48386 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications() !== + 57541 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count() !== + 60202 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() !== + 27272 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() !== + 42918 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() !== + 16635 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_info' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() !== + 54424 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave() !== + 52262 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details() !== + 16335 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() !== + 19277 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() !== + 53516 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_mediasource_url' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request() !== - 53466 + 56039 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request' @@ -65856,7 +64843,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request() !== - 37982 + 22948 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request' @@ -65864,7 +64851,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification() !== - 27140 + 26553 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification' @@ -65872,7 +64859,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification() !== - 32994 + 32557 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification' @@ -65880,7 +64867,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification() !== - 64345 + 9058 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification' @@ -65888,7 +64875,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification() !== - 4777 + 20402 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification' @@ -65896,7 +64883,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification() !== - 26149 + 11869 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification' @@ -65904,7 +64891,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate() !== - 42324 + 65112 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate' @@ -65912,7 +64899,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification() !== - 16328 + 56151 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification' @@ -65920,7 +64907,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description() !== - 21346 + 45746 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description' @@ -65928,15 +64915,31 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() !== - 46075 + 54870 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol' ); } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave() !== + 64951 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms() !== + 40216 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms' + ); + } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() !== - 57707 + 14784 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate' @@ -65944,7 +64947,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() !== - 33381 + 6614 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state' @@ -65952,7 +64955,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() !== - 24664 + 65022 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms' @@ -65960,7 +64963,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() !== - 25368 + 63772 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space' @@ -65968,7 +64971,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() !== - 16775 + 15348 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates' @@ -65976,7 +64979,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() !== - 55793 + 52629 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update' @@ -65984,7 +64987,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() !== - 26327 + 31589 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates' @@ -65992,7 +64995,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space() !== - 31295 + 64688 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space' @@ -66000,7 +65003,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces() !== - 62969 + 1160 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces' @@ -66008,7 +65011,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child() !== - 18724 + 40037 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child' @@ -66016,7 +65019,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() !== - 54285 + 25459 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces' @@ -66024,7 +65027,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space() !== - 7949 + 57139 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space' @@ -66032,7 +65035,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space() !== - 14438 + 22535 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space' @@ -66040,7 +65043,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() !== - 6768 + 14788 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list' @@ -66048,39 +65051,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() !== - 10090 + 8077 ) { 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 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_span_enter' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit() !== - 47924 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_span_exit' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none() !== - 33327 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_span_is_none' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size() !== - 52005 + 61803 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size' @@ -66088,7 +65067,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit() !== - 18671 + 23095 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit' @@ -66096,7 +65075,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase() !== - 58378 + 45337 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase' @@ -66104,7 +65083,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size() !== - 65399 + 41218 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size' @@ -66112,31 +65091,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained() !== - 16295 + 19368 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish() !== - 64706 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() !== - 10889 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() !== - 45579 + 5808 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions' @@ -66144,7 +65107,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() !== - 26426 + 39986 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service' @@ -66152,7 +65115,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() !== - 16010 + 42766 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservice_start' @@ -66160,7 +65123,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_state() !== - 61806 + 56378 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservice_state' @@ -66168,7 +65131,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop() !== - 42435 + 40415 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop' @@ -66176,7 +65139,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish() !== - 22814 + 29725 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish' @@ -66184,7 +65147,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() !== - 56326 + 17911 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock' @@ -66192,7 +65155,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode() !== - 16958 + 48885 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode' @@ -66200,7 +65163,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos() !== - 18892 + 21315 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos' @@ -66208,7 +65171,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() !== - 9124 + 12353 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel' @@ -66216,31 +65179,79 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished() !== - 29008 + 17040 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event() !== - 52917 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis() !== + 57596 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event' + 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies() !== - 10634 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info() !== + 797 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies' + 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle() !== + 279 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields() !== + 46064 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel() !== + 5666 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join() !== + 22211 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort() !== + 2406 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend() !== + 50142 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener() !== - 18746 + 38550 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener' @@ -66248,7 +65259,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content() !== - 21811 + 54719 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content' @@ -66256,7 +65267,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll() !== - 37925 + 33924 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll' @@ -66264,7 +65275,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_edit() !== - 42189 + 46968 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_edit' @@ -66272,7 +65283,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll() !== - 32659 + 2766 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll' @@ -66280,7 +65291,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event() !== - 54068 + 22240 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event' @@ -66288,7 +65299,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members() !== - 37994 + 22294 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members' @@ -66296,7 +65307,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id() !== - 33999 + 40008 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id' @@ -66304,7 +65315,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id() !== - 18266 + 31074 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id' @@ -66312,7 +65323,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() !== - 54225 + 11426 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details' @@ -66320,7 +65331,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read() !== - 20604 + 58804 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read' @@ -66328,7 +65339,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards() !== - 36829 + 53026 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards' @@ -66336,7 +65347,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards() !== - 30268 + 35094 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards' @@ -66344,7 +65355,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event() !== - 41687 + 40498 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event' @@ -66352,7 +65363,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event() !== - 48707 + 42154 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event' @@ -66360,7 +65371,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption() !== - 21112 + 39219 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption' @@ -66368,7 +65379,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send() !== - 9553 + 24846 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send' @@ -66376,7 +65387,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() !== - 36723 + 52753 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio' @@ -66384,23 +65395,15 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() !== - 4740 + 19448 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() !== - 61071 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() !== - 29043 + 31845 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image' @@ -66408,7 +65411,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() !== - 39080 + 21302 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location' @@ -66416,7 +65419,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response() !== - 7453 + 41951 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response' @@ -66424,7 +65427,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() !== - 37532 + 6077 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt' @@ -66432,7 +65435,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() !== - 11149 + 25065 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply' @@ -66440,7 +65443,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() !== - 52974 + 21275 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video' @@ -66448,7 +65451,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() !== - 41701 + 33769 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message' @@ -66456,7 +65459,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() !== - 46161 + 27990 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status' @@ -66464,7 +65467,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() !== - 13555 + 42673 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction' @@ -66472,55 +65475,23 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() !== - 52414 + 18514 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() !== - 11088 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type() !== - 12922 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() !== - 18142 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id() !== - 56465 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id' - ); - } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() !== - 50929 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() !== + 64895 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp' + 'uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event() !== - 6106 + 46788 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event' @@ -66528,7 +65499,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual() !== - 50960 + 58215 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual' @@ -66536,7 +65507,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug() !== - 38094 + 59080 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug' @@ -66544,87 +65515,87 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id() !== - 39945 + 32877 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications() !== - 33024 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel() !== + 23182 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications' + 'uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count() !== - 35997 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join() !== + 30455 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count' + 'uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() !== - 35655 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event() !== + 49553 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count' + 'uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation() !== - 2948 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies() !== + 47977 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation' + 'uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified() !== - 61954 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event() !== + 52000 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified' + 'uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key() !== - 4041 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id() !== + 55998 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key' + 'uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin() !== - 62925 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_enter() !== + 15935 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin' + 'uniffi_matrix_sdk_ffi_checksum_method_span_enter' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified() !== - 41686 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_exit() !== + 2919 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified' + 'uniffi_matrix_sdk_ffi_checksum_method_span_exit' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification() !== - 3578 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_span_is_none() !== + 59307 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification' + 'uniffi_matrix_sdk_ffi_checksum_method_span_is_none' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run() !== - 7519 + 61502 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run' @@ -66632,7 +65603,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv() !== - 2662 + 10867 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv' @@ -66640,7 +65611,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send() !== - 18689 + 27865 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send' @@ -66648,335 +65619,351 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() !== - 27991 + 40475 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() !== - 10564 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() !== + 55735 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json' + 'uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() !== - 11983 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() !== + 60091 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url' + 'uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() !== - 32675 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() !== + 37564 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes' + 'uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_current() !== - 53698 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new() !== + 604 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_span_current' + 'uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new() !== - 8957 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() !== + 17142 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_span_new' + 'uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span() !== - 63835 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() !== + 18137 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span' + 'uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new() !== - 51363 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_current() !== + 2135 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new' + 'uniffi_matrix_sdk_ffi_checksum_constructor_span_current' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() !== - 53805 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new() !== + 47713 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude' + 'uniffi_matrix_sdk_ffi_checksum_constructor_span_new' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() !== - 25498 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span() !== + 51316 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include' + 'uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change() !== - 16189 + 13017 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update() !== - 12849 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error() !== + 38563 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update() !== - 41052 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain() !== + 43233 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call() !== - 13016 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain() !== + 4452 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call' + 'uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error() !== - 26350 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call() !== + 6068 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error' + 'uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain() !== - 43954 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change() !== + 45931 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain' + 'uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain() !== - 53223 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() !== + 41998 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain' + 'uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update() !== - 13538 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change() !== + 54581 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update() !== - 28731 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error() !== + 601 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update() !== - 2320 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update() !== + 56104 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update() !== - 35830 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification() !== + 39259 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call() !== - 57311 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update() !== + 43998 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call' + 'uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call() !== - 47519 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update() !== + 56068 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call' + 'uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call() !== - 10077 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update() !== + 27773 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call' + 'uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call() !== - 34519 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() !== + 34195 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call' + 'uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change() !== - 14770 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() !== + 33992 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change' + 'uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change() !== - 51708 + 52554 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update() !== - 65318 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update() !== + 30858 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() !== - 41133 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update() !== + 23453 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress' + 'uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update() !== + 63807 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update() !== - 9758 + 62487 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() !== - 64575 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call() !== + 6360 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change() !== - 58105 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call() !== + 13891 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change' + 'uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update() !== - 41968 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call() !== + 17262 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call' + ); + } + if ( + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call() !== + 15280 + ) { + throw new UniffiInternalError.ApiChecksumMismatch( + 'uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call() !== - 44934 + 61614 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update() !== - 12576 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update() !== + 62056 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update() !== - 23169 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() !== + 36696 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update() !== - 24823 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update() !== + 6069 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update() !== - 36937 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update() !== + 12283 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update() !== - 24843 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update() !== + 34444 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error() !== - 38224 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update() !== + 60435 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update() !== - 11544 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update() !== + 47433 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request() !== - 3417 + 58189 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request' @@ -66984,7 +65971,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request() !== - 3733 + 43661 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request' @@ -66992,7 +65979,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification() !== - 56833 + 8006 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification' @@ -67000,7 +65987,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data() !== - 30840 + 8698 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data' @@ -67008,7 +65995,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail() !== - 32164 + 45076 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail' @@ -67016,7 +66003,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel() !== - 3367 + 36580 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel' @@ -67024,7 +66011,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() !== - 37905 + 53036 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish' @@ -67032,7 +66019,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() !== - 31502 + 20303 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update' @@ -67040,7 +66027,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() !== - 11960 + 4634 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update' @@ -67048,7 +66035,7 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() !== - 39714 + 21212 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update' @@ -67056,63 +66043,47 @@ function uniffiEnsureInitialized() { } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() !== - 19262 + 21383 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification() !== - 38017 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() !== - 62231 + 7272 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() !== - 53990 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update() !== + 53207 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update' + 'uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update' ); } if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() !== - 64299 + nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() !== + 35518 ) { throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call' + 'uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update' ); } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd() !== - 61791 + 3448 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd' ); } - if ( - nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() !== - 38998 - ) { - throw new UniffiInternalError.ApiChecksumMismatch( - 'uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update' - ); - } if ( nativeModule().ubrn_uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() !== - 12846 + 3738 ) { throw new UniffiInternalError.ApiChecksumMismatch( 'uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities' diff --git a/src/generated/matrix_sdk_ui-ffi.ts b/src/generated/matrix_sdk_ui-ffi.ts index 217dceb..9c9dd69 100644 --- a/src/generated/matrix_sdk_ui-ffi.ts +++ b/src/generated/matrix_sdk_ui-ffi.ts @@ -1,11 +1,15 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck + import { type StructuralEquality as UniffiStructuralEquality, type UniffiForeignFuture as RuntimeUniffiForeignFuture, type UniffiRustCallStatus, - type UniffiRustArcPtr, + type UniffiGcObject, type UniffiRustFutureContinuationCallback as RuntimeUniffiRustFutureContinuationCallback, type UniffiResult, } from 'uniffi-bindgen-react-native'; @@ -40,114 +44,107 @@ export type UniffiRustFutureContinuationCallback = ( data: bigint, pollResult: number ) => void; -type UniffiForeignFutureFree = (handle: bigint) => void; +export type UniffiForeignFutureDroppedCallback = (handle: bigint) => void; type UniffiCallbackInterfaceFree = (handle: bigint) => void; -export type UniffiForeignFuture = { +type UniffiCallbackInterfaceClone = (handle: bigint) => UniffiResult; +export type UniffiForeignFutureDroppedCallbackStruct = { handle: bigint; - free: UniffiForeignFutureFree; + free: UniffiForeignFutureDroppedCallback; }; -export type UniffiForeignFutureStructU8 = { +export type UniffiForeignFutureResultU8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU8 = ( callbackData: bigint, - result: UniffiForeignFutureStructU8 + result: UniffiForeignFutureResultU8 ) => void; -export type UniffiForeignFutureStructI8 = { +export type UniffiForeignFutureResultI8 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI8 = ( callbackData: bigint, - result: UniffiForeignFutureStructI8 + result: UniffiForeignFutureResultI8 ) => void; -export type UniffiForeignFutureStructU16 = { +export type UniffiForeignFutureResultU16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU16 = ( callbackData: bigint, - result: UniffiForeignFutureStructU16 + result: UniffiForeignFutureResultU16 ) => void; -export type UniffiForeignFutureStructI16 = { +export type UniffiForeignFutureResultI16 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI16 = ( callbackData: bigint, - result: UniffiForeignFutureStructI16 + result: UniffiForeignFutureResultI16 ) => void; -export type UniffiForeignFutureStructU32 = { +export type UniffiForeignFutureResultU32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU32 = ( callbackData: bigint, - result: UniffiForeignFutureStructU32 + result: UniffiForeignFutureResultU32 ) => void; -export type UniffiForeignFutureStructI32 = { +export type UniffiForeignFutureResultI32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI32 = ( callbackData: bigint, - result: UniffiForeignFutureStructI32 + result: UniffiForeignFutureResultI32 ) => void; -export type UniffiForeignFutureStructU64 = { +export type UniffiForeignFutureResultU64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteU64 = ( callbackData: bigint, - result: UniffiForeignFutureStructU64 + result: UniffiForeignFutureResultU64 ) => void; -export type UniffiForeignFutureStructI64 = { +export type UniffiForeignFutureResultI64 = { returnValue: bigint; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteI64 = ( callbackData: bigint, - result: UniffiForeignFutureStructI64 + result: UniffiForeignFutureResultI64 ) => void; -export type UniffiForeignFutureStructF32 = { +export type UniffiForeignFutureResultF32 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF32 = ( callbackData: bigint, - result: UniffiForeignFutureStructF32 + result: UniffiForeignFutureResultF32 ) => void; -export type UniffiForeignFutureStructF64 = { +export type UniffiForeignFutureResultF64 = { returnValue: number; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteF64 = ( callbackData: bigint, - result: UniffiForeignFutureStructF64 -) => void; -export type UniffiForeignFutureStructPointer = { - returnValue: bigint; - callStatus: UniffiRustCallStatus; -}; -export type UniffiForeignFutureCompletePointer = ( - callbackData: bigint, - result: UniffiForeignFutureStructPointer + result: UniffiForeignFutureResultF64 ) => void; -export type UniffiForeignFutureStructRustBuffer = { +export type UniffiForeignFutureResultRustBuffer = { returnValue: Uint8Array; callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteRustBuffer = ( callbackData: bigint, - result: UniffiForeignFutureStructRustBuffer + result: UniffiForeignFutureResultRustBuffer ) => void; -export type UniffiForeignFutureStructVoid = { +export type UniffiForeignFutureResultVoid = { callStatus: UniffiRustCallStatus; }; export type UniffiForeignFutureCompleteVoid = ( callbackData: bigint, - result: UniffiForeignFutureStructVoid + result: UniffiForeignFutureResultVoid ) => void; // UniffiRustFutureContinuationCallback is generated as part of the component interface's diff --git a/src/generated/matrix_sdk_ui.ts b/src/generated/matrix_sdk_ui.ts index 9dcc629..071db9c 100644 --- a/src/generated/matrix_sdk_ui.ts +++ b/src/generated/matrix_sdk_ui.ts @@ -1,33 +1,36 @@ // This file was autogenerated by some hot garbage in the `uniffi-bindgen-react-native` crate. // Trust me, you don't want to mess with it! + +/* tslint:disable */ +/* eslint-disable */ +// @ts-nocheck import nativeModule, { type UniffiRustFutureContinuationCallback, - type UniffiForeignFuture, - type UniffiForeignFutureStructU8, + type UniffiForeignFutureDroppedCallback, + type UniffiForeignFutureDroppedCallbackStruct, + type UniffiForeignFutureResultU8, type UniffiForeignFutureCompleteU8, - type UniffiForeignFutureStructI8, + type UniffiForeignFutureResultI8, type UniffiForeignFutureCompleteI8, - type UniffiForeignFutureStructU16, + type UniffiForeignFutureResultU16, type UniffiForeignFutureCompleteU16, - type UniffiForeignFutureStructI16, + type UniffiForeignFutureResultI16, type UniffiForeignFutureCompleteI16, - type UniffiForeignFutureStructU32, + type UniffiForeignFutureResultU32, type UniffiForeignFutureCompleteU32, - type UniffiForeignFutureStructI32, + type UniffiForeignFutureResultI32, type UniffiForeignFutureCompleteI32, - type UniffiForeignFutureStructU64, + type UniffiForeignFutureResultU64, type UniffiForeignFutureCompleteU64, - type UniffiForeignFutureStructI64, + type UniffiForeignFutureResultI64, type UniffiForeignFutureCompleteI64, - type UniffiForeignFutureStructF32, + type UniffiForeignFutureResultF32, type UniffiForeignFutureCompleteF32, - type UniffiForeignFutureStructF64, + type UniffiForeignFutureResultF64, type UniffiForeignFutureCompleteF64, - type UniffiForeignFutureStructPointer, - type UniffiForeignFutureCompletePointer, - type UniffiForeignFutureStructRustBuffer, + type UniffiForeignFutureResultRustBuffer, type UniffiForeignFutureCompleteRustBuffer, - type UniffiForeignFutureStructVoid, + type UniffiForeignFutureResultVoid, type UniffiForeignFutureCompleteVoid, } from './matrix_sdk_ui-ffi'; import { @@ -380,7 +383,7 @@ const FfiConverterTypeTimelineReadReceiptTracking = (() => { */ function uniffiEnsureInitialized() { // Get the bindings contract version from our ComponentInterface - const bindingsContractVersion = 29; + const bindingsContractVersion = 30; // Get the scaffolding contract version by calling the into the dylib const scaffoldingContractVersion = nativeModule().ubrn_ffi_matrix_sdk_ui_uniffi_contract_version(); diff --git a/swift/matrix_sdk.swift b/swift/matrix_sdk.swift index 490ca4a..c9cedef 100644 --- a/swift/matrix_sdk.swift +++ b/swift/matrix_sdk.swift @@ -352,21 +352,31 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } +// Initial value and increment amount for handles. +// These ensure that SWIFT handles always have the lowest bit set +fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 +fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 + fileprivate final class UniffiHandleMap: @unchecked Sendable { // All mutation happens with this lock held, which is why we implement @unchecked Sendable. private let lock = NSLock() private var map: [UInt64: T] = [:] - private var currentHandle: UInt64 = 1 + private var currentHandle: UInt64 = UNIFFI_HANDLEMAP_INITIAL func insert(obj: T) -> UInt64 { lock.withLock { - let handle = currentHandle - currentHandle += 1 - map[handle] = obj - return handle + return doInsert(obj) } } + // Low-level insert function, this assumes `lock` is held. + private func doInsert(_ obj: T) -> UInt64 { + let handle = currentHandle + currentHandle += UNIFFI_HANDLEMAP_DELTA + map[handle] = obj + return handle + } + func get(handle: UInt64) throws -> T { try lock.withLock { guard let obj = map[handle] else { @@ -376,6 +386,15 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { } } + func clone(handle: UInt64) throws -> UInt64 { + try lock.withLock { + guard let obj = map[handle] else { + throw UniffiInternalError.unexpectedStaleHandle + } + return doInsert(obj) + } + } + @discardableResult func remove(handle: UInt64) throws -> T { try lock.withLock { @@ -512,13 +531,13 @@ public protocol OAuthAuthorizationDataProtocol: AnyObject, Sendable { * The data needed to perform authorization using OAuth 2.0. */ open class OAuthAuthorizationData: OAuthAuthorizationDataProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -528,36 +547,37 @@ open class OAuthAuthorizationData: OAuthAuthorizationDataProtocol, @unchecked Se #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_fn_clone_oauthauthorizationdata(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_fn_clone_oauthauthorizationdata(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_fn_free_oauthauthorizationdata(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_fn_free_oauthauthorizationdata(handle, $0) } } @@ -568,12 +588,14 @@ open class OAuthAuthorizationData: OAuthAuthorizationDataProtocol, @unchecked Se */ open func loginUrl() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_fn_method_oauthauthorizationdata_login_url( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -581,33 +603,24 @@ open func loginUrl() -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeOAuthAuthorizationData: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = OAuthAuthorizationData - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> OAuthAuthorizationData { - return OAuthAuthorizationData(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> OAuthAuthorizationData { + return OAuthAuthorizationData(unsafeFromHandle: handle) } - public static func lower(_ value: OAuthAuthorizationData) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: OAuthAuthorizationData) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> OAuthAuthorizationData { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: OAuthAuthorizationData, 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))))) + writeInt(&buf, lower(value)) } } @@ -615,14 +628,14 @@ public struct FfiConverterTypeOAuthAuthorizationData: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOAuthAuthorizationData_lift(_ pointer: UnsafeMutableRawPointer) throws -> OAuthAuthorizationData { - return try FfiConverterTypeOAuthAuthorizationData.lift(pointer) +public func FfiConverterTypeOAuthAuthorizationData_lift(_ handle: UInt64) throws -> OAuthAuthorizationData { + return try FfiConverterTypeOAuthAuthorizationData.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeOAuthAuthorizationData_lower(_ value: OAuthAuthorizationData) -> UnsafeMutableRawPointer { +public func FfiConverterTypeOAuthAuthorizationData_lower(_ value: OAuthAuthorizationData) -> UInt64 { return FfiConverterTypeOAuthAuthorizationData.lower(value) } @@ -634,7 +647,7 @@ public func FfiConverterTypeOAuthAuthorizationData_lower(_ value: OAuthAuthoriza * that can be applied as a single operation. When updating these * settings, any levels that are `None` will remain unchanged. */ -public struct RoomPowerLevelChanges { +public struct RoomPowerLevelChanges: Equatable, Hashable { /** * The level required to ban a user. */ @@ -728,68 +741,16 @@ public struct RoomPowerLevelChanges { self.roomTopic = roomTopic self.spaceChild = spaceChild } + + + + } #if compiler(>=6) extension RoomPowerLevelChanges: Sendable {} #endif - -extension RoomPowerLevelChanges: Equatable, Hashable { - public static func ==(lhs: RoomPowerLevelChanges, rhs: RoomPowerLevelChanges) -> Bool { - if lhs.ban != rhs.ban { - return false - } - if lhs.invite != rhs.invite { - return false - } - if lhs.kick != rhs.kick { - return false - } - if lhs.redact != rhs.redact { - return false - } - if lhs.eventsDefault != rhs.eventsDefault { - return false - } - if lhs.stateDefault != rhs.stateDefault { - return false - } - if lhs.usersDefault != rhs.usersDefault { - return false - } - if lhs.roomName != rhs.roomName { - return false - } - if lhs.roomAvatar != rhs.roomAvatar { - return false - } - if lhs.roomTopic != rhs.roomTopic { - return false - } - if lhs.spaceChild != rhs.spaceChild { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(ban) - hasher.combine(invite) - hasher.combine(kick) - hasher.combine(redact) - hasher.combine(eventsDefault) - hasher.combine(stateDefault) - hasher.combine(usersDefault) - hasher.combine(roomName) - hasher.combine(roomAvatar) - hasher.combine(roomTopic) - hasher.combine(spaceChild) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -845,7 +806,7 @@ public func FfiConverterTypeRoomPowerLevelChanges_lower(_ value: RoomPowerLevelC /** * Information about the server vendor obtained from the federation API. */ -public struct ServerVendorInfo { +public struct ServerVendorInfo: Equatable, Hashable { /** * The server name. */ @@ -867,32 +828,16 @@ public struct ServerVendorInfo { 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 @@ -938,7 +883,7 @@ public func FfiConverterTypeServerVendorInfo_lower(_ value: ServerVendorInfo) -> * Set [`docs/url-params.md`](https://github.com/element-hq/element-call/blob/livekit/docs/url-params.md) * to find out more about the parameters and their defaults. */ -public struct VirtualElementCallWidgetConfig { +public struct VirtualElementCallWidgetConfig: Equatable, Hashable { /** * The intent of showing the call. * If the user wants to start a call or join an existing one. @@ -1058,64 +1003,16 @@ public struct VirtualElementCallWidgetConfig { self.controlledAudioDevices = controlledAudioDevices self.sendNotificationType = sendNotificationType } + + + + } #if compiler(>=6) extension VirtualElementCallWidgetConfig: Sendable {} #endif - -extension VirtualElementCallWidgetConfig: Equatable, Hashable { - public static func ==(lhs: VirtualElementCallWidgetConfig, rhs: VirtualElementCallWidgetConfig) -> Bool { - if lhs.intent != rhs.intent { - return false - } - if lhs.skipLobby != rhs.skipLobby { - return false - } - if lhs.header != rhs.header { - return false - } - if lhs.hideHeader != rhs.hideHeader { - return false - } - if lhs.preload != rhs.preload { - return false - } - if lhs.appPrompt != rhs.appPrompt { - return false - } - if lhs.confineToRoom != rhs.confineToRoom { - return false - } - if lhs.hideScreensharing != rhs.hideScreensharing { - return false - } - if lhs.controlledAudioDevices != rhs.controlledAudioDevices { - return false - } - if lhs.sendNotificationType != rhs.sendNotificationType { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(intent) - hasher.combine(skipLobby) - hasher.combine(header) - hasher.combine(hideHeader) - hasher.combine(preload) - hasher.combine(appPrompt) - hasher.combine(confineToRoom) - hasher.combine(hideScreensharing) - hasher.combine(controlledAudioDevices) - hasher.combine(sendNotificationType) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -1173,7 +1070,7 @@ public func FfiConverterTypeVirtualElementCallWidgetConfig_lower(_ value: Virtua * This is different from the `VirtualElementCallWidgetConfiguration` which * configures the widgets behavior. */ -public struct VirtualElementCallWidgetProperties { +public struct VirtualElementCallWidgetProperties: Equatable, Hashable { /** * The url to the app. * @@ -1321,72 +1218,16 @@ public struct VirtualElementCallWidgetProperties { self.sentryDsn = sentryDsn self.sentryEnvironment = sentryEnvironment } + + + + } #if compiler(>=6) extension VirtualElementCallWidgetProperties: Sendable {} #endif - -extension VirtualElementCallWidgetProperties: Equatable, Hashable { - public static func ==(lhs: VirtualElementCallWidgetProperties, rhs: VirtualElementCallWidgetProperties) -> Bool { - if lhs.elementCallUrl != rhs.elementCallUrl { - return false - } - if lhs.widgetId != rhs.widgetId { - return false - } - if lhs.parentUrl != rhs.parentUrl { - return false - } - if lhs.fontScale != rhs.fontScale { - return false - } - if lhs.font != rhs.font { - return false - } - if lhs.encryption != rhs.encryption { - return false - } - if lhs.posthogUserId != rhs.posthogUserId { - return false - } - if lhs.posthogApiHost != rhs.posthogApiHost { - return false - } - if lhs.posthogApiKey != rhs.posthogApiKey { - return false - } - if lhs.rageshakeSubmitUrl != rhs.rageshakeSubmitUrl { - return false - } - if lhs.sentryDsn != rhs.sentryDsn { - return false - } - if lhs.sentryEnvironment != rhs.sentryEnvironment { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(elementCallUrl) - hasher.combine(widgetId) - hasher.combine(parentUrl) - hasher.combine(fontScale) - hasher.combine(font) - hasher.combine(encryption) - hasher.combine(posthogUserId) - hasher.combine(posthogApiHost) - hasher.combine(posthogApiKey) - hasher.combine(rageshakeSubmitUrl) - hasher.combine(sentryDsn) - hasher.combine(sentryEnvironment) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -1446,7 +1287,7 @@ public func FfiConverterTypeVirtualElementCallWidgetProperties_lower(_ value: Vi * Settings for end-to-end encryption features. */ -public enum BackupDownloadStrategy { +public enum BackupDownloadStrategy: Equatable, Hashable { /** * Automatically download all room keys from the backup when the backup @@ -1472,9 +1313,13 @@ public enum BackupDownloadStrategy { * This is the default option. */ case manual -} + + + +} + #if compiler(>=6) extension BackupDownloadStrategy: Sendable {} #endif @@ -1534,13 +1379,6 @@ public func FfiConverterTypeBackupDownloadStrategy_lower(_ value: BackupDownload } -extension BackupDownloadStrategy: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -1549,7 +1387,7 @@ extension BackupDownloadStrategy: Equatable, Hashable {} * This controls the url parameters: `perParticipantE2EE`, `password`. */ -public enum EncryptionSystem { +public enum EncryptionSystem: Equatable, Hashable { /** * Equivalent to the element call url parameter: `perParticipantE2EE=false` @@ -1570,9 +1408,13 @@ public enum EncryptionSystem { * The secret/password which is used in the url. */secret: String ) -} + + + +} + #if compiler(>=6) extension EncryptionSystem: Sendable {} #endif @@ -1634,20 +1476,13 @@ public func FfiConverterTypeEncryptionSystem_lower(_ value: EncryptionSystem) -> } -extension EncryptionSystem: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Defines how (if) element-call renders a header. */ -public enum HeaderStyle { +public enum HeaderStyle: Equatable, Hashable { /** * The normal header with branding. @@ -1661,9 +1496,13 @@ public enum HeaderStyle { * No Header (useful for webapps). */ case none -} + + + +} + #if compiler(>=6) extension HeaderStyle: Sendable {} #endif @@ -1723,13 +1562,6 @@ public func FfiConverterTypeHeaderStyle_lower(_ value: HeaderStyle) -> RustBuffe } -extension HeaderStyle: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -1738,7 +1570,7 @@ extension HeaderStyle: Equatable, Hashable {} * This controls whether to show or skip the lobby. */ -public enum Intent { +public enum Intent: Equatable, Hashable { /** * The user wants to start a call. @@ -1757,9 +1589,13 @@ public enum Intent { * The user wants to start a call in a "Direct Message" (DM) room. */ case startCallDm -} + + + +} + #if compiler(>=6) extension Intent: Sendable {} #endif @@ -1825,20 +1661,13 @@ public func FfiConverterTypeIntent_lower(_ value: Intent) -> RustBuffer { } -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 { +public enum NotificationType: Equatable, Hashable { /** * The receiving client should display a visual notification. @@ -1848,9 +1677,13 @@ public enum NotificationType { * The receiving client should ring with an audible sound. */ case ring -} + + + +} + #if compiler(>=6) extension NotificationType: Sendable {} #endif @@ -1904,20 +1737,13 @@ public func FfiConverterTypeNotificationType_lower(_ value: NotificationType) -> } -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. /** * Current state of a [`Paginator`]. */ -public enum PaginatorState { +public enum PaginatorState: Equatable, Hashable { /** * The initial state of the paginator. @@ -1936,9 +1762,13 @@ public enum PaginatorState { * The paginator is… paginating one direction or another. */ case paginating -} + + + +} + #if compiler(>=6) extension PaginatorState: Sendable {} #endif @@ -2004,19 +1834,12 @@ public func FfiConverterTypePaginatorState_lower(_ value: PaginatorState) -> Rus } -extension PaginatorState: Equatable, Hashable {} - - - - - - /** * The error type for failures while trying to log in a new device using a QR * code. */ -public enum QrCodeLoginError: Swift.Error { +public enum QrCodeLoginError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -2081,8 +1904,21 @@ public enum QrCodeLoginError: Swift.Error { */ case ServerReset(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension QrCodeLoginError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -2195,28 +2031,13 @@ public func FfiConverterTypeQRCodeLoginError_lower(_ value: QrCodeLoginError) -> return FfiConverterTypeQRCodeLoginError.lower(value) } - -extension QrCodeLoginError: Equatable, Hashable {} - - - - -extension QrCodeLoginError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The role of a member in a room. */ -public enum RoomMemberRole { +public enum RoomMemberRole: Equatable, Hashable { /** * The member is a creator. @@ -2243,9 +2064,13 @@ public enum RoomMemberRole { * The member is a regular user. */ case user -} + + + +} + #if compiler(>=6) extension RoomMemberRole: Sendable {} #endif @@ -2311,20 +2136,13 @@ public func FfiConverterTypeRoomMemberRole_lower(_ value: RoomMemberRole) -> Rus } -extension RoomMemberRole: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Status for the back-pagination on a room event cache. */ -public enum RoomPaginationStatus { +public enum RoomPaginationStatus: Equatable, Hashable { /** * No back-pagination is happening right now. @@ -2339,9 +2157,13 @@ public enum RoomPaginationStatus { * Back-pagination is already running in the background. */ case paginating -} + + + +} + #if compiler(>=6) extension RoomPaginationStatus: Sendable {} #endif @@ -2397,13 +2219,6 @@ public func FfiConverterTypeRoomPaginationStatus_lower(_ value: RoomPaginationSt } -extension RoomPaginationStatus: Equatable, Hashable {} - - - - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -2581,13 +2396,13 @@ private enum InitializationResult { // the code inside is only computed once. private let initializationResult: InitializationResult = { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 29 + let bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib let scaffolding_contract_version = ffi_matrix_sdk_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { return InitializationResult.contractVersionMismatch } - if (uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() != 25566) { + if (uniffi_matrix_sdk_checksum_method_oauthauthorizationdata_login_url() != 47865) { return InitializationResult.apiChecksumMismatch } diff --git a/swift/matrix_sdk_base.swift b/swift/matrix_sdk_base.swift index 45155aa..901915c 100644 --- a/swift/matrix_sdk_base.swift +++ b/swift/matrix_sdk_base.swift @@ -352,21 +352,31 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } +// Initial value and increment amount for handles. +// These ensure that SWIFT handles always have the lowest bit set +fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 +fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 + fileprivate final class UniffiHandleMap: @unchecked Sendable { // All mutation happens with this lock held, which is why we implement @unchecked Sendable. private let lock = NSLock() private var map: [UInt64: T] = [:] - private var currentHandle: UInt64 = 1 + private var currentHandle: UInt64 = UNIFFI_HANDLEMAP_INITIAL func insert(obj: T) -> UInt64 { lock.withLock { - let handle = currentHandle - currentHandle += 1 - map[handle] = obj - return handle + return doInsert(obj) } } + // Low-level insert function, this assumes `lock` is held. + private func doInsert(_ obj: T) -> UInt64 { + let handle = currentHandle + currentHandle += UNIFFI_HANDLEMAP_DELTA + map[handle] = obj + return handle + } + func get(handle: UInt64) throws -> T { try lock.withLock { guard let obj = map[handle] else { @@ -376,6 +386,15 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { } } + func clone(handle: UInt64) throws -> UInt64 { + try lock.withLock { + guard let obj = map[handle] else { + throw UniffiInternalError.unexpectedStaleHandle + } + return doInsert(obj) + } + } + @discardableResult func remove(handle: UInt64) throws -> T { try lock.withLock { @@ -488,7 +507,7 @@ fileprivate struct FfiConverterDuration: FfiConverterRustBuffer { * * [`EventCacheStore`]: crate::event_cache::store::EventCacheStore */ -public struct MediaRetentionPolicy { +public struct MediaRetentionPolicy: Equatable, Hashable { /** * The maximum authorized size of the overall media cache, in bytes. * @@ -606,40 +625,16 @@ public struct MediaRetentionPolicy { self.lastAccessExpiry = lastAccessExpiry self.cleanupFrequency = cleanupFrequency } + + + + } #if compiler(>=6) extension MediaRetentionPolicy: Sendable {} #endif - -extension MediaRetentionPolicy: Equatable, Hashable { - public static func ==(lhs: MediaRetentionPolicy, rhs: MediaRetentionPolicy) -> Bool { - if lhs.maxCacheSize != rhs.maxCacheSize { - return false - } - if lhs.maxFileSize != rhs.maxFileSize { - return false - } - if lhs.lastAccessExpiry != rhs.lastAccessExpiry { - return false - } - if lhs.cleanupFrequency != rhs.cleanupFrequency { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(maxCacheSize) - hasher.combine(maxFileSize) - hasher.combine(lastAccessExpiry) - hasher.combine(cleanupFrequency) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -683,7 +678,7 @@ public func FfiConverterTypeMediaRetentionPolicy_lower(_ value: MediaRetentionPo * Represents the state of a room encryption. */ -public enum EncryptionState { +public enum EncryptionState: Equatable, Hashable { /** * The room is encrypted. @@ -698,9 +693,13 @@ public enum EncryptionState { * `/sync` did not provide all data needed to decide. */ case unknown -} + + + +} + #if compiler(>=6) extension EncryptionState: Sendable {} #endif @@ -760,13 +759,6 @@ public func FfiConverterTypeEncryptionState_lower(_ value: EncryptionState) -> R } -extension EncryptionState: Equatable, Hashable {} - - - - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -824,7 +816,7 @@ private enum InitializationResult { // the code inside is only computed once. private let initializationResult: InitializationResult = { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 29 + let bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib let scaffolding_contract_version = ffi_matrix_sdk_base_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { diff --git a/swift/matrix_sdk_common.swift b/swift/matrix_sdk_common.swift index 0cd6858..c4b68b4 100644 --- a/swift/matrix_sdk_common.swift +++ b/swift/matrix_sdk_common.swift @@ -352,21 +352,31 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } +// Initial value and increment amount for handles. +// These ensure that SWIFT handles always have the lowest bit set +fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 +fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 + fileprivate final class UniffiHandleMap: @unchecked Sendable { // All mutation happens with this lock held, which is why we implement @unchecked Sendable. private let lock = NSLock() private var map: [UInt64: T] = [:] - private var currentHandle: UInt64 = 1 + private var currentHandle: UInt64 = UNIFFI_HANDLEMAP_INITIAL func insert(obj: T) -> UInt64 { lock.withLock { - let handle = currentHandle - currentHandle += 1 - map[handle] = obj - return handle + return doInsert(obj) } } + // Low-level insert function, this assumes `lock` is held. + private func doInsert(_ obj: T) -> UInt64 { + let handle = currentHandle + currentHandle += UNIFFI_HANDLEMAP_DELTA + map[handle] = obj + return handle + } + func get(handle: UInt64) throws -> T { try lock.withLock { guard let obj = map[handle] else { @@ -376,6 +386,15 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { } } + func clone(handle: UInt64) throws -> UInt64 { + try lock.withLock { + guard let obj = map[handle] else { + throw UniffiInternalError.unexpectedStaleHandle + } + return doInsert(obj) + } + } + @discardableResult func remove(handle: UInt64) throws -> T { try lock.withLock { @@ -444,7 +463,7 @@ fileprivate struct FfiConverterString: FfiConverter { * A machine-readable representation of the authenticity for a `ShieldState`. */ -public enum ShieldStateCode { +public enum ShieldStateCode: Equatable, Hashable { /** * Not enough information available to check the authenticity. @@ -475,9 +494,13 @@ public enum ShieldStateCode { * that established the Megolm session. */ case mismatchedSender -} + + + +} + #if compiler(>=6) extension ShieldStateCode: Sendable {} #endif @@ -561,13 +584,6 @@ public func FfiConverterTypeShieldStateCode_lower(_ value: ShieldStateCode) -> R } -extension ShieldStateCode: Equatable, Hashable {} - - - - - - private enum InitializationResult { case ok case contractVersionMismatch @@ -577,7 +593,7 @@ private enum InitializationResult { // the code inside is only computed once. private let initializationResult: InitializationResult = { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 29 + let bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib let scaffolding_contract_version = ffi_matrix_sdk_common_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { diff --git a/swift/matrix_sdk_crypto.swift b/swift/matrix_sdk_crypto.swift index 53f91d4..bcab15c 100644 --- a/swift/matrix_sdk_crypto.swift +++ b/swift/matrix_sdk_crypto.swift @@ -352,21 +352,31 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } +// Initial value and increment amount for handles. +// These ensure that SWIFT handles always have the lowest bit set +fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 +fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 + fileprivate final class UniffiHandleMap: @unchecked Sendable { // All mutation happens with this lock held, which is why we implement @unchecked Sendable. private let lock = NSLock() private var map: [UInt64: T] = [:] - private var currentHandle: UInt64 = 1 + private var currentHandle: UInt64 = UNIFFI_HANDLEMAP_INITIAL func insert(obj: T) -> UInt64 { lock.withLock { - let handle = currentHandle - currentHandle += 1 - map[handle] = obj - return handle + return doInsert(obj) } } + // Low-level insert function, this assumes `lock` is held. + private func doInsert(_ obj: T) -> UInt64 { + let handle = currentHandle + currentHandle += UNIFFI_HANDLEMAP_DELTA + map[handle] = obj + return handle + } + func get(handle: UInt64) throws -> T { try lock.withLock { guard let obj = map[handle] else { @@ -376,6 +386,15 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { } } + func clone(handle: UInt64) throws -> UInt64 { + try lock.withLock { + guard let obj = map[handle] else { + throw UniffiInternalError.unexpectedStaleHandle + } + return doInsert(obj) + } + } + @discardableResult func remove(handle: UInt64) throws -> T { try lock.withLock { @@ -442,7 +461,7 @@ fileprivate struct FfiConverterString: FfiConverter { /** * Settings for decrypting messages */ -public struct DecryptionSettings { +public struct DecryptionSettings: Equatable, Hashable { /** * The trust level in the sender's device that is required to decrypt the * event. If the sender's device is not sufficiently trusted, @@ -460,28 +479,16 @@ public struct DecryptionSettings { */senderDeviceTrustRequirement: TrustRequirement) { self.senderDeviceTrustRequirement = senderDeviceTrustRequirement } + + + + } #if compiler(>=6) extension DecryptionSettings: Sendable {} #endif - -extension DecryptionSettings: Equatable, Hashable { - public static func ==(lhs: DecryptionSettings, rhs: DecryptionSettings) -> Bool { - if lhs.senderDeviceTrustRequirement != rhs.senderDeviceTrustRequirement { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(senderDeviceTrustRequirement) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -520,7 +527,7 @@ public func FfiConverterTypeDecryptionSettings_lower(_ value: DecryptionSettings * current discussion. */ -public enum CollectStrategy { +public enum CollectStrategy: Equatable, Hashable { /** * Share with all (unblacklisted) devices. @@ -559,9 +566,13 @@ public enum CollectStrategy { * - It is the current own device of the user. */ case onlyTrustedDevices -} + + + +} + #if compiler(>=6) extension CollectStrategy: Sendable {} #endif @@ -627,20 +638,13 @@ public func FfiConverterTypeCollectStrategy_lower(_ value: CollectStrategy) -> R } -extension CollectStrategy: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The state of an identity - verified, pinned etc. */ -public enum IdentityState { +public enum IdentityState: Equatable, Hashable { /** * The user is verified with us @@ -667,9 +671,13 @@ public enum IdentityState { * [`UserIdentity::withdraw_verification`] to make it pinned. */ case verificationViolation -} + + + +} + #if compiler(>=6) extension IdentityState: Sendable {} #endif @@ -735,20 +743,13 @@ public func FfiConverterTypeIdentityState_lower(_ value: IdentityState) -> RustB } -extension IdentityState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The local trust state of a device. */ -public enum LocalTrust { +public enum LocalTrust: Equatable, Hashable { /** * The device has been verified and is trusted. @@ -766,9 +767,13 @@ public enum LocalTrust { * The trust state is unset. */ case unset -} + + + +} + #if compiler(>=6) extension LocalTrust: Sendable {} #endif @@ -834,18 +839,11 @@ public func FfiConverterTypeLocalTrust_lower(_ value: LocalTrust) -> RustBuffer } -extension LocalTrust: Equatable, Hashable {} - - - - - - /** * Error type for the decoding of the [`QrCodeData`]. */ -public enum LoginQrCodeDecodeError: Swift.Error { +public enum LoginQrCodeDecodeError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -886,8 +884,21 @@ public enum LoginQrCodeDecodeError: Swift.Error { */ case InvalidPrefix(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension LoginQrCodeDecodeError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -976,28 +987,13 @@ public func FfiConverterTypeLoginQrCodeDecodeError_lower(_ value: LoginQrCodeDec return FfiConverterTypeLoginQrCodeDecodeError.lower(value) } - -extension LoginQrCodeDecodeError: Equatable, Hashable {} - - - - -extension LoginQrCodeDecodeError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The result of a signature check. */ -public enum SignatureState { +public enum SignatureState: Equatable, Hashable { /** * The signature is missing. @@ -1017,9 +1013,13 @@ public enum SignatureState { * signature is trusted. */ case validAndTrusted -} + + + +} + #if compiler(>=6) extension SignatureState: Sendable {} #endif @@ -1085,13 +1085,6 @@ public func FfiConverterTypeSignatureState_lower(_ value: SignatureState) -> Rus } -extension SignatureState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -1099,7 +1092,7 @@ extension SignatureState: Equatable, Hashable {} * event. */ -public enum TrustRequirement { +public enum TrustRequirement: Equatable, Hashable { /** * Decrypt events from everyone regardless of trust. @@ -1114,9 +1107,13 @@ public enum TrustRequirement { * Only decrypt events from cross-signed devices. */ case crossSigned -} + + + +} + #if compiler(>=6) extension TrustRequirement: Sendable {} #endif @@ -1176,20 +1173,13 @@ public func FfiConverterTypeTrustRequirement_lower(_ value: TrustRequirement) -> } -extension TrustRequirement: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Our best guess at the reason why an event can't be decrypted. */ -public enum UtdCause { +public enum UtdCause: Equatable, Hashable { /** * We don't have an explanation for why this UTD happened - it is probably @@ -1273,9 +1263,13 @@ public enum UtdCause { * Expected message to user: "You need to verify this device". */ case historicalMessageAndDeviceIsUnverified -} + + + +} + #if compiler(>=6) extension UtdCause: Sendable {} #endif @@ -1371,13 +1365,6 @@ public func FfiConverterTypeUtdCause_lower(_ value: UtdCause) -> RustBuffer { } -extension UtdCause: Equatable, Hashable {} - - - - - - private enum InitializationResult { case ok case contractVersionMismatch @@ -1387,7 +1374,7 @@ private enum InitializationResult { // the code inside is only computed once. private let initializationResult: InitializationResult = { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 29 + let bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib let scaffolding_contract_version = ffi_matrix_sdk_crypto_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { diff --git a/swift/matrix_sdk_ffi.swift b/swift/matrix_sdk_ffi.swift index 58d9196..2f1b4e1 100644 --- a/swift/matrix_sdk_ffi.swift +++ b/swift/matrix_sdk_ffi.swift @@ -352,21 +352,31 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } +// Initial value and increment amount for handles. +// These ensure that SWIFT handles always have the lowest bit set +fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 +fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 + fileprivate final class UniffiHandleMap: @unchecked Sendable { // All mutation happens with this lock held, which is why we implement @unchecked Sendable. private let lock = NSLock() private var map: [UInt64: T] = [:] - private var currentHandle: UInt64 = 1 + private var currentHandle: UInt64 = UNIFFI_HANDLEMAP_INITIAL func insert(obj: T) -> UInt64 { lock.withLock { - let handle = currentHandle - currentHandle += 1 - map[handle] = obj - return handle + return doInsert(obj) } } + // Low-level insert function, this assumes `lock` is held. + private func doInsert(_ obj: T) -> UInt64 { + let handle = currentHandle + currentHandle += UNIFFI_HANDLEMAP_DELTA + map[handle] = obj + return handle + } + func get(handle: UInt64) throws -> T { try lock.withLock { guard let obj = map[handle] else { @@ -376,6 +386,15 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { } } + func clone(handle: UInt64) throws -> UInt64 { + try lock.withLock { + guard let obj = map[handle] else { + throw UniffiInternalError.unexpectedStaleHandle + } + return doInsert(obj) + } + } + @discardableResult func remove(handle: UInt64) throws -> T { try lock.withLock { @@ -668,13 +687,13 @@ public protocol CheckCodeSenderProtocol: AnyObject, Sendable { * secure channel is indeed secure. */ open class CheckCodeSender: CheckCodeSenderProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -684,36 +703,37 @@ open class CheckCodeSender: CheckCodeSenderProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_checkcodesender(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_checkcodesender(handle, $0) } } @@ -733,7 +753,7 @@ open func send(code: UInt8)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_checkcodesender_send( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterUInt8.lower(code) ) }, @@ -746,6 +766,7 @@ open func send(code: UInt8)async throws { } + } @@ -753,33 +774,24 @@ open func send(code: UInt8)async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeCheckCodeSender: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = CheckCodeSender - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> CheckCodeSender { - return CheckCodeSender(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> CheckCodeSender { + return CheckCodeSender(unsafeFromHandle: handle) } - public static func lower(_ value: CheckCodeSender) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: CheckCodeSender) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> CheckCodeSender { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: CheckCodeSender, 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))))) + writeInt(&buf, lower(value)) } } @@ -787,14 +799,14 @@ public struct FfiConverterTypeCheckCodeSender: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCheckCodeSender_lift(_ pointer: UnsafeMutableRawPointer) throws -> CheckCodeSender { - return try FfiConverterTypeCheckCodeSender.lift(pointer) +public func FfiConverterTypeCheckCodeSender_lift(_ handle: UInt64) throws -> CheckCodeSender { + return try FfiConverterTypeCheckCodeSender.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeCheckCodeSender_lower(_ value: CheckCodeSender) -> UnsafeMutableRawPointer { +public func FfiConverterTypeCheckCodeSender_lower(_ value: CheckCodeSender) -> UInt64 { return FfiConverterTypeCheckCodeSender.lower(value) } @@ -821,12 +833,6 @@ public protocol ClientProtocol: AnyObject, Sendable { func accountUrl(action: AccountManagementAction?) async throws -> String? - /** - * Adds a recently used emoji to the list and uploads the updated - * `io.element.recent_emoji` content to the global account data. - */ - func addRecentEmoji(emoji: String) async throws - /** * Find all sliding sync versions that are available. * @@ -981,12 +987,6 @@ public protocol ClientProtocol: AnyObject, Sendable { func getProfile(userId: String) async throws -> UserProfile - /** - * Gets the list of recently used emojis from the - * `io.element.recent_emoji` global account data. - */ - func getRecentEmojis() async throws -> [RecentEmoji] - func getRecentlyVisitedRooms() async throws -> [String] /** @@ -1399,15 +1399,27 @@ public protocol ClientProtocol: AnyObject, Sendable { */ func userIdServerName() throws -> String + /** + * Adds a recently used emoji to the list and uploads the updated + * `io.element.recent_emoji` content to the global account data. + */ + func addRecentEmoji(emoji: String) async throws + + /** + * Gets the list of recently used emojis from the + * `io.element.recent_emoji` global account data. + */ + func getRecentEmojis() async throws -> [RecentEmoji] + } open class Client: ClientProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -1417,36 +1429,37 @@ open class Client: ClientProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_client(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_client(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_client(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_client(handle, $0) } } @@ -1461,7 +1474,7 @@ open func abortOidcAuth(authorizationData: OAuthAuthorizationData)async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_abort_oidc_auth( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeOAuthAuthorizationData_lower(authorizationData) ) }, @@ -1485,7 +1498,7 @@ open func accountData(eventType: String)async throws -> String? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_account_data( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventType) ) }, @@ -1502,7 +1515,7 @@ open func accountUrl(action: AccountManagementAction?)async throws -> String? try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_account_url( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionTypeAccountManagementAction.lower(action) ) }, @@ -1514,27 +1527,6 @@ open func accountUrl(action: AccountManagementAction?)async throws -> String? ) } - /** - * Adds a recently used emoji to the list and uploads the updated - * `io.element.recent_emoji` content to the global account data. - */ -open func addRecentEmoji(emoji: String)async throws { - return - try await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( - self.uniffiClonePointer(), - FfiConverterString.lower(emoji) - ) - }, - 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 - ) -} - /** * Find all sliding sync versions that are available. * @@ -1549,7 +1541,7 @@ open func availableSlidingSyncVersions()async -> [SlidingSyncVersion] { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_available_sliding_sync_versions( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1571,7 +1563,7 @@ open func avatarUrl()async throws -> String? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_avatar_url( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1595,13 +1587,13 @@ open func awaitRoomRemoteEcho(roomId: String)async throws -> Room { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoom_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -1615,7 +1607,7 @@ open func cachedAvatarUrl()async throws -> String? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1633,7 +1625,8 @@ open func cachedAvatarUrl()async throws -> String? { */ open func canDeactivateAccount() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_can_deactivate_account( + self.uniffiCloneHandle(),$0 ) }) } @@ -1667,7 +1660,7 @@ open func clearCaches(syncService: SyncService?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_clear_caches( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionTypeSyncService.lower(syncService) ) }, @@ -1684,7 +1677,7 @@ open func createRoom(request: CreateRoomParameters)async throws -> String { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_create_room( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeCreateRoomParameters_lower(request) ) }, @@ -1706,7 +1699,7 @@ open func customLoginWithJwt(jwt: String, initialDeviceName: String?, deviceId: try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_custom_login_with_jwt( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(jwt),FfiConverterOptionString.lower(initialDeviceName),FfiConverterOptionString.lower(deviceId) ) }, @@ -1735,7 +1728,7 @@ open func deactivateAccount(authData: AuthData?, eraseData: Bool)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_deactivate_account( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionTypeAuthData.lower(authData),FfiConverterBool.lower(eraseData) ) }, @@ -1755,7 +1748,7 @@ open func deletePusher(identifiers: PusherIdentifiers)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_delete_pusher( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypePusherIdentifiers_lower(identifiers) ) }, @@ -1769,7 +1762,8 @@ open func deletePusher(identifiers: PusherIdentifiers)async throws { open func deviceId()throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_device_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_device_id( + self.uniffiCloneHandle(),$0 ) }) } @@ -1779,7 +1773,7 @@ open func displayName()async throws -> String { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_display_name( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1805,7 +1799,7 @@ open func enableAllSendQueues(enable: Bool)async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_enable_all_send_queues( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(enable) ) }, @@ -1823,7 +1817,8 @@ open func enableAllSendQueues(enable: Bool)async { * queue. */ open func enableSendQueueUploadProgress(enable: Bool) {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_enable_send_queue_upload_progress( + self.uniffiCloneHandle(), FfiConverterBool.lower(enable),$0 ) } @@ -1831,7 +1826,8 @@ open func enableSendQueueUploadProgress(enable: Bool) {try! rustCall() { open func encryption() -> Encryption { return try! FfiConverterTypeEncryption_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_encryption(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_encryption( + self.uniffiCloneHandle(),$0 ) }) } @@ -1844,7 +1840,7 @@ open func fetchMediaPreviewConfig()async throws -> MediaPreviewConfig? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_fetch_media_preview_config( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1858,7 +1854,8 @@ open func fetchMediaPreviewConfig()async throws -> MediaPreviewConfig? { open func getDmRoom(userId: String)throws -> Room? { return try FfiConverterOptionTypeRoom.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_get_dm_room( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -1873,7 +1870,7 @@ open func getInviteAvatarsDisplayPolicy()async throws -> InviteAvatars? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_invite_avatars_display_policy( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1894,7 +1891,7 @@ open func getMaxMediaUploadSize()async throws -> UInt64 { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_max_media_upload_size( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1911,7 +1908,7 @@ open func getMediaContent(mediaSource: MediaSource)async throws -> Data { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_media_content( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeMediaSource_lower(mediaSource) ) }, @@ -1933,13 +1930,13 @@ open func getMediaFile(mediaSource: MediaSource, filename: String?, mimeType: St try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_media_file( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeMediaSource_lower(mediaSource),FfiConverterOptionString.lower(filename),FfiConverterString.lower(mimeType),FfiConverterBool.lower(useCache),FfiConverterOptionString.lower(tempDir) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeMediaFileHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -1954,7 +1951,7 @@ open func getMediaPreviewDisplayPolicy()async throws -> MediaPreviews? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_media_preview_display_policy( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -1971,7 +1968,7 @@ open func getMediaThumbnail(mediaSource: MediaSource, width: UInt64, height: UIn try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_media_thumbnail( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeMediaSource_lower(mediaSource),FfiConverterUInt64.lower(width),FfiConverterUInt64.lower(height) ) }, @@ -1988,13 +1985,13 @@ open func getNotificationSettings()async -> NotificationSettings { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_notification_settings( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeNotificationSettings_lift, errorHandler: nil @@ -2006,7 +2003,7 @@ open func getProfile(userId: String)async throws -> UserProfile { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_profile( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -2018,33 +2015,12 @@ open func getProfile(userId: String)async throws -> UserProfile { ) } - /** - * Gets the list of recently used emojis from the - * `io.element.recent_emoji` global account data. - */ -open func getRecentEmojis()async throws -> [RecentEmoji] { - return - try await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( - 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: FfiConverterSequenceTypeRecentEmoji.lift, - errorHandler: FfiConverterTypeClientError_lift - ) -} - open func getRecentlyVisitedRooms()async throws -> [String] { return try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2071,7 +2047,8 @@ open func getRecentlyVisitedRooms()async throws -> [String] { */ open func getRoom(roomId: String)throws -> Room? { return try FfiConverterOptionTypeRoom.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_get_room(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_get_room( + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),$0 ) }) @@ -2085,13 +2062,13 @@ open func getRoomPreviewFromRoomAlias(roomAlias: String)async throws -> RoomPre try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_alias( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomAlias) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomPreview_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2109,13 +2086,13 @@ open func getRoomPreviewFromRoomId(roomId: String, viaServers: [String])async th try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview_from_room_id( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),FfiConverterSequenceString.lower(viaServers) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomPreview_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2126,13 +2103,13 @@ open func getSessionVerificationController()async throws -> SessionVerification try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeSessionVerificationController_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2146,7 +2123,7 @@ open func getStoreSizes()async throws -> StoreSizes { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_store_sizes( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2173,7 +2150,7 @@ open func getUrl(url: String)async throws -> Data { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_get_url( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(url) ) }, @@ -2190,7 +2167,8 @@ open func getUrl(url: String)async throws -> Data { */ open func homeserver() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_homeserver(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_homeserver( + self.uniffiCloneHandle(),$0 ) }) } @@ -2203,13 +2181,13 @@ open func homeserverLoginDetails()async -> HomeserverLoginDetails { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_homeserver_login_details( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeHomeserverLoginDetails_lift, errorHandler: nil @@ -2221,7 +2199,7 @@ open func ignoreUser(userId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_ignore_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -2238,7 +2216,7 @@ open func ignoredUsers()async throws -> [String] { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_ignored_users( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2258,7 +2236,7 @@ open func isLivekitRtcSupported()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_is_livekit_rtc_supported( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2278,7 +2256,7 @@ open func isReportRoomApiSupported()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_is_report_room_api_supported( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2304,7 +2282,7 @@ open func isRoomAliasAvailable(alias: String)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_is_room_alias_available( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(alias) ) }, @@ -2328,13 +2306,13 @@ open func joinRoomById(roomId: String)async throws -> Room { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoom_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2353,13 +2331,13 @@ open func joinRoomByIdOrAlias(roomIdOrAlias: String, serverNames: [String])async try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_join_room_by_id_or_alias( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomIdOrAlias),FfiConverterSequenceString.lower(serverNames) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoom_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2373,13 +2351,13 @@ open func knock(roomIdOrAlias: String, reason: String?, serverNames: [String])as try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_knock( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomIdOrAlias),FfiConverterOptionString.lower(reason),FfiConverterSequenceString.lower(serverNames) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoom_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2393,7 +2371,7 @@ open func login(username: String, password: String, initialDeviceName: String?, try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_login( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(username),FfiConverterString.lower(password),FfiConverterOptionString.lower(initialDeviceName),FfiConverterOptionString.lower(deviceId) ) }, @@ -2413,7 +2391,7 @@ open func loginWithEmail(email: String, password: String, initialDeviceName: Str try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_login_with_email( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(email),FfiConverterString.lower(password),FfiConverterOptionString.lower(initialDeviceName),FfiConverterOptionString.lower(deviceId) ) }, @@ -2433,7 +2411,7 @@ open func loginWithOidcCallback(callbackUrl: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_login_with_oidc_callback( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(callbackUrl) ) }, @@ -2453,7 +2431,7 @@ open func logout()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_logout( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2471,7 +2449,8 @@ open func logout()async throws { */ open func newGrantLoginWithQrCodeHandler() -> GrantLoginWithQrCodeHandler { return try! FfiConverterTypeGrantLoginWithQrCodeHandler_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_new_grant_login_with_qr_code_handler( + self.uniffiCloneHandle(),$0 ) }) } @@ -2487,7 +2466,8 @@ open func newGrantLoginWithQrCodeHandler() -> GrantLoginWithQrCodeHandler { */ open func newLoginWithQrCodeHandler(oidcConfiguration: OidcConfiguration) -> LoginWithQrCodeHandler { return try! FfiConverterTypeLoginWithQrCodeHandler_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_new_login_with_qr_code_handler( + self.uniffiCloneHandle(), FfiConverterTypeOidcConfiguration_lower(oidcConfiguration),$0 ) }) @@ -2498,13 +2478,13 @@ open func notificationClient(processSetup: NotificationProcessSetup)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_notification_client( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeNotificationProcessSetup_lower(processSetup) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeNotificationClient_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -2519,7 +2499,8 @@ open func notificationClient(processSetup: NotificationProcessSetup)async throws */ open func observeAccountDataEvent(eventType: AccountDataEventType, listener: AccountDataListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_observe_account_data_event( + self.uniffiCloneHandle(), FfiConverterTypeAccountDataEventType_lower(eventType), FfiConverterCallbackInterfaceAccountDataListener_lower(listener),$0 ) @@ -2535,7 +2516,8 @@ open func observeAccountDataEvent(eventType: AccountDataEventType, listener: Acc */ open func observeRoomAccountDataEvent(roomId: String, eventType: RoomAccountDataEventType, listener: RoomAccountDataListener)throws -> TaskHandle { return try FfiConverterTypeTaskHandle_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_observe_room_account_data_event( + self.uniffiCloneHandle(), FfiConverterString.lower(roomId), FfiConverterTypeRoomAccountDataEventType_lower(eventType), FfiConverterCallbackInterfaceRoomAccountDataListener_lower(listener),$0 @@ -2552,7 +2534,7 @@ open func optimizeStores()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_optimize_stores( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2582,7 +2564,7 @@ open func registerNotificationHandler(listener: SyncNotificationListener)async try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handler( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSyncNotificationListener_lower(listener) ) }, @@ -2600,7 +2582,7 @@ open func removeAvatar()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2624,7 +2606,7 @@ open func resetSupportedVersions()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2648,7 +2630,7 @@ open func resetWellKnown()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2669,7 +2651,7 @@ open func resolveRoomAlias(roomAlias: String)async throws -> ResolvedRoomAlias? try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomAlias) ) }, @@ -2694,7 +2676,7 @@ open func restoreSession(session: Session)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_restore_session( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeSession_lower(session) ) }, @@ -2716,7 +2698,7 @@ open func restoreSessionWith(session: Session, roomLoadSettings: RoomLoadSetting try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_restore_session_with( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeSession_lower(session),FfiConverterTypeRoomLoadSettings_lower(roomLoadSettings) ) }, @@ -2736,7 +2718,7 @@ open func roomAliasExists(roomAlias: String)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_room_alias_exists( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomAlias) ) }, @@ -2750,14 +2732,16 @@ open func roomAliasExists(roomAlias: String)async throws -> Bool { open func roomDirectorySearch() -> RoomDirectorySearch { return try! FfiConverterTypeRoomDirectorySearch_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search( + self.uniffiCloneHandle(),$0 ) }) } open func rooms() -> [Room] { return try! FfiConverterSequenceTypeRoom.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_rooms(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_rooms( + self.uniffiCloneHandle(),$0 ) }) } @@ -2767,7 +2751,7 @@ open func searchUsers(searchTerm: String, limit: UInt64)async throws -> SearchU try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_search_users( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(searchTerm),FfiConverterUInt64.lower(limit) ) }, @@ -2794,7 +2778,8 @@ open func searchUsers(searchTerm: String, limit: UInt64)async throws -> SearchU */ open func server() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_server(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_server( + self.uniffiCloneHandle(),$0 ) }) } @@ -2810,7 +2795,7 @@ open func serverVendorInfo()async throws -> ServerVendorInfo { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_server_vendor_info( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -2824,7 +2809,8 @@ open func serverVendorInfo()async throws -> ServerVendorInfo { open func session()throws -> Session { return try FfiConverterTypeSession_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_session(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_session( + self.uniffiCloneHandle(),$0 ) }) } @@ -2839,7 +2825,7 @@ open func setAccountData(eventType: String, content: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_account_data( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventType),FfiConverterString.lower(content) ) }, @@ -2857,7 +2843,8 @@ open func setAccountData(eventType: String, content: String)async throws { */ open func setDelegate(delegate: ClientDelegate?)throws -> TaskHandle? { return try FfiConverterOptionTypeTaskHandle.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_set_delegate(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_set_delegate( + self.uniffiCloneHandle(), FfiConverterOptionCallbackInterfaceClientDelegate.lower(delegate),$0 ) }) @@ -2868,7 +2855,7 @@ open func setDisplayName(name: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_display_name( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(name) ) }, @@ -2888,7 +2875,7 @@ open func setInviteAvatarsDisplayPolicy(policy: InviteAvatars)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_invite_avatars_display_policy( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeInviteAvatars_lower(policy) ) }, @@ -2908,7 +2895,7 @@ open func setMediaPreviewDisplayPolicy(policy: MediaPreviews)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_media_preview_display_policy( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeMediaPreviews_lower(policy) ) }, @@ -2928,7 +2915,7 @@ open func setMediaRetentionPolicy(policy: MediaRetentionPolicy)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_media_retention_policy( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeMediaRetentionPolicy_lower(policy) ) }, @@ -2948,7 +2935,7 @@ open func setPusher(identifiers: PusherIdentifiers, kind: PusherKind, appDisplay try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_pusher( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypePusherIdentifiers_lower(identifiers),FfiConverterTypePusherKind_lower(kind),FfiConverterString.lower(appDisplayName),FfiConverterString.lower(deviceDisplayName),FfiConverterOptionString.lower(profileTag),FfiConverterString.lower(lang) ) }, @@ -2969,7 +2956,7 @@ open func setUtdDelegate(utdDelegate: UnableToDecryptDelegate)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_set_utd_delegate( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceUnableToDecryptDelegate_lower(utdDelegate) ) }, @@ -2986,14 +2973,16 @@ open func setUtdDelegate(utdDelegate: UnableToDecryptDelegate)async throws { */ open func slidingSyncVersion() -> SlidingSyncVersion { return try! FfiConverterTypeSlidingSyncVersion_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_sliding_sync_version( + self.uniffiCloneHandle(),$0 ) }) } open func spaceService() -> SpaceService { return try! FfiConverterTypeSpaceService_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_space_service(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_space_service( + self.uniffiCloneHandle(),$0 ) }) } @@ -3006,13 +2995,13 @@ open func startSsoLogin(redirectUrl: String, idpId: String?)async throws -> Sso try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_start_sso_login( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(redirectUrl),FfiConverterOptionString.lower(idpId) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeSsoHandler_lift, errorHandler: FfiConverterTypeSsoError_lift ) @@ -3020,7 +3009,8 @@ open func startSsoLogin(redirectUrl: String, idpId: String?)async throws -> Sso open func subscribeToIgnoredUsers(listener: IgnoredUsersListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_ignored_users( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceIgnoredUsersListener_lower(listener),$0 ) }) @@ -3034,13 +3024,13 @@ open func subscribeToMediaPreviewConfig(listener: MediaPreviewConfigListener)asy try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_media_preview_config( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceMediaPreviewConfigListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -3063,13 +3053,13 @@ open func subscribeToRoomInfo(roomId: String, listener: RoomInfoListener)async t try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_room_info( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),FfiConverterCallbackInterfaceRoomInfoListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -3084,7 +3074,8 @@ open func subscribeToRoomInfo(roomId: String, listener: RoomInfoListener)async t */ open func subscribeToSendQueueStatus(listener: SendQueueRoomErrorListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_status( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSendQueueRoomErrorListener_lower(listener),$0 ) }) @@ -3103,13 +3094,13 @@ open func subscribeToSendQueueUpdates(listener: SendQueueRoomUpdateListener)asyn try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_subscribe_to_send_queue_updates( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSendQueueRoomUpdateListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -3117,7 +3108,8 @@ open func subscribeToSendQueueUpdates(listener: SendQueueRoomUpdateListener)asyn open func syncService() -> SyncServiceBuilder { return try! FfiConverterTypeSyncServiceBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_client_sync_service(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_sync_service( + self.uniffiCloneHandle(),$0 ) }) } @@ -3127,7 +3119,7 @@ open func trackRecentlyVisitedRoom(room: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_track_recently_visited_room( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(room) ) }, @@ -3144,7 +3136,7 @@ open func unignoreUser(userId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_unignore_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -3161,7 +3153,7 @@ open func uploadAvatar(mimeType: String, data: Data)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_upload_avatar( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(mimeType),FfiConverterData.lower(data) ) }, @@ -3178,7 +3170,7 @@ open func uploadMedia(mimeType: String, data: Data, progressWatcher: ProgressWat try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_upload_media( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(mimeType),FfiConverterData.lower(data),FfiConverterOptionCallbackInterfaceProgressWatcher.lower(progressWatcher) ) }, @@ -3229,13 +3221,13 @@ open func urlForOidc(oidcConfiguration: OidcConfiguration, prompt: OidcPrompt?, try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_client_url_for_oidc( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeOidcConfiguration_lower(oidcConfiguration),FfiConverterOptionTypeOidcPrompt.lower(prompt),FfiConverterOptionString.lower(loginHint),FfiConverterOptionString.lower(deviceId),FfiConverterOptionSequenceString.lower(additionalScopes) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeOAuthAuthorizationData_lift, errorHandler: FfiConverterTypeOidcError_lift ) @@ -3243,7 +3235,8 @@ open func urlForOidc(oidcConfiguration: OidcConfiguration, prompt: OidcPrompt?, open func userId()throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_user_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_user_id( + self.uniffiCloneHandle(),$0 ) }) } @@ -3253,12 +3246,56 @@ open func userId()throws -> String { */ open func userIdServerName()throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_client_user_id_server_name( + self.uniffiCloneHandle(),$0 ) }) } + /** + * Adds a recently used emoji to the list and uploads the updated + * `io.element.recent_emoji` content to the global account data. + */ +open func addRecentEmoji(emoji: String)async throws { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_client_add_recent_emoji( + self.uniffiCloneHandle(), + FfiConverterString.lower(emoji) + ) + }, + 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 + ) +} + + /** + * Gets the list of recently used emojis from the + * `io.element.recent_emoji` global account data. + */ +open func getRecentEmojis()async throws -> [RecentEmoji] { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_method_client_get_recent_emojis( + self.uniffiCloneHandle() + + ) + }, + 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: FfiConverterSequenceTypeRecentEmoji.lift, + errorHandler: FfiConverterTypeClientError_lift + ) +} + + } @@ -3266,33 +3303,24 @@ open func userIdServerName()throws -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeClient: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = Client - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> Client { - return Client(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> Client { + return Client(unsafeFromHandle: handle) } - public static func lower(_ value: Client) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: Client) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Client { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: Client, 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))))) + writeInt(&buf, lower(value)) } } @@ -3300,14 +3328,14 @@ public struct FfiConverterTypeClient: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeClient_lift(_ pointer: UnsafeMutableRawPointer) throws -> Client { - return try FfiConverterTypeClient.lift(pointer) +public func FfiConverterTypeClient_lift(_ handle: UInt64) throws -> Client { + return try FfiConverterTypeClient.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeClient_lower(_ value: Client) -> UnsafeMutableRawPointer { +public func FfiConverterTypeClient_lower(_ value: Client) -> UInt64 { return FfiConverterTypeClient.lower(value) } @@ -3431,13 +3459,13 @@ public protocol ClientBuilderProtocol: AnyObject, Sendable { } open class ClientBuilder: ClientBuilderProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -3447,43 +3475,44 @@ open class ClientBuilder: ClientBuilderProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_clientbuilder(self.handle, $0) } } public convenience init() { - let pointer = + let handle = try! rustCall() { uniffi_matrix_sdk_ffi_fn_constructor_clientbuilder_new($0 ) } - self.init(unsafeFromRawPointer: pointer) + self.init(unsafeFromHandle: handle) } deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_clientbuilder(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_clientbuilder(handle, $0) } } @@ -3491,7 +3520,8 @@ public convenience init() { open func addRootCertificates(certificates: [Data]) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_add_root_certificates( + self.uniffiCloneHandle(), FfiConverterSequenceData.lower(certificates),$0 ) }) @@ -3502,7 +3532,8 @@ open func addRootCertificates(certificates: [Data]) -> ClientBuilder { */ open func autoEnableBackups(autoEnableBackups: Bool) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_backups( + self.uniffiCloneHandle(), FfiConverterBool.lower(autoEnableBackups),$0 ) }) @@ -3510,7 +3541,8 @@ open func autoEnableBackups(autoEnableBackups: Bool) -> ClientBuilder { open func autoEnableCrossSigning(autoEnableCrossSigning: Bool) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_auto_enable_cross_signing( + self.uniffiCloneHandle(), FfiConverterBool.lower(autoEnableCrossSigning),$0 ) }) @@ -3524,7 +3556,8 @@ open func autoEnableCrossSigning(autoEnableCrossSigning: Bool) -> ClientBuilder */ open func backupDownloadStrategy(backupDownloadStrategy: BackupDownloadStrategy) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_backup_download_strategy( + self.uniffiCloneHandle(), FfiConverterTypeBackupDownloadStrategy_lower(backupDownloadStrategy),$0 ) }) @@ -3535,13 +3568,13 @@ open func build()async throws -> Client { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_clientbuilder_build( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeClient_lift, errorHandler: FfiConverterTypeClientBuildError_lift ) @@ -3549,7 +3582,8 @@ open func build()async throws -> Client { 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(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_cross_process_store_locks_holder_name( + self.uniffiCloneHandle(), FfiConverterString.lower(holderName),$0 ) }) @@ -3560,7 +3594,8 @@ open func crossProcessStoreLocksHolderName(holderName: String) -> ClientBuilder */ open func decryptionSettings(decryptionSettings: DecryptionSettings) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_decryption_settings( + self.uniffiCloneHandle(), FfiConverterTypeDecryptionSettings_lower(decryptionSettings),$0 ) }) @@ -3568,7 +3603,8 @@ open func decryptionSettings(decryptionSettings: DecryptionSettings) -> ClientBu open func disableAutomaticTokenRefresh() -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_automatic_token_refresh( + self.uniffiCloneHandle(),$0 ) }) } @@ -3580,21 +3616,24 @@ open func disableAutomaticTokenRefresh() -> ClientBuilder { */ open func disableBuiltInRootCertificates() -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_built_in_root_certificates( + self.uniffiCloneHandle(),$0 ) }) } open func disableSslVerification() -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_disable_ssl_verification( + self.uniffiCloneHandle(),$0 ) }) } open func enableOidcRefreshLock() -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_oidc_refresh_lock( + self.uniffiCloneHandle(),$0 ) }) } @@ -3607,7 +3646,8 @@ open func enableOidcRefreshLock() -> ClientBuilder { */ open func enableShareHistoryOnInvite(enableShareHistoryOnInvite: Bool) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_enable_share_history_on_invite( + self.uniffiCloneHandle(), FfiConverterBool.lower(enableShareHistoryOnInvite),$0 ) }) @@ -3615,7 +3655,8 @@ open func enableShareHistoryOnInvite(enableShareHistoryOnInvite: Bool) -> Client open func homeserverUrl(url: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_homeserver_url( + self.uniffiCloneHandle(), FfiConverterString.lower(url),$0 ) }) @@ -3626,14 +3667,16 @@ open func homeserverUrl(url: String) -> ClientBuilder { */ open func inMemoryStore() -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_in_memory_store( + self.uniffiCloneHandle(),$0 ) }) } open func proxy(url: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_proxy( + self.uniffiCloneHandle(), FfiConverterString.lower(url),$0 ) }) @@ -3644,7 +3687,8 @@ open func proxy(url: String) -> ClientBuilder { */ open func requestConfig(config: RequestConfig) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_request_config( + self.uniffiCloneHandle(), FfiConverterTypeRequestConfig_lower(config),$0 ) }) @@ -3656,7 +3700,8 @@ open func requestConfig(config: RequestConfig) -> ClientBuilder { */ open func roomKeyRecipientStrategy(strategy: CollectStrategy) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_room_key_recipient_strategy( + self.uniffiCloneHandle(), FfiConverterTypeCollectStrategy_lower(strategy),$0 ) }) @@ -3664,7 +3709,8 @@ open func roomKeyRecipientStrategy(strategy: CollectStrategy) -> ClientBuilder open func serverName(serverName: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name( + self.uniffiCloneHandle(), FfiConverterString.lower(serverName),$0 ) }) @@ -3672,7 +3718,8 @@ open func serverName(serverName: String) -> ClientBuilder { open func serverNameOrHomeserverUrl(serverNameOrUrl: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_server_name_or_homeserver_url( + self.uniffiCloneHandle(), FfiConverterString.lower(serverNameOrUrl),$0 ) }) @@ -3688,7 +3735,8 @@ open func serverNameOrHomeserverUrl(serverNameOrUrl: String) -> ClientBuilder { */ open func sessionPaths(dataPath: String, cachePath: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_session_paths( + self.uniffiCloneHandle(), FfiConverterString.lower(dataPath), FfiConverterString.lower(cachePath),$0 ) @@ -3697,7 +3745,8 @@ open func sessionPaths(dataPath: String, cachePath: String) -> ClientBuilder { open func setSessionDelegate(sessionDelegate: ClientSessionDelegate) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_set_session_delegate( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceClientSessionDelegate_lower(sessionDelegate),$0 ) }) @@ -3705,7 +3754,8 @@ open func setSessionDelegate(sessionDelegate: ClientSessionDelegate) -> ClientBu open func slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sliding_sync_version_builder( + self.uniffiCloneHandle(), FfiConverterTypeSlidingSyncVersionBuilder_lower(versionBuilder),$0 ) }) @@ -3716,7 +3766,8 @@ open func slidingSyncVersionBuilder(versionBuilder: SlidingSyncVersionBuilder) - */ open func sqliteStore(config: SqliteStoreBuilder) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_sqlite_store( + self.uniffiCloneHandle(), FfiConverterTypeSqliteStoreBuilder_lower(config),$0 ) }) @@ -3733,7 +3784,8 @@ open func sqliteStore(config: SqliteStoreBuilder) -> ClientBuilder { */ open func systemIsMemoryConstrained() -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_system_is_memory_constrained( + self.uniffiCloneHandle(),$0 ) }) } @@ -3744,7 +3796,8 @@ open func systemIsMemoryConstrained() -> ClientBuilder { */ 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(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_threads_enabled( + self.uniffiCloneHandle(), FfiConverterBool.lower(enabled), FfiConverterBool.lower(threadSubscriptions),$0 ) @@ -3753,7 +3806,8 @@ open func threadsEnabled(enabled: Bool, threadSubscriptions: Bool) -> ClientBuil open func userAgent(userAgent: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_user_agent( + self.uniffiCloneHandle(), FfiConverterString.lower(userAgent),$0 ) }) @@ -3761,13 +3815,15 @@ open func userAgent(userAgent: String) -> ClientBuilder { open func username(username: String) -> ClientBuilder { return try! FfiConverterTypeClientBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_clientbuilder_username( + self.uniffiCloneHandle(), FfiConverterString.lower(username),$0 ) }) } + } @@ -3775,33 +3831,24 @@ open func username(username: String) -> ClientBuilder { @_documentation(visibility: private) #endif public struct FfiConverterTypeClientBuilder: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = ClientBuilder - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> ClientBuilder { - return ClientBuilder(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> ClientBuilder { + return ClientBuilder(unsafeFromHandle: handle) } - public static func lower(_ value: ClientBuilder) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: ClientBuilder) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ClientBuilder { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: ClientBuilder, 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))))) + writeInt(&buf, lower(value)) } } @@ -3809,14 +3856,14 @@ public struct FfiConverterTypeClientBuilder: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeClientBuilder_lift(_ pointer: UnsafeMutableRawPointer) throws -> ClientBuilder { - return try FfiConverterTypeClientBuilder.lift(pointer) +public func FfiConverterTypeClientBuilder_lift(_ handle: UInt64) throws -> ClientBuilder { + return try FfiConverterTypeClientBuilder.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeClientBuilder_lower(_ value: ClientBuilder) -> UnsafeMutableRawPointer { +public func FfiConverterTypeClientBuilder_lower(_ value: ClientBuilder) -> UInt64 { return FfiConverterTypeClientBuilder.lower(value) } @@ -3925,13 +3972,13 @@ public protocol EncryptionProtocol: AnyObject, Sendable { } open class Encryption: EncryptionProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -3941,36 +3988,37 @@ open class Encryption: EncryptionProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_encryption(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_encryption(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_encryption(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_encryption(handle, $0) } } @@ -3992,7 +4040,7 @@ open func backupExistsOnServer()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_backup_exists_on_server( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4006,14 +4054,16 @@ open func backupExistsOnServer()async throws -> Bool { open func backupState() -> BackupState { return try! FfiConverterTypeBackupState_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state( + self.uniffiCloneHandle(),$0 ) }) } open func backupStateListener(listener: BackupStateListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_encryption_backup_state_listener( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceBackupStateListener_lower(listener),$0 ) }) @@ -4028,7 +4078,7 @@ open func curve25519Key()async -> String? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_curve25519_key( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4046,7 +4096,7 @@ open func disableRecovery()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_disable_recovery( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4067,7 +4117,7 @@ open func ed25519Key()async -> String? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_ed25519_key( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4085,7 +4135,7 @@ open func enableBackups()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_enable_backups( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4102,7 +4152,7 @@ open func enableRecovery(waitForBackupsToUpload: Bool, passphrase: String?, prog try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_enable_recovery( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(waitForBackupsToUpload),FfiConverterOptionString.lower(passphrase),FfiConverterCallbackInterfaceEnableRecoveryProgressListener_lower(progressListener) ) }, @@ -4126,7 +4176,7 @@ open func hasDevicesToVerifyAgainst()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_has_devices_to_verify_against( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4143,7 +4193,7 @@ open func isLastDevice()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_is_last_device( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4160,7 +4210,7 @@ open func recover(recoveryKey: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_recover( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(recoveryKey) ) }, @@ -4177,7 +4227,7 @@ open func recoverAndReset(oldRecoveryKey: String)async throws -> String { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_recover_and_reset( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(oldRecoveryKey) ) }, @@ -4191,14 +4241,16 @@ open func recoverAndReset(oldRecoveryKey: String)async throws -> String { open func recoveryState() -> RecoveryState { return try! FfiConverterTypeRecoveryState_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state( + self.uniffiCloneHandle(),$0 ) }) } open func recoveryStateListener(listener: RecoveryStateListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_encryption_recovery_state_listener( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceRecoveryStateListener_lower(listener),$0 ) }) @@ -4213,7 +4265,7 @@ open func resetIdentity()async throws -> IdentityResetHandle? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_reset_identity( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4230,7 +4282,7 @@ open func resetRecoveryKey()async throws -> String { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_reset_recovery_key( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4267,7 +4319,7 @@ open func userIdentity(userId: String, fallbackToServer: Bool)async throws -> U try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_user_identity( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId),FfiConverterBool.lower(fallbackToServer) ) }, @@ -4281,14 +4333,16 @@ open func userIdentity(userId: String, fallbackToServer: Bool)async throws -> U open func verificationState() -> VerificationState { return try! FfiConverterTypeVerificationState_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state( + self.uniffiCloneHandle(),$0 ) }) } open func verificationStateListener(listener: VerificationStateListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceVerificationStateListener_lower(listener),$0 ) }) @@ -4299,7 +4353,7 @@ open func waitForBackupUploadSteadyState(progressListener: BackupSteadyStateList try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_backup_upload_steady_state( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionCallbackInterfaceBackupSteadyStateListener.lower(progressListener) ) }, @@ -4320,7 +4374,7 @@ open func waitForE2eeInitializationTasks()async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_encryption_wait_for_e2ee_initialization_tasks( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4334,6 +4388,7 @@ open func waitForE2eeInitializationTasks()async { } + } @@ -4341,33 +4396,24 @@ open func waitForE2eeInitializationTasks()async { @_documentation(visibility: private) #endif public struct FfiConverterTypeEncryption: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = Encryption - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> Encryption { - return Encryption(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> Encryption { + return Encryption(unsafeFromHandle: handle) } - public static func lower(_ value: Encryption) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: Encryption) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Encryption { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: Encryption, 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))))) + writeInt(&buf, lower(value)) } } @@ -4375,14 +4421,14 @@ public struct FfiConverterTypeEncryption: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeEncryption_lift(_ pointer: UnsafeMutableRawPointer) throws -> Encryption { - return try FfiConverterTypeEncryption.lift(pointer) +public func FfiConverterTypeEncryption_lift(_ handle: UInt64) throws -> Encryption { + return try FfiConverterTypeEncryption.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeEncryption_lower(_ value: Encryption) -> UnsafeMutableRawPointer { +public func FfiConverterTypeEncryption_lower(_ value: Encryption) -> UInt64 { return FfiConverterTypeEncryption.lower(value) } @@ -4445,13 +4491,13 @@ public protocol GrantLoginWithQrCodeHandlerProtocol: AnyObject, Sendable { * Handler for granting login in with a QR code. */ open class GrantLoginWithQrCodeHandler: GrantLoginWithQrCodeHandlerProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -4461,36 +4507,37 @@ open class GrantLoginWithQrCodeHandler: GrantLoginWithQrCodeHandlerProtocol, @un #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_grantloginwithqrcodehandler(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_grantloginwithqrcodehandler(handle, $0) } } @@ -4520,7 +4567,7 @@ open func generate(progressListener: GrantGeneratedQrLoginProgressListener)async try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_generate( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceGrantGeneratedQrLoginProgressListener_lower(progressListener) ) }, @@ -4558,7 +4605,7 @@ open func scan(qrCodeData: QrCodeData, progressListener: GrantQrLoginProgressLis try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_grantloginwithqrcodehandler_scan( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeQrCodeData_lower(qrCodeData),FfiConverterCallbackInterfaceGrantQrLoginProgressListener_lower(progressListener) ) }, @@ -4571,6 +4618,7 @@ open func scan(qrCodeData: QrCodeData, progressListener: GrantQrLoginProgressLis } + } @@ -4578,33 +4626,24 @@ open func scan(qrCodeData: QrCodeData, progressListener: GrantQrLoginProgressLis @_documentation(visibility: private) #endif public struct FfiConverterTypeGrantLoginWithQrCodeHandler: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = GrantLoginWithQrCodeHandler - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> GrantLoginWithQrCodeHandler { - return GrantLoginWithQrCodeHandler(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> GrantLoginWithQrCodeHandler { + return GrantLoginWithQrCodeHandler(unsafeFromHandle: handle) } - public static func lower(_ value: GrantLoginWithQrCodeHandler) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: GrantLoginWithQrCodeHandler) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> GrantLoginWithQrCodeHandler { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: GrantLoginWithQrCodeHandler, 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))))) + writeInt(&buf, lower(value)) } } @@ -4612,14 +4651,14 @@ public struct FfiConverterTypeGrantLoginWithQrCodeHandler: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGrantLoginWithQrCodeHandler_lift(_ pointer: UnsafeMutableRawPointer) throws -> GrantLoginWithQrCodeHandler { - return try FfiConverterTypeGrantLoginWithQrCodeHandler.lift(pointer) +public func FfiConverterTypeGrantLoginWithQrCodeHandler_lift(_ handle: UInt64) throws -> GrantLoginWithQrCodeHandler { + return try FfiConverterTypeGrantLoginWithQrCodeHandler.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeGrantLoginWithQrCodeHandler_lower(_ value: GrantLoginWithQrCodeHandler) -> UnsafeMutableRawPointer { +public func FfiConverterTypeGrantLoginWithQrCodeHandler_lower(_ value: GrantLoginWithQrCodeHandler) -> UInt64 { return FfiConverterTypeGrantLoginWithQrCodeHandler.lower(value) } @@ -4663,13 +4702,13 @@ public protocol HomeserverLoginDetailsProtocol: AnyObject, Sendable { } open class HomeserverLoginDetails: HomeserverLoginDetailsProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -4679,36 +4718,37 @@ open class HomeserverLoginDetails: HomeserverLoginDetailsProtocol, @unchecked Se #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_homeserverlogindetails(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_homeserverlogindetails(handle, $0) } } @@ -4719,7 +4759,8 @@ open class HomeserverLoginDetails: HomeserverLoginDetailsProtocol, @unchecked Se */ open func slidingSyncVersion() -> SlidingSyncVersion { return try! FfiConverterTypeSlidingSyncVersion_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_sliding_sync_version( + self.uniffiCloneHandle(),$0 ) }) } @@ -4730,7 +4771,8 @@ open func slidingSyncVersion() -> SlidingSyncVersion { */ open func supportedOidcPrompts() -> [OidcPrompt] { return try! FfiConverterSequenceTypeOidcPrompt.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supported_oidc_prompts( + self.uniffiCloneHandle(),$0 ) }) } @@ -4740,7 +4782,8 @@ open func supportedOidcPrompts() -> [OidcPrompt] { */ open func supportsOidcLogin() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_oidc_login( + self.uniffiCloneHandle(),$0 ) }) } @@ -4750,7 +4793,8 @@ open func supportsOidcLogin() -> Bool { */ open func supportsPasswordLogin() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_password_login( + self.uniffiCloneHandle(),$0 ) }) } @@ -4760,7 +4804,8 @@ open func supportsPasswordLogin() -> Bool { */ open func supportsSsoLogin() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_supports_sso_login( + self.uniffiCloneHandle(),$0 ) }) } @@ -4770,12 +4815,14 @@ open func supportsSsoLogin() -> Bool { */ open func url() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_homeserverlogindetails_url( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -4783,33 +4830,24 @@ open func url() -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeHomeserverLoginDetails: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = HomeserverLoginDetails - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> HomeserverLoginDetails { - return HomeserverLoginDetails(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> HomeserverLoginDetails { + return HomeserverLoginDetails(unsafeFromHandle: handle) } - public static func lower(_ value: HomeserverLoginDetails) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: HomeserverLoginDetails) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> HomeserverLoginDetails { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: HomeserverLoginDetails, 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))))) + writeInt(&buf, lower(value)) } } @@ -4817,14 +4855,14 @@ public struct FfiConverterTypeHomeserverLoginDetails: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHomeserverLoginDetails_lift(_ pointer: UnsafeMutableRawPointer) throws -> HomeserverLoginDetails { - return try FfiConverterTypeHomeserverLoginDetails.lift(pointer) +public func FfiConverterTypeHomeserverLoginDetails_lift(_ handle: UInt64) throws -> HomeserverLoginDetails { + return try FfiConverterTypeHomeserverLoginDetails.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeHomeserverLoginDetails_lower(_ value: HomeserverLoginDetails) -> UnsafeMutableRawPointer { +public func FfiConverterTypeHomeserverLoginDetails_lower(_ value: HomeserverLoginDetails) -> UInt64 { return FfiConverterTypeHomeserverLoginDetails.lower(value) } @@ -4856,13 +4894,13 @@ public protocol IdentityResetHandleProtocol: AnyObject, Sendable { } open class IdentityResetHandle: IdentityResetHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -4872,36 +4910,37 @@ open class IdentityResetHandle: IdentityResetHandleProtocol, @unchecked Sendable #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_identityresethandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_identityresethandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_identityresethandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_identityresethandle(handle, $0) } } @@ -4913,7 +4952,8 @@ open class IdentityResetHandle: IdentityResetHandleProtocol, @unchecked Sendable */ open func authType() -> CrossSigningResetAuthType { return try! FfiConverterTypeCrossSigningResetAuthType_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_identityresethandle_auth_type( + self.uniffiCloneHandle(),$0 ) }) } @@ -4923,7 +4963,7 @@ open func cancel()async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_identityresethandle_cancel( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -4950,7 +4990,7 @@ open func reset(auth: AuthData?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_identityresethandle_reset( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionTypeAuthData.lower(auth) ) }, @@ -4963,6 +5003,7 @@ open func reset(auth: AuthData?)async throws { } + } @@ -4970,33 +5011,24 @@ open func reset(auth: AuthData?)async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeIdentityResetHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = IdentityResetHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> IdentityResetHandle { - return IdentityResetHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> IdentityResetHandle { + return IdentityResetHandle(unsafeFromHandle: handle) } - public static func lower(_ value: IdentityResetHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: IdentityResetHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> IdentityResetHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: IdentityResetHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -5004,14 +5036,14 @@ public struct FfiConverterTypeIdentityResetHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIdentityResetHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> IdentityResetHandle { - return try FfiConverterTypeIdentityResetHandle.lift(pointer) +public func FfiConverterTypeIdentityResetHandle_lift(_ handle: UInt64) throws -> IdentityResetHandle { + return try FfiConverterTypeIdentityResetHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeIdentityResetHandle_lower(_ value: IdentityResetHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeIdentityResetHandle_lower(_ value: IdentityResetHandle) -> UInt64 { return FfiConverterTypeIdentityResetHandle.lower(value) } @@ -5028,13 +5060,13 @@ public protocol InReplyToDetailsProtocol: AnyObject, Sendable { } open class InReplyToDetails: InReplyToDetailsProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -5044,36 +5076,37 @@ open class InReplyToDetails: InReplyToDetailsProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_inreplytodetails(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_inreplytodetails(handle, $0) } } @@ -5081,19 +5114,22 @@ open class InReplyToDetails: InReplyToDetailsProtocol, @unchecked Sendable { open func event() -> EmbeddedEventDetails { return try! FfiConverterTypeEmbeddedEventDetails_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event( + self.uniffiCloneHandle(),$0 ) }) } open func eventId() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_inreplytodetails_event_id( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -5101,33 +5137,24 @@ open func eventId() -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeInReplyToDetails: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = InReplyToDetails - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> InReplyToDetails { - return InReplyToDetails(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> InReplyToDetails { + return InReplyToDetails(unsafeFromHandle: handle) } - public static func lower(_ value: InReplyToDetails) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: InReplyToDetails) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> InReplyToDetails { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: InReplyToDetails, 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))))) + writeInt(&buf, lower(value)) } } @@ -5135,14 +5162,14 @@ public struct FfiConverterTypeInReplyToDetails: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeInReplyToDetails_lift(_ pointer: UnsafeMutableRawPointer) throws -> InReplyToDetails { - return try FfiConverterTypeInReplyToDetails.lift(pointer) +public func FfiConverterTypeInReplyToDetails_lift(_ handle: UInt64) throws -> InReplyToDetails { + return try FfiConverterTypeInReplyToDetails.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeInReplyToDetails_lower(_ value: InReplyToDetails) -> UnsafeMutableRawPointer { +public func FfiConverterTypeInReplyToDetails_lower(_ value: InReplyToDetails) -> UInt64 { return FfiConverterTypeInReplyToDetails.lower(value) } @@ -5186,13 +5213,13 @@ public protocol KnockRequestActionsProtocol: AnyObject, Sendable { * A set of actions to perform for a knock request. */ open class KnockRequestActions: KnockRequestActionsProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -5202,36 +5229,37 @@ open class KnockRequestActions: KnockRequestActionsProtocol, @unchecked Sendable #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_knockrequestactions(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_knockrequestactions(handle, $0) } } @@ -5245,7 +5273,7 @@ open func accept()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_accept( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -5266,7 +5294,7 @@ open func decline(reason: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionString.lower(reason) ) }, @@ -5287,7 +5315,7 @@ open func declineAndBan(reason: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_decline_and_ban( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionString.lower(reason) ) }, @@ -5310,7 +5338,7 @@ open func markAsSeen()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_knockrequestactions_mark_as_seen( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -5323,6 +5351,7 @@ open func markAsSeen()async throws { } + } @@ -5330,33 +5359,24 @@ open func markAsSeen()async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeKnockRequestActions: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = KnockRequestActions - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> KnockRequestActions { - return KnockRequestActions(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> KnockRequestActions { + return KnockRequestActions(unsafeFromHandle: handle) } - public static func lower(_ value: KnockRequestActions) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: KnockRequestActions) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> KnockRequestActions { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: KnockRequestActions, 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))))) + writeInt(&buf, lower(value)) } } @@ -5364,14 +5384,14 @@ public struct FfiConverterTypeKnockRequestActions: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeKnockRequestActions_lift(_ pointer: UnsafeMutableRawPointer) throws -> KnockRequestActions { - return try FfiConverterTypeKnockRequestActions.lift(pointer) +public func FfiConverterTypeKnockRequestActions_lift(_ handle: UInt64) throws -> KnockRequestActions { + return try FfiConverterTypeKnockRequestActions.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeKnockRequestActions_lower(_ value: KnockRequestActions) -> UnsafeMutableRawPointer { +public func FfiConverterTypeKnockRequestActions_lower(_ value: KnockRequestActions) -> UInt64 { return FfiConverterTypeKnockRequestActions.lower(value) } @@ -5408,13 +5428,13 @@ public protocol LazyTimelineItemProviderProtocol: AnyObject, Sendable { * Wrapper to retrieve some timeline item info lazily. */ open class LazyTimelineItemProvider: LazyTimelineItemProviderProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -5424,36 +5444,37 @@ open class LazyTimelineItemProvider: LazyTimelineItemProviderProtocol, @unchecke #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_lazytimelineitemprovider(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_lazytimelineitemprovider(handle, $0) } } @@ -5461,7 +5482,8 @@ open class LazyTimelineItemProvider: LazyTimelineItemProviderProtocol, @unchecke open func containsOnlyEmojis() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_contains_only_emojis( + self.uniffiCloneHandle(),$0 ) }) } @@ -5471,7 +5493,8 @@ open func containsOnlyEmojis() -> Bool { */ open func debugInfo() -> EventTimelineItemDebugInfo { return try! FfiConverterTypeEventTimelineItemDebugInfo_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_debug_info( + self.uniffiCloneHandle(),$0 ) }) } @@ -5482,7 +5505,8 @@ open func debugInfo() -> EventTimelineItemDebugInfo { */ open func getSendHandle() -> SendHandle? { return try! FfiConverterOptionTypeSendHandle.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_send_handle( + self.uniffiCloneHandle(),$0 ) }) } @@ -5492,13 +5516,15 @@ open func getSendHandle() -> SendHandle? { */ open func getShields(strict: Bool) -> ShieldState? { return try! FfiConverterOptionTypeShieldState.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_lazytimelineitemprovider_get_shields( + self.uniffiCloneHandle(), FfiConverterBool.lower(strict),$0 ) }) } + } @@ -5506,33 +5532,24 @@ open func getShields(strict: Bool) -> ShieldState? { @_documentation(visibility: private) #endif public struct FfiConverterTypeLazyTimelineItemProvider: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = LazyTimelineItemProvider - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> LazyTimelineItemProvider { - return LazyTimelineItemProvider(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> LazyTimelineItemProvider { + return LazyTimelineItemProvider(unsafeFromHandle: handle) } - public static func lower(_ value: LazyTimelineItemProvider) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: LazyTimelineItemProvider) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LazyTimelineItemProvider { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: LazyTimelineItemProvider, 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))))) + writeInt(&buf, lower(value)) } } @@ -5540,14 +5557,14 @@ public struct FfiConverterTypeLazyTimelineItemProvider: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLazyTimelineItemProvider_lift(_ pointer: UnsafeMutableRawPointer) throws -> LazyTimelineItemProvider { - return try FfiConverterTypeLazyTimelineItemProvider.lift(pointer) +public func FfiConverterTypeLazyTimelineItemProvider_lift(_ handle: UInt64) throws -> LazyTimelineItemProvider { + return try FfiConverterTypeLazyTimelineItemProvider.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLazyTimelineItemProvider_lower(_ value: LazyTimelineItemProvider) -> UnsafeMutableRawPointer { +public func FfiConverterTypeLazyTimelineItemProvider_lower(_ value: LazyTimelineItemProvider) -> UInt64 { return FfiConverterTypeLazyTimelineItemProvider.lower(value) } @@ -5587,13 +5604,13 @@ public protocol LeaveSpaceHandleProtocol: AnyObject, Sendable { * handle provides a method to execute that too. */ open class LeaveSpaceHandle: LeaveSpaceHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -5603,36 +5620,37 @@ open class LeaveSpaceHandle: LeaveSpaceHandleProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_leavespacehandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_leavespacehandle(handle, $0) } } @@ -5646,7 +5664,7 @@ open func leave(roomIds: [String])async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_leave( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterSequenceString.lower(roomIds) ) }, @@ -5664,12 +5682,14 @@ open func leave(roomIds: [String])async throws { */ open func rooms() -> [LeaveSpaceRoom] { return try! FfiConverterSequenceTypeLeaveSpaceRoom.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_leavespacehandle_rooms( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -5677,33 +5697,24 @@ open func rooms() -> [LeaveSpaceRoom] { @_documentation(visibility: private) #endif public struct FfiConverterTypeLeaveSpaceHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = LeaveSpaceHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> LeaveSpaceHandle { - return LeaveSpaceHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> LeaveSpaceHandle { + return LeaveSpaceHandle(unsafeFromHandle: handle) } - public static func lower(_ value: LeaveSpaceHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: LeaveSpaceHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LeaveSpaceHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: LeaveSpaceHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -5711,14 +5722,14 @@ public struct FfiConverterTypeLeaveSpaceHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLeaveSpaceHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> LeaveSpaceHandle { - return try FfiConverterTypeLeaveSpaceHandle.lift(pointer) +public func FfiConverterTypeLeaveSpaceHandle_lift(_ handle: UInt64) throws -> LeaveSpaceHandle { + return try FfiConverterTypeLeaveSpaceHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLeaveSpaceHandle_lower(_ value: LeaveSpaceHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeLeaveSpaceHandle_lower(_ value: LeaveSpaceHandle) -> UInt64 { return FfiConverterTypeLeaveSpaceHandle.lower(value) } @@ -5785,13 +5796,13 @@ public protocol LoginWithQrCodeHandlerProtocol: AnyObject, Sendable { * Handler for logging in with a QR code. */ open class LoginWithQrCodeHandler: LoginWithQrCodeHandlerProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -5801,36 +5812,37 @@ open class LoginWithQrCodeHandler: LoginWithQrCodeHandlerProtocol, @unchecked Se #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_loginwithqrcodehandler(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_loginwithqrcodehandler(handle, $0) } } @@ -5861,7 +5873,7 @@ open func generate(progressListener: GeneratedQrLoginProgressListener)async thro try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_generate( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceGeneratedQrLoginProgressListener_lower(progressListener) ) }, @@ -5902,7 +5914,7 @@ open func scan(qrCodeData: QrCodeData, progressListener: QrLoginProgressListener try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_loginwithqrcodehandler_scan( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeQrCodeData_lower(qrCodeData),FfiConverterCallbackInterfaceQrLoginProgressListener_lower(progressListener) ) }, @@ -5915,6 +5927,7 @@ open func scan(qrCodeData: QrCodeData, progressListener: QrLoginProgressListener } + } @@ -5922,33 +5935,24 @@ open func scan(qrCodeData: QrCodeData, progressListener: QrLoginProgressListener @_documentation(visibility: private) #endif public struct FfiConverterTypeLoginWithQrCodeHandler: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = LoginWithQrCodeHandler - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> LoginWithQrCodeHandler { - return LoginWithQrCodeHandler(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> LoginWithQrCodeHandler { + return LoginWithQrCodeHandler(unsafeFromHandle: handle) } - public static func lower(_ value: LoginWithQrCodeHandler) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: LoginWithQrCodeHandler) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LoginWithQrCodeHandler { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: LoginWithQrCodeHandler, 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))))) + writeInt(&buf, lower(value)) } } @@ -5956,14 +5960,14 @@ public struct FfiConverterTypeLoginWithQrCodeHandler: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLoginWithQrCodeHandler_lift(_ pointer: UnsafeMutableRawPointer) throws -> LoginWithQrCodeHandler { - return try FfiConverterTypeLoginWithQrCodeHandler.lift(pointer) +public func FfiConverterTypeLoginWithQrCodeHandler_lift(_ handle: UInt64) throws -> LoginWithQrCodeHandler { + return try FfiConverterTypeLoginWithQrCodeHandler.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeLoginWithQrCodeHandler_lower(_ value: LoginWithQrCodeHandler) -> UnsafeMutableRawPointer { +public func FfiConverterTypeLoginWithQrCodeHandler_lower(_ value: LoginWithQrCodeHandler) -> UInt64 { return FfiConverterTypeLoginWithQrCodeHandler.lower(value) } @@ -5991,13 +5995,13 @@ public protocol MediaFileHandleProtocol: AnyObject, Sendable { * is dropped, the file will be removed from the disk. */ open class MediaFileHandle: MediaFileHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -6007,36 +6011,37 @@ open class MediaFileHandle: MediaFileHandleProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_mediafilehandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_mediafilehandle(handle, $0) } } @@ -6047,20 +6052,23 @@ open class MediaFileHandle: MediaFileHandleProtocol, @unchecked Sendable { */ open func path()throws -> String { return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_path( + self.uniffiCloneHandle(),$0 ) }) } open func persist(path: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_mediafilehandle_persist( + self.uniffiCloneHandle(), FfiConverterString.lower(path),$0 ) }) } + } @@ -6068,33 +6076,24 @@ open func persist(path: String)throws -> Bool { @_documentation(visibility: private) #endif public struct FfiConverterTypeMediaFileHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = MediaFileHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> MediaFileHandle { - return MediaFileHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> MediaFileHandle { + return MediaFileHandle(unsafeFromHandle: handle) } - public static func lower(_ value: MediaFileHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: MediaFileHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MediaFileHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: MediaFileHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -6102,14 +6101,14 @@ public struct FfiConverterTypeMediaFileHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMediaFileHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> MediaFileHandle { - return try FfiConverterTypeMediaFileHandle.lift(pointer) +public func FfiConverterTypeMediaFileHandle_lift(_ handle: UInt64) throws -> MediaFileHandle { + return try FfiConverterTypeMediaFileHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMediaFileHandle_lower(_ value: MediaFileHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeMediaFileHandle_lower(_ value: MediaFileHandle) -> UInt64 { return FfiConverterTypeMediaFileHandle.lower(value) } @@ -6126,13 +6125,13 @@ public protocol MediaSourceProtocol: AnyObject, Sendable { } open class MediaSource: MediaSourceProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -6142,36 +6141,37 @@ open class MediaSource: MediaSourceProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_mediasource(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_mediasource(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_mediasource(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_mediasource(handle, $0) } } @@ -6195,19 +6195,22 @@ public static func fromUrl(url: String)throws -> MediaSource { open func toJson() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_mediasource_to_json( + self.uniffiCloneHandle(),$0 ) }) } open func url() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_mediasource_url(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_mediasource_url( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -6215,33 +6218,24 @@ open func url() -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeMediaSource: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = MediaSource - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> MediaSource { - return MediaSource(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> MediaSource { + return MediaSource(unsafeFromHandle: handle) } - public static func lower(_ value: MediaSource) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: MediaSource) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> MediaSource { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: MediaSource, 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))))) + writeInt(&buf, lower(value)) } } @@ -6249,14 +6243,14 @@ public struct FfiConverterTypeMediaSource: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMediaSource_lift(_ pointer: UnsafeMutableRawPointer) throws -> MediaSource { - return try FfiConverterTypeMediaSource.lift(pointer) +public func FfiConverterTypeMediaSource_lift(_ handle: UInt64) throws -> MediaSource { + return try FfiConverterTypeMediaSource.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeMediaSource_lower(_ value: MediaSource) -> UnsafeMutableRawPointer { +public func FfiConverterTypeMediaSource_lower(_ value: MediaSource) -> UInt64 { return FfiConverterTypeMediaSource.lower(value) } @@ -6300,13 +6294,13 @@ public protocol NotificationClientProtocol: AnyObject, Sendable { } open class NotificationClient: NotificationClientProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -6316,36 +6310,37 @@ open class NotificationClient: NotificationClientProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_notificationclient(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_notificationclient(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_notificationclient(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_notificationclient(handle, $0) } } @@ -6366,7 +6361,7 @@ open func getNotification(roomId: String, eventId: String)async throws -> Notif try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),FfiConverterString.lower(eventId) ) }, @@ -6392,7 +6387,7 @@ open func getNotifications(requests: [NotificationItemsRequest])async throws -> try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notifications( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterSequenceTypeNotificationItemsRequest.lower(requests) ) }, @@ -6412,13 +6407,15 @@ open func getNotifications(requests: [NotificationItemsRequest])async throws -> */ open func getRoom(roomId: String)throws -> Room? { return try FfiConverterOptionTypeRoom.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_room( + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),$0 ) }) } + } @@ -6426,33 +6423,24 @@ open func getRoom(roomId: String)throws -> Room? { @_documentation(visibility: private) #endif public struct FfiConverterTypeNotificationClient: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = NotificationClient - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> NotificationClient { - return NotificationClient(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> NotificationClient { + return NotificationClient(unsafeFromHandle: handle) } - public static func lower(_ value: NotificationClient) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: NotificationClient) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NotificationClient { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: NotificationClient, 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))))) + writeInt(&buf, lower(value)) } } @@ -6460,14 +6448,14 @@ public struct FfiConverterTypeNotificationClient: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNotificationClient_lift(_ pointer: UnsafeMutableRawPointer) throws -> NotificationClient { - return try FfiConverterTypeNotificationClient.lift(pointer) +public func FfiConverterTypeNotificationClient_lift(_ handle: UInt64) throws -> NotificationClient { + return try FfiConverterTypeNotificationClient.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNotificationClient_lower(_ value: NotificationClient) -> UnsafeMutableRawPointer { +public func FfiConverterTypeNotificationClient_lower(_ value: NotificationClient) -> UInt64 { return FfiConverterTypeNotificationClient.lower(value) } @@ -6621,13 +6609,13 @@ public protocol NotificationSettingsProtocol: AnyObject, Sendable { } open class NotificationSettings: NotificationSettingsProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -6637,36 +6625,37 @@ open class NotificationSettings: NotificationSettingsProtocol, @unchecked Sendab #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_notificationsettings(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_notificationsettings(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_notificationsettings(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_notificationsettings(handle, $0) } } @@ -6682,7 +6671,7 @@ open func canHomeserverPushEncryptedEventToDevice()async -> Bool { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6705,7 +6694,7 @@ open func canPushEncryptedEventToDevice()async -> Bool { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_push_encrypted_event_to_device( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6726,7 +6715,7 @@ open func containsKeywordsRules()async -> Bool { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_contains_keywords_rules( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6756,7 +6745,7 @@ open func getDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool)asy try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_default_room_notification_mode( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(isEncrypted),FfiConverterBool.lower(isOneToOne) ) }, @@ -6777,7 +6766,7 @@ open func getRawPushRules()async throws -> String? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_raw_push_rules( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6804,7 +6793,7 @@ open func getRoomNotificationSettings(roomId: String, isEncrypted: Bool, isOneTo try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_room_notification_settings( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),FfiConverterBool.lower(isEncrypted),FfiConverterBool.lower(isOneToOne) ) }, @@ -6824,7 +6813,7 @@ open func getRoomsWithUserDefinedRules(enabled: Bool?)async -> [String] { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_rooms_with_user_defined_rules( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionBool.lower(enabled) ) }, @@ -6845,7 +6834,7 @@ open func getUserDefinedRoomNotificationMode(roomId: String)async throws -> Roo try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_get_user_defined_room_notification_mode( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId) ) }, @@ -6865,7 +6854,7 @@ open func isCallEnabled()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_call_enabled( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6885,7 +6874,7 @@ open func isInviteForMeEnabled()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_invite_for_me_enabled( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6905,7 +6894,7 @@ open func isRoomMentionEnabled()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_room_mention_enabled( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6925,7 +6914,7 @@ open func isUserMentionEnabled()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_is_user_mention_enabled( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -6945,7 +6934,7 @@ open func restoreDefaultRoomNotificationMode(roomId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_restore_default_room_notification_mode( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId) ) }, @@ -6965,7 +6954,7 @@ open func setCallEnabled(enabled: Bool)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_call_enabled( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(enabled) ) }, @@ -6985,7 +6974,7 @@ open func setCustomPushRule(ruleId: String, ruleKind: RuleKind, actions: [Action try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_custom_push_rule( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(ruleId),FfiConverterTypeRuleKind_lower(ruleKind),FfiConverterSequenceTypeAction.lower(actions),FfiConverterSequenceTypePushCondition.lower(conditions) ) }, @@ -7012,7 +7001,7 @@ open func setDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool, mo try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_default_room_notification_mode( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(isEncrypted),FfiConverterBool.lower(isOneToOne),FfiConverterTypeRoomNotificationMode_lower(mode) ) }, @@ -7025,7 +7014,8 @@ open func setDefaultRoomNotificationMode(isEncrypted: Bool, isOneToOne: Bool, mo } open func setDelegate(delegate: NotificationSettingsDelegate?) {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_delegate( + self.uniffiCloneHandle(), FfiConverterOptionCallbackInterfaceNotificationSettingsDelegate.lower(delegate),$0 ) } @@ -7039,7 +7029,7 @@ open func setInviteForMeEnabled(enabled: Bool)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_invite_for_me_enabled( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(enabled) ) }, @@ -7059,7 +7049,7 @@ open func setRoomMentionEnabled(enabled: Bool)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_mention_enabled( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(enabled) ) }, @@ -7079,7 +7069,7 @@ open func setRoomNotificationMode(roomId: String, mode: RoomNotificationMode)asy try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_room_notification_mode( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),FfiConverterTypeRoomNotificationMode_lower(mode) ) }, @@ -7099,7 +7089,7 @@ open func setUserMentionEnabled(enabled: Bool)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_set_user_mention_enabled( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(enabled) ) }, @@ -7126,7 +7116,7 @@ open func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool)async t try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_notificationsettings_unmute_room( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),FfiConverterBool.lower(isEncrypted),FfiConverterBool.lower(isOneToOne) ) }, @@ -7139,6 +7129,7 @@ open func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool)async t } + } @@ -7146,33 +7137,24 @@ open func unmuteRoom(roomId: String, isEncrypted: Bool, isOneToOne: Bool)async t @_documentation(visibility: private) #endif public struct FfiConverterTypeNotificationSettings: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = NotificationSettings - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> NotificationSettings { - return NotificationSettings(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> NotificationSettings { + return NotificationSettings(unsafeFromHandle: handle) } - public static func lower(_ value: NotificationSettings) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: NotificationSettings) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NotificationSettings { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: NotificationSettings, 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))))) + writeInt(&buf, lower(value)) } } @@ -7180,14 +7162,14 @@ public struct FfiConverterTypeNotificationSettings: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNotificationSettings_lift(_ pointer: UnsafeMutableRawPointer) throws -> NotificationSettings { - return try FfiConverterTypeNotificationSettings.lift(pointer) +public func FfiConverterTypeNotificationSettings_lift(_ handle: UInt64) throws -> NotificationSettings { + return try FfiConverterTypeNotificationSettings.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeNotificationSettings_lower(_ value: NotificationSettings) -> UnsafeMutableRawPointer { +public func FfiConverterTypeNotificationSettings_lower(_ value: NotificationSettings) -> UInt64 { return FfiConverterTypeNotificationSettings.lower(value) } @@ -7221,13 +7203,13 @@ public protocol QrCodeDataProtocol: AnyObject, Sendable { * decoded from a QR code. */ open class QrCodeData: QrCodeDataProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -7237,36 +7219,37 @@ open class QrCodeData: QrCodeDataProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_qrcodedata(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_qrcodedata(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_qrcodedata(handle, $0) } } @@ -7294,12 +7277,14 @@ public static func fromBytes(bytes: Data)throws -> QrCodeData { */ open func serverName() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_qrcodedata_server_name( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -7307,33 +7292,24 @@ open func serverName() -> String? { @_documentation(visibility: private) #endif public struct FfiConverterTypeQrCodeData: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = QrCodeData - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> QrCodeData { - return QrCodeData(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> QrCodeData { + return QrCodeData(unsafeFromHandle: handle) } - public static func lower(_ value: QrCodeData) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: QrCodeData) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrCodeData { - let v: UInt64 = try readInt(&buf) - // The Rust code won't compile if a pointer won't fit in a UInt64. - // We have to go via `UInt` because that's the thing that's the size of a pointer. - let ptr = UnsafeMutableRawPointer(bitPattern: UInt(truncatingIfNeeded: v)) - if (ptr == nil) { - throw UniffiInternalError.unexpectedNullPointer - } - return try lift(ptr!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: QrCodeData, into buf: inout [UInt8]) { - // This fiddling is because `Int` is the thing that's the same size as a pointer. - // The Rust code won't compile if a pointer won't fit in a `UInt64`. - writeInt(&buf, UInt64(bitPattern: Int64(Int(bitPattern: lower(value))))) + writeInt(&buf, lower(value)) } } @@ -7341,14 +7317,14 @@ public struct FfiConverterTypeQrCodeData: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeQrCodeData_lift(_ pointer: UnsafeMutableRawPointer) throws -> QrCodeData { - return try FfiConverterTypeQrCodeData.lift(pointer) +public func FfiConverterTypeQrCodeData_lift(_ handle: UInt64) throws -> QrCodeData { + return try FfiConverterTypeQrCodeData.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeQrCodeData_lower(_ value: QrCodeData) -> UnsafeMutableRawPointer { +public func FfiConverterTypeQrCodeData_lower(_ value: QrCodeData) -> UInt64 { return FfiConverterTypeQrCodeData.lower(value) } @@ -7931,13 +7907,13 @@ public protocol RoomProtocol: AnyObject, Sendable { } open class Room: RoomProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -7947,36 +7923,37 @@ open class Room: RoomProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_room(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_room(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_room(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_room(handle, $0) } } @@ -7984,7 +7961,8 @@ open class Room: RoomProtocol, @unchecked Sendable { open func activeMembersCount() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_active_members_count(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_active_members_count( + self.uniffiCloneHandle(),$0 ) }) } @@ -8001,14 +7979,16 @@ open func activeMembersCount() -> UInt64 { */ open func activeRoomCallParticipants() -> [String] { return try! FfiConverterSequenceString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_active_room_call_participants( + self.uniffiCloneHandle(),$0 ) }) } open func alternativeAliases() -> [String] { return try! FfiConverterSequenceString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_alternative_aliases( + self.uniffiCloneHandle(),$0 ) }) } @@ -8018,7 +7998,7 @@ open func applyPowerLevelChanges(changes: RoomPowerLevelChanges)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_apply_power_level_changes( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeRoomPowerLevelChanges_lower(changes) ) }, @@ -8032,7 +8012,8 @@ open func applyPowerLevelChanges(changes: RoomPowerLevelChanges)async throws { open func avatarUrl() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_avatar_url(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_avatar_url( + self.uniffiCloneHandle(),$0 ) }) } @@ -8042,7 +8023,7 @@ open func banUser(userId: String, reason: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_ban_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId),FfiConverterOptionString.lower(reason) ) }, @@ -8056,7 +8037,8 @@ open func banUser(userId: String, reason: String?)async throws { open func canonicalAlias() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_canonical_alias( + self.uniffiCloneHandle(),$0 ) }) } @@ -8069,7 +8051,7 @@ open func clearComposerDraft(threadRoot: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_clear_composer_draft( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionString.lower(threadRoot) ) }, @@ -8092,7 +8074,7 @@ open func clearEventCacheStorage()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_clear_event_cache_storage( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8117,7 +8099,7 @@ open func declineCall(rtcNotificationEventId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_decline_call( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(rtcNotificationEventId) ) }, @@ -8143,7 +8125,7 @@ open func discardRoomKey()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_discard_room_key( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8162,7 +8144,8 @@ open func discardRoomKey()async throws { */ open func displayName() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_display_name(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_display_name( + self.uniffiCloneHandle(),$0 ) }) } @@ -8178,7 +8161,7 @@ open func edit(eventId: String, newContent: RoomMessageEventContentWithoutRelati try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_edit( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId),FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(newContent) ) }, @@ -8198,7 +8181,7 @@ open func enableEncryption()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_enable_encryption( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8214,7 +8197,8 @@ open func enableEncryption()async throws { * Enable or disable the send queue for that particular room. */ open func enableSendQueue(enable: Bool) {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_room_enable_send_queue( + self.uniffiCloneHandle(), FfiConverterBool.lower(enable),$0 ) } @@ -8222,7 +8206,8 @@ open func enableSendQueue(enable: Bool) {try! rustCall() { open func encryptionState() -> EncryptionState { return try! FfiConverterTypeEncryptionState_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_encryption_state(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_encryption_state( + self.uniffiCloneHandle(),$0 ) }) } @@ -8240,7 +8225,7 @@ open func fetchThreadSubscription(threadRootEventId: String)async throws -> Thr try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(threadRootEventId) ) }, @@ -8264,7 +8249,7 @@ open func forget()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_forget( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8281,13 +8266,13 @@ open func getPowerLevels()async throws -> RoomPowerLevels { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomPowerLevels_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -8304,7 +8289,7 @@ open func getRoomVisibility()async throws -> RoomVisibility { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_get_room_visibility( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8322,7 +8307,8 @@ open func getRoomVisibility()async throws -> RoomVisibility { */ open func hasActiveRoomCall() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call( + self.uniffiCloneHandle(),$0 ) }) } @@ -8332,14 +8318,16 @@ open func hasActiveRoomCall() -> Bool { */ open func heroes() -> [RoomHero] { return try! FfiConverterSequenceTypeRoomHero.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_heroes(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_heroes( + self.uniffiCloneHandle(),$0 ) }) } open func id() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_id( + self.uniffiCloneHandle(),$0 ) }) } @@ -8361,7 +8349,7 @@ open func ignoreDeviceTrustAndResend(devices: [String: [String]], sendHandle: Se try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_ignore_device_trust_and_resend( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterDictionaryStringSequenceString.lower(devices),FfiConverterTypeSendHandle_lower(sendHandle) ) }, @@ -8385,7 +8373,7 @@ open func ignoreUser(userId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_ignore_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -8402,7 +8390,7 @@ open func inviteUserById(userId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_invite_user_by_id( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -8416,7 +8404,8 @@ open func inviteUserById(userId: String)async throws { open func invitedMembersCount() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_invited_members_count( + self.uniffiCloneHandle(),$0 ) }) } @@ -8429,7 +8418,7 @@ open func inviter()async throws -> RoomMember? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_inviter( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8446,7 +8435,7 @@ open func isDirect()async -> Bool { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_is_direct( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8470,7 +8459,7 @@ open func isEncrypted()async -> Bool { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_is_encrypted( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8490,7 +8479,8 @@ open func isEncrypted()async -> Bool { */ open func isPublic() -> Bool? { return try! FfiConverterOptionBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_is_public(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_is_public( + self.uniffiCloneHandle(),$0 ) }) } @@ -8501,14 +8491,16 @@ open func isPublic() -> Bool? { */ open func isSendQueueEnabled() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_is_send_queue_enabled( + self.uniffiCloneHandle(),$0 ) }) } open func isSpace() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_is_space(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_is_space( + self.uniffiCloneHandle(),$0 ) }) } @@ -8523,7 +8515,7 @@ open func join()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_join( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8537,7 +8529,8 @@ open func join()async throws { open func joinedMembersCount() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_joined_members_count( + self.uniffiCloneHandle(),$0 ) }) } @@ -8547,7 +8540,7 @@ open func kickUser(userId: String, reason: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_kick_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId),FfiConverterOptionString.lower(reason) ) }, @@ -8564,7 +8557,7 @@ open func latestEncryptionState()async throws -> EncryptionState { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_latest_encryption_state( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8581,7 +8574,7 @@ open func latestEvent()async -> EventTimelineItem? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_latest_event( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8604,7 +8597,7 @@ open func leave()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_leave( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8624,7 +8617,7 @@ open func loadComposerDraft(threadRoot: String?)async throws -> ComposerDraft? try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_load_composer_draft( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionString.lower(threadRoot) ) }, @@ -8645,13 +8638,13 @@ open func loadOrFetchEvent(eventId: String)async throws -> TimelineEvent { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_load_or_fetch_event( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTimelineEvent_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -8673,7 +8666,7 @@ open func markAsFullyReadUnchecked(eventId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_mark_as_fully_read_unchecked( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, @@ -8696,7 +8689,7 @@ open func markAsRead(receiptType: ReceiptType)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_mark_as_read( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeReceiptType_lower(receiptType) ) }, @@ -8713,7 +8706,7 @@ open func matrixToEventPermalink(eventId: String)async throws -> String { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_event_permalink( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, @@ -8730,7 +8723,7 @@ open func matrixToPermalink()async throws -> String { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_matrix_to_permalink( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8747,7 +8740,7 @@ open func member(userId: String)async throws -> RoomMember { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_member( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -8764,7 +8757,7 @@ open func memberAvatarUrl(userId: String)async throws -> String? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_member_avatar_url( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -8781,7 +8774,7 @@ open func memberDisplayName(userId: String)async throws -> String? { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_member_display_name( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -8808,7 +8801,7 @@ open func memberWithSenderInfo(userId: String)async throws -> RoomMemberWithSen try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_member_with_sender_info( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -8825,13 +8818,13 @@ open func members()async throws -> RoomMembersIterator { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_members( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomMembersIterator_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -8842,13 +8835,13 @@ open func membersNoSync()async throws -> RoomMembersIterator { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_members_no_sync( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomMembersIterator_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -8859,7 +8852,8 @@ open func membersNoSync()async throws -> RoomMembersIterator { */ open func membership() -> Membership { return try! FfiConverterTypeMembership_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_membership(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_membership( + self.uniffiCloneHandle(),$0 ) }) } @@ -8869,7 +8863,7 @@ open func newLatestEvent()async -> LatestEventValue { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_new_latest_event( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -8884,7 +8878,8 @@ open func newLatestEvent()async -> LatestEventValue { open func ownUserId() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_own_user_id( + self.uniffiCloneHandle(),$0 ) }) } @@ -8905,7 +8900,8 @@ open func ownUserId() -> String { */ open func predecessorRoom() -> PredecessorRoom? { return try! FfiConverterOptionTypePredecessorRoom.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_predecessor_room( + self.uniffiCloneHandle(),$0 ) }) } @@ -8919,13 +8915,13 @@ open func previewRoom(via: [String])async throws -> RoomPreview { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_preview_room( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterSequenceString.lower(via) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomPreview_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -8944,7 +8940,7 @@ open func publishRoomAliasInRoomDirectory(alias: String)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_publish_room_alias_in_room_directory( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(alias) ) }, @@ -8961,7 +8957,8 @@ open func publishRoomAliasInRoomDirectory(alias: String)async throws -> Bool { */ open func rawName() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_raw_name(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_raw_name( + self.uniffiCloneHandle(),$0 ) }) } @@ -8981,7 +8978,7 @@ open func redact(eventId: String, reason: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_redact( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId),FfiConverterOptionString.lower(reason) ) }, @@ -9001,7 +8998,7 @@ open func removeAvatar()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_remove_avatar( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -9026,7 +9023,7 @@ open func removeRoomAliasFromRoomDirectory(alias: String)async throws -> Bool try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_remove_room_alias_from_room_directory( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(alias) ) }, @@ -9055,7 +9052,7 @@ open func reportContent(eventId: String, score: Int32?, reason: String?)async th try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_report_content( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId),FfiConverterOptionInt32.lower(score),FfiConverterOptionString.lower(reason) ) }, @@ -9084,7 +9081,7 @@ open func reportRoom(reason: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_report_room( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(reason) ) }, @@ -9101,13 +9098,13 @@ open func resetPowerLevels()async throws -> RoomPowerLevels { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_reset_power_levels( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomPowerLevels_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -9122,7 +9119,7 @@ open func roomEventsDebugString()async throws -> [String] { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_room_events_debug_string( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -9139,7 +9136,7 @@ open func roomInfo()async throws -> RoomInfo { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_room_info( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -9160,7 +9157,7 @@ open func saveComposerDraft(draft: ComposerDraft, threadRoot: String?)async thro try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_save_composer_draft( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeComposerDraft_lower(draft),FfiConverterOptionString.lower(threadRoot) ) }, @@ -9180,7 +9177,7 @@ open func sendLiveLocation(geoUri: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_send_live_location( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(geoUri) ) }, @@ -9206,7 +9203,7 @@ open func sendRaw(eventType: String, content: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_send_raw( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventType),FfiConverterString.lower(content) ) }, @@ -9223,7 +9220,7 @@ open func setIsFavourite(isFavourite: Bool, tagOrder: Double?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_set_is_favourite( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(isFavourite),FfiConverterOptionDouble.lower(tagOrder) ) }, @@ -9240,7 +9237,7 @@ open func setIsLowPriority(isLowPriority: Bool, tagOrder: Double?)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_set_is_low_priority( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(isLowPriority),FfiConverterOptionDouble.lower(tagOrder) ) }, @@ -9260,7 +9257,7 @@ open func setName(name: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_set_name( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(name) ) }, @@ -9290,7 +9287,7 @@ open func setThreadSubscription(threadRootEventId: String, subscribed: Bool)asyn try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(threadRootEventId),FfiConverterBool.lower(subscribed) ) }, @@ -9310,7 +9307,7 @@ open func setTopic(topic: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_set_topic( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(topic) ) }, @@ -9331,7 +9328,7 @@ open func setUnreadFlag(newValue: Bool)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(newValue) ) }, @@ -9351,7 +9348,7 @@ open func startLiveLocationShare(durationMillis: UInt64)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_start_live_location_share( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterUInt64.lower(durationMillis) ) }, @@ -9371,7 +9368,7 @@ open func stopLiveLocationShare()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_stop_live_location_share( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -9392,7 +9389,8 @@ open func stopLiveLocationShare()async throws { */ open func subscribeToCallDeclineEvents(rtcNotificationEventId: String, listener: CallDeclineListener)throws -> TaskHandle { return try FfiConverterTypeTaskHandle_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_call_decline_events( + self.uniffiCloneHandle(), FfiConverterString.lower(rtcNotificationEventId), FfiConverterCallbackInterfaceCallDeclineListener_lower(listener),$0 ) @@ -9404,13 +9402,13 @@ open func subscribeToIdentityStatusChanges(listener: IdentityStatusChangeListene try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_identity_status_changes( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceIdentityStatusChangeListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -9429,13 +9427,13 @@ open func subscribeToKnockRequests(listener: KnockRequestsListener)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_knock_requests( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceKnockRequestsListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -9450,7 +9448,8 @@ open func subscribeToKnockRequests(listener: KnockRequestsListener)async throws */ open func subscribeToLiveLocationShares(listener: LiveLocationShareListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_live_location_shares( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceLiveLocationShareListener_lower(listener),$0 ) }) @@ -9458,7 +9457,8 @@ open func subscribeToLiveLocationShares(listener: LiveLocationShareListener) -> open func subscribeToRoomInfoUpdates(listener: RoomInfoListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_room_info_updates( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceRoomInfoListener_lower(listener),$0 ) }) @@ -9476,13 +9476,13 @@ open func subscribeToSendQueueUpdates(listener: SendQueueListener)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_send_queue_updates( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSendQueueListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -9490,7 +9490,8 @@ open func subscribeToSendQueueUpdates(listener: SendQueueListener)async throws open func subscribeToTypingNotifications(listener: TypingNotificationsListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_room_subscribe_to_typing_notifications( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceTypingNotificationsListener_lower(listener),$0 ) }) @@ -9507,7 +9508,8 @@ open func subscribeToTypingNotifications(listener: TypingNotificationsListener) */ open func successorRoom() -> SuccessorRoom? { return try! FfiConverterOptionTypeSuccessorRoom.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_successor_room(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_successor_room( + self.uniffiCloneHandle(),$0 ) }) } @@ -9517,7 +9519,7 @@ open func suggestedRoleForUser(userId: String)async throws -> RoomMemberRole { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_suggested_role_for_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -9538,13 +9540,13 @@ open func timeline()async throws -> Timeline { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_timeline( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTimeline_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -9558,13 +9560,13 @@ open func timelineWithConfiguration(configuration: TimelineConfiguration)async t try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_timeline_with_configuration( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeTimelineConfiguration_lower(configuration) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTimeline_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -9572,7 +9574,8 @@ open func timelineWithConfiguration(configuration: TimelineConfiguration)async t open func topic() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_room_topic(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_room_topic( + self.uniffiCloneHandle(),$0 ) }) } @@ -9582,7 +9585,7 @@ open func typingNotice(isTyping: Bool)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_typing_notice( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterBool.lower(isTyping) ) }, @@ -9599,7 +9602,7 @@ open func unbanUser(userId: String, reason: String?)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_unban_user( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId),FfiConverterOptionString.lower(reason) ) }, @@ -9621,7 +9624,7 @@ open func updateCanonicalAlias(alias: String?, altAliases: [String])async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_update_canonical_alias( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionString.lower(alias),FfiConverterSequenceString.lower(altAliases) ) }, @@ -9641,7 +9644,7 @@ open func updateHistoryVisibility(visibility: RoomHistoryVisibility)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_update_history_visibility( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeRoomHistoryVisibility_lower(visibility) ) }, @@ -9661,7 +9664,7 @@ open func updateJoinRules(newRule: JoinRule)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_update_join_rules( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeJoinRule_lower(newRule) ) }, @@ -9678,7 +9681,7 @@ open func updatePowerLevelsForUsers(updates: [UserPowerLevelUpdate])async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterSequenceTypeUserPowerLevelUpdate.lower(updates) ) }, @@ -9698,7 +9701,7 @@ open func updateRoomVisibility(visibility: RoomVisibility)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_update_room_visibility( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeRoomVisibility_lower(visibility) ) }, @@ -9730,7 +9733,7 @@ open func uploadAvatar(mimeType: String, data: Data, mediaInfo: ImageInfo?)async try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(mimeType),FfiConverterData.lower(data),FfiConverterOptionTypeImageInfo.lower(mediaInfo) ) }, @@ -9759,7 +9762,7 @@ open func withdrawVerificationAndResend(userIds: [String], sendHandle: SendHandl try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_room_withdraw_verification_and_resend( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterSequenceString.lower(userIds),FfiConverterTypeSendHandle_lower(sendHandle) ) }, @@ -9772,6 +9775,7 @@ open func withdrawVerificationAndResend(userIds: [String], sendHandle: SendHandl } + } @@ -9779,33 +9783,24 @@ open func withdrawVerificationAndResend(userIds: [String], sendHandle: SendHandl @_documentation(visibility: private) #endif public struct FfiConverterTypeRoom: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = Room - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> Room { - return Room(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> Room { + return Room(unsafeFromHandle: handle) } - public static func lower(_ value: Room) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: Room) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Room { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: Room, 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))))) + writeInt(&buf, lower(value)) } } @@ -9813,14 +9808,14 @@ public struct FfiConverterTypeRoom: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoom_lift(_ pointer: UnsafeMutableRawPointer) throws -> Room { - return try FfiConverterTypeRoom.lift(pointer) +public func FfiConverterTypeRoom_lift(_ handle: UInt64) throws -> Room { + return try FfiConverterTypeRoom.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoom_lower(_ value: Room) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoom_lower(_ value: Room) -> UInt64 { return FfiConverterTypeRoom.lower(value) } @@ -9884,13 +9879,13 @@ public protocol RoomDirectorySearchProtocol: AnyObject, Sendable { * 3. To get more results, use [`RoomDirectorySearch::next_page`]. */ open class RoomDirectorySearch: RoomDirectorySearchProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -9900,36 +9895,37 @@ open class RoomDirectorySearch: RoomDirectorySearchProtocol, @unchecked Sendable #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomdirectorysearch(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomdirectorysearch(handle, $0) } } @@ -9943,7 +9939,7 @@ open func isAtLastPage()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_is_at_last_page( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -9963,7 +9959,7 @@ open func loadedPages()async throws -> UInt32 { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_loaded_pages( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -9983,7 +9979,7 @@ open func nextPage()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_next_page( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -10004,13 +10000,13 @@ open func results(listener: RoomDirectorySearchEntriesListener)async -> TaskHan try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_results( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceRoomDirectorySearchEntriesListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: nil @@ -10034,7 +10030,7 @@ open func search(filter: String?, batchSize: UInt32, viaServerName: String?)asyn try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomdirectorysearch_search( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterOptionString.lower(filter),FfiConverterUInt32.lower(batchSize),FfiConverterOptionString.lower(viaServerName) ) }, @@ -10047,6 +10043,7 @@ open func search(filter: String?, batchSize: UInt32, viaServerName: String?)asyn } + } @@ -10054,33 +10051,24 @@ open func search(filter: String?, batchSize: UInt32, viaServerName: String?)asyn @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomDirectorySearch: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomDirectorySearch - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomDirectorySearch { - return RoomDirectorySearch(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomDirectorySearch { + return RoomDirectorySearch(unsafeFromHandle: handle) } - public static func lower(_ value: RoomDirectorySearch) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomDirectorySearch) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomDirectorySearch { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomDirectorySearch, 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))))) + writeInt(&buf, lower(value)) } } @@ -10088,14 +10076,14 @@ public struct FfiConverterTypeRoomDirectorySearch: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomDirectorySearch_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomDirectorySearch { - return try FfiConverterTypeRoomDirectorySearch.lift(pointer) +public func FfiConverterTypeRoomDirectorySearch_lift(_ handle: UInt64) throws -> RoomDirectorySearch { + return try FfiConverterTypeRoomDirectorySearch.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomDirectorySearch_lower(_ value: RoomDirectorySearch) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomDirectorySearch_lower(_ value: RoomDirectorySearch) -> UInt64 { return FfiConverterTypeRoomDirectorySearch.lower(value) } @@ -10116,13 +10104,13 @@ public protocol RoomListProtocol: AnyObject, Sendable { } open class RoomList: RoomListProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -10132,36 +10120,37 @@ open class RoomList: RoomListProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlist(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlist(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlist(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlist(handle, $0) } } @@ -10169,7 +10158,8 @@ open class RoomList: RoomListProtocol, @unchecked Sendable { open func entriesWithDynamicAdapters(pageSize: UInt32, listener: RoomListEntriesListener) -> RoomListEntriesWithDynamicAdaptersResult { return try! FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters( + self.uniffiCloneHandle(), FfiConverterUInt32.lower(pageSize), FfiConverterCallbackInterfaceRoomListEntriesListener_lower(listener),$0 ) @@ -10178,7 +10168,8 @@ open func entriesWithDynamicAdapters(pageSize: UInt32, listener: RoomListEntries open func entriesWithDynamicAdaptersWith(pageSize: UInt32, enableLatestEventSorter: Bool, listener: RoomListEntriesListener) -> RoomListEntriesWithDynamicAdaptersResult { return try! FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlist_entries_with_dynamic_adapters_with( + self.uniffiCloneHandle(), FfiConverterUInt32.lower(pageSize), FfiConverterBool.lower(enableLatestEventSorter), FfiConverterCallbackInterfaceRoomListEntriesListener_lower(listener),$0 @@ -10188,7 +10179,8 @@ open func entriesWithDynamicAdaptersWith(pageSize: UInt32, enableLatestEventSort open func loadingState(listener: RoomListLoadingStateListener)throws -> RoomListLoadingStateResult { return try FfiConverterTypeRoomListLoadingStateResult_lift(try rustCallWithError(FfiConverterTypeRoomListError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlist_loading_state( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceRoomListLoadingStateListener_lower(listener),$0 ) }) @@ -10196,13 +10188,15 @@ open func loadingState(listener: RoomListLoadingStateListener)throws -> RoomLis open func room(roomId: String)throws -> Room { return try FfiConverterTypeRoom_lift(try rustCallWithError(FfiConverterTypeRoomListError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roomlist_room(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlist_room( + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),$0 ) }) } + } @@ -10210,33 +10204,24 @@ open func room(roomId: String)throws -> Room { @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomList: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomList - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomList { - return RoomList(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomList { + return RoomList(unsafeFromHandle: handle) } - public static func lower(_ value: RoomList) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomList) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomList { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomList, 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))))) + writeInt(&buf, lower(value)) } } @@ -10244,14 +10229,14 @@ public struct FfiConverterTypeRoomList: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomList_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomList { - return try FfiConverterTypeRoomList.lift(pointer) +public func FfiConverterTypeRoomList_lift(_ handle: UInt64) throws -> RoomList { + return try FfiConverterTypeRoomList.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomList_lower(_ value: RoomList) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomList_lower(_ value: RoomList) -> UInt64 { return FfiConverterTypeRoomList.lower(value) } @@ -10270,13 +10255,13 @@ public protocol RoomListDynamicEntriesControllerProtocol: AnyObject, Sendable { } open class RoomListDynamicEntriesController: RoomListDynamicEntriesControllerProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -10286,62 +10271,67 @@ open class RoomListDynamicEntriesController: RoomListDynamicEntriesControllerPro #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlistdynamicentriescontroller(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlistdynamicentriescontroller(handle, $0) } } open func addOnePage() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_add_one_page( + self.uniffiCloneHandle(),$0 ) } } open func resetToOnePage() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_reset_to_one_page( + self.uniffiCloneHandle(),$0 ) } } open func setFilter(kind: RoomListEntriesDynamicFilterKind) -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlistdynamicentriescontroller_set_filter( + self.uniffiCloneHandle(), FfiConverterTypeRoomListEntriesDynamicFilterKind_lower(kind),$0 ) }) } + } @@ -10349,33 +10339,24 @@ open func setFilter(kind: RoomListEntriesDynamicFilterKind) -> Bool { @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomListDynamicEntriesController: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomListDynamicEntriesController - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomListDynamicEntriesController { - return RoomListDynamicEntriesController(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomListDynamicEntriesController { + return RoomListDynamicEntriesController(unsafeFromHandle: handle) } - public static func lower(_ value: RoomListDynamicEntriesController) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomListDynamicEntriesController) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomListDynamicEntriesController { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomListDynamicEntriesController, 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))))) + writeInt(&buf, lower(value)) } } @@ -10383,14 +10364,14 @@ public struct FfiConverterTypeRoomListDynamicEntriesController: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomListDynamicEntriesController_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomListDynamicEntriesController { - return try FfiConverterTypeRoomListDynamicEntriesController.lift(pointer) +public func FfiConverterTypeRoomListDynamicEntriesController_lift(_ handle: UInt64) throws -> RoomListDynamicEntriesController { + return try FfiConverterTypeRoomListDynamicEntriesController.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomListDynamicEntriesController_lower(_ value: RoomListDynamicEntriesController) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomListDynamicEntriesController_lower(_ value: RoomListDynamicEntriesController) -> UInt64 { return FfiConverterTypeRoomListDynamicEntriesController.lower(value) } @@ -10407,13 +10388,13 @@ public protocol RoomListEntriesWithDynamicAdaptersResultProtocol: AnyObject, Sen } open class RoomListEntriesWithDynamicAdaptersResult: RoomListEntriesWithDynamicAdaptersResultProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -10423,36 +10404,37 @@ open class RoomListEntriesWithDynamicAdaptersResult: RoomListEntriesWithDynamicA #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlistentrieswithdynamicadaptersresult(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlistentrieswithdynamicadaptersresult(handle, $0) } } @@ -10460,19 +10442,22 @@ open class RoomListEntriesWithDynamicAdaptersResult: RoomListEntriesWithDynamicA open func controller() -> RoomListDynamicEntriesController { return try! FfiConverterTypeRoomListDynamicEntriesController_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_controller( + self.uniffiCloneHandle(),$0 ) }) } open func entriesStream() -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roomlistentrieswithdynamicadaptersresult_entries_stream( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -10480,33 +10465,24 @@ open func entriesStream() -> TaskHandle { @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomListEntriesWithDynamicAdaptersResult - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomListEntriesWithDynamicAdaptersResult { - return RoomListEntriesWithDynamicAdaptersResult(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomListEntriesWithDynamicAdaptersResult { + return RoomListEntriesWithDynamicAdaptersResult(unsafeFromHandle: handle) } - public static func lower(_ value: RoomListEntriesWithDynamicAdaptersResult) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomListEntriesWithDynamicAdaptersResult) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomListEntriesWithDynamicAdaptersResult { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomListEntriesWithDynamicAdaptersResult, 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))))) + writeInt(&buf, lower(value)) } } @@ -10514,14 +10490,14 @@ public struct FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult: FfiConve #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomListEntriesWithDynamicAdaptersResult { - return try FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult.lift(pointer) +public func FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult_lift(_ handle: UInt64) throws -> RoomListEntriesWithDynamicAdaptersResult { + return try FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult_lower(_ value: RoomListEntriesWithDynamicAdaptersResult) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult_lower(_ value: RoomListEntriesWithDynamicAdaptersResult) -> UInt64 { return FfiConverterTypeRoomListEntriesWithDynamicAdaptersResult.lower(value) } @@ -10544,13 +10520,13 @@ public protocol RoomListServiceProtocol: AnyObject, Sendable { } open class RoomListService: RoomListServiceProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -10560,36 +10536,37 @@ open class RoomListService: RoomListServiceProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roomlistservice(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlistservice(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roomlistservice(handle, $0) } } @@ -10600,13 +10577,13 @@ open func allRooms()async throws -> RoomList { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomlistservice_all_rooms( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeRoomList_lift, errorHandler: FfiConverterTypeRoomListError_lift ) @@ -10614,7 +10591,8 @@ open func allRooms()async throws -> RoomList { open func room(roomId: String)throws -> Room { return try FfiConverterTypeRoom_lift(try rustCallWithError(FfiConverterTypeRoomListError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room( + self.uniffiCloneHandle(), FfiConverterString.lower(roomId),$0 ) }) @@ -10622,7 +10600,8 @@ open func room(roomId: String)throws -> Room { open func state(listener: RoomListServiceStateListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlistservice_state( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceRoomListServiceStateListener_lower(listener),$0 ) }) @@ -10633,7 +10612,7 @@ open func subscribeToRooms(roomIds: [String])async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roomlistservice_subscribe_to_rooms( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterSequenceString.lower(roomIds) ) }, @@ -10647,7 +10626,8 @@ open func subscribeToRooms(roomIds: [String])async throws { open func syncIndicator(delayBeforeShowingInMs: UInt32, delayBeforeHidingInMs: UInt32, listener: RoomListServiceSyncIndicatorListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roomlistservice_sync_indicator( + self.uniffiCloneHandle(), FfiConverterUInt32.lower(delayBeforeShowingInMs), FfiConverterUInt32.lower(delayBeforeHidingInMs), FfiConverterCallbackInterfaceRoomListServiceSyncIndicatorListener_lower(listener),$0 @@ -10656,6 +10636,7 @@ open func syncIndicator(delayBeforeShowingInMs: UInt32, delayBeforeHidingInMs: U } + } @@ -10663,33 +10644,24 @@ open func syncIndicator(delayBeforeShowingInMs: UInt32, delayBeforeHidingInMs: U @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomListService: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomListService - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomListService { - return RoomListService(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomListService { + return RoomListService(unsafeFromHandle: handle) } - public static func lower(_ value: RoomListService) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomListService) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomListService { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomListService, 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))))) + writeInt(&buf, lower(value)) } } @@ -10697,14 +10669,14 @@ public struct FfiConverterTypeRoomListService: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomListService_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomListService { - return try FfiConverterTypeRoomListService.lift(pointer) +public func FfiConverterTypeRoomListService_lift(_ handle: UInt64) throws -> RoomListService { + return try FfiConverterTypeRoomListService.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomListService_lower(_ value: RoomListService) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomListService_lower(_ value: RoomListService) -> UInt64 { return FfiConverterTypeRoomListService.lower(value) } @@ -10721,13 +10693,13 @@ public protocol RoomMembersIteratorProtocol: AnyObject, Sendable { } open class RoomMembersIterator: RoomMembersIteratorProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -10737,36 +10709,37 @@ open class RoomMembersIterator: RoomMembersIteratorProtocol, @unchecked Sendable #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roommembersiterator(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roommembersiterator(handle, $0) } } @@ -10774,20 +10747,23 @@ open class RoomMembersIterator: RoomMembersIteratorProtocol, @unchecked Sendable open func len() -> UInt32 { return try! FfiConverterUInt32.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_len( + self.uniffiCloneHandle(),$0 ) }) } open func nextChunk(chunkSize: UInt32) -> [RoomMember]? { return try! FfiConverterOptionSequenceTypeRoomMember.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roommembersiterator_next_chunk( + self.uniffiCloneHandle(), FfiConverterUInt32.lower(chunkSize),$0 ) }) } + } @@ -10795,33 +10771,24 @@ open func nextChunk(chunkSize: UInt32) -> [RoomMember]? { @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomMembersIterator: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomMembersIterator - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomMembersIterator { - return RoomMembersIterator(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomMembersIterator { + return RoomMembersIterator(unsafeFromHandle: handle) } - public static func lower(_ value: RoomMembersIterator) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomMembersIterator) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomMembersIterator { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomMembersIterator, 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))))) + writeInt(&buf, lower(value)) } } @@ -10829,14 +10796,14 @@ public struct FfiConverterTypeRoomMembersIterator: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomMembersIterator_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomMembersIterator { - return try FfiConverterTypeRoomMembersIterator.lift(pointer) +public func FfiConverterTypeRoomMembersIterator_lift(_ handle: UInt64) throws -> RoomMembersIterator { + return try FfiConverterTypeRoomMembersIterator.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomMembersIterator_lower(_ value: RoomMembersIterator) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomMembersIterator_lower(_ value: RoomMembersIterator) -> UInt64 { return FfiConverterTypeRoomMembersIterator.lower(value) } @@ -10851,13 +10818,13 @@ public protocol RoomMessageEventContentWithoutRelationProtocol: AnyObject, Senda } open class RoomMessageEventContentWithoutRelation: RoomMessageEventContentWithoutRelationProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -10867,36 +10834,37 @@ open class RoomMessageEventContentWithoutRelation: RoomMessageEventContentWithou #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roommessageeventcontentwithoutrelation(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roommessageeventcontentwithoutrelation(handle, $0) } } @@ -10904,13 +10872,15 @@ open class RoomMessageEventContentWithoutRelation: RoomMessageEventContentWithou open func withMentions(mentions: Mentions) -> RoomMessageEventContentWithoutRelation { return try! FfiConverterTypeRoomMessageEventContentWithoutRelation_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roommessageeventcontentwithoutrelation_with_mentions( + self.uniffiCloneHandle(), FfiConverterTypeMentions_lower(mentions),$0 ) }) } + } @@ -10918,33 +10888,24 @@ open func withMentions(mentions: Mentions) -> RoomMessageEventContentWithoutRela @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomMessageEventContentWithoutRelation: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomMessageEventContentWithoutRelation - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomMessageEventContentWithoutRelation { - return RoomMessageEventContentWithoutRelation(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomMessageEventContentWithoutRelation { + return RoomMessageEventContentWithoutRelation(unsafeFromHandle: handle) } - public static func lower(_ value: RoomMessageEventContentWithoutRelation) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomMessageEventContentWithoutRelation) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomMessageEventContentWithoutRelation { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomMessageEventContentWithoutRelation, 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))))) + writeInt(&buf, lower(value)) } } @@ -10952,14 +10913,14 @@ public struct FfiConverterTypeRoomMessageEventContentWithoutRelation: FfiConvert #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomMessageEventContentWithoutRelation_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomMessageEventContentWithoutRelation { - return try FfiConverterTypeRoomMessageEventContentWithoutRelation.lift(pointer) +public func FfiConverterTypeRoomMessageEventContentWithoutRelation_lift(_ handle: UInt64) throws -> RoomMessageEventContentWithoutRelation { + return try FfiConverterTypeRoomMessageEventContentWithoutRelation.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(_ value: RoomMessageEventContentWithoutRelation) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(_ value: RoomMessageEventContentWithoutRelation) -> UInt64 { return FfiConverterTypeRoomMessageEventContentWithoutRelation.lower(value) } @@ -11103,13 +11064,13 @@ public protocol RoomPowerLevelsProtocol: AnyObject, Sendable { } open class RoomPowerLevels: RoomPowerLevelsProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -11119,36 +11080,37 @@ open class RoomPowerLevels: RoomPowerLevelsProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roompowerlevels(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roompowerlevels(handle, $0) } } @@ -11159,7 +11121,8 @@ open class RoomPowerLevels: RoomPowerLevelsProtocol, @unchecked Sendable { */ open func canOwnUserBan() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_ban( + self.uniffiCloneHandle(),$0 ) }) } @@ -11169,7 +11132,8 @@ open func canOwnUserBan() -> Bool { */ open func canOwnUserInvite() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_invite( + self.uniffiCloneHandle(),$0 ) }) } @@ -11179,7 +11143,8 @@ open func canOwnUserInvite() -> Bool { */ open func canOwnUserKick() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_kick( + self.uniffiCloneHandle(),$0 ) }) } @@ -11190,7 +11155,8 @@ open func canOwnUserKick() -> Bool { */ open func canOwnUserPinUnpin() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_pin_unpin( + self.uniffiCloneHandle(),$0 ) }) } @@ -11201,7 +11167,8 @@ open func canOwnUserPinUnpin() -> Bool { */ open func canOwnUserRedactOther() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_other( + self.uniffiCloneHandle(),$0 ) }) } @@ -11212,7 +11179,8 @@ open func canOwnUserRedactOther() -> Bool { */ open func canOwnUserRedactOwn() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_redact_own( + self.uniffiCloneHandle(),$0 ) }) } @@ -11223,7 +11191,8 @@ open func canOwnUserRedactOwn() -> Bool { */ open func canOwnUserSendMessage(message: MessageLikeEventType) -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_message( + self.uniffiCloneHandle(), FfiConverterTypeMessageLikeEventType_lower(message),$0 ) }) @@ -11235,7 +11204,8 @@ open func canOwnUserSendMessage(message: MessageLikeEventType) -> Bool { */ open func canOwnUserSendState(stateEvent: StateEventType) -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_send_state( + self.uniffiCloneHandle(), FfiConverterTypeStateEventType_lower(stateEvent),$0 ) }) @@ -11247,7 +11217,8 @@ open func canOwnUserSendState(stateEvent: StateEventType) -> Bool { */ open func canOwnUserTriggerRoomNotification() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_own_user_trigger_room_notification( + self.uniffiCloneHandle(),$0 ) }) } @@ -11260,7 +11231,8 @@ open func canOwnUserTriggerRoomNotification() -> Bool { */ open func canUserBan(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_ban( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11274,7 +11246,8 @@ open func canUserBan(userId: String)throws -> Bool { */ open func canUserInvite(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_invite( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11288,7 +11261,8 @@ open func canUserInvite(userId: String)throws -> Bool { */ open func canUserKick(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_kick( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11302,7 +11276,8 @@ open func canUserKick(userId: String)throws -> Bool { */ open func canUserPinUnpin(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_pin_unpin( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11316,7 +11291,8 @@ open func canUserPinUnpin(userId: String)throws -> Bool { */ open func canUserRedactOther(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_other( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11330,7 +11306,8 @@ open func canUserRedactOther(userId: String)throws -> Bool { */ open func canUserRedactOwn(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_redact_own( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11344,7 +11321,8 @@ open func canUserRedactOwn(userId: String)throws -> Bool { */ open func canUserSendMessage(userId: String, message: MessageLikeEventType)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_message( + self.uniffiCloneHandle(), FfiConverterString.lower(userId), FfiConverterTypeMessageLikeEventType_lower(message),$0 ) @@ -11359,7 +11337,8 @@ open func canUserSendMessage(userId: String, message: MessageLikeEventType)throw */ open func canUserSendState(userId: String, stateEvent: StateEventType)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_send_state( + self.uniffiCloneHandle(), FfiConverterString.lower(userId), FfiConverterTypeStateEventType_lower(stateEvent),$0 ) @@ -11374,7 +11353,8 @@ open func canUserSendState(userId: String, stateEvent: StateEventType)throws -> */ open func canUserTriggerRoomNotification(userId: String)throws -> Bool { return try FfiConverterBool.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_can_user_trigger_room_notification( + self.uniffiCloneHandle(), FfiConverterString.lower(userId),$0 ) }) @@ -11386,19 +11366,22 @@ open func canUserTriggerRoomNotification(userId: String)throws -> Bool { */ open func userPowerLevels() -> [String: Int64] { return try! FfiConverterDictionaryStringInt64.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_user_power_levels( + self.uniffiCloneHandle(),$0 ) }) } open func values() -> RoomPowerLevelsValues { return try! FfiConverterTypeRoomPowerLevelsValues_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompowerlevels_values( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -11406,33 +11389,24 @@ open func values() -> RoomPowerLevelsValues { @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomPowerLevels: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomPowerLevels - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomPowerLevels { - return RoomPowerLevels(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomPowerLevels { + return RoomPowerLevels(unsafeFromHandle: handle) } - public static func lower(_ value: RoomPowerLevels) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomPowerLevels) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomPowerLevels { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomPowerLevels, 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))))) + writeInt(&buf, lower(value)) } } @@ -11440,14 +11414,14 @@ public struct FfiConverterTypeRoomPowerLevels: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomPowerLevels_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomPowerLevels { - return try FfiConverterTypeRoomPowerLevels.lift(pointer) +public func FfiConverterTypeRoomPowerLevels_lift(_ handle: UInt64) throws -> RoomPowerLevels { + return try FfiConverterTypeRoomPowerLevels.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomPowerLevels_lower(_ value: RoomPowerLevels) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomPowerLevels_lower(_ value: RoomPowerLevels) -> UInt64 { return FfiConverterTypeRoomPowerLevels.lower(value) } @@ -11499,13 +11473,13 @@ public protocol RoomPreviewProtocol: AnyObject, Sendable { * aren't joined yet. */ open class RoomPreview: RoomPreviewProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -11515,36 +11489,37 @@ open class RoomPreview: RoomPreviewProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roompreview(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_roompreview(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roompreview(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_roompreview(handle, $0) } } @@ -11558,7 +11533,7 @@ open func forget()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roompreview_forget( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -11575,7 +11550,8 @@ open func forget()async throws { */ open func info() -> RoomPreviewInfo { return try! FfiConverterTypeRoomPreviewInfo_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_roompreview_info(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_roompreview_info( + self.uniffiCloneHandle(),$0 ) }) } @@ -11588,7 +11564,7 @@ open func inviter()async -> RoomMember? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roompreview_inviter( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -11615,7 +11591,7 @@ open func leave()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roompreview_leave( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -11635,7 +11611,7 @@ open func ownMembershipDetails()async -> RoomMemberWithSenderInfo? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_roompreview_own_membership_details( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -11649,6 +11625,7 @@ open func ownMembershipDetails()async -> RoomMemberWithSenderInfo? { } + } @@ -11656,33 +11633,24 @@ open func ownMembershipDetails()async -> RoomMemberWithSenderInfo? { @_documentation(visibility: private) #endif public struct FfiConverterTypeRoomPreview: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = RoomPreview - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomPreview { - return RoomPreview(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> RoomPreview { + return RoomPreview(unsafeFromHandle: handle) } - public static func lower(_ value: RoomPreview) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: RoomPreview) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomPreview { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: RoomPreview, 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))))) + writeInt(&buf, lower(value)) } } @@ -11690,14 +11658,14 @@ public struct FfiConverterTypeRoomPreview: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomPreview_lift(_ pointer: UnsafeMutableRawPointer) throws -> RoomPreview { - return try FfiConverterTypeRoomPreview.lift(pointer) +public func FfiConverterTypeRoomPreview_lift(_ handle: UInt64) throws -> RoomPreview { + return try FfiConverterTypeRoomPreview.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeRoomPreview_lower(_ value: RoomPreview) -> UnsafeMutableRawPointer { +public func FfiConverterTypeRoomPreview_lower(_ value: RoomPreview) -> UInt64 { return FfiConverterTypeRoomPreview.lower(value) } @@ -11724,13 +11692,13 @@ public protocol SendAttachmentJoinHandleProtocol: AnyObject, Sendable { } open class SendAttachmentJoinHandle: SendAttachmentJoinHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -11740,36 +11708,37 @@ open class SendAttachmentJoinHandle: SendAttachmentJoinHandleProtocol, @unchecke #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sendattachmentjoinhandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sendattachmentjoinhandle(handle, $0) } } @@ -11781,7 +11750,8 @@ open class SendAttachmentJoinHandle: SendAttachmentJoinHandleProtocol, @unchecke * A subsequent call to [`Self::join`] will return immediately. */ open func cancel() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_cancel( + self.uniffiCloneHandle(),$0 ) } } @@ -11796,7 +11766,7 @@ open func join()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sendattachmentjoinhandle_join( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -11809,6 +11779,7 @@ open func join()async throws { } + } @@ -11816,33 +11787,24 @@ open func join()async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeSendAttachmentJoinHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SendAttachmentJoinHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SendAttachmentJoinHandle { - return SendAttachmentJoinHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SendAttachmentJoinHandle { + return SendAttachmentJoinHandle(unsafeFromHandle: handle) } - public static func lower(_ value: SendAttachmentJoinHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SendAttachmentJoinHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SendAttachmentJoinHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SendAttachmentJoinHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -11850,14 +11812,14 @@ public struct FfiConverterTypeSendAttachmentJoinHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSendAttachmentJoinHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> SendAttachmentJoinHandle { - return try FfiConverterTypeSendAttachmentJoinHandle.lift(pointer) +public func FfiConverterTypeSendAttachmentJoinHandle_lift(_ handle: UInt64) throws -> SendAttachmentJoinHandle { + return try FfiConverterTypeSendAttachmentJoinHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSendAttachmentJoinHandle_lower(_ value: SendAttachmentJoinHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSendAttachmentJoinHandle_lower(_ value: SendAttachmentJoinHandle) -> UInt64 { return FfiConverterTypeSendAttachmentJoinHandle.lower(value) } @@ -11884,13 +11846,13 @@ public protocol SendGalleryJoinHandleProtocol: AnyObject, Sendable { } open class SendGalleryJoinHandle: SendGalleryJoinHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -11900,36 +11862,37 @@ open class SendGalleryJoinHandle: SendGalleryJoinHandleProtocol, @unchecked Send #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sendgalleryjoinhandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sendgalleryjoinhandle(handle, $0) } } @@ -11941,7 +11904,8 @@ open class SendGalleryJoinHandle: SendGalleryJoinHandleProtocol, @unchecked Send * A subsequent call to [`Self::join`] will return immediately. */ open func cancel() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_cancel( + self.uniffiCloneHandle(),$0 ) } } @@ -11956,7 +11920,7 @@ open func join()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sendgalleryjoinhandle_join( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -11969,6 +11933,7 @@ open func join()async throws { } + } @@ -11976,33 +11941,24 @@ open func join()async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeSendGalleryJoinHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SendGalleryJoinHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SendGalleryJoinHandle { - return SendGalleryJoinHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SendGalleryJoinHandle { + return SendGalleryJoinHandle(unsafeFromHandle: handle) } - public static func lower(_ value: SendGalleryJoinHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SendGalleryJoinHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SendGalleryJoinHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SendGalleryJoinHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -12010,14 +11966,14 @@ public struct FfiConverterTypeSendGalleryJoinHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSendGalleryJoinHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> SendGalleryJoinHandle { - return try FfiConverterTypeSendGalleryJoinHandle.lift(pointer) +public func FfiConverterTypeSendGalleryJoinHandle_lift(_ handle: UInt64) throws -> SendGalleryJoinHandle { + return try FfiConverterTypeSendGalleryJoinHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSendGalleryJoinHandle_lower(_ value: SendGalleryJoinHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSendGalleryJoinHandle_lower(_ value: SendGalleryJoinHandle) -> UInt64 { return FfiConverterTypeSendGalleryJoinHandle.lower(value) } @@ -12064,13 +12020,13 @@ public protocol SendHandleProtocol: AnyObject, Sendable { * A handle to perform actions onto a local echo. */ open class SendHandle: SendHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -12080,36 +12036,37 @@ open class SendHandle: SendHandleProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sendhandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sendhandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sendhandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sendhandle(handle, $0) } } @@ -12130,7 +12087,7 @@ open func abort()async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sendhandle_abort( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12161,7 +12118,7 @@ open func tryResend()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sendhandle_try_resend( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12174,6 +12131,7 @@ open func tryResend()async throws { } + } @@ -12181,33 +12139,24 @@ open func tryResend()async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeSendHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SendHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SendHandle { - return SendHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SendHandle { + return SendHandle(unsafeFromHandle: handle) } - public static func lower(_ value: SendHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SendHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SendHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SendHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -12215,14 +12164,14 @@ public struct FfiConverterTypeSendHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSendHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> SendHandle { - return try FfiConverterTypeSendHandle.lift(pointer) +public func FfiConverterTypeSendHandle_lift(_ handle: UInt64) throws -> SendHandle { + return try FfiConverterTypeSendHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSendHandle_lower(_ value: SendHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSendHandle_lower(_ value: SendHandle) -> UInt64 { return FfiConverterTypeSendHandle.lower(value) } @@ -12281,13 +12230,13 @@ public protocol SessionVerificationControllerProtocol: AnyObject, Sendable { } open class SessionVerificationController: SessionVerificationControllerProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -12297,36 +12246,37 @@ open class SessionVerificationController: SessionVerificationControllerProtocol, #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sessionverificationcontroller(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sessionverificationcontroller(handle, $0) } } @@ -12340,7 +12290,7 @@ open func acceptVerificationRequest()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_accept_verification_request( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12363,7 +12313,7 @@ open func acknowledgeVerificationRequest(senderId: String, flowId: String)async try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_acknowledge_verification_request( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(senderId),FfiConverterString.lower(flowId) ) }, @@ -12383,7 +12333,7 @@ open func approveVerification()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_approve_verification( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12403,7 +12353,7 @@ open func cancelVerification()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_cancel_verification( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12423,7 +12373,7 @@ open func declineVerification()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_decline_verification( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12443,7 +12393,7 @@ open func requestDeviceVerification()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_device_verification( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12463,7 +12413,7 @@ open func requestUserVerification(userId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_request_user_verification( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(userId) ) }, @@ -12476,7 +12426,8 @@ open func requestUserVerification(userId: String)async throws { } open func setDelegate(delegate: SessionVerificationControllerDelegate?) {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_set_delegate( + self.uniffiCloneHandle(), FfiConverterOptionCallbackInterfaceSessionVerificationControllerDelegate.lower(delegate),$0 ) } @@ -12491,7 +12442,7 @@ open func startSasVerification()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_sessionverificationcontroller_start_sas_verification( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12504,6 +12455,7 @@ open func startSasVerification()async throws { } + } @@ -12511,33 +12463,24 @@ open func startSasVerification()async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeSessionVerificationController: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SessionVerificationController - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SessionVerificationController { - return SessionVerificationController(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SessionVerificationController { + return SessionVerificationController(unsafeFromHandle: handle) } - public static func lower(_ value: SessionVerificationController) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SessionVerificationController) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SessionVerificationController { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SessionVerificationController, 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))))) + writeInt(&buf, lower(value)) } } @@ -12545,14 +12488,14 @@ public struct FfiConverterTypeSessionVerificationController: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSessionVerificationController_lift(_ pointer: UnsafeMutableRawPointer) throws -> SessionVerificationController { - return try FfiConverterTypeSessionVerificationController.lift(pointer) +public func FfiConverterTypeSessionVerificationController_lift(_ handle: UInt64) throws -> SessionVerificationController { + return try FfiConverterTypeSessionVerificationController.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSessionVerificationController_lower(_ value: SessionVerificationController) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSessionVerificationController_lower(_ value: SessionVerificationController) -> UInt64 { return FfiConverterTypeSessionVerificationController.lower(value) } @@ -12569,13 +12512,13 @@ public protocol SessionVerificationEmojiProtocol: AnyObject, Sendable { } open class SessionVerificationEmoji: SessionVerificationEmojiProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -12585,36 +12528,37 @@ open class SessionVerificationEmoji: SessionVerificationEmojiProtocol, @unchecke #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sessionverificationemoji(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sessionverificationemoji(handle, $0) } } @@ -12622,19 +12566,22 @@ open class SessionVerificationEmoji: SessionVerificationEmojiProtocol, @unchecke open func description() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_description( + self.uniffiCloneHandle(),$0 ) }) } open func symbol() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_sessionverificationemoji_symbol( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -12642,33 +12589,24 @@ open func symbol() -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeSessionVerificationEmoji: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SessionVerificationEmoji - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SessionVerificationEmoji { - return SessionVerificationEmoji(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SessionVerificationEmoji { + return SessionVerificationEmoji(unsafeFromHandle: handle) } - public static func lower(_ value: SessionVerificationEmoji) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SessionVerificationEmoji) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SessionVerificationEmoji { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SessionVerificationEmoji, 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))))) + writeInt(&buf, lower(value)) } } @@ -12676,14 +12614,14 @@ public struct FfiConverterTypeSessionVerificationEmoji: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSessionVerificationEmoji_lift(_ pointer: UnsafeMutableRawPointer) throws -> SessionVerificationEmoji { - return try FfiConverterTypeSessionVerificationEmoji.lift(pointer) +public func FfiConverterTypeSessionVerificationEmoji_lift(_ handle: UInt64) throws -> SessionVerificationEmoji { + return try FfiConverterTypeSessionVerificationEmoji.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSessionVerificationEmoji_lower(_ value: SessionVerificationEmoji) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSessionVerificationEmoji_lower(_ value: SessionVerificationEmoji) -> UInt64 { return FfiConverterTypeSessionVerificationEmoji.lower(value) } @@ -12754,13 +12692,13 @@ public protocol SpaceRoomListProtocol: AnyObject, Sendable { * and updates the list accordingly as rooms are joined or left. */ open class SpaceRoomList: SpaceRoomListProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -12770,36 +12708,37 @@ open class SpaceRoomList: SpaceRoomListProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #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) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_spaceroomlist(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_spaceroomlist(handle, $0) } } @@ -12814,7 +12753,7 @@ open func paginate()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_paginate( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -12831,7 +12770,8 @@ open func paginate()async throws { */ open func paginationState() -> SpaceRoomListPaginationState { return try! FfiConverterTypeSpaceRoomListPaginationState_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_pagination_state( + self.uniffiCloneHandle(),$0 ) }) } @@ -12841,7 +12781,8 @@ open func paginationState() -> SpaceRoomListPaginationState { */ open func rooms() -> [SpaceRoom] { return try! FfiConverterSequenceTypeSpaceRoom.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms( + self.uniffiCloneHandle(),$0 ) }) } @@ -12851,7 +12792,8 @@ open func rooms() -> [SpaceRoom] { */ open func space() -> SpaceRoom? { return try! FfiConverterOptionTypeSpaceRoom.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space( + self.uniffiCloneHandle(),$0 ) }) } @@ -12861,7 +12803,8 @@ open func space() -> SpaceRoom? { */ 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(), + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener_lower(listener),$0 ) }) @@ -12872,7 +12815,8 @@ open func subscribeToPaginationStateUpdates(listener: SpaceRoomListPaginationSta */ 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(), + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSpaceRoomListEntriesListener_lower(listener),$0 ) }) @@ -12883,13 +12827,15 @@ open func subscribeToRoomUpdate(listener: SpaceRoomListEntriesListener) -> TaskH */ open func subscribeToSpaceUpdates(listener: SpaceRoomListSpaceListener) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSpaceRoomListSpaceListener_lower(listener),$0 ) }) } + } @@ -12897,33 +12843,24 @@ open func subscribeToSpaceUpdates(listener: SpaceRoomListSpaceListener) -> TaskH @_documentation(visibility: private) #endif public struct FfiConverterTypeSpaceRoomList: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SpaceRoomList - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceRoomList { - return SpaceRoomList(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SpaceRoomList { + return SpaceRoomList(unsafeFromHandle: handle) } - public static func lower(_ value: SpaceRoomList) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SpaceRoomList) -> UInt64 { + return value.uniffiCloneHandle() } 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } 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))))) + writeInt(&buf, lower(value)) } } @@ -12931,14 +12868,14 @@ public struct FfiConverterTypeSpaceRoomList: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSpaceRoomList_lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceRoomList { - return try FfiConverterTypeSpaceRoomList.lift(pointer) +public func FfiConverterTypeSpaceRoomList_lift(_ handle: UInt64) throws -> SpaceRoomList { + return try FfiConverterTypeSpaceRoomList.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSpaceRoomList_lower(_ value: SpaceRoomList) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSpaceRoomList_lower(_ value: SpaceRoomList) -> UInt64 { return FfiConverterTypeSpaceRoomList.lower(value) } @@ -13012,13 +12949,13 @@ public protocol SpaceServiceProtocol: AnyObject, Sendable { * events, and providing access to the top-level spaces and their children. */ open class SpaceService: SpaceServiceProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -13028,36 +12965,37 @@ open class SpaceService: SpaceServiceProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #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) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_spaceservice(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_spaceservice(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_spaceservice(handle, $0) } } @@ -13068,7 +13006,7 @@ open func addChildToSpace(childId: String, spaceId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_add_child_to_space( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(childId),FfiConverterString.lower(spaceId) ) }, @@ -13092,7 +13030,7 @@ open func editableSpaces()async -> [SpaceRoom] { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_editable_spaces( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -13113,7 +13051,7 @@ open func joinedParentsOfChild(childId: String)async throws -> [SpaceRoom] { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_parents_of_child( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(childId) ) }, @@ -13135,7 +13073,7 @@ open func joinedSpaces()async -> [SpaceRoom] { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_joined_spaces( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -13162,13 +13100,13 @@ open func leaveSpace(spaceId: String)async throws -> LeaveSpaceHandle { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_leave_space( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeLeaveSpaceHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -13179,7 +13117,7 @@ open func removeChildFromSpace(childId: String, spaceId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_remove_child_from_space( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(childId),FfiConverterString.lower(spaceId) ) }, @@ -13199,13 +13137,13 @@ open func spaceRoomList(spaceId: String)async throws -> SpaceRoomList { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_space_room_list( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeSpaceRoomList_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -13220,13 +13158,13 @@ open func subscribeToJoinedSpaces(listener: SpaceServiceJoinedSpacesListener)asy try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_spaceservice_subscribe_to_joined_spaces( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: nil @@ -13234,6 +13172,7 @@ open func subscribeToJoinedSpaces(listener: SpaceServiceJoinedSpacesListener)asy } + } @@ -13241,33 +13180,24 @@ open func subscribeToJoinedSpaces(listener: SpaceServiceJoinedSpacesListener)asy @_documentation(visibility: private) #endif public struct FfiConverterTypeSpaceService: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SpaceService - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceService { - return SpaceService(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SpaceService { + return SpaceService(unsafeFromHandle: handle) } - public static func lower(_ value: SpaceService) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SpaceService) -> UInt64 { + return value.uniffiCloneHandle() } 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } 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))))) + writeInt(&buf, lower(value)) } } @@ -13275,14 +13205,14 @@ public struct FfiConverterTypeSpaceService: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSpaceService_lift(_ pointer: UnsafeMutableRawPointer) throws -> SpaceService { - return try FfiConverterTypeSpaceService.lift(pointer) +public func FfiConverterTypeSpaceService_lift(_ handle: UInt64) throws -> SpaceService { + return try FfiConverterTypeSpaceService.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSpaceService_lower(_ value: SpaceService) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSpaceService_lower(_ value: SpaceService) -> UInt64 { return FfiConverterTypeSpaceService.lower(value) } @@ -13301,13 +13231,13 @@ public protocol SpanProtocol: AnyObject, Sendable { } open class Span: SpanProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -13317,27 +13247,27 @@ open class Span: SpanProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_span(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_span(self.handle, $0) } } /** * Create a span originating at the given callsite (file, line and column). @@ -13366,7 +13296,7 @@ open class Span: SpanProtocol, @unchecked Sendable { * on that thread. */ public convenience init(file: String, line: UInt32?, level: LogLevel, target: String, name: String, bridgeTraceId: String?) { - let pointer = + let handle = try! rustCall() { uniffi_matrix_sdk_ffi_fn_constructor_span_new( FfiConverterString.lower(file), @@ -13377,15 +13307,16 @@ public convenience init(file: String, line: UInt32?, level: LogLevel, target: St FfiConverterOptionString.lower(bridgeTraceId),$0 ) } - self.init(unsafeFromRawPointer: pointer) + self.init(unsafeFromHandle: handle) } deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_span(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_span(handle, $0) } } @@ -13414,25 +13345,29 @@ public static func newBridgeSpan(target: String, parentTraceId: String?) -> Span open func enter() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_span_enter(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_span_enter( + self.uniffiCloneHandle(),$0 ) } } open func exit() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_span_exit(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_span_exit( + self.uniffiCloneHandle(),$0 ) } } open func isNone() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_span_is_none(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_span_is_none( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -13440,33 +13375,24 @@ open func isNone() -> Bool { @_documentation(visibility: private) #endif public struct FfiConverterTypeSpan: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = Span - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> Span { - return Span(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> Span { + return Span(unsafeFromHandle: handle) } - public static func lower(_ value: Span) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: Span) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Span { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: Span, 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))))) + writeInt(&buf, lower(value)) } } @@ -13474,14 +13400,14 @@ public struct FfiConverterTypeSpan: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSpan_lift(_ pointer: UnsafeMutableRawPointer) throws -> Span { - return try FfiConverterTypeSpan.lift(pointer) +public func FfiConverterTypeSpan_lift(_ handle: UInt64) throws -> Span { + return try FfiConverterTypeSpan.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSpan_lower(_ value: Span) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSpan_lower(_ value: Span) -> UInt64 { return FfiConverterTypeSpan.lower(value) } @@ -13552,13 +13478,13 @@ public protocol SqliteStoreBuilderProtocol: AnyObject, Sendable { * A builder for configuring a Sqlite session store. */ open class SqliteStoreBuilder: SqliteStoreBuilderProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -13568,27 +13494,27 @@ open class SqliteStoreBuilder: SqliteStoreBuilderProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_sqlitestorebuilder(self.handle, $0) } } /** * Construct a [`SqliteStoreBuilder`] and set the paths that the client @@ -13599,22 +13525,23 @@ open class SqliteStoreBuilder: SqliteStoreBuilderProtocol, @unchecked Sendable { * same path for both stores on a single session. */ public convenience init(dataPath: String, cachePath: String) { - let pointer = + let handle = try! rustCall() { uniffi_matrix_sdk_ffi_fn_constructor_sqlitestorebuilder_new( FfiConverterString.lower(dataPath), FfiConverterString.lower(cachePath),$0 ) } - self.init(unsafeFromRawPointer: pointer) + self.init(unsafeFromHandle: handle) } deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_sqlitestorebuilder(handle, $0) } } @@ -13635,7 +13562,8 @@ public convenience init(dataPath: String, cachePath: String) { */ open func cacheSize(cacheSize: UInt32?) -> SqliteStoreBuilder { return try! FfiConverterTypeSqliteStoreBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_cache_size( + self.uniffiCloneHandle(), FfiConverterOptionUInt32.lower(cacheSize),$0 ) }) @@ -13651,7 +13579,8 @@ open func cacheSize(cacheSize: UInt32?) -> SqliteStoreBuilder { */ open func journalSizeLimit(limit: UInt32?) -> SqliteStoreBuilder { return try! FfiConverterTypeSqliteStoreBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_journal_size_limit( + self.uniffiCloneHandle(), FfiConverterOptionUInt32.lower(limit),$0 ) }) @@ -13662,7 +13591,8 @@ open func journalSizeLimit(limit: UInt32?) -> SqliteStoreBuilder { */ open func passphrase(passphrase: String?) -> SqliteStoreBuilder { return try! FfiConverterTypeSqliteStoreBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_passphrase( + self.uniffiCloneHandle(), FfiConverterOptionString.lower(passphrase),$0 ) }) @@ -13680,7 +13610,8 @@ open func passphrase(passphrase: String?) -> SqliteStoreBuilder { */ open func poolMaxSize(poolMaxSize: UInt32?) -> SqliteStoreBuilder { return try! FfiConverterTypeSqliteStoreBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_pool_max_size( + self.uniffiCloneHandle(), FfiConverterOptionUInt32.lower(poolMaxSize),$0 ) }) @@ -13696,12 +13627,14 @@ open func poolMaxSize(poolMaxSize: UInt32?) -> SqliteStoreBuilder { */ open func systemIsMemoryConstrained() -> SqliteStoreBuilder { return try! FfiConverterTypeSqliteStoreBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_sqlitestorebuilder_system_is_memory_constrained( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -13709,33 +13642,24 @@ open func systemIsMemoryConstrained() -> SqliteStoreBuilder { @_documentation(visibility: private) #endif public struct FfiConverterTypeSqliteStoreBuilder: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SqliteStoreBuilder - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SqliteStoreBuilder { - return SqliteStoreBuilder(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SqliteStoreBuilder { + return SqliteStoreBuilder(unsafeFromHandle: handle) } - public static func lower(_ value: SqliteStoreBuilder) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SqliteStoreBuilder) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SqliteStoreBuilder { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SqliteStoreBuilder, 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))))) + writeInt(&buf, lower(value)) } } @@ -13743,14 +13667,14 @@ public struct FfiConverterTypeSqliteStoreBuilder: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSqliteStoreBuilder_lift(_ pointer: UnsafeMutableRawPointer) throws -> SqliteStoreBuilder { - return try FfiConverterTypeSqliteStoreBuilder.lift(pointer) +public func FfiConverterTypeSqliteStoreBuilder_lift(_ handle: UInt64) throws -> SqliteStoreBuilder { + return try FfiConverterTypeSqliteStoreBuilder.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSqliteStoreBuilder_lower(_ value: SqliteStoreBuilder) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSqliteStoreBuilder_lower(_ value: SqliteStoreBuilder) -> UInt64 { return FfiConverterTypeSqliteStoreBuilder.lower(value) } @@ -13781,13 +13705,13 @@ public protocol SsoHandlerProtocol: AnyObject, Sendable { * An object encapsulating the SSO login flow */ open class SsoHandler: SsoHandlerProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -13797,36 +13721,37 @@ open class SsoHandler: SsoHandlerProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_ssohandler(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_ssohandler(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_ssohandler(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_ssohandler(handle, $0) } } @@ -13840,7 +13765,7 @@ open func finish(callbackUrl: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_ssohandler_finish( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(callbackUrl) ) }, @@ -13859,12 +13784,14 @@ open func finish(callbackUrl: String)async throws { */ open func url() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_ssohandler_url(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_ssohandler_url( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -13872,33 +13799,24 @@ open func url() -> String { @_documentation(visibility: private) #endif public struct FfiConverterTypeSsoHandler: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SsoHandler - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SsoHandler { - return SsoHandler(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SsoHandler { + return SsoHandler(unsafeFromHandle: handle) } - public static func lower(_ value: SsoHandler) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SsoHandler) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SsoHandler { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SsoHandler, 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))))) + writeInt(&buf, lower(value)) } } @@ -13906,14 +13824,14 @@ public struct FfiConverterTypeSsoHandler: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSsoHandler_lift(_ pointer: UnsafeMutableRawPointer) throws -> SsoHandler { - return try FfiConverterTypeSsoHandler.lift(pointer) +public func FfiConverterTypeSsoHandler_lift(_ handle: UInt64) throws -> SsoHandler { + return try FfiConverterTypeSsoHandler.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSsoHandler_lower(_ value: SsoHandler) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSsoHandler_lower(_ value: SsoHandler) -> UInt64 { return FfiConverterTypeSsoHandler.lower(value) } @@ -13943,13 +13861,13 @@ public protocol SyncServiceProtocol: AnyObject, Sendable { } open class SyncService: SyncServiceProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -13959,36 +13877,37 @@ open class SyncService: SyncServiceProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_syncservice(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_syncservice(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_syncservice(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_syncservice(handle, $0) } } @@ -14006,7 +13925,7 @@ open func expireSessions()async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_syncservice_expire_sessions( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -14021,7 +13940,8 @@ open func expireSessions()async { open func roomListService() -> RoomListService { return try! FfiConverterTypeRoomListService_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_syncservice_room_list_service( + self.uniffiCloneHandle(),$0 ) }) } @@ -14031,7 +13951,7 @@ open func start()async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_syncservice_start( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -14046,7 +13966,8 @@ open func start()async { open func state(listener: SyncServiceStateObserver) -> TaskHandle { return try! FfiConverterTypeTaskHandle_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_syncservice_state(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_syncservice_state( + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceSyncServiceStateObserver_lower(listener),$0 ) }) @@ -14057,7 +13978,7 @@ open func stop()async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_syncservice_stop( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -14071,6 +13992,7 @@ open func stop()async { } + } @@ -14078,33 +14000,24 @@ open func stop()async { @_documentation(visibility: private) #endif public struct FfiConverterTypeSyncService: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SyncService - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SyncService { - return SyncService(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SyncService { + return SyncService(unsafeFromHandle: handle) } - public static func lower(_ value: SyncService) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SyncService) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SyncService { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SyncService, 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))))) + writeInt(&buf, lower(value)) } } @@ -14112,14 +14025,14 @@ public struct FfiConverterTypeSyncService: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSyncService_lift(_ pointer: UnsafeMutableRawPointer) throws -> SyncService { - return try FfiConverterTypeSyncService.lift(pointer) +public func FfiConverterTypeSyncService_lift(_ handle: UInt64) throws -> SyncService { + return try FfiConverterTypeSyncService.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSyncService_lower(_ value: SyncService) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSyncService_lower(_ value: SyncService) -> UInt64 { return FfiConverterTypeSyncService.lower(value) } @@ -14143,13 +14056,13 @@ public protocol SyncServiceBuilderProtocol: AnyObject, Sendable { } open class SyncServiceBuilder: SyncServiceBuilderProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -14159,36 +14072,37 @@ open class SyncServiceBuilder: SyncServiceBuilderProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_syncservicebuilder(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_syncservicebuilder(handle, $0) } } @@ -14199,13 +14113,13 @@ open func finish()async throws -> SyncService { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_finish( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeSyncService_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -14213,7 +14127,8 @@ open func finish()async throws -> SyncService { open func withCrossProcessLock() -> SyncServiceBuilder { return try! FfiConverterTypeSyncServiceBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock( + self.uniffiCloneHandle(),$0 ) }) } @@ -14223,20 +14138,23 @@ open func withCrossProcessLock() -> SyncServiceBuilder { */ open func withOfflineMode() -> SyncServiceBuilder { return try! FfiConverterTypeSyncServiceBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_offline_mode( + self.uniffiCloneHandle(),$0 ) }) } open func withSharePos(enable: Bool) -> SyncServiceBuilder { return try! FfiConverterTypeSyncServiceBuilder_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_share_pos( + self.uniffiCloneHandle(), FfiConverterBool.lower(enable),$0 ) }) } + } @@ -14244,33 +14162,24 @@ open func withSharePos(enable: Bool) -> SyncServiceBuilder { @_documentation(visibility: private) #endif public struct FfiConverterTypeSyncServiceBuilder: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = SyncServiceBuilder - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> SyncServiceBuilder { - return SyncServiceBuilder(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> SyncServiceBuilder { + return SyncServiceBuilder(unsafeFromHandle: handle) } - public static func lower(_ value: SyncServiceBuilder) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: SyncServiceBuilder) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SyncServiceBuilder { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: SyncServiceBuilder, 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))))) + writeInt(&buf, lower(value)) } } @@ -14278,14 +14187,14 @@ public struct FfiConverterTypeSyncServiceBuilder: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSyncServiceBuilder_lift(_ pointer: UnsafeMutableRawPointer) throws -> SyncServiceBuilder { - return try FfiConverterTypeSyncServiceBuilder.lift(pointer) +public func FfiConverterTypeSyncServiceBuilder_lift(_ handle: UInt64) throws -> SyncServiceBuilder { + return try FfiConverterTypeSyncServiceBuilder.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeSyncServiceBuilder_lower(_ value: SyncServiceBuilder) -> UnsafeMutableRawPointer { +public func FfiConverterTypeSyncServiceBuilder_lower(_ value: SyncServiceBuilder) -> UInt64 { return FfiConverterTypeSyncServiceBuilder.lower(value) } @@ -14317,13 +14226,13 @@ public protocol TaskHandleProtocol: AnyObject, Sendable { * It's a thin wrapper around [`JoinHandle`]. */ open class TaskHandle: TaskHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -14333,43 +14242,45 @@ open class TaskHandle: TaskHandleProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_taskhandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_taskhandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_taskhandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_taskhandle(handle, $0) } } open func cancel() {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_taskhandle_cancel( + self.uniffiCloneHandle(),$0 ) } } @@ -14379,12 +14290,14 @@ open func cancel() {try! rustCall() { */ open func isFinished() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_taskhandle_is_finished( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -14392,33 +14305,24 @@ open func isFinished() -> Bool { @_documentation(visibility: private) #endif public struct FfiConverterTypeTaskHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = TaskHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> TaskHandle { - return TaskHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> TaskHandle { + return TaskHandle(unsafeFromHandle: handle) } - public static func lower(_ value: TaskHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: TaskHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TaskHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: TaskHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -14426,14 +14330,14 @@ public struct FfiConverterTypeTaskHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTaskHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> TaskHandle { - return try FfiConverterTypeTaskHandle.lift(pointer) +public func FfiConverterTypeTaskHandle_lift(_ handle: UInt64) throws -> TaskHandle { + return try FfiConverterTypeTaskHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTaskHandle_lower(_ value: TaskHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeTaskHandle_lower(_ value: TaskHandle) -> UInt64 { return FfiConverterTypeTaskHandle.lower(value) } @@ -14450,13 +14354,13 @@ public protocol ThreadSummaryProtocol: AnyObject, Sendable { } open class ThreadSummary: ThreadSummaryProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -14466,36 +14370,37 @@ open class ThreadSummary: ThreadSummaryProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_threadsummary(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_threadsummary(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_threadsummary(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_threadsummary(handle, $0) } } @@ -14503,19 +14408,22 @@ open class ThreadSummary: ThreadSummaryProtocol, @unchecked Sendable { open func latestEvent() -> EmbeddedEventDetails { return try! FfiConverterTypeEmbeddedEventDetails_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_threadsummary_latest_event( + self.uniffiCloneHandle(),$0 ) }) } open func numReplies() -> UInt64 { return try! FfiConverterUInt64.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_threadsummary_num_replies( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -14523,33 +14431,24 @@ open func numReplies() -> UInt64 { @_documentation(visibility: private) #endif public struct FfiConverterTypeThreadSummary: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = ThreadSummary - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> ThreadSummary { - return ThreadSummary(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> ThreadSummary { + return ThreadSummary(unsafeFromHandle: handle) } - public static func lower(_ value: ThreadSummary) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: ThreadSummary) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> ThreadSummary { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: ThreadSummary, 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))))) + writeInt(&buf, lower(value)) } } @@ -14557,14 +14456,14 @@ public struct FfiConverterTypeThreadSummary: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeThreadSummary_lift(_ pointer: UnsafeMutableRawPointer) throws -> ThreadSummary { - return try FfiConverterTypeThreadSummary.lift(pointer) +public func FfiConverterTypeThreadSummary_lift(_ handle: UInt64) throws -> ThreadSummary { + return try FfiConverterTypeThreadSummary.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeThreadSummary_lower(_ value: ThreadSummary) -> UnsafeMutableRawPointer { +public func FfiConverterTypeThreadSummary_lower(_ value: ThreadSummary) -> UInt64 { return FfiConverterTypeThreadSummary.lower(value) } @@ -14694,8 +14593,6 @@ public protocol TimelineProtocol: AnyObject, Sendable { func sendFile(params: UploadParameters, fileInfo: FileInfo) throws -> SendAttachmentJoinHandle - func sendGallery(params: GalleryUploadParameters, itemInfos: [GalleryItemInfo]) throws -> SendGalleryJoinHandle - func sendImage(params: UploadParameters, thumbnailSource: UploadSource?, imageInfo: ImageInfo) throws -> SendAttachmentJoinHandle func sendLocation(body: String, geoUri: String, description: String?, zoomLevel: UInt8?, assetType: AssetType?, repliedToEventId: String?) async throws @@ -14745,15 +14642,17 @@ public protocol TimelineProtocol: AnyObject, Sendable { */ func unpinEvent(eventId: String) async throws -> Bool + func sendGallery(params: GalleryUploadParameters, itemInfos: [GalleryItemInfo]) throws -> SendGalleryJoinHandle + } open class Timeline: TimelineProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -14763,36 +14662,37 @@ open class Timeline: TimelineProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timeline(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timeline(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timeline(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timeline(handle, $0) } } @@ -14803,13 +14703,13 @@ open func addListener(listener: TimelineListener)async -> TaskHandle { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_add_listener( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfaceTimelineListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: nil @@ -14818,7 +14718,8 @@ open func addListener(listener: TimelineListener)async -> TaskHandle { open func createMessageContent(msgType: MessageType) -> RoomMessageEventContentWithoutRelation? { return try! FfiConverterOptionTypeRoomMessageEventContentWithoutRelation.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_timeline_create_message_content( + self.uniffiCloneHandle(), FfiConverterTypeMessageType_lower(msgType),$0 ) }) @@ -14829,7 +14730,7 @@ open func createPoll(question: String, answers: [String], maxSelections: UInt8, try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_create_poll( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(question),FfiConverterSequenceString.lower(answers),FfiConverterUInt8.lower(maxSelections),FfiConverterTypePollKind_lower(pollKind) ) }, @@ -14856,7 +14757,7 @@ open func edit(eventOrTransactionId: EventOrTransactionId, newContent: EditedCon try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_edit( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeEventOrTransactionId_lower(eventOrTransactionId),FfiConverterTypeEditedContent_lower(newContent) ) }, @@ -14873,7 +14774,7 @@ open func endPoll(pollStartEventId: String, text: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_end_poll( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(pollStartEventId),FfiConverterString.lower(text) ) }, @@ -14890,7 +14791,7 @@ open func fetchDetailsForEvent(eventId: String)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_details_for_event( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, @@ -14907,7 +14808,7 @@ open func fetchMembers()async { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_fetch_members( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -14935,7 +14836,7 @@ open func getEventTimelineItemByEventId(eventId: String)async throws -> EventTi try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_get_event_timeline_item_by_event_id( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, @@ -14955,7 +14856,7 @@ open func latestEventId()async -> String? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event_id( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -14979,13 +14880,13 @@ open func loadReplyDetails(eventIdStr: String)async throws -> InReplyToDetails try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_load_reply_details( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventIdStr) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeInReplyToDetails_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -15013,7 +14914,7 @@ open func markAsRead(receiptType: ReceiptType)async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_mark_as_read( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeReceiptType_lower(receiptType) ) }, @@ -15035,7 +14936,7 @@ open func paginateBackwards(numEvents: UInt16)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterUInt16.lower(numEvents) ) }, @@ -15057,7 +14958,7 @@ open func paginateForwards(numEvents: UInt16)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_forwards( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterUInt16.lower(numEvents) ) }, @@ -15081,7 +14982,7 @@ open func pinEvent(eventId: String)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, @@ -15109,7 +15010,7 @@ open func redactEvent(eventOrTransactionId: EventOrTransactionId, reason: String try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeEventOrTransactionId_lower(eventOrTransactionId),FfiConverterOptionString.lower(reason) ) }, @@ -15122,7 +15023,8 @@ open func redactEvent(eventOrTransactionId: EventOrTransactionId, reason: String } open func retryDecryption(sessionIds: [String]) {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption( + self.uniffiCloneHandle(), FfiConverterSequenceString.lower(sessionIds),$0 ) } @@ -15140,13 +15042,13 @@ open func send(msg: RoomMessageEventContentWithoutRelation)async throws -> Send try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(msg) ) }, - 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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeSendHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -15154,7 +15056,8 @@ open func send(msg: RoomMessageEventContentWithoutRelation)async throws -> Send 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(), + uniffi_matrix_sdk_ffi_fn_method_timeline_send_audio( + self.uniffiCloneHandle(), FfiConverterTypeUploadParameters_lower(params), FfiConverterTypeAudioInfo_lower(audioInfo),$0 ) @@ -15163,25 +15066,18 @@ open func sendAudio(params: UploadParameters, audioInfo: AudioInfo)throws -> Se 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(), + uniffi_matrix_sdk_ffi_fn_method_timeline_send_file( + self.uniffiCloneHandle(), FfiConverterTypeUploadParameters_lower(params), FfiConverterTypeFileInfo_lower(fileInfo),$0 ) }) } -open func sendGallery(params: GalleryUploadParameters, itemInfos: [GalleryItemInfo])throws -> SendGalleryJoinHandle { - return try FfiConverterTypeSendGalleryJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { - uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery(self.uniffiClonePointer(), - FfiConverterTypeGalleryUploadParameters_lower(params), - FfiConverterSequenceTypeGalleryItemInfo.lower(itemInfos),$0 - ) -}) -} - 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(), + uniffi_matrix_sdk_ffi_fn_method_timeline_send_image( + self.uniffiCloneHandle(), FfiConverterTypeUploadParameters_lower(params), FfiConverterOptionTypeUploadSource.lower(thumbnailSource), FfiConverterTypeImageInfo_lower(imageInfo),$0 @@ -15194,7 +15090,7 @@ open func sendLocation(body: String, geoUri: String, description: String?, zoomL try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send_location( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(body),FfiConverterString.lower(geoUri),FfiConverterOptionString.lower(description),FfiConverterOptionUInt8.lower(zoomLevel),FfiConverterOptionTypeAssetType.lower(assetType),FfiConverterOptionString.lower(repliedToEventId) ) }, @@ -15211,7 +15107,7 @@ open func sendPollResponse(pollStartEventId: String, answers: [String])async thr try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send_poll_response( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(pollStartEventId),FfiConverterSequenceString.lower(answers) ) }, @@ -15228,7 +15124,7 @@ open func sendReadReceipt(receiptType: ReceiptType, eventId: String)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send_read_receipt( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeReceiptType_lower(receiptType),FfiConverterString.lower(eventId) ) }, @@ -15252,7 +15148,7 @@ open func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_send_reply( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeRoomMessageEventContentWithoutRelation_lower(msg),FfiConverterString.lower(eventId) ) }, @@ -15266,7 +15162,8 @@ open func sendReply(msg: RoomMessageEventContentWithoutRelation, eventId: String 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(), + uniffi_matrix_sdk_ffi_fn_method_timeline_send_video( + self.uniffiCloneHandle(), FfiConverterTypeUploadParameters_lower(params), FfiConverterOptionTypeUploadSource.lower(thumbnailSource), FfiConverterTypeVideoInfo_lower(videoInfo),$0 @@ -15276,7 +15173,8 @@ open func sendVideo(params: UploadParameters, thumbnailSource: UploadSource?, vi open func sendVoiceMessage(params: UploadParameters, audioInfo: AudioInfo, waveform: [Float])throws -> SendAttachmentJoinHandle { return try FfiConverterTypeSendAttachmentJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { - uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message(self.uniffiClonePointer(), + uniffi_matrix_sdk_ffi_fn_method_timeline_send_voice_message( + self.uniffiCloneHandle(), FfiConverterTypeUploadParameters_lower(params), FfiConverterTypeAudioInfo_lower(audioInfo), FfiConverterSequenceFloat.lower(waveform),$0 @@ -15289,13 +15187,13 @@ open func subscribeToBackPaginationStatus(listener: PaginationStatusListener)asy try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_subscribe_to_back_pagination_status( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterCallbackInterfacePaginationStatusListener_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, + pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_u64, + completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_u64, + freeFunc: ffi_matrix_sdk_ffi_rust_future_free_u64, liftFunc: FfiConverterTypeTaskHandle_lift, errorHandler: FfiConverterTypeClientError_lift ) @@ -15321,7 +15219,7 @@ open func toggleReaction(itemId: EventOrTransactionId, key: String)async throws try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeEventOrTransactionId_lower(itemId),FfiConverterString.lower(key) ) }, @@ -15345,7 +15243,7 @@ open func unpinEvent(eventId: String)async throws -> Bool { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(eventId) ) }, @@ -15357,7 +15255,18 @@ open func unpinEvent(eventId: String)async throws -> Bool { ) } +open func sendGallery(params: GalleryUploadParameters, itemInfos: [GalleryItemInfo])throws -> SendGalleryJoinHandle { + return try FfiConverterTypeSendGalleryJoinHandle_lift(try rustCallWithError(FfiConverterTypeRoomError_lift) { + uniffi_matrix_sdk_ffi_fn_method_timeline_send_gallery( + self.uniffiCloneHandle(), + FfiConverterTypeGalleryUploadParameters_lower(params), + FfiConverterSequenceTypeGalleryItemInfo.lower(itemInfos),$0 + ) +}) +} + + } @@ -15365,33 +15274,24 @@ open func unpinEvent(eventId: String)async throws -> Bool { @_documentation(visibility: private) #endif public struct FfiConverterTypeTimeline: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = Timeline - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> Timeline { - return Timeline(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> Timeline { + return Timeline(unsafeFromHandle: handle) } - public static func lower(_ value: Timeline) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: Timeline) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> Timeline { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: Timeline, 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))))) + writeInt(&buf, lower(value)) } } @@ -15399,14 +15299,14 @@ public struct FfiConverterTypeTimeline: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimeline_lift(_ pointer: UnsafeMutableRawPointer) throws -> Timeline { - return try FfiConverterTypeTimeline.lift(pointer) +public func FfiConverterTypeTimeline_lift(_ handle: UInt64) throws -> Timeline { + return try FfiConverterTypeTimeline.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimeline_lower(_ value: Timeline) -> UnsafeMutableRawPointer { +public func FfiConverterTypeTimeline_lower(_ value: Timeline) -> UInt64 { return FfiConverterTypeTimeline.lower(value) } @@ -15433,13 +15333,13 @@ public protocol TimelineEventProtocol: AnyObject, Sendable { } open class TimelineEvent: TimelineEventProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -15449,36 +15349,37 @@ open class TimelineEvent: TimelineEventProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineevent(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineevent(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineevent(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineevent(handle, $0) } } @@ -15486,21 +15387,24 @@ open class TimelineEvent: TimelineEventProtocol, @unchecked Sendable { open func eventId() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_id( + self.uniffiCloneHandle(),$0 ) }) } open func eventType()throws -> TimelineEventType { return try FfiConverterTypeTimelineEventType_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineevent_event_type( + self.uniffiCloneHandle(),$0 ) }) } open func senderId() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineevent_sender_id( + self.uniffiCloneHandle(),$0 ) }) } @@ -15511,19 +15415,22 @@ open func senderId() -> String { */ open func threadRootEventId() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineevent_thread_root_event_id( + self.uniffiCloneHandle(),$0 ) }) } open func timestamp() -> Timestamp { return try! FfiConverterTypeTimestamp_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineevent_timestamp( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -15531,33 +15438,24 @@ open func timestamp() -> Timestamp { @_documentation(visibility: private) #endif public struct FfiConverterTypeTimelineEvent: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = TimelineEvent - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineEvent { - return TimelineEvent(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> TimelineEvent { + return TimelineEvent(unsafeFromHandle: handle) } - public static func lower(_ value: TimelineEvent) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: TimelineEvent) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineEvent { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: TimelineEvent, 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))))) + writeInt(&buf, lower(value)) } } @@ -15565,14 +15463,14 @@ public struct FfiConverterTypeTimelineEvent: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineEvent_lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineEvent { - return try FfiConverterTypeTimelineEvent.lift(pointer) +public func FfiConverterTypeTimelineEvent_lift(_ handle: UInt64) throws -> TimelineEvent { + return try FfiConverterTypeTimelineEvent.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineEvent_lower(_ value: TimelineEvent) -> UnsafeMutableRawPointer { +public func FfiConverterTypeTimelineEvent_lower(_ value: TimelineEvent) -> UInt64 { return FfiConverterTypeTimelineEvent.lower(value) } @@ -15585,13 +15483,13 @@ public protocol TimelineEventTypeFilterProtocol: AnyObject, Sendable { } open class TimelineEventTypeFilter: TimelineEventTypeFilterProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -15601,36 +15499,37 @@ open class TimelineEventTypeFilter: TimelineEventTypeFilterProtocol, @unchecked #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineeventtypefilter(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineeventtypefilter(handle, $0) } } @@ -15653,6 +15552,7 @@ public static func include(eventTypes: [FilterTimelineEventType]) -> TimelineEve + } @@ -15660,33 +15560,24 @@ public static func include(eventTypes: [FilterTimelineEventType]) -> TimelineEve @_documentation(visibility: private) #endif public struct FfiConverterTypeTimelineEventTypeFilter: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = TimelineEventTypeFilter - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineEventTypeFilter { - return TimelineEventTypeFilter(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> TimelineEventTypeFilter { + return TimelineEventTypeFilter(unsafeFromHandle: handle) } - public static func lower(_ value: TimelineEventTypeFilter) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: TimelineEventTypeFilter) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineEventTypeFilter { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: TimelineEventTypeFilter, 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))))) + writeInt(&buf, lower(value)) } } @@ -15694,14 +15585,14 @@ public struct FfiConverterTypeTimelineEventTypeFilter: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineEventTypeFilter_lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineEventTypeFilter { - return try FfiConverterTypeTimelineEventTypeFilter.lift(pointer) +public func FfiConverterTypeTimelineEventTypeFilter_lift(_ handle: UInt64) throws -> TimelineEventTypeFilter { + return try FfiConverterTypeTimelineEventTypeFilter.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineEventTypeFilter_lower(_ value: TimelineEventTypeFilter) -> UnsafeMutableRawPointer { +public func FfiConverterTypeTimelineEventTypeFilter_lower(_ value: TimelineEventTypeFilter) -> UInt64 { return FfiConverterTypeTimelineEventTypeFilter.lower(value) } @@ -15725,13 +15616,13 @@ public protocol TimelineItemProtocol: AnyObject, Sendable { } open class TimelineItem: TimelineItemProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -15741,36 +15632,37 @@ open class TimelineItem: TimelineItemProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineitem(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_timelineitem(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineitem(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_timelineitem(handle, $0) } } @@ -15778,21 +15670,24 @@ open class TimelineItem: TimelineItemProtocol, @unchecked Sendable { open func asEvent() -> EventTimelineItem? { return try! FfiConverterOptionTypeEventTimelineItem.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_event( + self.uniffiCloneHandle(),$0 ) }) } open func asVirtual() -> VirtualTimelineItem? { return try! FfiConverterOptionTypeVirtualTimelineItem.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineitem_as_virtual( + self.uniffiCloneHandle(),$0 ) }) } open func fmtDebug() -> String { return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineitem_fmt_debug( + self.uniffiCloneHandle(),$0 ) }) } @@ -15802,12 +15697,14 @@ open func fmtDebug() -> String { */ open func uniqueId() -> TimelineUniqueId { return try! FfiConverterTypeTimelineUniqueId_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_timelineitem_unique_id( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -15815,33 +15712,24 @@ open func uniqueId() -> TimelineUniqueId { @_documentation(visibility: private) #endif public struct FfiConverterTypeTimelineItem: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = TimelineItem - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineItem { - return TimelineItem(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> TimelineItem { + return TimelineItem(unsafeFromHandle: handle) } - public static func lower(_ value: TimelineItem) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: TimelineItem) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> TimelineItem { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: TimelineItem, 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))))) + writeInt(&buf, lower(value)) } } @@ -15849,14 +15737,14 @@ public struct FfiConverterTypeTimelineItem: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineItem_lift(_ pointer: UnsafeMutableRawPointer) throws -> TimelineItem { - return try FfiConverterTypeTimelineItem.lift(pointer) +public func FfiConverterTypeTimelineItem_lift(_ handle: UInt64) throws -> TimelineItem { + return try FfiConverterTypeTimelineItem.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeTimelineItem_lower(_ value: TimelineItem) -> UnsafeMutableRawPointer { +public func FfiConverterTypeTimelineItem_lower(_ value: TimelineItem) -> UInt64 { return FfiConverterTypeTimelineItem.lower(value) } @@ -15875,13 +15763,13 @@ public protocol UnreadNotificationsCountProtocol: AnyObject, Sendable { } open class UnreadNotificationsCount: UnreadNotificationsCountProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -15891,36 +15779,37 @@ open class UnreadNotificationsCount: UnreadNotificationsCountProtocol, @unchecke #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_unreadnotificationscount(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_unreadnotificationscount(handle, $0) } } @@ -15928,26 +15817,30 @@ open class UnreadNotificationsCount: UnreadNotificationsCountProtocol, @unchecke open func hasNotifications() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_has_notifications( + self.uniffiCloneHandle(),$0 ) }) } open func highlightCount() -> UInt32 { return try! FfiConverterUInt32.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_highlight_count( + self.uniffiCloneHandle(),$0 ) }) } open func notificationCount() -> UInt32 { return try! FfiConverterUInt32.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_unreadnotificationscount_notification_count( + self.uniffiCloneHandle(),$0 ) }) } + } @@ -15955,33 +15848,24 @@ open func notificationCount() -> UInt32 { @_documentation(visibility: private) #endif public struct FfiConverterTypeUnreadNotificationsCount: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = UnreadNotificationsCount - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> UnreadNotificationsCount { - return UnreadNotificationsCount(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> UnreadNotificationsCount { + return UnreadNotificationsCount(unsafeFromHandle: handle) } - public static func lower(_ value: UnreadNotificationsCount) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: UnreadNotificationsCount) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UnreadNotificationsCount { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: UnreadNotificationsCount, 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))))) + writeInt(&buf, lower(value)) } } @@ -15989,14 +15873,14 @@ public struct FfiConverterTypeUnreadNotificationsCount: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeUnreadNotificationsCount_lift(_ pointer: UnsafeMutableRawPointer) throws -> UnreadNotificationsCount { - return try FfiConverterTypeUnreadNotificationsCount.lift(pointer) +public func FfiConverterTypeUnreadNotificationsCount_lift(_ handle: UInt64) throws -> UnreadNotificationsCount { + return try FfiConverterTypeUnreadNotificationsCount.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeUnreadNotificationsCount_lower(_ value: UnreadNotificationsCount) -> UnsafeMutableRawPointer { +public func FfiConverterTypeUnreadNotificationsCount_lower(_ value: UnreadNotificationsCount) -> UInt64 { return FfiConverterTypeUnreadNotificationsCount.lower(value) } @@ -16073,13 +15957,13 @@ public protocol UserIdentityProtocol: AnyObject, Sendable { * The E2EE identity of a user. */ open class UserIdentity: UserIdentityProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -16089,36 +15973,37 @@ open class UserIdentity: UserIdentityProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_useridentity(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_useridentity(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_useridentity(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_useridentity(handle, $0) } } @@ -16129,7 +16014,8 @@ open class UserIdentity: UserIdentityProtocol, @unchecked Sendable { */ open func hasVerificationViolation() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_useridentity_has_verification_violation( + self.uniffiCloneHandle(),$0 ) }) } @@ -16142,7 +16028,8 @@ open func hasVerificationViolation() -> Bool { */ open func isVerified() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_useridentity_is_verified( + self.uniffiCloneHandle(),$0 ) }) } @@ -16157,7 +16044,8 @@ open func isVerified() -> Bool { */ open func masterKey() -> String? { return try! FfiConverterOptionString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_useridentity_master_key( + self.uniffiCloneHandle(),$0 ) }) } @@ -16183,7 +16071,7 @@ open func pin()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_useridentity_pin( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -16203,7 +16091,8 @@ open func pin()async throws { */ open func wasPreviouslyVerified() -> Bool { return try! FfiConverterBool.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified(self.uniffiClonePointer(),$0 + uniffi_matrix_sdk_ffi_fn_method_useridentity_was_previously_verified( + self.uniffiCloneHandle(),$0 ) }) } @@ -16220,7 +16109,7 @@ open func withdrawVerification()async throws { try await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_useridentity_withdraw_verification( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -16233,6 +16122,7 @@ open func withdrawVerification()async throws { } + } @@ -16240,33 +16130,24 @@ open func withdrawVerification()async throws { @_documentation(visibility: private) #endif public struct FfiConverterTypeUserIdentity: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = UserIdentity - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> UserIdentity { - return UserIdentity(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> UserIdentity { + return UserIdentity(unsafeFromHandle: handle) } - public static func lower(_ value: UserIdentity) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: UserIdentity) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> UserIdentity { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: UserIdentity, 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))))) + writeInt(&buf, lower(value)) } } @@ -16274,14 +16155,14 @@ public struct FfiConverterTypeUserIdentity: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeUserIdentity_lift(_ pointer: UnsafeMutableRawPointer) throws -> UserIdentity { - return try FfiConverterTypeUserIdentity.lift(pointer) +public func FfiConverterTypeUserIdentity_lift(_ handle: UInt64) throws -> UserIdentity { + return try FfiConverterTypeUserIdentity.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeUserIdentity_lower(_ value: UserIdentity) -> UnsafeMutableRawPointer { +public func FfiConverterTypeUserIdentity_lower(_ value: UserIdentity) -> UInt64 { return FfiConverterTypeUserIdentity.lower(value) } @@ -16304,13 +16185,13 @@ public protocol WidgetDriverProtocol: AnyObject, Sendable { * or IFrame with the Matrix world. */ open class WidgetDriver: WidgetDriverProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -16320,36 +16201,37 @@ open class WidgetDriver: WidgetDriverProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_widgetdriver(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_widgetdriver(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_widgetdriver(handle, $0) } } @@ -16360,7 +16242,7 @@ open func run(room: Room, capabilitiesProvider: WidgetCapabilitiesProvider)async try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_widgetdriver_run( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterTypeRoom_lower(room),FfiConverterCallbackInterfaceWidgetCapabilitiesProvider_lower(capabilitiesProvider) ) }, @@ -16374,6 +16256,7 @@ open func run(room: Room, capabilitiesProvider: WidgetCapabilitiesProvider)async } + } @@ -16381,33 +16264,24 @@ open func run(room: Room, capabilitiesProvider: WidgetCapabilitiesProvider)async @_documentation(visibility: private) #endif public struct FfiConverterTypeWidgetDriver: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = WidgetDriver - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> WidgetDriver { - return WidgetDriver(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> WidgetDriver { + return WidgetDriver(unsafeFromHandle: handle) } - public static func lower(_ value: WidgetDriver) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: WidgetDriver) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WidgetDriver { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: WidgetDriver, 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))))) + writeInt(&buf, lower(value)) } } @@ -16415,14 +16289,14 @@ public struct FfiConverterTypeWidgetDriver: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeWidgetDriver_lift(_ pointer: UnsafeMutableRawPointer) throws -> WidgetDriver { - return try FfiConverterTypeWidgetDriver.lift(pointer) +public func FfiConverterTypeWidgetDriver_lift(_ handle: UInt64) throws -> WidgetDriver { + return try FfiConverterTypeWidgetDriver.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeWidgetDriver_lower(_ value: WidgetDriver) -> UnsafeMutableRawPointer { +public func FfiConverterTypeWidgetDriver_lower(_ value: WidgetDriver) -> UInt64 { return FfiConverterTypeWidgetDriver.lower(value) } @@ -16458,13 +16332,13 @@ public protocol WidgetDriverHandleProtocol: AnyObject, Sendable { * corresponding widget (inside a webview or IFrame). */ open class WidgetDriverHandle: WidgetDriverHandleProtocol, @unchecked Sendable { - fileprivate let pointer: UnsafeMutableRawPointer! + fileprivate let handle: UInt64 - /// Used to instantiate a [FFIObject] without an actual pointer, for fakes in tests, mostly. + /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly. #if swift(>=5.8) @_documentation(visibility: private) #endif - public struct NoPointer { + public struct NoHandle { public init() {} } @@ -16474,36 +16348,37 @@ open class WidgetDriverHandle: WidgetDriverHandleProtocol, @unchecked Sendable { #if swift(>=5.8) @_documentation(visibility: private) #endif - required public init(unsafeFromRawPointer pointer: UnsafeMutableRawPointer) { - self.pointer = pointer + required public init(unsafeFromHandle handle: UInt64) { + self.handle = handle } // 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]. + // - Parameter noHandle: 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. + // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash. #if swift(>=5.8) @_documentation(visibility: private) #endif - public init(noPointer: NoPointer) { - self.pointer = nil + public init(noHandle: NoHandle) { + self.handle = 0 } #if swift(>=5.8) @_documentation(visibility: private) #endif - public func uniffiClonePointer() -> UnsafeMutableRawPointer { - return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle(self.pointer, $0) } + public func uniffiCloneHandle() -> UInt64 { + return try! rustCall { uniffi_matrix_sdk_ffi_fn_clone_widgetdriverhandle(self.handle, $0) } } // No primary constructor declared for this class. deinit { - guard let pointer = pointer else { + if handle == 0 { + // Mock objects have handle=0 don't try to free them return } - try! rustCall { uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(pointer, $0) } + try! rustCall { uniffi_matrix_sdk_ffi_fn_free_widgetdriverhandle(handle, $0) } } @@ -16521,7 +16396,7 @@ open func recv()async -> String? { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_recv( - self.uniffiClonePointer() + self.uniffiCloneHandle() ) }, @@ -16543,7 +16418,7 @@ open func send(msg: String)async -> Bool { try! await uniffiRustCallAsync( rustFutureFunc: { uniffi_matrix_sdk_ffi_fn_method_widgetdriverhandle_send( - self.uniffiClonePointer(), + self.uniffiCloneHandle(), FfiConverterString.lower(msg) ) }, @@ -16557,6 +16432,7 @@ open func send(msg: String)async -> Bool { } + } @@ -16564,33 +16440,24 @@ open func send(msg: String)async -> Bool { @_documentation(visibility: private) #endif public struct FfiConverterTypeWidgetDriverHandle: FfiConverter { - - typealias FfiType = UnsafeMutableRawPointer + typealias FfiType = UInt64 typealias SwiftType = WidgetDriverHandle - public static func lift(_ pointer: UnsafeMutableRawPointer) throws -> WidgetDriverHandle { - return WidgetDriverHandle(unsafeFromRawPointer: pointer) + public static func lift(_ handle: UInt64) throws -> WidgetDriverHandle { + return WidgetDriverHandle(unsafeFromHandle: handle) } - public static func lower(_ value: WidgetDriverHandle) -> UnsafeMutableRawPointer { - return value.uniffiClonePointer() + public static func lower(_ value: WidgetDriverHandle) -> UInt64 { + return value.uniffiCloneHandle() } public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> WidgetDriverHandle { - 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!) + let handle: UInt64 = try readInt(&buf) + return try lift(handle) } public static func write(_ value: WidgetDriverHandle, 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))))) + writeInt(&buf, lower(value)) } } @@ -16598,14 +16465,14 @@ public struct FfiConverterTypeWidgetDriverHandle: FfiConverter { #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeWidgetDriverHandle_lift(_ pointer: UnsafeMutableRawPointer) throws -> WidgetDriverHandle { - return try FfiConverterTypeWidgetDriverHandle.lift(pointer) +public func FfiConverterTypeWidgetDriverHandle_lift(_ handle: UInt64) throws -> WidgetDriverHandle { + return try FfiConverterTypeWidgetDriverHandle.lift(handle) } #if swift(>=5.8) @_documentation(visibility: private) #endif -public func FfiConverterTypeWidgetDriverHandle_lower(_ value: WidgetDriverHandle) -> UnsafeMutableRawPointer { +public func FfiConverterTypeWidgetDriverHandle_lower(_ value: WidgetDriverHandle) -> UInt64 { return FfiConverterTypeWidgetDriverHandle.lower(value) } @@ -16621,7 +16488,7 @@ public func FfiConverterTypeWidgetDriverHandle_lower(_ value: WidgetDriverHandle * known, for instance, because encryption (which changes the size) happens on * the fly. */ -public struct AbstractProgress { +public struct AbstractProgress: Equatable, Hashable { /** * How many units were already transferred. */ @@ -16643,32 +16510,16 @@ public struct AbstractProgress { 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 @@ -16703,7 +16554,7 @@ public func FfiConverterTypeAbstractProgress_lower(_ value: AbstractProgress) -> } -public struct AudioInfo { +public struct AudioInfo: Equatable, Hashable { public var duration: TimeInterval? public var size: UInt64? public var mimetype: String? @@ -16715,36 +16566,16 @@ public struct AudioInfo { self.size = size self.mimetype = mimetype } + + + + } #if compiler(>=6) extension AudioInfo: Sendable {} #endif - -extension AudioInfo: Equatable, Hashable { - public static func ==(lhs: AudioInfo, rhs: AudioInfo) -> Bool { - if lhs.duration != rhs.duration { - return false - } - if lhs.size != rhs.size { - return false - } - if lhs.mimetype != rhs.mimetype { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(duration) - hasher.combine(size) - hasher.combine(mimetype) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -16807,14 +16638,16 @@ public struct AudioMessageContent { self.audio = audio self.voice = voice } + + + + } #if compiler(>=6) extension AudioMessageContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -16859,7 +16692,7 @@ public func FfiConverterTypeAudioMessageContent_lower(_ value: AudioMessageConte } -public struct AuthDataPasswordDetails { +public struct AuthDataPasswordDetails: Equatable, Hashable { /** * One of the user's identifiers. */ @@ -16881,32 +16714,16 @@ public struct AuthDataPasswordDetails { self.identifier = identifier self.password = password } + + + + } #if compiler(>=6) extension AuthDataPasswordDetails: Sendable {} #endif - -extension AuthDataPasswordDetails: Equatable, Hashable { - public static func ==(lhs: AuthDataPasswordDetails, rhs: AuthDataPasswordDetails) -> Bool { - if lhs.identifier != rhs.identifier { - return false - } - if lhs.password != rhs.password { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(identifier) - hasher.combine(password) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -16941,7 +16758,7 @@ public func FfiConverterTypeAuthDataPasswordDetails_lower(_ value: AuthDataPassw } -public struct ClientProperties { +public struct ClientProperties: Equatable, Hashable { /** * The client_id provides the widget with the option to behave differently * for different clients. e.g org.example.ios. @@ -16977,36 +16794,16 @@ public struct ClientProperties { self.languageTag = languageTag self.theme = theme } + + + + } #if compiler(>=6) extension ClientProperties: Sendable {} #endif - -extension ClientProperties: Equatable, Hashable { - public static func ==(lhs: ClientProperties, rhs: ClientProperties) -> Bool { - if lhs.clientId != rhs.clientId { - return false - } - if lhs.languageTag != rhs.languageTag { - return false - } - if lhs.theme != rhs.theme { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(clientId) - hasher.combine(languageTag) - hasher.combine(theme) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17086,14 +16883,16 @@ public struct ComposerDraft { self.draftType = draftType self.attachments = attachments } + + + + } #if compiler(>=6) extension ComposerDraft: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17135,7 +16934,7 @@ public func FfiConverterTypeComposerDraft_lower(_ value: ComposerDraft) -> RustB /** * Like [`SimplePushRule`], but with an additional `conditions` field. */ -public struct ConditionalPushRule { +public struct ConditionalPushRule: Equatable, Hashable { /** * Actions to determine if and how a notification is delivered for events * matching this rule. @@ -17189,44 +16988,16 @@ public struct ConditionalPushRule { self.ruleId = ruleId self.conditions = conditions } + + + + } #if compiler(>=6) extension ConditionalPushRule: Sendable {} #endif - -extension ConditionalPushRule: Equatable, Hashable { - public static func ==(lhs: ConditionalPushRule, rhs: ConditionalPushRule) -> Bool { - if lhs.actions != rhs.actions { - return false - } - if lhs.`default` != rhs.`default` { - return false - } - if lhs.enabled != rhs.enabled { - return false - } - if lhs.ruleId != rhs.ruleId { - return false - } - if lhs.conditions != rhs.conditions { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(actions) - hasher.combine(`default`) - hasher.combine(enabled) - hasher.combine(ruleId) - hasher.combine(conditions) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17267,7 +17038,7 @@ public func FfiConverterTypeConditionalPushRule_lower(_ value: ConditionalPushRu } -public struct CreateRoomParameters { +public struct CreateRoomParameters: Equatable, Hashable { public var name: String? public var topic: String? public var isEncrypted: Bool @@ -17297,72 +17068,16 @@ public struct CreateRoomParameters { self.historyVisibilityOverride = historyVisibilityOverride self.canonicalAlias = canonicalAlias } + + + + } #if compiler(>=6) extension CreateRoomParameters: Sendable {} #endif - -extension CreateRoomParameters: Equatable, Hashable { - public static func ==(lhs: CreateRoomParameters, rhs: CreateRoomParameters) -> Bool { - if lhs.name != rhs.name { - return false - } - if lhs.topic != rhs.topic { - return false - } - if lhs.isEncrypted != rhs.isEncrypted { - return false - } - if lhs.isDirect != rhs.isDirect { - return false - } - if lhs.visibility != rhs.visibility { - return false - } - if lhs.preset != rhs.preset { - return false - } - if lhs.invite != rhs.invite { - return false - } - if lhs.avatar != rhs.avatar { - return false - } - if lhs.powerLevelContentOverride != rhs.powerLevelContentOverride { - return false - } - if lhs.joinRuleOverride != rhs.joinRuleOverride { - return false - } - if lhs.historyVisibilityOverride != rhs.historyVisibilityOverride { - return false - } - if lhs.canonicalAlias != rhs.canonicalAlias { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(name) - hasher.combine(topic) - hasher.combine(isEncrypted) - hasher.combine(isDirect) - hasher.combine(visibility) - hasher.combine(preset) - hasher.combine(invite) - hasher.combine(avatar) - hasher.combine(powerLevelContentOverride) - hasher.combine(joinRuleOverride) - hasher.combine(historyVisibilityOverride) - hasher.combine(canonicalAlias) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17417,7 +17132,7 @@ public func FfiConverterTypeCreateRoomParameters_lower(_ value: CreateRoomParame } -public struct EmoteMessageContent { +public struct EmoteMessageContent: Equatable, Hashable { public var body: String public var formatted: FormattedBody? @@ -17427,32 +17142,16 @@ public struct EmoteMessageContent { self.body = body self.formatted = formatted } + + + + } #if compiler(>=6) extension EmoteMessageContent: Sendable {} #endif - -extension EmoteMessageContent: Equatable, Hashable { - public static func ==(lhs: EmoteMessageContent, rhs: EmoteMessageContent) -> Bool { - if lhs.body != rhs.body { - return false - } - if lhs.formatted != rhs.formatted { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(body) - hasher.combine(formatted) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17527,14 +17226,16 @@ public struct EventTimelineItem { self.canBeRepliedTo = canBeRepliedTo self.lazyProvider = lazyProvider } + + + + } #if compiler(>=6) extension EventTimelineItem: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17593,7 +17294,7 @@ public func FfiConverterTypeEventTimelineItem_lower(_ value: EventTimelineItem) } -public struct EventTimelineItemDebugInfo { +public struct EventTimelineItemDebugInfo: Equatable, Hashable { public var model: String public var originalJson: String? public var latestEditJson: String? @@ -17605,36 +17306,16 @@ public struct EventTimelineItemDebugInfo { self.originalJson = originalJson self.latestEditJson = latestEditJson } + + + + } #if compiler(>=6) extension EventTimelineItemDebugInfo: Sendable {} #endif - -extension EventTimelineItemDebugInfo: Equatable, Hashable { - public static func ==(lhs: EventTimelineItemDebugInfo, rhs: EventTimelineItemDebugInfo) -> Bool { - if lhs.model != rhs.model { - return false - } - if lhs.originalJson != rhs.originalJson { - return false - } - if lhs.latestEditJson != rhs.latestEditJson { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(model) - hasher.combine(originalJson) - hasher.combine(latestEditJson) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17685,14 +17366,16 @@ public struct FileInfo { self.thumbnailInfo = thumbnailInfo self.thumbnailSource = thumbnailSource } + + + + } #if compiler(>=6) extension FileInfo: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17753,14 +17436,16 @@ public struct FileMessageContent { self.source = source self.info = info } + + + + } #if compiler(>=6) extension FileMessageContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17801,7 +17486,7 @@ public func FfiConverterTypeFileMessageContent_lower(_ value: FileMessageContent } -public struct FormattedBody { +public struct FormattedBody: Equatable, Hashable { public var format: MessageFormat public var body: String @@ -17811,32 +17496,16 @@ public struct FormattedBody { self.format = format self.body = body } + + + + } #if compiler(>=6) extension FormattedBody: Sendable {} #endif - -extension FormattedBody: Equatable, Hashable { - public static func ==(lhs: FormattedBody, rhs: FormattedBody) -> Bool { - if lhs.format != rhs.format { - return false - } - if lhs.body != rhs.body { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(format) - hasher.combine(body) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17883,14 +17552,16 @@ public struct GalleryMessageContent { self.formatted = formatted self.itemtypes = itemtypes } + + + + } #if compiler(>=6) extension GalleryMessageContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -17927,7 +17598,7 @@ public func FfiConverterTypeGalleryMessageContent_lower(_ value: GalleryMessageC } -public struct GalleryUploadParameters { +public struct GalleryUploadParameters: Equatable, Hashable { /** * Optional non-formatted caption, for clients that support it. */ @@ -17965,40 +17636,16 @@ public struct GalleryUploadParameters { self.mentions = mentions self.inReplyTo = inReplyTo } + + + + } #if compiler(>=6) extension GalleryUploadParameters: Sendable {} #endif - -extension GalleryUploadParameters: Equatable, Hashable { - public static func ==(lhs: GalleryUploadParameters, rhs: GalleryUploadParameters) -> Bool { - if lhs.caption != rhs.caption { - return false - } - if lhs.formattedCaption != rhs.formattedCaption { - return false - } - if lhs.mentions != rhs.mentions { - return false - } - if lhs.inReplyTo != rhs.inReplyTo { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(caption) - hasher.combine(formattedCaption) - hasher.combine(mentions) - hasher.combine(inReplyTo) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18037,7 +17684,7 @@ public func FfiConverterTypeGalleryUploadParameters_lower(_ value: GalleryUpload } -public struct HttpPusherData { +public struct HttpPusherData: Equatable, Hashable { public var url: String public var format: PushFormat? public var defaultPayload: String? @@ -18049,36 +17696,16 @@ public struct HttpPusherData { self.format = format self.defaultPayload = defaultPayload } + + + + } #if compiler(>=6) extension HttpPusherData: Sendable {} #endif - -extension HttpPusherData: Equatable, Hashable { - public static func ==(lhs: HttpPusherData, rhs: HttpPusherData) -> Bool { - if lhs.url != rhs.url { - return false - } - if lhs.format != rhs.format { - return false - } - if lhs.defaultPayload != rhs.defaultPayload { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(url) - hasher.combine(format) - hasher.combine(defaultPayload) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18115,7 +17742,7 @@ public func FfiConverterTypeHttpPusherData_lower(_ value: HttpPusherData) -> Rus } -public struct IdentityStatusChange { +public struct IdentityStatusChange: Equatable, Hashable { /** * The user ID of the user whose identity status changed */ @@ -18137,32 +17764,16 @@ public struct IdentityStatusChange { self.userId = userId self.changedTo = changedTo } + + + + } #if compiler(>=6) extension IdentityStatusChange: Sendable {} #endif - -extension IdentityStatusChange: Equatable, Hashable { - public static func ==(lhs: IdentityStatusChange, rhs: IdentityStatusChange) -> Bool { - if lhs.userId != rhs.userId { - return false - } - if lhs.changedTo != rhs.changedTo { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(userId) - hasher.combine(changedTo) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18202,30 +17813,22 @@ public func FfiConverterTypeIdentityStatusChange_lower(_ value: IdentityStatusCh * * This is currently empty. */ -public struct IgnoredUser { +public struct IgnoredUser: Equatable, Hashable { // Default memberwise initializers are never public by default, so we // declare one manually. public init() { } + + + + } #if compiler(>=6) extension IgnoredUser: Sendable {} #endif - -extension IgnoredUser: Equatable, Hashable { - public static func ==(lhs: IgnoredUser, rhs: IgnoredUser) -> Bool { - return true - } - - public func hash(into hasher: inout Hasher) { - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18277,14 +17880,16 @@ public struct ImageInfo { self.blurhash = blurhash self.isAnimated = isAnimated } + + + + } #if compiler(>=6) extension ImageInfo: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18353,14 +17958,16 @@ public struct ImageMessageContent { self.source = source self.info = info } + + + + } #if compiler(>=6) extension ImageMessageContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18484,14 +18091,16 @@ public struct KnockRequest { self.isSeen = isSeen self.actions = actions } + + + + } #if compiler(>=6) extension KnockRequest: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18540,7 +18149,7 @@ public func FfiConverterTypeKnockRequest_lower(_ value: KnockRequest) -> RustBuf } -public struct LastLocation { +public struct LastLocation: Equatable, Hashable { /** * The most recent location content of the user. */ @@ -18564,32 +18173,16 @@ public struct LastLocation { self.location = location self.ts = ts } + + + + } #if compiler(>=6) extension LastLocation: Sendable {} #endif - -extension LastLocation: Equatable, Hashable { - public static func ==(lhs: LastLocation, rhs: LastLocation) -> Bool { - if lhs.location != rhs.location { - return false - } - if lhs.ts != rhs.ts { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(location) - hasher.combine(ts) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18628,7 +18221,7 @@ public func FfiConverterTypeLastLocation_lower(_ value: LastLocation) -> RustBuf * Space leaving specific room that groups normal [`SpaceRoom`] details with * information about the leaving user's role. */ -public struct LeaveSpaceRoom { +public struct LeaveSpaceRoom: Equatable, Hashable { /** * The underlying [`SpaceRoom`] */ @@ -18652,32 +18245,16 @@ public struct LeaveSpaceRoom { self.spaceRoom = spaceRoom self.isLastAdmin = isLastAdmin } + + + + } #if compiler(>=6) extension LeaveSpaceRoom: Sendable {} #endif - -extension LeaveSpaceRoom: Equatable, Hashable { - public static func ==(lhs: LeaveSpaceRoom, rhs: LeaveSpaceRoom) -> Bool { - if lhs.spaceRoom != rhs.spaceRoom { - return false - } - if lhs.isLastAdmin != rhs.isLastAdmin { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(spaceRoom) - hasher.combine(isLastAdmin) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18715,7 +18292,7 @@ public func FfiConverterTypeLeaveSpaceRoom_lower(_ value: LeaveSpaceRoom) -> Rus /** * Details of a users live location share. */ -public struct LiveLocationShare { +public struct LiveLocationShare: Equatable, Hashable { /** * The user's last known location. */ @@ -18745,36 +18322,16 @@ public struct LiveLocationShare { self.isLive = isLive self.userId = userId } + + + + } #if compiler(>=6) extension LiveLocationShare: Sendable {} #endif - -extension LiveLocationShare: Equatable, Hashable { - public static func ==(lhs: LiveLocationShare, rhs: LiveLocationShare) -> Bool { - if lhs.lastLocation != rhs.lastLocation { - return false - } - if lhs.isLive != rhs.isLive { - return false - } - if lhs.userId != rhs.userId { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(lastLocation) - hasher.combine(isLive) - hasher.combine(userId) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18811,7 +18368,7 @@ public func FfiConverterTypeLiveLocationShare_lower(_ value: LiveLocationShare) } -public struct LocationContent { +public struct LocationContent: Equatable, Hashable { public var body: String public var geoUri: String public var description: String? @@ -18827,44 +18384,16 @@ public struct LocationContent { self.zoomLevel = zoomLevel self.asset = asset } + + + + } #if compiler(>=6) extension LocationContent: Sendable {} #endif - -extension LocationContent: Equatable, Hashable { - public static func ==(lhs: LocationContent, rhs: LocationContent) -> Bool { - if lhs.body != rhs.body { - return false - } - if lhs.geoUri != rhs.geoUri { - return false - } - if lhs.description != rhs.description { - return false - } - if lhs.zoomLevel != rhs.zoomLevel { - return false - } - if lhs.asset != rhs.asset { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(body) - hasher.combine(geoUri) - hasher.combine(description) - hasher.combine(zoomLevel) - hasher.combine(asset) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18909,7 +18438,7 @@ public func FfiConverterTypeLocationContent_lower(_ value: LocationContent) -> R * A Matrix entity that can be a room, room alias, user, or event, and a list * of via servers. */ -public struct MatrixEntity { +public struct MatrixEntity: Equatable, Hashable { public var id: MatrixId public var via: [String] @@ -18919,32 +18448,16 @@ public struct MatrixEntity { self.id = id self.via = via } + + + + } #if compiler(>=6) extension MatrixEntity: Sendable {} #endif - -extension MatrixEntity: Equatable, Hashable { - public static func ==(lhs: MatrixEntity, rhs: MatrixEntity) -> Bool { - if lhs.id != rhs.id { - return false - } - if lhs.via != rhs.via { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(id) - hasher.combine(via) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -18985,7 +18498,7 @@ public func FfiConverterTypeMatrixEntity_lower(_ value: MatrixEntity) -> RustBuf * Is also the content of the unstable * `io.element.msc4278.media_preview_config`. */ -public struct MediaPreviewConfig { +public struct MediaPreviewConfig: Equatable, Hashable { /** * The media previews setting for the user. */ @@ -19007,32 +18520,16 @@ public struct MediaPreviewConfig { self.mediaPreviews = mediaPreviews self.inviteAvatars = inviteAvatars } + + + + } #if compiler(>=6) extension MediaPreviewConfig: Sendable {} #endif - -extension MediaPreviewConfig: Equatable, Hashable { - public static func ==(lhs: MediaPreviewConfig, rhs: MediaPreviewConfig) -> Bool { - if lhs.mediaPreviews != rhs.mediaPreviews { - return false - } - if lhs.inviteAvatars != rhs.inviteAvatars { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(mediaPreviews) - hasher.combine(inviteAvatars) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19071,7 +18568,7 @@ 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 { +public struct MediaUploadProgress: Equatable, Hashable { /** * The index of the media within the transaction. A file and its * thumbnail share the same index. Will always be 0 for non-gallery @@ -19099,32 +18596,16 @@ public struct MediaUploadProgress { 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 @@ -19159,7 +18640,7 @@ public func FfiConverterTypeMediaUploadProgress_lower(_ value: MediaUploadProgre } -public struct Mentions { +public struct Mentions: Equatable, Hashable { public var userIds: [String] public var room: Bool @@ -19169,32 +18650,16 @@ public struct Mentions { self.userIds = userIds self.room = room } + + + + } #if compiler(>=6) extension Mentions: Sendable {} #endif - -extension Mentions: Equatable, Hashable { - public static func ==(lhs: Mentions, rhs: Mentions) -> Bool { - if lhs.userIds != rhs.userIds { - return false - } - if lhs.room != rhs.room { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(userIds) - hasher.combine(room) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19243,14 +18708,16 @@ public struct MessageContent { self.isEdited = isEdited self.mentions = mentions } + + + + } #if compiler(>=6) extension MessageContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19328,14 +18795,16 @@ public struct MsgLikeContent { self.threadRoot = threadRoot self.threadSummary = threadSummary } + + + + } #if compiler(>=6) extension MsgLikeContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19376,7 +18845,7 @@ public func FfiConverterTypeMsgLikeContent_lower(_ value: MsgLikeContent) -> Rus } -public struct NoticeMessageContent { +public struct NoticeMessageContent: Equatable, Hashable { public var body: String public var formatted: FormattedBody? @@ -19386,32 +18855,16 @@ public struct NoticeMessageContent { self.body = body self.formatted = formatted } + + + + } #if compiler(>=6) extension NoticeMessageContent: Sendable {} #endif - -extension NoticeMessageContent: Equatable, Hashable { - public static func ==(lhs: NoticeMessageContent, rhs: NoticeMessageContent) -> Bool { - if lhs.body != rhs.body { - return false - } - if lhs.formatted != rhs.formatted { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(body) - hasher.combine(formatted) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19482,14 +18935,16 @@ public struct NotificationItem { self.threadId = threadId self.actions = actions } + + + + } #if compiler(>=6) extension NotificationItem: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19537,7 +18992,7 @@ public func FfiConverterTypeNotificationItem_lower(_ value: NotificationItem) -> /** * A request for notification items grouped by their room. */ -public struct NotificationItemsRequest { +public struct NotificationItemsRequest: Equatable, Hashable { public var roomId: String public var eventIds: [String] @@ -19547,32 +19002,16 @@ public struct NotificationItemsRequest { self.roomId = roomId self.eventIds = eventIds } + + + + } #if compiler(>=6) extension NotificationItemsRequest: Sendable {} #endif - -extension NotificationItemsRequest: Equatable, Hashable { - public static func ==(lhs: NotificationItemsRequest, rhs: NotificationItemsRequest) -> Bool { - if lhs.roomId != rhs.roomId { - return false - } - if lhs.eventIds != rhs.eventIds { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomId) - hasher.combine(eventIds) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19607,7 +19046,7 @@ public func FfiConverterTypeNotificationItemsRequest_lower(_ value: Notification } -public struct NotificationPowerLevels { +public struct NotificationPowerLevels: Equatable, Hashable { public var room: Int32 // Default memberwise initializers are never public by default, so we @@ -19615,28 +19054,16 @@ public struct NotificationPowerLevels { public init(room: Int32) { self.room = room } + + + + } #if compiler(>=6) extension NotificationPowerLevels: Sendable {} #endif - -extension NotificationPowerLevels: Equatable, Hashable { - public static func ==(lhs: NotificationPowerLevels, rhs: NotificationPowerLevels) -> Bool { - if lhs.room != rhs.room { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(room) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19669,7 +19096,7 @@ public func FfiConverterTypeNotificationPowerLevels_lower(_ value: NotificationP } -public struct NotificationRoomInfo { +public struct NotificationRoomInfo: Equatable, Hashable { public var displayName: String public var avatarUrl: String? public var canonicalAlias: String? @@ -19693,60 +19120,16 @@ public struct NotificationRoomInfo { self.isDirect = isDirect self.isSpace = isSpace } + + + + } #if compiler(>=6) extension NotificationRoomInfo: Sendable {} #endif - -extension NotificationRoomInfo: Equatable, Hashable { - public static func ==(lhs: NotificationRoomInfo, rhs: NotificationRoomInfo) -> Bool { - if lhs.displayName != rhs.displayName { - return false - } - if lhs.avatarUrl != rhs.avatarUrl { - return false - } - if lhs.canonicalAlias != rhs.canonicalAlias { - return false - } - if lhs.topic != rhs.topic { - return false - } - if lhs.joinRule != rhs.joinRule { - return false - } - if lhs.joinedMembersCount != rhs.joinedMembersCount { - return false - } - if lhs.isEncrypted != rhs.isEncrypted { - return false - } - if lhs.isDirect != rhs.isDirect { - return false - } - if lhs.isSpace != rhs.isSpace { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(displayName) - hasher.combine(avatarUrl) - hasher.combine(canonicalAlias) - hasher.combine(topic) - hasher.combine(joinRule) - hasher.combine(joinedMembersCount) - hasher.combine(isEncrypted) - hasher.combine(isDirect) - hasher.combine(isSpace) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19795,7 +19178,7 @@ public func FfiConverterTypeNotificationRoomInfo_lower(_ value: NotificationRoom } -public struct NotificationSenderInfo { +public struct NotificationSenderInfo: Equatable, Hashable { public var displayName: String? public var avatarUrl: String? public var isNameAmbiguous: Bool @@ -19807,36 +19190,16 @@ public struct NotificationSenderInfo { self.avatarUrl = avatarUrl self.isNameAmbiguous = isNameAmbiguous } + + + + } #if compiler(>=6) extension NotificationSenderInfo: Sendable {} #endif - -extension NotificationSenderInfo: Equatable, Hashable { - public static func ==(lhs: NotificationSenderInfo, rhs: NotificationSenderInfo) -> Bool { - if lhs.displayName != rhs.displayName { - return false - } - if lhs.avatarUrl != rhs.avatarUrl { - return false - } - if lhs.isNameAmbiguous != rhs.isNameAmbiguous { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(displayName) - hasher.combine(avatarUrl) - hasher.combine(isNameAmbiguous) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -19876,7 +19239,7 @@ public func FfiConverterTypeNotificationSenderInfo_lower(_ value: NotificationSe /** * The configuration to use when authenticating with OIDC. */ -public struct OidcConfiguration { +public struct OidcConfiguration: Equatable, Hashable { /** * The name of the client that will be shown during OIDC authentication. */ @@ -19948,52 +19311,16 @@ public struct OidcConfiguration { self.policyUri = policyUri self.staticRegistrations = staticRegistrations } + + + + } #if compiler(>=6) extension OidcConfiguration: Sendable {} #endif - -extension OidcConfiguration: Equatable, Hashable { - public static func ==(lhs: OidcConfiguration, rhs: OidcConfiguration) -> Bool { - if lhs.clientName != rhs.clientName { - return false - } - if lhs.redirectUri != rhs.redirectUri { - return false - } - if lhs.clientUri != rhs.clientUri { - return false - } - if lhs.logoUri != rhs.logoUri { - return false - } - if lhs.tosUri != rhs.tosUri { - return false - } - if lhs.policyUri != rhs.policyUri { - return false - } - if lhs.staticRegistrations != rhs.staticRegistrations { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(clientName) - hasher.combine(redirectUri) - hasher.combine(clientUri) - hasher.combine(logoUri) - hasher.combine(tosUri) - hasher.combine(policyUri) - hasher.combine(staticRegistrations) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20038,7 +19365,7 @@ public func FfiConverterTypeOidcConfiguration_lower(_ value: OidcConfiguration) } -public struct OidcCrossSigningResetInfo { +public struct OidcCrossSigningResetInfo: Equatable, Hashable { /** * The URL where the user can approve the reset of the cross-signing keys. */ @@ -20052,28 +19379,16 @@ public struct OidcCrossSigningResetInfo { */approvalUrl: String) { self.approvalUrl = approvalUrl } + + + + } #if compiler(>=6) extension OidcCrossSigningResetInfo: Sendable {} #endif - -extension OidcCrossSigningResetInfo: Equatable, Hashable { - public static func ==(lhs: OidcCrossSigningResetInfo, rhs: OidcCrossSigningResetInfo) -> Bool { - if lhs.approvalUrl != rhs.approvalUrl { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(approvalUrl) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20109,7 +19424,7 @@ public func FfiConverterTypeOidcCrossSigningResetInfo_lower(_ value: OidcCrossSi /** * A passphrase from which a key is to be derived. */ -public struct PassPhrase { +public struct PassPhrase: Equatable, Hashable { /** * The algorithm to use to generate the key from the passphrase. * @@ -20155,40 +19470,16 @@ public struct PassPhrase { self.iterations = iterations self.bits = bits } + + + + } #if compiler(>=6) extension PassPhrase: Sendable {} #endif - -extension PassPhrase: Equatable, Hashable { - public static func ==(lhs: PassPhrase, rhs: PassPhrase) -> Bool { - if lhs.algorithm != rhs.algorithm { - return false - } - if lhs.salt != rhs.salt { - return false - } - if lhs.iterations != rhs.iterations { - return false - } - if lhs.bits != rhs.bits { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(algorithm) - hasher.combine(salt) - hasher.combine(iterations) - hasher.combine(bits) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20230,7 +19521,7 @@ public func FfiConverterTypePassPhrase_lower(_ value: PassPhrase) -> RustBuffer /** * Like [`SimplePushRule`], but with an additional `pattern`` field. */ -public struct PatternedPushRule { +public struct PatternedPushRule: Equatable, Hashable { /** * Actions to determine if and how a notification is delivered for events * matching this rule. @@ -20278,44 +19569,16 @@ public struct PatternedPushRule { self.ruleId = ruleId self.pattern = pattern } + + + + } #if compiler(>=6) extension PatternedPushRule: Sendable {} #endif - -extension PatternedPushRule: Equatable, Hashable { - public static func ==(lhs: PatternedPushRule, rhs: PatternedPushRule) -> Bool { - if lhs.actions != rhs.actions { - return false - } - if lhs.`default` != rhs.`default` { - return false - } - if lhs.enabled != rhs.enabled { - return false - } - if lhs.ruleId != rhs.ruleId { - return false - } - if lhs.pattern != rhs.pattern { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(actions) - hasher.combine(`default`) - hasher.combine(enabled) - hasher.combine(ruleId) - hasher.combine(pattern) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20356,7 +19619,7 @@ public func FfiConverterTypePatternedPushRule_lower(_ value: PatternedPushRule) } -public struct PollAnswer { +public struct PollAnswer: Equatable, Hashable { public var id: String public var text: String @@ -20366,32 +19629,16 @@ public struct PollAnswer { self.id = id self.text = text } + + + + } #if compiler(>=6) extension PollAnswer: Sendable {} #endif - -extension PollAnswer: Equatable, Hashable { - public static func ==(lhs: PollAnswer, rhs: PollAnswer) -> Bool { - if lhs.id != rhs.id { - return false - } - if lhs.text != rhs.text { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(id) - hasher.combine(text) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20426,7 +19673,7 @@ public func FfiConverterTypePollAnswer_lower(_ value: PollAnswer) -> RustBuffer } -public struct PollData { +public struct PollData: Equatable, Hashable { public var question: String public var answers: [String] public var maxSelections: UInt8 @@ -20440,40 +19687,16 @@ public struct PollData { self.maxSelections = maxSelections self.pollKind = pollKind } + + + + } #if compiler(>=6) extension PollData: Sendable {} #endif - -extension PollData: Equatable, Hashable { - public static func ==(lhs: PollData, rhs: PollData) -> Bool { - if lhs.question != rhs.question { - return false - } - if lhs.answers != rhs.answers { - return false - } - if lhs.maxSelections != rhs.maxSelections { - return false - } - if lhs.pollKind != rhs.pollKind { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(question) - hasher.combine(answers) - hasher.combine(maxSelections) - hasher.combine(pollKind) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20512,7 +19735,7 @@ public func FfiConverterTypePollData_lower(_ value: PollData) -> RustBuffer { } -public struct PowerLevels { +public struct PowerLevels: Equatable, Hashable { public var usersDefault: Int32? public var eventsDefault: Int32? public var stateDefault: Int32? @@ -20538,64 +19761,16 @@ public struct PowerLevels { self.users = users self.events = events } + + + + } #if compiler(>=6) extension PowerLevels: Sendable {} #endif - -extension PowerLevels: Equatable, Hashable { - public static func ==(lhs: PowerLevels, rhs: PowerLevels) -> Bool { - if lhs.usersDefault != rhs.usersDefault { - return false - } - if lhs.eventsDefault != rhs.eventsDefault { - return false - } - if lhs.stateDefault != rhs.stateDefault { - return false - } - if lhs.ban != rhs.ban { - return false - } - if lhs.kick != rhs.kick { - return false - } - if lhs.redact != rhs.redact { - return false - } - if lhs.invite != rhs.invite { - return false - } - if lhs.notifications != rhs.notifications { - return false - } - if lhs.users != rhs.users { - return false - } - if lhs.events != rhs.events { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(usersDefault) - hasher.combine(eventsDefault) - hasher.combine(stateDefault) - hasher.combine(ban) - hasher.combine(kick) - hasher.combine(redact) - hasher.combine(invite) - hasher.combine(notifications) - hasher.combine(users) - hasher.combine(events) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20656,7 +19831,7 @@ public func FfiConverterTypePowerLevels_lower(_ value: PowerLevels) -> RustBuffe * * [`m.room.create`]: https://spec.matrix.org/v1.14/client-server-api/#mroomcreate */ -public struct PredecessorRoom { +public struct PredecessorRoom: Equatable, Hashable { /** * The ID of the replacement room. */ @@ -20670,28 +19845,16 @@ public struct PredecessorRoom { */roomId: String) { self.roomId = roomId } + + + + } #if compiler(>=6) extension PredecessorRoom: Sendable {} #endif - -extension PredecessorRoom: Equatable, Hashable { - public static func ==(lhs: PredecessorRoom, rhs: PredecessorRoom) -> Bool { - if lhs.roomId != rhs.roomId { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomId) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20724,7 +19887,7 @@ public func FfiConverterTypePredecessorRoom_lower(_ value: PredecessorRoom) -> R } -public struct PusherIdentifiers { +public struct PusherIdentifiers: Equatable, Hashable { public var pushkey: String public var appId: String @@ -20734,32 +19897,16 @@ public struct PusherIdentifiers { self.pushkey = pushkey self.appId = appId } + + + + } #if compiler(>=6) extension PusherIdentifiers: Sendable {} #endif - -extension PusherIdentifiers: Equatable, Hashable { - public static func ==(lhs: PusherIdentifiers, rhs: PusherIdentifiers) -> Bool { - if lhs.pushkey != rhs.pushkey { - return false - } - if lhs.appId != rhs.appId { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(pushkey) - hasher.combine(appId) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20794,7 +19941,7 @@ public func FfiConverterTypePusherIdentifiers_lower(_ value: PusherIdentifiers) } -public struct Reaction { +public struct Reaction: Equatable, Hashable { public var key: String public var senders: [ReactionSenderData] @@ -20804,32 +19951,16 @@ public struct Reaction { self.key = key self.senders = senders } + + + + } #if compiler(>=6) extension Reaction: Sendable {} #endif - -extension Reaction: Equatable, Hashable { - public static func ==(lhs: Reaction, rhs: Reaction) -> Bool { - if lhs.key != rhs.key { - return false - } - if lhs.senders != rhs.senders { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(key) - hasher.combine(senders) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20864,7 +19995,7 @@ public func FfiConverterTypeReaction_lower(_ value: Reaction) -> RustBuffer { } -public struct ReactionSenderData { +public struct ReactionSenderData: Equatable, Hashable { public var senderId: String public var timestamp: Timestamp @@ -20874,32 +20005,16 @@ public struct ReactionSenderData { self.senderId = senderId self.timestamp = timestamp } + + + + } #if compiler(>=6) extension ReactionSenderData: Sendable {} #endif - -extension ReactionSenderData: Equatable, Hashable { - public static func ==(lhs: ReactionSenderData, rhs: ReactionSenderData) -> Bool { - if lhs.senderId != rhs.senderId { - return false - } - if lhs.timestamp != rhs.timestamp { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(senderId) - hasher.combine(timestamp) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20934,7 +20049,7 @@ public func FfiConverterTypeReactionSenderData_lower(_ value: ReactionSenderData } -public struct Receipt { +public struct Receipt: Equatable, Hashable { public var timestamp: Timestamp? // Default memberwise initializers are never public by default, so we @@ -20942,28 +20057,16 @@ public struct Receipt { public init(timestamp: Timestamp?) { self.timestamp = timestamp } + + + + } #if compiler(>=6) extension Receipt: Sendable {} #endif - -extension Receipt: Equatable, Hashable { - public static func ==(lhs: Receipt, rhs: Receipt) -> Bool { - if lhs.timestamp != rhs.timestamp { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(timestamp) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -20999,7 +20102,7 @@ public func FfiConverterTypeReceipt_lower(_ value: Receipt) -> RustBuffer { /** * Represents an emoji recently used for reactions. */ -public struct RecentEmoji { +public struct RecentEmoji: Equatable, Hashable { /** * The actual emoji text representation. */ @@ -21021,32 +20124,16 @@ public struct RecentEmoji { self.emoji = emoji self.count = count } + + + + } #if compiler(>=6) extension RecentEmoji: Sendable {} #endif - -extension RecentEmoji: Equatable, Hashable { - public static func ==(lhs: RecentEmoji, rhs: RecentEmoji) -> Bool { - if lhs.emoji != rhs.emoji { - return false - } - if lhs.count != rhs.count { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(emoji) - hasher.combine(count) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21084,7 +20171,7 @@ public func FfiConverterTypeRecentEmoji_lower(_ value: RecentEmoji) -> RustBuffe /** * The config to use for HTTP requests by default in this client. */ -public struct RequestConfig { +public struct RequestConfig: Equatable, Hashable { /** * Max number of retries. */ @@ -21122,40 +20209,16 @@ public struct RequestConfig { self.maxConcurrentRequests = maxConcurrentRequests self.maxRetryTime = maxRetryTime } + + + + } #if compiler(>=6) extension RequestConfig: Sendable {} #endif - -extension RequestConfig: Equatable, Hashable { - public static func ==(lhs: RequestConfig, rhs: RequestConfig) -> Bool { - if lhs.retryLimit != rhs.retryLimit { - return false - } - if lhs.timeout != rhs.timeout { - return false - } - if lhs.maxConcurrentRequests != rhs.maxConcurrentRequests { - return false - } - if lhs.maxRetryTime != rhs.maxRetryTime { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(retryLimit) - hasher.combine(timeout) - hasher.combine(maxConcurrentRequests) - hasher.combine(maxRetryTime) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21197,7 +20260,7 @@ public func FfiConverterTypeRequestConfig_lower(_ value: RequestConfig) -> RustB /** * Information about a room, that was resolved from a room alias. */ -public struct ResolvedRoomAlias { +public struct ResolvedRoomAlias: Equatable, Hashable { /** * The room ID that the alias resolved to. */ @@ -21219,32 +20282,16 @@ public struct ResolvedRoomAlias { self.roomId = roomId self.servers = servers } + + + + } #if compiler(>=6) extension ResolvedRoomAlias: Sendable {} #endif - -extension ResolvedRoomAlias: Equatable, Hashable { - public static func ==(lhs: ResolvedRoomAlias, rhs: ResolvedRoomAlias) -> Bool { - if lhs.roomId != rhs.roomId { - return false - } - if lhs.servers != rhs.servers { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomId) - hasher.combine(servers) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21279,7 +20326,7 @@ public func FfiConverterTypeResolvedRoomAlias_lower(_ value: ResolvedRoomAlias) } -public struct RoomDescription { +public struct RoomDescription: Equatable, Hashable { public var roomId: String public var name: String? public var topic: String? @@ -21301,56 +20348,16 @@ public struct RoomDescription { self.isWorldReadable = isWorldReadable self.joinedMembers = joinedMembers } + + + + } #if compiler(>=6) extension RoomDescription: Sendable {} #endif - -extension RoomDescription: Equatable, Hashable { - public static func ==(lhs: RoomDescription, rhs: RoomDescription) -> Bool { - if lhs.roomId != rhs.roomId { - return false - } - if lhs.name != rhs.name { - return false - } - if lhs.topic != rhs.topic { - return false - } - if lhs.alias != rhs.alias { - return false - } - if lhs.avatarUrl != rhs.avatarUrl { - return false - } - if lhs.joinRule != rhs.joinRule { - return false - } - if lhs.isWorldReadable != rhs.isWorldReadable { - return false - } - if lhs.joinedMembers != rhs.joinedMembers { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomId) - hasher.combine(name) - hasher.combine(topic) - hasher.combine(alias) - hasher.combine(avatarUrl) - hasher.combine(joinRule) - hasher.combine(isWorldReadable) - hasher.combine(joinedMembers) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21400,7 +20407,7 @@ public func FfiConverterTypeRoomDescription_lower(_ value: RoomDescription) -> R /** * Information about a member considered to be a room hero. */ -public struct RoomHero { +public struct RoomHero: Equatable, Hashable { /** * The user ID of the hero. */ @@ -21430,36 +20437,16 @@ public struct RoomHero { self.displayName = displayName self.avatarUrl = avatarUrl } + + + + } #if compiler(>=6) extension RoomHero: Sendable {} #endif - -extension RoomHero: Equatable, Hashable { - public static func ==(lhs: RoomHero, rhs: RoomHero) -> Bool { - if lhs.userId != rhs.userId { - return false - } - if lhs.displayName != rhs.displayName { - return false - } - if lhs.avatarUrl != rhs.avatarUrl { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(userId) - hasher.combine(displayName) - hasher.combine(avatarUrl) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21690,14 +20677,16 @@ public struct RoomInfo { self.roomVersion = roomVersion self.privilegedCreatorsRole = privilegedCreatorsRole } + + + + } #if compiler(>=6) extension RoomInfo: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21808,14 +20797,16 @@ public struct RoomListLoadingStateResult { self.state = state self.stateStream = stateStream } + + + + } #if compiler(>=6) extension RoomListLoadingStateResult: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21850,7 +20841,7 @@ public func FfiConverterTypeRoomListLoadingStateResult_lower(_ value: RoomListLo } -public struct RoomMember { +public struct RoomMember: Equatable, Hashable { public var userId: String public var displayName: String? public var avatarUrl: String? @@ -21874,60 +20865,16 @@ public struct RoomMember { self.suggestedRoleForPowerLevel = suggestedRoleForPowerLevel self.membershipChangeReason = membershipChangeReason } + + + + } #if compiler(>=6) extension RoomMember: Sendable {} #endif - -extension RoomMember: Equatable, Hashable { - public static func ==(lhs: RoomMember, rhs: RoomMember) -> Bool { - if lhs.userId != rhs.userId { - return false - } - if lhs.displayName != rhs.displayName { - return false - } - if lhs.avatarUrl != rhs.avatarUrl { - return false - } - if lhs.membership != rhs.membership { - return false - } - if lhs.isNameAmbiguous != rhs.isNameAmbiguous { - return false - } - if lhs.powerLevel != rhs.powerLevel { - return false - } - if lhs.isIgnored != rhs.isIgnored { - return false - } - if lhs.suggestedRoleForPowerLevel != rhs.suggestedRoleForPowerLevel { - return false - } - if lhs.membershipChangeReason != rhs.membershipChangeReason { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(userId) - hasher.combine(displayName) - hasher.combine(avatarUrl) - hasher.combine(membership) - hasher.combine(isNameAmbiguous) - hasher.combine(powerLevel) - hasher.combine(isIgnored) - hasher.combine(suggestedRoleForPowerLevel) - hasher.combine(membershipChangeReason) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -21980,7 +20927,7 @@ public func FfiConverterTypeRoomMember_lower(_ value: RoomMember) -> RustBuffer * Contains the current user's room member info and the optional room member * info of the sender of the `m.room.member` event that this info represents. */ -public struct RoomMemberWithSenderInfo { +public struct RoomMemberWithSenderInfo: Equatable, Hashable { /** * The room member. */ @@ -22004,32 +20951,16 @@ public struct RoomMemberWithSenderInfo { self.roomMember = roomMember self.senderInfo = senderInfo } + + + + } #if compiler(>=6) extension RoomMemberWithSenderInfo: Sendable {} #endif - -extension RoomMemberWithSenderInfo: Equatable, Hashable { - public static func ==(lhs: RoomMemberWithSenderInfo, rhs: RoomMemberWithSenderInfo) -> Bool { - if lhs.roomMember != rhs.roomMember { - return false - } - if lhs.senderInfo != rhs.senderInfo { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomMember) - hasher.combine(senderInfo) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22067,7 +20998,7 @@ public func FfiConverterTypeRoomMemberWithSenderInfo_lower(_ value: RoomMemberWi /** * `RoomNotificationSettings` represents the current settings for a `Room` */ -public struct RoomNotificationSettings { +public struct RoomNotificationSettings: Equatable, Hashable { /** * The room notification mode */ @@ -22089,32 +21020,16 @@ public struct RoomNotificationSettings { self.mode = mode self.isDefault = isDefault } + + + + } #if compiler(>=6) extension RoomNotificationSettings: Sendable {} #endif - -extension RoomNotificationSettings: Equatable, Hashable { - public static func ==(lhs: RoomNotificationSettings, rhs: RoomNotificationSettings) -> Bool { - if lhs.mode != rhs.mode { - return false - } - if lhs.isDefault != rhs.isDefault { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(mode) - hasher.combine(isDefault) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22153,7 +21068,7 @@ public func FfiConverterTypeRoomNotificationSettings_lower(_ value: RoomNotifica * This intermediary struct is used to expose the power levels values through * FFI and work around it not exposing public exported object fields. */ -public struct RoomPowerLevelsValues { +public struct RoomPowerLevelsValues: Equatable, Hashable { /** * The level required to ban a user. */ @@ -22247,68 +21162,16 @@ public struct RoomPowerLevelsValues { self.roomTopic = roomTopic self.spaceChild = spaceChild } + + + + } #if compiler(>=6) extension RoomPowerLevelsValues: Sendable {} #endif - -extension RoomPowerLevelsValues: Equatable, Hashable { - public static func ==(lhs: RoomPowerLevelsValues, rhs: RoomPowerLevelsValues) -> Bool { - if lhs.ban != rhs.ban { - return false - } - if lhs.invite != rhs.invite { - return false - } - if lhs.kick != rhs.kick { - return false - } - if lhs.redact != rhs.redact { - return false - } - if lhs.eventsDefault != rhs.eventsDefault { - return false - } - if lhs.stateDefault != rhs.stateDefault { - return false - } - if lhs.usersDefault != rhs.usersDefault { - return false - } - if lhs.roomName != rhs.roomName { - return false - } - if lhs.roomAvatar != rhs.roomAvatar { - return false - } - if lhs.roomTopic != rhs.roomTopic { - return false - } - if lhs.spaceChild != rhs.spaceChild { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(ban) - hasher.combine(invite) - hasher.combine(kick) - hasher.combine(redact) - hasher.combine(eventsDefault) - hasher.combine(stateDefault) - hasher.combine(usersDefault) - hasher.combine(roomName) - hasher.combine(roomAvatar) - hasher.combine(roomTopic) - hasher.combine(spaceChild) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22364,7 +21227,7 @@ public func FfiConverterTypeRoomPowerLevelsValues_lower(_ value: RoomPowerLevels /** * The preview of a room, be it invited/joined/left, or not. */ -public struct RoomPreviewInfo { +public struct RoomPreviewInfo: Equatable, Hashable { /** * The room id for this room. */ @@ -22474,76 +21337,16 @@ public struct RoomPreviewInfo { self.isDirect = isDirect self.heroes = heroes } + + + + } #if compiler(>=6) extension RoomPreviewInfo: Sendable {} #endif - -extension RoomPreviewInfo: Equatable, Hashable { - public static func ==(lhs: RoomPreviewInfo, rhs: RoomPreviewInfo) -> 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.numJoinedMembers != rhs.numJoinedMembers { - return false - } - if lhs.numActiveMembers != rhs.numActiveMembers { - return false - } - if lhs.roomType != rhs.roomType { - return false - } - if lhs.isHistoryWorldReadable != rhs.isHistoryWorldReadable { - return false - } - if lhs.membership != rhs.membership { - return false - } - if lhs.joinRule != rhs.joinRule { - return false - } - if lhs.isDirect != rhs.isDirect { - 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(numJoinedMembers) - hasher.combine(numActiveMembers) - hasher.combine(roomType) - hasher.combine(isHistoryWorldReadable) - hasher.combine(membership) - hasher.combine(joinRule) - hasher.combine(isDirect) - hasher.combine(heroes) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22603,7 +21406,7 @@ public func FfiConverterTypeRoomPreviewInfo_lower(_ value: RoomPreviewInfo) -> R /** * A push ruleset scopes a set of rules according to some criteria. */ -public struct Ruleset { +public struct Ruleset: Equatable, Hashable { /** * These rules configure behavior for (unencrypted) messages that match * certain patterns. @@ -22661,44 +21464,16 @@ public struct Ruleset { self.sender = sender self.underride = underride } + + + + } #if compiler(>=6) extension Ruleset: Sendable {} #endif - -extension Ruleset: Equatable, Hashable { - public static func ==(lhs: Ruleset, rhs: Ruleset) -> Bool { - if lhs.content != rhs.content { - return false - } - if lhs.override != rhs.override { - return false - } - if lhs.room != rhs.room { - return false - } - if lhs.sender != rhs.sender { - return false - } - if lhs.underride != rhs.underride { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(content) - hasher.combine(override) - hasher.combine(room) - hasher.combine(sender) - hasher.combine(underride) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22739,7 +21514,7 @@ public func FfiConverterTypeRuleset_lower(_ value: Ruleset) -> RustBuffer { } -public struct SearchUsersResults { +public struct SearchUsersResults: Equatable, Hashable { public var results: [UserProfile] public var limited: Bool @@ -22749,32 +21524,16 @@ public struct SearchUsersResults { self.results = results self.limited = limited } + + + + } #if compiler(>=6) extension SearchUsersResults: Sendable {} #endif - -extension SearchUsersResults: Equatable, Hashable { - public static func ==(lhs: SearchUsersResults, rhs: SearchUsersResults) -> Bool { - if lhs.results != rhs.results { - return false - } - if lhs.limited != rhs.limited { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(results) - hasher.combine(limited) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22812,7 +21571,7 @@ public func FfiConverterTypeSearchUsersResults_lower(_ value: SearchUsersResults /** * The key properties for the `m.secret_storage.v1.aes-hmac-sha2`` algorithm. */ -public struct SecretStorageV1AesHmacSha2Properties { +public struct SecretStorageV1AesHmacSha2Properties: Equatable, Hashable { /** * The 16-byte initialization vector, encoded as base64. */ @@ -22834,32 +21593,16 @@ public struct SecretStorageV1AesHmacSha2Properties { self.iv = iv self.mac = mac } + + + + } #if compiler(>=6) extension SecretStorageV1AesHmacSha2Properties: Sendable {} #endif - -extension SecretStorageV1AesHmacSha2Properties: Equatable, Hashable { - public static func ==(lhs: SecretStorageV1AesHmacSha2Properties, rhs: SecretStorageV1AesHmacSha2Properties) -> Bool { - if lhs.iv != rhs.iv { - return false - } - if lhs.mac != rhs.mac { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(iv) - hasher.combine(mac) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -22894,7 +21637,7 @@ public func FfiConverterTypeSecretStorageV1AesHmacSha2Properties_lower(_ value: } -public struct Session { +public struct Session: Equatable, Hashable { /** * The access token used for this session. */ @@ -22962,52 +21705,16 @@ public struct Session { self.oidcData = oidcData self.slidingSyncVersion = slidingSyncVersion } + + + + } #if compiler(>=6) extension Session: Sendable {} #endif - -extension Session: Equatable, Hashable { - public static func ==(lhs: Session, rhs: Session) -> Bool { - if lhs.accessToken != rhs.accessToken { - return false - } - if lhs.refreshToken != rhs.refreshToken { - return false - } - if lhs.userId != rhs.userId { - return false - } - if lhs.deviceId != rhs.deviceId { - return false - } - if lhs.homeserverUrl != rhs.homeserverUrl { - return false - } - if lhs.oidcData != rhs.oidcData { - return false - } - if lhs.slidingSyncVersion != rhs.slidingSyncVersion { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(accessToken) - hasher.combine(refreshToken) - hasher.combine(userId) - hasher.combine(deviceId) - hasher.combine(homeserverUrl) - hasher.combine(oidcData) - hasher.combine(slidingSyncVersion) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23055,7 +21762,7 @@ public func FfiConverterTypeSession_lower(_ value: Session) -> RustBuffer { /** * Details about the incoming verification request */ -public struct SessionVerificationRequestDetails { +public struct SessionVerificationRequestDetails: Equatable, Hashable { public var senderProfile: UserProfile public var flowId: String public var deviceId: String @@ -23077,44 +21784,16 @@ public struct SessionVerificationRequestDetails { self.deviceDisplayName = deviceDisplayName self.firstSeenTimestamp = firstSeenTimestamp } + + + + } #if compiler(>=6) extension SessionVerificationRequestDetails: Sendable {} #endif - -extension SessionVerificationRequestDetails: Equatable, Hashable { - public static func ==(lhs: SessionVerificationRequestDetails, rhs: SessionVerificationRequestDetails) -> Bool { - if lhs.senderProfile != rhs.senderProfile { - return false - } - if lhs.flowId != rhs.flowId { - return false - } - if lhs.deviceId != rhs.deviceId { - return false - } - if lhs.deviceDisplayName != rhs.deviceDisplayName { - return false - } - if lhs.firstSeenTimestamp != rhs.firstSeenTimestamp { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(senderProfile) - hasher.combine(flowId) - hasher.combine(deviceId) - hasher.combine(deviceDisplayName) - hasher.combine(firstSeenTimestamp) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23160,7 +21839,7 @@ public func FfiConverterTypeSessionVerificationRequestDetails_lower(_ value: Ses * should be passed onto a push gateway and how the notification should be * presented. */ -public struct SimplePushRule { +public struct SimplePushRule: Equatable, Hashable { /** * Actions to determine if and how a notification is delivered for events * matching this rule. @@ -23204,40 +21883,16 @@ public struct SimplePushRule { self.enabled = enabled self.ruleId = ruleId } + + + + } #if compiler(>=6) extension SimplePushRule: Sendable {} #endif - -extension SimplePushRule: Equatable, Hashable { - public static func ==(lhs: SimplePushRule, rhs: SimplePushRule) -> Bool { - if lhs.actions != rhs.actions { - return false - } - if lhs.`default` != rhs.`default` { - return false - } - if lhs.enabled != rhs.enabled { - return false - } - if lhs.ruleId != rhs.ruleId { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(actions) - hasher.combine(`default`) - hasher.combine(enabled) - hasher.combine(ruleId) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23280,7 +21935,7 @@ 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 { +public struct SpaceRoom: Equatable, Hashable { /** * The ID of the room. */ @@ -23422,88 +22077,16 @@ public struct SpaceRoom { self.heroes = heroes self.via = via } + + + + } #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.displayName != rhs.displayName { - return false - } - if lhs.rawName != rhs.rawName { - 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.isDirect != rhs.isDirect { - return false - } - if lhs.childrenCount != rhs.childrenCount { - return false - } - if lhs.state != rhs.state { - return false - } - if lhs.heroes != rhs.heroes { - return false - } - if lhs.via != rhs.via { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomId) - hasher.combine(canonicalAlias) - hasher.combine(displayName) - hasher.combine(rawName) - hasher.combine(topic) - hasher.combine(avatarUrl) - hasher.combine(roomType) - hasher.combine(numJoinedMembers) - hasher.combine(joinRule) - hasher.combine(worldReadable) - hasher.combine(guestCanJoin) - hasher.combine(isDirect) - hasher.combine(childrenCount) - hasher.combine(state) - hasher.combine(heroes) - hasher.combine(via) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23570,7 +22153,7 @@ public func FfiConverterTypeSpaceRoom_lower(_ value: SpaceRoom) -> RustBuffer { * Contains the disk size of the different stores, if known. It won't be * available for in-memory stores. */ -public struct StoreSizes { +public struct StoreSizes: Equatable, Hashable { /** * The size of the CryptoStore. */ @@ -23608,40 +22191,16 @@ public struct StoreSizes { self.eventCacheStore = eventCacheStore self.mediaStore = mediaStore } + + + + } #if compiler(>=6) extension StoreSizes: Sendable {} #endif - -extension StoreSizes: Equatable, Hashable { - public static func ==(lhs: StoreSizes, rhs: StoreSizes) -> Bool { - if lhs.cryptoStore != rhs.cryptoStore { - return false - } - if lhs.stateStore != rhs.stateStore { - return false - } - if lhs.eventCacheStore != rhs.eventCacheStore { - return false - } - if lhs.mediaStore != rhs.mediaStore { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(cryptoStore) - hasher.combine(stateStore) - hasher.combine(eventCacheStore) - hasher.combine(mediaStore) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23689,7 +22248,7 @@ public func FfiConverterTypeStoreSizes_lower(_ value: StoreSizes) -> RustBuffer * * [`m.room.tombstone`]: https://spec.matrix.org/v1.14/client-server-api/#mroomtombstone */ -public struct SuccessorRoom { +public struct SuccessorRoom: Equatable, Hashable { /** * The ID of the replacement room. */ @@ -23711,32 +22270,16 @@ public struct SuccessorRoom { self.roomId = roomId self.reason = reason } + + + + } #if compiler(>=6) extension SuccessorRoom: Sendable {} #endif - -extension SuccessorRoom: Equatable, Hashable { - public static func ==(lhs: SuccessorRoom, rhs: SuccessorRoom) -> Bool { - if lhs.roomId != rhs.roomId { - return false - } - if lhs.reason != rhs.reason { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(roomId) - hasher.combine(reason) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23774,7 +22317,7 @@ public func FfiConverterTypeSuccessorRoom_lower(_ value: SuccessorRoom) -> RustB /** * Information about a tag. */ -public struct TagInfo { +public struct TagInfo: Equatable, Hashable { /** * Value to use for lexicographically ordering rooms with this tag. */ @@ -23788,28 +22331,16 @@ public struct TagInfo { */order: Double?) { self.order = order } + + + + } #if compiler(>=6) extension TagInfo: Sendable {} #endif - -extension TagInfo: Equatable, Hashable { - public static func ==(lhs: TagInfo, rhs: TagInfo) -> Bool { - if lhs.order != rhs.order { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(order) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23842,7 +22373,7 @@ public func FfiConverterTypeTagInfo_lower(_ value: TagInfo) -> RustBuffer { } -public struct TextMessageContent { +public struct TextMessageContent: Equatable, Hashable { public var body: String public var formatted: FormattedBody? @@ -23852,32 +22383,16 @@ public struct TextMessageContent { self.body = body self.formatted = formatted } + + + + } #if compiler(>=6) extension TextMessageContent: Sendable {} #endif - -extension TextMessageContent: Equatable, Hashable { - public static func ==(lhs: TextMessageContent, rhs: TextMessageContent) -> Bool { - if lhs.body != rhs.body { - return false - } - if lhs.formatted != rhs.formatted { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(body) - hasher.combine(formatted) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -23915,7 +22430,7 @@ public func FfiConverterTypeTextMessageContent_lower(_ value: TextMessageContent /** * A thread subscription (MSC4306). */ -public struct ThreadSubscription { +public struct ThreadSubscription: Equatable, Hashable { /** * Whether the thread subscription happened automatically (e.g. after a * mention) or if it was manually requested by the user. @@ -23931,28 +22446,16 @@ public struct ThreadSubscription { */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 @@ -23985,7 +22488,7 @@ public func FfiConverterTypeThreadSubscription_lower(_ value: ThreadSubscription } -public struct ThumbnailInfo { +public struct ThumbnailInfo: Equatable, Hashable { public var height: UInt64? public var width: UInt64? public var mimetype: String? @@ -23999,40 +22502,16 @@ public struct ThumbnailInfo { self.mimetype = mimetype self.size = size } + + + + } #if compiler(>=6) extension ThumbnailInfo: Sendable {} #endif - -extension ThumbnailInfo: Equatable, Hashable { - public static func ==(lhs: ThumbnailInfo, rhs: ThumbnailInfo) -> Bool { - if lhs.height != rhs.height { - return false - } - if lhs.width != rhs.width { - return false - } - if lhs.mimetype != rhs.mimetype { - return false - } - if lhs.size != rhs.size { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(height) - hasher.combine(width) - hasher.combine(mimetype) - hasher.combine(size) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24142,14 +22621,16 @@ public struct TimelineConfiguration { self.trackReadReceipts = trackReadReceipts self.reportUtds = reportUtds } + + + + } #if compiler(>=6) extension TimelineConfiguration: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24192,7 +22673,7 @@ public func FfiConverterTypeTimelineConfiguration_lower(_ value: TimelineConfigu } -public struct TimelineUniqueId { +public struct TimelineUniqueId: Equatable, Hashable { public var id: String // Default memberwise initializers are never public by default, so we @@ -24200,28 +22681,16 @@ public struct TimelineUniqueId { public init(id: String) { self.id = id } + + + + } #if compiler(>=6) extension TimelineUniqueId: Sendable {} #endif - -extension TimelineUniqueId: Equatable, Hashable { - public static func ==(lhs: TimelineUniqueId, rhs: TimelineUniqueId) -> Bool { - if lhs.id != rhs.id { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(id) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24254,7 +22723,7 @@ public func FfiConverterTypeTimelineUniqueId_lower(_ value: TimelineUniqueId) -> } -public struct TracingConfiguration { +public struct TracingConfiguration: Equatable, Hashable { /** * The desired log level. */ @@ -24308,44 +22777,16 @@ public struct TracingConfiguration { self.writeToStdoutOrSystem = writeToStdoutOrSystem self.writeToFiles = writeToFiles } + + + + } #if compiler(>=6) extension TracingConfiguration: Sendable {} #endif - -extension TracingConfiguration: Equatable, Hashable { - public static func ==(lhs: TracingConfiguration, rhs: TracingConfiguration) -> Bool { - if lhs.logLevel != rhs.logLevel { - return false - } - if lhs.traceLogPacks != rhs.traceLogPacks { - return false - } - if lhs.extraTargets != rhs.extraTargets { - return false - } - if lhs.writeToStdoutOrSystem != rhs.writeToStdoutOrSystem { - return false - } - if lhs.writeToFiles != rhs.writeToFiles { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(logLevel) - hasher.combine(traceLogPacks) - hasher.combine(extraTargets) - hasher.combine(writeToStdoutOrSystem) - hasher.combine(writeToFiles) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24389,7 +22830,7 @@ public func FfiConverterTypeTracingConfiguration_lower(_ value: TracingConfigura /** * Configuration to save logs to (rotated) log-files. */ -public struct TracingFileConfiguration { +public struct TracingFileConfiguration: Equatable, Hashable { /** * Base location for all the log files. */ @@ -24433,40 +22874,16 @@ public struct TracingFileConfiguration { self.fileSuffix = fileSuffix self.maxFiles = maxFiles } + + + + } #if compiler(>=6) extension TracingFileConfiguration: Sendable {} #endif - -extension TracingFileConfiguration: Equatable, Hashable { - public static func ==(lhs: TracingFileConfiguration, rhs: TracingFileConfiguration) -> Bool { - if lhs.path != rhs.path { - return false - } - if lhs.filePrefix != rhs.filePrefix { - return false - } - if lhs.fileSuffix != rhs.fileSuffix { - return false - } - if lhs.maxFiles != rhs.maxFiles { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(path) - hasher.combine(filePrefix) - hasher.combine(fileSuffix) - hasher.combine(maxFiles) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24505,7 +22922,7 @@ public func FfiConverterTypeTracingFileConfiguration_lower(_ value: TracingFileC } -public struct TransmissionProgress { +public struct TransmissionProgress: Equatable, Hashable { public var current: UInt64 public var total: UInt64 @@ -24515,32 +22932,16 @@ public struct TransmissionProgress { self.current = current self.total = total } + + + + } #if compiler(>=6) extension TransmissionProgress: Sendable {} #endif - -extension TransmissionProgress: Equatable, Hashable { - public static func ==(lhs: TransmissionProgress, rhs: TransmissionProgress) -> 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 @@ -24575,7 +22976,7 @@ public func FfiConverterTypeTransmissionProgress_lower(_ value: TransmissionProg } -public struct UnableToDecryptInfo { +public struct UnableToDecryptInfo: Equatable, Hashable { /** * The identifier of the event that couldn't get decrypted. */ @@ -24657,52 +23058,16 @@ public struct UnableToDecryptInfo { self.senderHomeserver = senderHomeserver self.ownHomeserver = ownHomeserver } + + + + } #if compiler(>=6) extension UnableToDecryptInfo: Sendable {} #endif - -extension UnableToDecryptInfo: Equatable, Hashable { - public static func ==(lhs: UnableToDecryptInfo, rhs: UnableToDecryptInfo) -> Bool { - if lhs.eventId != rhs.eventId { - return false - } - if lhs.timeToDecryptMs != rhs.timeToDecryptMs { - return false - } - if lhs.cause != rhs.cause { - return false - } - if lhs.eventLocalAgeMillis != rhs.eventLocalAgeMillis { - return false - } - if lhs.userTrustsOwnIdentity != rhs.userTrustsOwnIdentity { - return false - } - if lhs.senderHomeserver != rhs.senderHomeserver { - return false - } - if lhs.ownHomeserver != rhs.ownHomeserver { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(eventId) - hasher.combine(timeToDecryptMs) - hasher.combine(cause) - hasher.combine(eventLocalAgeMillis) - hasher.combine(userTrustsOwnIdentity) - hasher.combine(senderHomeserver) - hasher.combine(ownHomeserver) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24747,7 +23112,7 @@ public func FfiConverterTypeUnableToDecryptInfo_lower(_ value: UnableToDecryptIn } -public struct UnstableAudioDetailsContent { +public struct UnstableAudioDetailsContent: Equatable, Hashable { public var duration: TimeInterval public var waveform: [UInt16] @@ -24757,32 +23122,16 @@ public struct UnstableAudioDetailsContent { self.duration = duration self.waveform = waveform } + + + + } #if compiler(>=6) extension UnstableAudioDetailsContent: Sendable {} #endif - -extension UnstableAudioDetailsContent: Equatable, Hashable { - public static func ==(lhs: UnstableAudioDetailsContent, rhs: UnstableAudioDetailsContent) -> Bool { - if lhs.duration != rhs.duration { - return false - } - if lhs.waveform != rhs.waveform { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(duration) - hasher.combine(waveform) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24817,30 +23166,22 @@ public func FfiConverterTypeUnstableAudioDetailsContent_lower(_ value: UnstableA } -public struct UnstableVoiceContent { +public struct UnstableVoiceContent: Equatable, Hashable { // Default memberwise initializers are never public by default, so we // declare one manually. public init() { } + + + + } #if compiler(>=6) extension UnstableVoiceContent: Sendable {} #endif - -extension UnstableVoiceContent: Equatable, Hashable { - public static func ==(lhs: UnstableVoiceContent, rhs: UnstableVoiceContent) -> Bool { - return true - } - - public func hash(into hasher: inout Hasher) { - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24870,7 +23211,7 @@ public func FfiConverterTypeUnstableVoiceContent_lower(_ value: UnstableVoiceCon } -public struct UploadParameters { +public struct UploadParameters: Equatable, Hashable { /** * Source from which to upload data */ @@ -24916,44 +23257,16 @@ public struct UploadParameters { self.mentions = mentions self.inReplyTo = inReplyTo } + + + + } #if compiler(>=6) extension UploadParameters: Sendable {} #endif - -extension UploadParameters: Equatable, Hashable { - public static func ==(lhs: UploadParameters, rhs: UploadParameters) -> Bool { - if lhs.source != rhs.source { - return false - } - if lhs.caption != rhs.caption { - return false - } - if lhs.formattedCaption != rhs.formattedCaption { - return false - } - if lhs.mentions != rhs.mentions { - return false - } - if lhs.inReplyTo != rhs.inReplyTo { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(source) - hasher.combine(caption) - hasher.combine(formattedCaption) - hasher.combine(mentions) - hasher.combine(inReplyTo) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -24997,7 +23310,7 @@ public func FfiConverterTypeUploadParameters_lower(_ value: UploadParameters) -> /** * An update for a particular user's power level within the room. */ -public struct UserPowerLevelUpdate { +public struct UserPowerLevelUpdate: Equatable, Hashable { /** * The user ID of the user to update. */ @@ -25019,32 +23332,16 @@ public struct UserPowerLevelUpdate { self.userId = userId self.powerLevel = powerLevel } + + + + } #if compiler(>=6) extension UserPowerLevelUpdate: Sendable {} #endif - -extension UserPowerLevelUpdate: Equatable, Hashable { - public static func ==(lhs: UserPowerLevelUpdate, rhs: UserPowerLevelUpdate) -> Bool { - if lhs.userId != rhs.userId { - return false - } - if lhs.powerLevel != rhs.powerLevel { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(userId) - hasher.combine(powerLevel) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25079,7 +23376,7 @@ public func FfiConverterTypeUserPowerLevelUpdate_lower(_ value: UserPowerLevelUp } -public struct UserProfile { +public struct UserProfile: Equatable, Hashable { public var userId: String public var displayName: String? public var avatarUrl: String? @@ -25091,36 +23388,16 @@ public struct UserProfile { self.displayName = displayName self.avatarUrl = avatarUrl } + + + + } #if compiler(>=6) extension UserProfile: Sendable {} #endif - -extension UserProfile: Equatable, Hashable { - public static func ==(lhs: UserProfile, rhs: UserProfile) -> Bool { - if lhs.userId != rhs.userId { - return false - } - if lhs.displayName != rhs.displayName { - return false - } - if lhs.avatarUrl != rhs.avatarUrl { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(userId) - hasher.combine(displayName) - hasher.combine(avatarUrl) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25160,7 +23437,7 @@ public func FfiConverterTypeUserProfile_lower(_ value: UserProfile) -> RustBuffe /** * A user-defined tag name. */ -public struct UserTagName { +public struct UserTagName: Equatable, Hashable { public var name: String // Default memberwise initializers are never public by default, so we @@ -25168,28 +23445,16 @@ public struct UserTagName { public init(name: String) { self.name = name } + + + + } #if compiler(>=6) extension UserTagName: Sendable {} #endif - -extension UserTagName: Equatable, Hashable { - public static func ==(lhs: UserTagName, rhs: UserTagName) -> Bool { - if lhs.name != rhs.name { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(name) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25244,14 +23509,16 @@ public struct VideoInfo { self.thumbnailSource = thumbnailSource self.blurhash = blurhash } + + + + } #if compiler(>=6) extension VideoInfo: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25320,14 +23587,16 @@ public struct VideoMessageContent { self.source = source self.info = info } + + + + } #if compiler(>=6) extension VideoMessageContent: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25371,7 +23640,7 @@ public func FfiConverterTypeVideoMessageContent_lower(_ value: VideoMessageConte /** * Capabilities that a widget can request from a client. */ -public struct WidgetCapabilities { +public struct WidgetCapabilities: Equatable, Hashable { /** * Types of the messages that a widget wants to be able to fetch. */ @@ -25425,44 +23694,16 @@ public struct WidgetCapabilities { self.updateDelayedEvent = updateDelayedEvent self.sendDelayedEvent = sendDelayedEvent } + + + + } #if compiler(>=6) extension WidgetCapabilities: Sendable {} #endif - -extension WidgetCapabilities: Equatable, Hashable { - public static func ==(lhs: WidgetCapabilities, rhs: WidgetCapabilities) -> Bool { - if lhs.read != rhs.read { - return false - } - if lhs.send != rhs.send { - return false - } - if lhs.requiresClient != rhs.requiresClient { - return false - } - if lhs.updateDelayedEvent != rhs.updateDelayedEvent { - return false - } - if lhs.sendDelayedEvent != rhs.sendDelayedEvent { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(read) - hasher.combine(send) - hasher.combine(requiresClient) - hasher.combine(updateDelayedEvent) - hasher.combine(sendDelayedEvent) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25513,14 +23754,16 @@ public struct WidgetDriverAndHandle { self.driver = driver self.handle = handle } + + + + } #if compiler(>=6) extension WidgetDriverAndHandle: Sendable {} #endif - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25558,7 +23801,7 @@ public func FfiConverterTypeWidgetDriverAndHandle_lower(_ value: WidgetDriverAnd /** * Information about a widget. */ -public struct WidgetSettings { +public struct WidgetSettings: Equatable, Hashable { /** * Widget's unique identifier. */ @@ -25608,36 +23851,16 @@ public struct WidgetSettings { self.initAfterContentLoad = initAfterContentLoad self.rawUrl = rawUrl } + + + + } #if compiler(>=6) extension WidgetSettings: Sendable {} #endif - -extension WidgetSettings: Equatable, Hashable { - public static func ==(lhs: WidgetSettings, rhs: WidgetSettings) -> Bool { - if lhs.widgetId != rhs.widgetId { - return false - } - if lhs.initAfterContentLoad != rhs.initAfterContentLoad { - return false - } - if lhs.rawUrl != rhs.rawUrl { - return false - } - return true - } - - public func hash(into hasher: inout Hasher) { - hasher.combine(widgetId) - hasher.combine(initAfterContentLoad) - hasher.combine(rawUrl) - } -} - - - #if swift(>=5.8) @_documentation(visibility: private) #endif @@ -25679,7 +23902,7 @@ public func FfiConverterTypeWidgetSettings_lower(_ value: WidgetSettings) -> Rus * Global account data events. */ -public enum AccountDataEvent { +public enum AccountDataEvent: Equatable, Hashable { /** * m.direct @@ -25742,9 +23965,13 @@ public enum AccountDataEvent { * The passphrase from which to generate the key. */passphrase: PassPhrase? ) -} + + + +} + #if compiler(>=6) extension AccountDataEvent: Sendable {} #endif @@ -25837,20 +24064,13 @@ public func FfiConverterTypeAccountDataEvent_lower(_ value: AccountDataEvent) -> } -extension AccountDataEvent: 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 global account data events. */ -public enum AccountDataEventType { +public enum AccountDataEventType: Equatable, Hashable { /** * m.direct @@ -25877,9 +24097,13 @@ public enum AccountDataEventType { */ case secretStorageKey(keyId: String ) -} + + + +} + #if compiler(>=6) extension AccountDataEventType: Sendable {} #endif @@ -25959,17 +24183,10 @@ public func FfiConverterTypeAccountDataEventType_lower(_ value: AccountDataEvent } -extension AccountDataEventType: 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 AccountManagementAction { +public enum AccountManagementAction: Equatable, Hashable { case profile case sessionsList @@ -25979,9 +24196,13 @@ public enum AccountManagementAction { ) case accountDeactivate case crossSigningReset -} + + + +} + #if compiler(>=6) extension AccountManagementAction: Sendable {} #endif @@ -26063,20 +24284,13 @@ public func FfiConverterTypeAccountManagementAction_lower(_ value: AccountManage } -extension AccountManagementAction: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Enum representing the push notification actions for a rule. */ -public enum Action { +public enum Action: Equatable, Hashable { /** * Causes matching events to generate a notification. @@ -26087,9 +24301,13 @@ public enum Action { */ case setTweak(value: Tweak ) -} + + + +} + #if compiler(>=6) extension Action: Sendable {} #endif @@ -26145,20 +24363,13 @@ public func FfiConverterTypeAction_lower(_ value: Action) -> RustBuffer { } -extension Action: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * An allow rule which defines a condition that allows joining a room. */ -public enum AllowRule { +public enum AllowRule: Equatable, Hashable { /** * Only a member of the `room_id` Room can join the one this rule is used @@ -26172,9 +24383,13 @@ public enum AllowRule { */ case custom(json: String ) -} + + + +} + #if compiler(>=6) extension AllowRule: Sendable {} #endif @@ -26232,23 +24447,20 @@ public func FfiConverterTypeAllowRule_lower(_ value: AllowRule) -> RustBuffer { } -extension AllowRule: 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 AssetType { +public enum AssetType: Equatable, Hashable { case sender case pin -} + + + +} + #if compiler(>=6) extension AssetType: Sendable {} #endif @@ -26302,26 +24514,23 @@ public func FfiConverterTypeAssetType_lower(_ value: AssetType) -> RustBuffer { } -extension AssetType: 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 AuthData { +public enum AuthData: Equatable, Hashable { /** * Password-based authentication (`m.login.password`). */ case password(passwordDetails: AuthDataPasswordDetails ) -} + + + +} + #if compiler(>=6) extension AuthData: Sendable {} #endif @@ -26371,17 +24580,10 @@ public func FfiConverterTypeAuthData_lower(_ value: AuthData) -> RustBuffer { } -extension AuthData: 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 BackupState { +public enum BackupState: Equatable, Hashable { case unknown case creating @@ -26390,9 +24592,13 @@ public enum BackupState { case enabled case downloading case disabling -} + + + +} + #if compiler(>=6) extension BackupState: Sendable {} #endif @@ -26476,26 +24682,23 @@ public func FfiConverterTypeBackupState_lower(_ value: BackupState) -> RustBuffe } -extension BackupState: 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 BackupUploadState { +public enum BackupUploadState: Equatable, Hashable { case waiting case uploading(backedUpCount: UInt32, totalCount: UInt32 ) case error case done -} + + + +} + #if compiler(>=6) extension BackupUploadState: Sendable {} #endif @@ -26564,13 +24767,6 @@ public func FfiConverterTypeBackupUploadState_lower(_ value: BackupUploadState) } -extension BackupUploadState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -26589,9 +24785,13 @@ public enum BatchNotificationResult { * The error message observed while handling a specific notification. */message: String ) -} + + + +} + #if compiler(>=6) extension BatchNotificationResult: Sendable {} #endif @@ -26650,11 +24850,7 @@ public func FfiConverterTypeBatchNotificationResult_lower(_ value: BatchNotifica - - - - -public enum ClientBuildError: Swift.Error { +public enum ClientBuildError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -26676,8 +24872,21 @@ public enum ClientBuildError: Swift.Error { case Generic(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension ClientBuildError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -26779,31 +24988,29 @@ public func FfiConverterTypeClientBuildError_lower(_ value: ClientBuildError) -> } -extension ClientBuildError: Equatable, Hashable {} +public enum ClientError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { + + + case Generic(msg: String, details: String? + ) + case MatrixApi(kind: ErrorKind, code: String, msg: String, details: String? + ) + + -extension ClientBuildError: Foundation.LocalizedError { + public var errorDescription: String? { String(reflecting: self) } -} - - - - - -public enum ClientError: Swift.Error { - - - case Generic(msg: String, details: String? - ) - case MatrixApi(kind: ErrorKind, code: String, msg: String, details: String? - ) } +#if compiler(>=6) +extension ClientError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -26872,25 +25079,10 @@ public func FfiConverterTypeClientError_lower(_ value: ClientError) -> RustBuffe return FfiConverterTypeClientError.lower(value) } - -extension ClientError: Equatable, Hashable {} - - - - -extension ClientError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum ComparisonOperator { +public enum ComparisonOperator: Equatable, Hashable { /** * Equals @@ -26912,9 +25104,13 @@ public enum ComparisonOperator { * Less or equal */ case le -} + + + +} + #if compiler(>=6) extension ComparisonOperator: Sendable {} #endif @@ -26986,20 +25182,13 @@ public func FfiConverterTypeComparisonOperator_lower(_ value: ComparisonOperator } -extension ComparisonOperator: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The type of draft of the composer. */ -public enum ComposerDraftType { +public enum ComposerDraftType: Equatable, Hashable { /** * The draft is a new message. @@ -27021,9 +25210,13 @@ public enum ComposerDraftType { * The ID of the event being edited. */eventId: String ) -} + + + +} + #if compiler(>=6) extension ComposerDraftType: Sendable {} #endif @@ -27087,17 +25280,10 @@ public func FfiConverterTypeComposerDraftType_lower(_ value: ComposerDraftType) } -extension ComposerDraftType: 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 CrossSigningResetAuthType { +public enum CrossSigningResetAuthType: Equatable, Hashable { /** * The homeserver requires user-interactive authentication. @@ -27105,9 +25291,13 @@ public enum CrossSigningResetAuthType { case uiaa case oidc(info: OidcCrossSigningResetInfo ) -} + + + +} + #if compiler(>=6) extension CrossSigningResetAuthType: Sendable {} #endif @@ -27163,13 +25353,6 @@ public func FfiConverterTypeCrossSigningResetAuthType_lower(_ value: CrossSignin } -extension CrossSigningResetAuthType: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -27177,13 +25360,17 @@ extension CrossSigningResetAuthType: Equatable, Hashable {} * between each month */ -public enum DateDividerMode { +public enum DateDividerMode: Equatable, Hashable { case daily case monthly -} + + + +} + #if compiler(>=6) extension DateDividerMode: Sendable {} #endif @@ -27237,13 +25424,6 @@ public func FfiConverterTypeDateDividerMode_lower(_ value: DateDividerMode) -> R } -extension DateDividerMode: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -27260,9 +25440,13 @@ public enum DraftAttachment { ) case video(videoInfo: VideoInfo, source: UploadSource, thumbnailSource: UploadSource? ) -} + + + +} + #if compiler(>=6) extension DraftAttachment: Sendable {} #endif @@ -27342,10 +25526,6 @@ public func FfiConverterTypeDraftAttachment_lower(_ value: DraftAttachment) -> R } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -27357,9 +25537,13 @@ public enum EditedContent { ) case pollStart(pollData: PollData ) -} + + + +} + #if compiler(>=6) extension EditedContent: Sendable {} #endif @@ -27427,10 +25611,6 @@ public func FfiConverterTypeEditedContent_lower(_ value: EditedContent) -> RustB } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -27442,9 +25622,13 @@ public enum EmbeddedEventDetails { ) case error(message: String ) -} + + + +} + #if compiler(>=6) extension EmbeddedEventDetails: Sendable {} #endif @@ -27518,14 +25702,10 @@ public func FfiConverterTypeEmbeddedEventDetails_lower(_ value: EmbeddedEventDet } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum EnableRecoveryProgress { +public enum EnableRecoveryProgress: Equatable, Hashable { case starting case creatingBackup @@ -27535,9 +25715,13 @@ public enum EnableRecoveryProgress { case roomKeyUploadError case done(recoveryKey: String ) -} + + + +} + #if compiler(>=6) extension EnableRecoveryProgress: Sendable {} #endif @@ -27620,17 +25804,10 @@ public func FfiConverterTypeEnableRecoveryProgress_lower(_ value: EnableRecovery } -extension EnableRecoveryProgress: 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 EncryptedMessage { +public enum EncryptedMessage: Equatable, Hashable { case olmV1Curve25519AesSha2( /** @@ -27647,9 +25824,13 @@ public enum EncryptedMessage { */cause: UtdCause ) case unknown -} + + + +} + #if compiler(>=6) extension EncryptedMessage: Sendable {} #endif @@ -27714,17 +25895,10 @@ public func FfiConverterTypeEncryptedMessage_lower(_ value: EncryptedMessage) -> } -extension EncryptedMessage: 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 ErrorKind { +public enum ErrorKind: Equatable, Hashable { /** * `M_BAD_ALIAS` @@ -28126,9 +26300,13 @@ public enum ErrorKind { */ case custom(errcode: String ) -} + + + +} + #if compiler(>=6) extension ErrorKind: Sendable {} #endif @@ -28473,13 +26651,6 @@ public func FfiConverterTypeErrorKind_lower(_ value: ErrorKind) -> RustBuffer { } -extension ErrorKind: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -28487,15 +26658,19 @@ extension ErrorKind: Equatable, Hashable {} * event id or a local transaction id, never both or none. */ -public enum EventOrTransactionId { +public enum EventOrTransactionId: Equatable, Hashable { case eventId(eventId: String ) case transactionId(transactionId: String ) -} + + + +} + #if compiler(>=6) extension EventOrTransactionId: Sendable {} #endif @@ -28553,20 +26728,13 @@ public func FfiConverterTypeEventOrTransactionId_lower(_ value: EventOrTransacti } -extension EventOrTransactionId: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * This type represents the “send state” of a local event timeline item. */ -public enum EventSendState { +public enum EventSendState: Equatable, Hashable { /** * The local event has not been sent yet. @@ -28598,9 +26766,13 @@ public enum EventSendState { */ case sent(eventId: String ) -} + + + +} + #if compiler(>=6) extension EventSendState: Sendable {} #endif @@ -28667,25 +26839,22 @@ public func FfiConverterTypeEventSendState_lower(_ value: EventSendState) -> Rus } -extension EventSendState: 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 FilterTimelineEventType { +public enum FilterTimelineEventType: Equatable, Hashable { case messageLike(eventType: MessageLikeEventType ) case state(eventType: StateEventType ) -} + + + +} + #if compiler(>=6) extension FilterTimelineEventType: Sendable {} #endif @@ -28743,15 +26912,8 @@ public func FfiConverterTypeFilterTimelineEventType_lower(_ value: FilterTimelin } -extension FilterTimelineEventType: Equatable, Hashable {} - - - - - - -public enum FocusEventError: Swift.Error { +public enum FocusEventError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -28761,8 +26923,21 @@ public enum FocusEventError: Swift.Error { ) case Other(msg: String ) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension FocusEventError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -28833,21 +27008,6 @@ public func FfiConverterTypeFocusEventError_lower(_ value: FocusEventError) -> R return FfiConverterTypeFocusEventError.lower(value) } - -extension FocusEventError: Equatable, Hashable {} - - - - -extension FocusEventError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -28861,9 +27021,13 @@ public enum GalleryItemInfo { ) case video(videoInfo: VideoInfo, source: UploadSource, caption: String?, formattedCaption: FormattedBody?, thumbnailSource: UploadSource? ) -} + + + +} + #if compiler(>=6) extension GalleryItemInfo: Sendable {} #endif @@ -28951,10 +27115,6 @@ public func FfiConverterTypeGalleryItemInfo_lower(_ value: GalleryItemInfo) -> R } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -28970,9 +27130,13 @@ public enum GalleryItemType { ) case other(itemtype: String, body: String ) -} + + + +} + #if compiler(>=6) extension GalleryItemType: Sendable {} #endif @@ -29055,10 +27219,6 @@ public func FfiConverterTypeGalleryItemType_lower(_ value: GalleryItemType) -> R } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -29099,9 +27259,13 @@ public enum GeneratedQrLoginProgress { * The login has successfully finished. */ case done -} + + + +} + #if compiler(>=6) extension GeneratedQrLoginProgress: Sendable {} #endif @@ -29185,10 +27349,6 @@ public func FfiConverterTypeGeneratedQrLoginProgress_lower(_ value: GeneratedQrL } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -29232,9 +27392,13 @@ public enum GrantGeneratedQrLoginProgress { * The login has successfully finished. */ case done -} + + + +} + #if compiler(>=6) extension GrantGeneratedQrLoginProgress: Sendable {} #endif @@ -29318,10 +27482,6 @@ public func FfiConverterTypeGrantGeneratedQrLoginProgress_lower(_ value: GrantGe } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -29329,7 +27489,7 @@ public func FfiConverterTypeGrantGeneratedQrLoginProgress_lower(_ value: GrantGe * was generated on a new device. */ -public enum GrantQrLoginProgress { +public enum GrantQrLoginProgress: Equatable, Hashable { /** * The login process is starting. @@ -29366,9 +27526,13 @@ public enum GrantQrLoginProgress { * The login has successfully finished. */ case done -} + + + +} + #if compiler(>=6) extension GrantQrLoginProgress: Sendable {} #endif @@ -29445,17 +27609,10 @@ public func FfiConverterTypeGrantQrLoginProgress_lower(_ value: GrantQrLoginProg } -extension GrantQrLoginProgress: 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 HistoryVisibility { +public enum HistoryVisibility: Equatable, Hashable { /** * Previous events are accessible to newly joined members from the point @@ -29493,9 +27650,13 @@ public enum HistoryVisibility { * The string representation for this custom history visibility. */repr: String ) -} + + + +} + #if compiler(>=6) extension HistoryVisibility: Sendable {} #endif @@ -29569,15 +27730,8 @@ public func FfiConverterTypeHistoryVisibility_lower(_ value: HistoryVisibility) } -extension HistoryVisibility: Equatable, Hashable {} - - - - - - -public enum HumanQrGrantLoginError: Swift.Error { +public enum HumanQrGrantLoginError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -29616,8 +27770,21 @@ public enum HumanQrGrantLoginError: Swift.Error { */ case Unknown(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension HumanQrGrantLoginError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -29707,22 +27874,7 @@ public func FfiConverterTypeHumanQrGrantLoginError_lower(_ value: HumanQrGrantLo } -extension HumanQrGrantLoginError: Equatable, Hashable {} - - - - -extension HumanQrGrantLoginError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - - -public enum HumanQrLoginError: Swift.Error { +public enum HumanQrLoginError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -29738,8 +27890,21 @@ public enum HumanQrLoginError: Swift.Error { case CheckCodeAlreadySent case CheckCodeCannotBeSent case NotFound + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension HumanQrLoginError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -29844,28 +28009,13 @@ public func FfiConverterTypeHumanQrLoginError_lower(_ value: HumanQrLoginError) return FfiConverterTypeHumanQrLoginError.lower(value) } - -extension HumanQrLoginError: Equatable, Hashable {} - - - - -extension HumanQrLoginError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The policy that decides if avatars should be shown in invite requests. */ -public enum InviteAvatars { +public enum InviteAvatars: Equatable, Hashable { /** * Always show avatars in invite requests. @@ -29875,9 +28025,13 @@ public enum InviteAvatars { * Never show avatars in invite requests. */ case off -} + + + +} + #if compiler(>=6) extension InviteAvatars: Sendable {} #endif @@ -29931,20 +28085,13 @@ public func FfiConverterTypeInviteAvatars_lower(_ value: InviteAvatars) -> RustB } -extension InviteAvatars: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The rule used for users wishing to join this room. */ -public enum JoinRule { +public enum JoinRule: Equatable, Hashable { /** * Anyone can join the room without any prior action. @@ -29987,9 +28134,13 @@ public enum JoinRule { * The string representation for this custom rule. */repr: String ) -} + + + +} + #if compiler(>=6) extension JoinRule: Sendable {} #endif @@ -30079,17 +28230,10 @@ public func FfiConverterTypeJoinRule_lower(_ value: JoinRule) -> RustBuffer { } -extension JoinRule: 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 JsonValue { +public enum JsonValue: Equatable, Hashable { /** * Represents a `null` value. @@ -30110,9 +28254,13 @@ public enum JsonValue { */ case string(value: String ) -} + + + +} + #if compiler(>=6) extension JsonValue: Sendable {} #endif @@ -30184,28 +28332,25 @@ public func FfiConverterTypeJsonValue_lower(_ value: JsonValue) -> RustBuffer { } -extension JsonValue: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * A key algorithm to be used to generate a key from a passphrase. */ -public enum KeyDerivationAlgorithm { +public enum KeyDerivationAlgorithm: Equatable, Hashable { /** * PBKDF2 */ case pbkfd2 -} + + + +} + #if compiler(>=6) extension KeyDerivationAlgorithm: Sendable {} #endif @@ -30253,13 +28398,6 @@ public func FfiConverterTypeKeyDerivationAlgorithm_lower(_ value: KeyDerivationA } -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. /** @@ -30273,9 +28411,13 @@ public enum LatestEventValue { ) case local(timestamp: Timestamp, sender: String, profile: ProfileDetails, content: TimelineItemContent, isSending: Bool ) -} + + + +} + #if compiler(>=6) extension LatestEventValue: Sendable {} #endif @@ -30347,23 +28489,23 @@ public func FfiConverterTypeLatestEventValue_lower(_ value: LatestEventValue) -> } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum LogLevel { +public enum LogLevel: Equatable, Hashable { case error case warn case info case debug case trace -} + + + +} + #if compiler(>=6) extension LogLevel: Sendable {} #endif @@ -30435,20 +28577,13 @@ public func FfiConverterTypeLogLevel_lower(_ value: LogLevel) -> RustBuffer { } -extension LogLevel: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * A Matrix ID that can be a room, room alias, user, or event. */ -public enum MatrixId { +public enum MatrixId: Equatable, Hashable { case room(id: String ) @@ -30460,9 +28595,13 @@ public enum MatrixId { ) case eventOnRoomAlias(alias: String, eventId: String ) -} + + + +} + #if compiler(>=6) extension MatrixId: Sendable {} #endif @@ -30546,15 +28685,8 @@ public func FfiConverterTypeMatrixId_lower(_ value: MatrixId) -> RustBuffer { } -extension MatrixId: Equatable, Hashable {} - - - - - - -public enum MediaInfoError: Swift.Error { +public enum MediaInfoError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -30562,8 +28694,21 @@ public enum MediaInfoError: Swift.Error { case InvalidField(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension MediaInfoError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -30622,28 +28767,13 @@ public func FfiConverterTypeMediaInfoError_lower(_ value: MediaInfoError) -> Rus return FfiConverterTypeMediaInfoError.lower(value) } - -extension MediaInfoError: Equatable, Hashable {} - - - - -extension MediaInfoError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The policy that decides if media previews should be shown in the timeline. */ -public enum MediaPreviews { +public enum MediaPreviews: Equatable, Hashable { /** * Always show media previews in the timeline. @@ -30657,9 +28787,13 @@ public enum MediaPreviews { * Never show media previews in the timeline. */ case off -} + + + +} + #if compiler(>=6) extension MediaPreviews: Sendable {} #endif @@ -30719,26 +28853,23 @@ public func FfiConverterTypeMediaPreviews_lower(_ value: MediaPreviews) -> RustB } -extension MediaPreviews: 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 Membership { +public enum Membership: Equatable, Hashable { case invited case joined case left case knocked case banned -} + + + +} + #if compiler(>=6) extension Membership: Sendable {} #endif @@ -30810,17 +28941,10 @@ public func FfiConverterTypeMembership_lower(_ value: Membership) -> RustBuffer } -extension Membership: 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 MembershipChange { +public enum MembershipChange: Equatable, Hashable { case none case error @@ -30839,9 +28963,13 @@ public enum MembershipChange { case knockRetracted case knockDenied case notImplemented -} + + + +} + #if compiler(>=6) extension MembershipChange: Sendable {} #endif @@ -30985,17 +29113,10 @@ public func FfiConverterTypeMembershipChange_lower(_ value: MembershipChange) -> } -extension MembershipChange: 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 MembershipState { +public enum MembershipState: Equatable, Hashable { /** * The user is banned. @@ -31022,9 +29143,13 @@ public enum MembershipState { */ case custom(value: String ) -} + + + +} + #if compiler(>=6) extension MembershipState: Sendable {} #endif @@ -31104,24 +29229,21 @@ public func FfiConverterTypeMembershipState_lower(_ value: MembershipState) -> R } -extension MembershipState: 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 MessageFormat { +public enum MessageFormat: Equatable, Hashable { case html case unknown(format: String ) -} + + + +} + #if compiler(>=6) extension MessageFormat: Sendable {} #endif @@ -31177,13 +29299,6 @@ public func FfiConverterTypeMessageFormat_lower(_ value: MessageFormat) -> RustB } -extension MessageFormat: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -31215,9 +29330,13 @@ public enum MessageLikeEventContent { case roomRedaction(redactedEventId: String?, reason: String? ) case sticker -} + + + +} + #if compiler(>=6) extension MessageLikeEventContent: Sendable {} #endif @@ -31380,14 +29499,10 @@ public func FfiConverterTypeMessageLikeEventContent_lower(_ value: MessageLikeEv } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum MessageLikeEventType { +public enum MessageLikeEventType: Equatable, Hashable { case callAnswer case callCandidates @@ -31414,9 +29529,13 @@ public enum MessageLikeEventType { case unstablePollStart case other(String ) -} + + + +} + #if compiler(>=6) extension MessageLikeEventType: Sendable {} #endif @@ -31604,13 +29723,6 @@ public func FfiConverterTypeMessageLikeEventType_lower(_ value: MessageLikeEvent } -extension MessageLikeEventType: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -31636,9 +29748,13 @@ public enum MessageType { ) case other(msgtype: String, body: String ) -} + + + +} + #if compiler(>=6) extension MessageType: Sendable {} #endif @@ -31761,10 +29877,6 @@ public func FfiConverterTypeMessageType_lower(_ value: MessageType) -> RustBuffe } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -31799,9 +29911,13 @@ public enum MsgLikeKind { */ case other(eventType: MessageLikeEventType ) -} + + + +} + #if compiler(>=6) extension MsgLikeKind: Sendable {} #endif @@ -31897,10 +30013,6 @@ public func FfiConverterTypeMsgLikeKind_lower(_ value: MsgLikeKind) -> RustBuffe } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -31910,9 +30022,13 @@ public enum NotificationEvent { ) case invite(sender: String ) -} + + + +} + #if compiler(>=6) extension NotificationEvent: Sendable {} #endif @@ -31970,10 +30086,6 @@ public func FfiConverterTypeNotificationEvent_lower(_ value: NotificationEvent) } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -31982,9 +30094,13 @@ public enum NotificationProcessSetup { case multipleProcesses case singleProcess(syncService: SyncService ) -} + + + +} + #if compiler(>=6) extension NotificationProcessSetup: Sendable {} #endif @@ -32041,11 +30157,7 @@ public func FfiConverterTypeNotificationProcessSetup_lower(_ value: Notification - - - - -public enum NotificationSettingsError: Swift.Error { +public enum NotificationSettingsError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -32082,8 +30194,21 @@ public enum NotificationSettingsError: Swift.Error { * Unable to update push rule. */ case UnableToUpdatePushRule + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension NotificationSettingsError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -32180,21 +30305,6 @@ public func FfiConverterTypeNotificationSettingsError_lower(_ value: Notificatio return FfiConverterTypeNotificationSettingsError.lower(value) } - -extension NotificationSettingsError: Equatable, Hashable {} - - - - -extension NotificationSettingsError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -32215,9 +30325,13 @@ public enum NotificationStatus { * current user. */ case eventFilteredOut -} + + + +} + #if compiler(>=6) extension NotificationStatus: Sendable {} #endif @@ -32280,11 +30394,7 @@ public func FfiConverterTypeNotificationStatus_lower(_ value: NotificationStatus - - - - -public enum OidcError: Swift.Error { +public enum OidcError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -32298,8 +30408,21 @@ public enum OidcError: Swift.Error { case Generic(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension OidcError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -32376,25 +30499,10 @@ public func FfiConverterTypeOidcError_lower(_ value: OidcError) -> RustBuffer { return FfiConverterTypeOidcError.lower(value) } - -extension OidcError: Equatable, Hashable {} - - - - -extension OidcError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum OidcPrompt { +public enum OidcPrompt: Equatable, Hashable { /** * The Authorization Server should prompt the End-User to create a user @@ -32418,9 +30526,13 @@ public enum OidcPrompt { */ case unknown(value: String ) -} + + + +} + #if compiler(>=6) extension OidcPrompt: Sendable {} #endif @@ -32488,17 +30600,10 @@ public func FfiConverterTypeOidcPrompt_lower(_ value: OidcPrompt) -> RustBuffer } -extension OidcPrompt: 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 OtherState { +public enum OtherState: Equatable, Hashable { case policyRuleRoom case policyRuleServer @@ -32531,9 +30636,13 @@ public enum OtherState { case spaceParent case custom(eventType: String ) -} + + + +} + #if compiler(>=6) extension OtherState: Sendable {} #endif @@ -32722,15 +30831,8 @@ public func FfiConverterTypeOtherState_lower(_ value: OtherState) -> RustBuffer } -extension OtherState: Equatable, Hashable {} - - - - - - -public enum ParseError: Swift.Error { +public enum ParseError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -32756,8 +30858,21 @@ public enum ParseError: Swift.Error { case Other(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension ParseError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -32870,31 +30985,20 @@ public func FfiConverterTypeParseError_lower(_ value: ParseError) -> RustBuffer return FfiConverterTypeParseError.lower(value) } - -extension ParseError: Equatable, Hashable {} - - - - -extension ParseError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum PollKind { +public enum PollKind: Equatable, Hashable { case disclosed case undisclosed -} + + + +} + #if compiler(>=6) extension PollKind: Sendable {} #endif @@ -32948,17 +31052,10 @@ public func FfiConverterTypePollKind_lower(_ value: PollKind) -> RustBuffer { } -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 { +public enum PowerLevel: Equatable, Hashable { /** * The user is a room creator and has infinite power level. @@ -32971,9 +31068,13 @@ public enum PowerLevel { */ case value(value: Int64 ) -} + + + +} + #if compiler(>=6) extension PowerLevel: Sendable {} #endif @@ -33029,17 +31130,10 @@ public func FfiConverterTypePowerLevel_lower(_ value: PowerLevel) -> RustBuffer } -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. -public enum ProfileDetails { +public enum ProfileDetails: Equatable, Hashable { case unavailable case pending @@ -33047,9 +31141,13 @@ public enum ProfileDetails { ) case error(message: String ) -} + + + +} + #if compiler(>=6) extension ProfileDetails: Sendable {} #endif @@ -33121,26 +31219,23 @@ public func FfiConverterTypeProfileDetails_lower(_ value: ProfileDetails) -> Rus } -extension ProfileDetails: 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 PublicRoomJoinRule { +public enum PublicRoomJoinRule: Equatable, Hashable { case `public` case knock case restricted case knockRestricted case invite -} + + + +} + #if compiler(>=6) extension PublicRoomJoinRule: Sendable {} #endif @@ -33212,17 +31307,10 @@ public func FfiConverterTypePublicRoomJoinRule_lower(_ value: PublicRoomJoinRule } -extension PublicRoomJoinRule: 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 PushCondition { +public enum PushCondition: Equatable, Hashable { /** * A glob pattern match on a field of the event. @@ -33290,9 +31378,13 @@ public enum PushCondition { * The value to match against. */value: JsonValue ) -} + + + +} + #if compiler(>=6) extension PushCondition: Sendable {} #endif @@ -33384,22 +31476,19 @@ public func FfiConverterTypePushCondition_lower(_ value: PushCondition) -> RustB } -extension PushCondition: 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 PushFormat: Equatable, Hashable { + + case eventIdOnly -// Note that we don't yet support `indirect` for enums. -// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum PushFormat { - - case eventIdOnly } - #if compiler(>=6) extension PushFormat: Sendable {} #endif @@ -33447,24 +31536,21 @@ public func FfiConverterTypePushFormat_lower(_ value: PushFormat) -> RustBuffer } -extension PushFormat: 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 PusherKind { +public enum PusherKind: Equatable, Hashable { case http(data: HttpPusherData ) case email -} + + + +} + #if compiler(>=6) extension PusherKind: Sendable {} #endif @@ -33520,25 +31606,31 @@ public func FfiConverterTypePusherKind_lower(_ value: PusherKind) -> RustBuffer } -extension PusherKind: Equatable, Hashable {} - - - - - - /** * Error type for the decoding of the [`QrCodeData`]. */ -public enum QrCodeDecodeError: Swift.Error { +public enum QrCodeDecodeError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { case Crypto(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension QrCodeDecodeError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -33591,21 +31683,6 @@ public func FfiConverterTypeQrCodeDecodeError_lower(_ value: QrCodeDecodeError) return FfiConverterTypeQrCodeDecodeError.lower(value) } - -extension QrCodeDecodeError: Equatable, Hashable {} - - - - -extension QrCodeDecodeError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -33613,7 +31690,7 @@ extension QrCodeDecodeError: Foundation.LocalizedError { * generated on an existing device. */ -public enum QrLoginProgress { +public enum QrLoginProgress: Equatable, Hashable { /** * The login process is starting. @@ -33647,9 +31724,13 @@ public enum QrLoginProgress { * The login has successfully finished. */ case done -} + + + +} + #if compiler(>=6) extension QrLoginProgress: Sendable {} #endif @@ -33726,13 +31807,6 @@ public func FfiConverterTypeQrLoginProgress_lower(_ value: QrLoginProgress) -> R } -extension QrLoginProgress: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -33746,7 +31820,7 @@ extension QrLoginProgress: Equatable, Hashable {} * sending. If not the only solution is to delete the local event. */ -public enum QueueWedgeError { +public enum QueueWedgeError: Equatable, Hashable { /** * This error occurs when there are some insecure devices in the room, and @@ -33785,9 +31859,13 @@ public enum QueueWedgeError { */ case genericApiError(msg: String ) -} + + + +} + #if compiler(>=6) extension QueueWedgeError: Sendable {} #endif @@ -33873,27 +31951,24 @@ public func FfiConverterTypeQueueWedgeError_lower(_ value: QueueWedgeError) -> R } -extension QueueWedgeError: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * A [`TimelineItem`](super::TimelineItem) that doesn't correspond to an event. */ -public enum ReceiptType { +public enum ReceiptType: Equatable, Hashable { case read case readPrivate case fullyRead -} + + + +} + #if compiler(>=6) extension ReceiptType: Sendable {} #endif @@ -33953,15 +32028,8 @@ public func FfiConverterTypeReceiptType_lower(_ value: ReceiptType) -> RustBuffe } -extension ReceiptType: Equatable, Hashable {} - - - - - - -public enum RecoveryError: Swift.Error { +public enum RecoveryError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -33986,8 +32054,21 @@ public enum RecoveryError: Swift.Error { */ case Import(errorMessage: String ) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension RecoveryError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -34061,33 +32142,22 @@ public func FfiConverterTypeRecoveryError_lower(_ value: RecoveryError) -> RustB return FfiConverterTypeRecoveryError.lower(value) } - -extension RecoveryError: Equatable, Hashable {} - - - - -extension RecoveryError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum RecoveryState { +public enum RecoveryState: Equatable, Hashable { case unknown case enabled case disabled case incomplete -} + + + +} + #if compiler(>=6) extension RecoveryState: Sendable {} #endif @@ -34153,20 +32223,13 @@ public func FfiConverterTypeRecoveryState_lower(_ value: RecoveryState) -> RustB } -extension RecoveryState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Room account data events. */ -public enum RoomAccountDataEvent { +public enum RoomAccountDataEvent: Equatable, Hashable { /** * m.fully_read @@ -34197,9 +32260,13 @@ public enum RoomAccountDataEvent { * The current unread state. */unread: Bool ) -} + + + +} + #if compiler(>=6) extension RoomAccountDataEvent: Sendable {} #endif @@ -34273,20 +32340,13 @@ public func FfiConverterTypeRoomAccountDataEvent_lower(_ value: RoomAccountDataE } -extension RoomAccountDataEvent: 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 room account data events. */ -public enum RoomAccountDataEventType { +public enum RoomAccountDataEventType: Equatable, Hashable { /** * m.fully_read @@ -34304,9 +32364,13 @@ public enum RoomAccountDataEventType { * com.famedly.marked_unread */ case unstableMarkedUnread -} + + + +} + #if compiler(>=6) extension RoomAccountDataEventType: Sendable {} #endif @@ -34372,17 +32436,10 @@ public func FfiConverterTypeRoomAccountDataEventType_lower(_ value: RoomAccountD } -extension RoomAccountDataEventType: 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 RoomDirectorySearchEntryUpdate { +public enum RoomDirectorySearchEntryUpdate: Equatable, Hashable { case append(values: [RoomDescription] ) @@ -34403,9 +32460,13 @@ public enum RoomDirectorySearchEntryUpdate { ) case reset(values: [RoomDescription] ) -} + + + +} + #if compiler(>=6) extension RoomDirectorySearchEntryUpdate: Sendable {} #endif @@ -34531,15 +32592,8 @@ public func FfiConverterTypeRoomDirectorySearchEntryUpdate_lower(_ value: RoomDi } -extension RoomDirectorySearchEntryUpdate: Equatable, Hashable {} - - - - - - -public enum RoomError: Swift.Error { +public enum RoomError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -34557,8 +32611,21 @@ public enum RoomError: Swift.Error { case FailedSendingAttachment(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension RoomError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -34647,25 +32714,10 @@ public func FfiConverterTypeRoomError_lower(_ value: RoomError) -> RustBuffer { return FfiConverterTypeRoomError.lower(value) } - -extension RoomError: Equatable, Hashable {} - - - - -extension RoomError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum RoomHistoryVisibility { +public enum RoomHistoryVisibility: Equatable, Hashable { /** * Previous events are accessible to newly joined members from the point @@ -34700,9 +32752,13 @@ public enum RoomHistoryVisibility { */ case custom(value: String ) -} + + + +} + #if compiler(>=6) extension RoomHistoryVisibility: Sendable {} #endif @@ -34776,17 +32832,10 @@ public func FfiConverterTypeRoomHistoryVisibility_lower(_ value: RoomHistoryVisi } -extension RoomHistoryVisibility: 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 RoomListEntriesDynamicFilterKind { +public enum RoomListEntriesDynamicFilterKind: Equatable, Hashable { case all(filters: [RoomListEntriesDynamicFilterKind] ) @@ -34809,9 +32858,13 @@ public enum RoomListEntriesDynamicFilterKind { case fuzzyMatchRoomName(pattern: String ) case deduplicateVersions -} + + + +} + #if compiler(>=6) extension RoomListEntriesDynamicFilterKind: Sendable {} #endif @@ -34959,13 +33012,6 @@ public func FfiConverterTypeRoomListEntriesDynamicFilterKind_lower(_ value: Room } -extension RoomListEntriesDynamicFilterKind: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -34990,9 +33036,13 @@ public enum RoomListEntriesUpdate { ) case reset(values: [Room] ) -} + + + +} + #if compiler(>=6) extension RoomListEntriesUpdate: Sendable {} #endif @@ -35119,11 +33169,7 @@ public func FfiConverterTypeRoomListEntriesUpdate_lower(_ value: RoomListEntries - - - - -public enum RoomListError: Swift.Error { +public enum RoomListError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -35140,8 +33186,21 @@ public enum RoomListError: Swift.Error { ) case IncorrectRoomMembership(expected: [Membership], actual: Membership ) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension RoomListError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -35241,31 +33300,20 @@ public func FfiConverterTypeRoomListError_lower(_ value: RoomListError) -> RustB return FfiConverterTypeRoomListError.lower(value) } - -extension RoomListError: Equatable, Hashable {} - - - - -extension RoomListError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum RoomListFilterCategory { +public enum RoomListFilterCategory: Equatable, Hashable { case group case people -} + + + +} + #if compiler(>=6) extension RoomListFilterCategory: Sendable {} #endif @@ -35319,24 +33367,21 @@ public func FfiConverterTypeRoomListFilterCategory_lower(_ value: RoomListFilter } -extension RoomListFilterCategory: 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 RoomListLoadingState { +public enum RoomListLoadingState: Equatable, Hashable { case notLoaded case loaded(maximumNumberOfRooms: UInt32? ) -} + + + +} + #if compiler(>=6) extension RoomListLoadingState: Sendable {} #endif @@ -35392,17 +33437,10 @@ public func FfiConverterTypeRoomListLoadingState_lower(_ value: RoomListLoadingS } -extension RoomListLoadingState: 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 RoomListServiceState { +public enum RoomListServiceState: Equatable, Hashable { case initial case settingUp @@ -35410,9 +33448,13 @@ public enum RoomListServiceState { case running case error case terminated -} + + + +} + #if compiler(>=6) extension RoomListServiceState: Sendable {} #endif @@ -35490,23 +33532,20 @@ public func FfiConverterTypeRoomListServiceState_lower(_ value: RoomListServiceS } -extension RoomListServiceState: 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 RoomListServiceSyncIndicator { +public enum RoomListServiceSyncIndicator: Equatable, Hashable { case show case hide -} + + + +} + #if compiler(>=6) extension RoomListServiceSyncIndicator: Sendable {} #endif @@ -35560,13 +33599,6 @@ public func FfiConverterTypeRoomListServiceSyncIndicator_lower(_ value: RoomList } -extension RoomListServiceSyncIndicator: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -35577,7 +33609,7 @@ extension RoomListServiceSyncIndicator: Equatable, Hashable {} * learn more. */ -public enum RoomLoadSettings { +public enum RoomLoadSettings: Equatable, Hashable { /** * Load all rooms from the `StateStore` into the in-memory state store @@ -35593,9 +33625,13 @@ public enum RoomLoadSettings { */ case one(roomId: String ) -} + + + +} + #if compiler(>=6) extension RoomLoadSettings: Sendable {} #endif @@ -35651,17 +33687,10 @@ public func FfiConverterTypeRoomLoadSettings_lower(_ value: RoomLoadSettings) -> } -extension RoomLoadSettings: 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 RoomMessageEventMessageType { +public enum RoomMessageEventMessageType: Equatable, Hashable { case audio case emote @@ -35675,9 +33704,13 @@ public enum RoomMessageEventMessageType { case video case verificationRequest case other -} + + + +} + #if compiler(>=6) extension RoomMessageEventMessageType: Sendable {} #endif @@ -35791,20 +33824,13 @@ public func FfiConverterTypeRoomMessageEventMessageType_lower(_ value: RoomMessa } -extension RoomMessageEventMessageType: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Enum representing the push notification modes for a room. */ -public enum RoomNotificationMode { +public enum RoomNotificationMode: Equatable, Hashable { /** * Receive notifications for all messages. @@ -35818,9 +33844,13 @@ public enum RoomNotificationMode { * Do not receive any notifications. */ case mute -} + + + +} + #if compiler(>=6) extension RoomNotificationMode: Sendable {} #endif @@ -35880,17 +33910,10 @@ public func FfiConverterTypeRoomNotificationMode_lower(_ value: RoomNotification } -extension RoomNotificationMode: 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 RoomPreset { +public enum RoomPreset: Equatable, Hashable { /** * `join_rules` is set to `invite` and `history_visibility` is set to @@ -35907,9 +33930,13 @@ public enum RoomPreset { * as the creator. */ case trustedPrivateChat -} + + + +} + #if compiler(>=6) extension RoomPreset: Sendable {} #endif @@ -35969,13 +33996,6 @@ public func FfiConverterTypeRoomPreset_lower(_ value: RoomPreset) -> RustBuffer } -extension RoomPreset: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -36072,9 +34092,13 @@ public enum RoomSendQueueUpdate { * gallery item. */progress: AbstractProgress ) -} + + + +} + #if compiler(>=6) extension RoomSendQueueUpdate: Sendable {} #endif @@ -36178,17 +34202,13 @@ public func FfiConverterTypeRoomSendQueueUpdate_lower(_ value: RoomSendQueueUpda } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The type of room for a [`RoomPreviewInfo`]. */ -public enum RoomType { +public enum RoomType: Equatable, Hashable { /** * It's a plain chat room. @@ -36203,9 +34223,13 @@ public enum RoomType { */ case custom(value: String ) -} + + + +} + #if compiler(>=6) extension RoomType: Sendable {} #endif @@ -36267,17 +34291,10 @@ public func FfiConverterTypeRoomType_lower(_ value: RoomType) -> RustBuffer { } -extension RoomType: 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 RoomVisibility { +public enum RoomVisibility: Equatable, Hashable { /** * Indicates that the room will be shown in the published room list. @@ -36292,9 +34309,13 @@ public enum RoomVisibility { */ case custom(value: String ) -} + + + +} + #if compiler(>=6) extension RoomVisibility: Sendable {} #endif @@ -36356,23 +34377,20 @@ public func FfiConverterTypeRoomVisibility_lower(_ value: RoomVisibility) -> Rus } -extension RoomVisibility: 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 RtcNotificationType { +public enum RtcNotificationType: Equatable, Hashable { case ring case notification -} + + + +} + #if compiler(>=6) extension RtcNotificationType: Sendable {} #endif @@ -36426,17 +34444,10 @@ public func FfiConverterTypeRtcNotificationType_lower(_ value: RtcNotificationTy } -extension RtcNotificationType: 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 RuleKind { +public enum RuleKind: Equatable, Hashable { /** * User-configured rules that override all other kinds. @@ -36460,9 +34471,13 @@ public enum RuleKind { case content case custom(value: String ) -} + + + +} + #if compiler(>=6) extension RuleKind: Sendable {} #endif @@ -36542,20 +34557,13 @@ public func FfiConverterTypeRuleKind_lower(_ value: RuleKind) -> RustBuffer { } -extension RuleKind: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * An algorithm and its properties, used to encrypt a secret. */ -public enum SecretStorageEncryptionAlgorithm { +public enum SecretStorageEncryptionAlgorithm: Equatable, Hashable { /** * Encrypted using the `m.secret_storage.v1.aes-hmac-sha2` algorithm. @@ -36565,9 +34573,13 @@ public enum SecretStorageEncryptionAlgorithm { */ case v1AesHmacSha2(properties: SecretStorageV1AesHmacSha2Properties ) -} + + + +} + #if compiler(>=6) extension SecretStorageEncryptionAlgorithm: Sendable {} #endif @@ -36617,13 +34629,6 @@ public func FfiConverterTypeSecretStorageEncryptionAlgorithm_lower(_ value: Secr } -extension SecretStorageEncryptionAlgorithm: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -36633,9 +34638,13 @@ public enum SessionVerificationData { ) case decimals(values: [UInt16] ) -} + + + +} + #if compiler(>=6) extension SessionVerificationData: Sendable {} #endif @@ -36694,10 +34703,6 @@ public func FfiConverterTypeSessionVerificationData_lower(_ value: SessionVerifi } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -36705,7 +34710,7 @@ public func FfiConverterTypeSessionVerificationData_lower(_ value: SessionVerifi * authenticity properties. */ -public enum ShieldState { +public enum ShieldState: Equatable, Hashable { /** * A red shield with a tooltip containing the associated message should be @@ -36723,9 +34728,13 @@ public enum ShieldState { * No shield should be presented. */ case none -} + + + +} + #if compiler(>=6) extension ShieldState: Sendable {} #endif @@ -36791,23 +34800,20 @@ public func FfiConverterTypeShieldState_lower(_ value: ShieldState) -> RustBuffe } -extension ShieldState: 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 SlidingSyncVersion { +public enum SlidingSyncVersion: Equatable, Hashable { case none case native -} + + + +} + #if compiler(>=6) extension SlidingSyncVersion: Sendable {} #endif @@ -36861,24 +34867,21 @@ public func FfiConverterTypeSlidingSyncVersion_lower(_ value: SlidingSyncVersion } -extension SlidingSyncVersion: 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 SlidingSyncVersionBuilder { +public enum SlidingSyncVersionBuilder: Equatable, Hashable { case none case native case discoverNative -} + + + +} + #if compiler(>=6) extension SlidingSyncVersionBuilder: Sendable {} #endif @@ -36938,17 +34941,10 @@ public func FfiConverterTypeSlidingSyncVersionBuilder_lower(_ value: SlidingSync } -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 { +public enum SpaceListUpdate: Equatable, Hashable { case append(values: [SpaceRoom] ) @@ -36969,9 +34965,13 @@ public enum SpaceListUpdate { ) case reset(values: [SpaceRoom] ) -} + + + +} + #if compiler(>=6) extension SpaceListUpdate: Sendable {} #endif @@ -37097,15 +35097,8 @@ public func FfiConverterTypeSpaceListUpdate_lower(_ value: SpaceListUpdate) -> R } -extension SpaceListUpdate: Equatable, Hashable {} - - - - - - -public enum SsoError: Swift.Error { +public enum SsoError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -37115,8 +35108,21 @@ public enum SsoError: Swift.Error { case Generic(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension SsoError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -37181,25 +35187,10 @@ public func FfiConverterTypeSsoError_lower(_ value: SsoError) -> RustBuffer { return FfiConverterTypeSsoError.lower(value) } - -extension SsoError: Equatable, Hashable {} - - - - -extension SsoError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum StateEventContent { +public enum StateEventContent: Equatable, Hashable { case policyRuleRoom case policyRuleServer @@ -37224,9 +35215,13 @@ public enum StateEventContent { ) case spaceChild case spaceParent -} + + + +} + #if compiler(>=6) extension StateEventContent: Sendable {} #endif @@ -37399,17 +35394,10 @@ public func FfiConverterTypeStateEventContent_lower(_ value: StateEventContent) } -extension StateEventContent: 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 StateEventType { +public enum StateEventType: Equatable, Hashable { case callMember case policyRuleRoom @@ -37433,9 +35421,13 @@ public enum StateEventType { case roomTopic case spaceChild case spaceParent -} + + + +} + #if compiler(>=6) extension StateEventType: Sendable {} #endif @@ -37609,15 +35601,8 @@ public func FfiConverterTypeStateEventType_lower(_ value: StateEventType) -> Rus } -extension StateEventType: Equatable, Hashable {} - - - - - - -public enum SteadyStateError: Swift.Error { +public enum SteadyStateError: Swift.Error, Equatable, Hashable, Foundation.LocalizedError { @@ -37627,8 +35612,21 @@ public enum SteadyStateError: Swift.Error { case Lagged(message: String) + + + + + + + public var errorDescription: String? { + String(reflecting: self) + } + } +#if compiler(>=6) +extension SteadyStateError: Sendable {} +#endif #if swift(>=5.8) @_documentation(visibility: private) @@ -37693,34 +35691,23 @@ public func FfiConverterTypeSteadyStateError_lower(_ value: SteadyStateError) -> return FfiConverterTypeSteadyStateError.lower(value) } - -extension SteadyStateError: Equatable, Hashable {} - - - - -extension SteadyStateError: Foundation.LocalizedError { - public var errorDescription: String? { - String(reflecting: self) - } -} - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum SyncServiceState { +public enum SyncServiceState: Equatable, Hashable { case idle case running case terminated case error case offline -} + + + +} + #if compiler(>=6) extension SyncServiceState: Sendable {} #endif @@ -37792,20 +35779,13 @@ public func FfiConverterTypeSyncServiceState_lower(_ value: SyncServiceState) -> } -extension SyncServiceState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The name of a tag. */ -public enum TagName { +public enum TagName: Equatable, Hashable { /** * `m.favourite`: The user's favorite rooms. @@ -37825,9 +35805,13 @@ public enum TagName { */ case user(name: UserTagName ) -} + + + +} + #if compiler(>=6) extension TagName: Sendable {} #endif @@ -37895,13 +35879,6 @@ public func FfiConverterTypeTagName_lower(_ value: TagName) -> RustBuffer { } -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. @@ -37926,9 +35903,13 @@ public enum TimelineDiff { ) case reset(values: [TimelineItem] ) -} + + + +} + #if compiler(>=6) extension TimelineDiff: Sendable {} #endif @@ -38054,10 +36035,6 @@ public func FfiConverterTypeTimelineDiff_lower(_ value: TimelineDiff) -> RustBuf } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -38067,9 +36044,13 @@ public enum TimelineEventType { ) case state(content: StateEventContent ) -} + + + +} + #if compiler(>=6) extension TimelineEventType: Sendable {} #endif @@ -38127,10 +36108,6 @@ public func FfiConverterTypeTimelineEventType_lower(_ value: TimelineEventType) } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -38154,9 +36131,13 @@ public enum TimelineFilter { */ case eventTypeFilter(filter: TimelineEventTypeFilter ) -} + + + +} + #if compiler(>=6) extension TimelineFilter: Sendable {} #endif @@ -38220,14 +36201,10 @@ public func FfiConverterTypeTimelineFilter_lower(_ value: TimelineFilter) -> Rus } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. -public enum TimelineFocus { +public enum TimelineFocus: Equatable, Hashable { case live( /** @@ -38253,9 +36230,13 @@ public enum TimelineFocus { ) case pinnedEvents(maxEventsToLoad: UInt16, maxConcurrentRequests: UInt16 ) -} + + + +} + #if compiler(>=6) extension TimelineFocus: Sendable {} #endif @@ -38332,13 +36313,6 @@ public func FfiConverterTypeTimelineFocus_lower(_ value: TimelineFocus) -> RustB } -extension TimelineFocus: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. @@ -38358,9 +36332,13 @@ public enum TimelineItemContent { ) case failedToParseState(eventType: String, stateKey: String, error: String ) -} + + + +} + #if compiler(>=6) extension TimelineItemContent: Sendable {} #endif @@ -38472,10 +36450,6 @@ public func FfiConverterTypeTimelineItemContent_lower(_ value: TimelineItemConte } - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** @@ -38483,7 +36457,7 @@ public func FfiConverterTypeTimelineItemContent_lower(_ value: TimelineItemConte * log targets at once, for debugging purposes. */ -public enum TraceLogPacks { +public enum TraceLogPacks: Equatable, Hashable { /** * Enables all the logs relevant to the event cache. @@ -38505,9 +36479,13 @@ public enum TraceLogPacks { * Enables all the logs relevant to sync profiling. */ case syncProfiling -} + + + +} + #if compiler(>=6) extension TraceLogPacks: Sendable {} #endif @@ -38579,20 +36557,13 @@ public func FfiConverterTypeTraceLogPacks_lower(_ value: TraceLogPacks) -> RustB } -extension TraceLogPacks: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Enum representing the push notification tweaks for a rule. */ -public enum Tweak { +public enum Tweak: Equatable, Hashable { /** * A string representing the sound to be played when this notification @@ -38620,9 +36591,13 @@ public enum Tweak { * The value of the custom tweak as an encoded JSON string */value: String ) -} + + + +} + #if compiler(>=6) extension Tweak: Sendable {} #endif @@ -38689,20 +36664,13 @@ public func FfiConverterTypeTweak_lower(_ value: Tweak) -> RustBuffer { } -extension Tweak: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * A source for uploading a file */ -public enum UploadSource { +public enum UploadSource: Equatable, Hashable { /** * Upload source is a file on disk @@ -38723,9 +36691,13 @@ public enum UploadSource { * Filename to associate with bytes */filename: String ) -} + + + +} + #if compiler(>=6) extension UploadSource: Sendable {} #endif @@ -38784,24 +36756,21 @@ public func FfiConverterTypeUploadSource_lower(_ value: UploadSource) -> RustBuf } -extension UploadSource: 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 VerificationState { +public enum VerificationState: Equatable, Hashable { case unknown case verified case unverified -} + + + +} + #if compiler(>=6) extension VerificationState: Sendable {} #endif @@ -38861,20 +36830,13 @@ public func FfiConverterTypeVerificationState_lower(_ value: VerificationState) } -extension VerificationState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * A [`TimelineItem`](super::TimelineItem) that doesn't correspond to an event. */ -public enum VirtualTimelineItem { +public enum VirtualTimelineItem: Equatable, Hashable { /** * A divider between messages of different day or month depending on @@ -38894,9 +36856,13 @@ public enum VirtualTimelineItem { * The timeline start, that is, the *oldest* event in time for that room. */ case timelineStart -} + + + +} + #if compiler(>=6) extension VirtualTimelineItem: Sendable {} #endif @@ -38958,20 +36924,13 @@ public func FfiConverterTypeVirtualTimelineItem_lower(_ value: VirtualTimelineIt } -extension VirtualTimelineItem: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * Different kinds of filters that could be applied to the timeline events. */ -public enum WidgetEventFilter { +public enum WidgetEventFilter: Equatable, Hashable { /** * Matches message-like events with the given `type`. @@ -38998,9 +36957,13 @@ public enum WidgetEventFilter { */ case toDevice(eventType: String ) -} + + + +} + #if compiler(>=6) extension WidgetEventFilter: Sendable {} #endif @@ -39083,13 +37046,6 @@ public func FfiConverterTypeWidgetEventFilter_lower(_ value: WidgetEventFilter) } -extension WidgetEventFilter: Equatable, Hashable {} - - - - - - @@ -39115,6 +37071,20 @@ fileprivate struct UniffiCallbackInterfaceAccountDataListener { // 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: [UniffiVTableCallbackInterfaceAccountDataListener] = [UniffiVTableCallbackInterfaceAccountDataListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceAccountDataListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface AccountDataListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceAccountDataListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface AccountDataListener: handle missing in uniffiClone") + } + }, onChange: { ( uniffiHandle: UInt64, event: RustBuffer, @@ -39138,12 +37108,6 @@ fileprivate struct UniffiCallbackInterfaceAccountDataListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceAccountDataListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface AccountDataListener: handle missing in uniffiFree") - } } )] } @@ -39231,6 +37195,20 @@ fileprivate struct UniffiCallbackInterfaceBackupStateListener { // 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: [UniffiVTableCallbackInterfaceBackupStateListener] = [UniffiVTableCallbackInterfaceBackupStateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceBackupStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface BackupStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceBackupStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface BackupStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, status: RustBuffer, @@ -39254,12 +37232,6 @@ fileprivate struct UniffiCallbackInterfaceBackupStateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceBackupStateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface BackupStateListener: handle missing in uniffiFree") - } } )] } @@ -39347,6 +37319,20 @@ fileprivate struct UniffiCallbackInterfaceBackupSteadyStateListener { // 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: [UniffiVTableCallbackInterfaceBackupSteadyStateListener] = [UniffiVTableCallbackInterfaceBackupSteadyStateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceBackupSteadyStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface BackupSteadyStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceBackupSteadyStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface BackupSteadyStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, status: RustBuffer, @@ -39370,12 +37356,6 @@ fileprivate struct UniffiCallbackInterfaceBackupSteadyStateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceBackupSteadyStateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface BackupSteadyStateListener: handle missing in uniffiFree") - } } )] } @@ -39466,6 +37446,20 @@ fileprivate struct UniffiCallbackInterfaceCallDeclineListener { // 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: [UniffiVTableCallbackInterfaceCallDeclineListener] = [UniffiVTableCallbackInterfaceCallDeclineListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceCallDeclineListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface CallDeclineListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceCallDeclineListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface CallDeclineListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, declinerUserId: RustBuffer, @@ -39489,12 +37483,6 @@ fileprivate struct UniffiCallbackInterfaceCallDeclineListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceCallDeclineListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface CallDeclineListener: handle missing in uniffiFree") - } } )] } @@ -39582,6 +37570,20 @@ fileprivate struct UniffiCallbackInterfaceClientDelegate { // 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: [UniffiVTableCallbackInterfaceClientDelegate] = [UniffiVTableCallbackInterfaceClientDelegate( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceClientDelegate.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface ClientDelegate: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceClientDelegate.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface ClientDelegate: handle missing in uniffiClone") + } + }, didReceiveAuthError: { ( uniffiHandle: UInt64, isSoftLogout: Int8, @@ -39605,12 +37607,6 @@ fileprivate struct UniffiCallbackInterfaceClientDelegate { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceClientDelegate.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface ClientDelegate: handle missing in uniffiFree") - } } )] } @@ -39700,6 +37696,20 @@ fileprivate struct UniffiCallbackInterfaceClientSessionDelegate { // 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: [UniffiVTableCallbackInterfaceClientSessionDelegate] = [UniffiVTableCallbackInterfaceClientSessionDelegate( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceClientSessionDelegate.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface ClientSessionDelegate: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceClientSessionDelegate.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface ClientSessionDelegate: handle missing in uniffiClone") + } + }, retrieveSessionFromKeychain: { ( uniffiHandle: UInt64, userId: RustBuffer, @@ -39748,12 +37758,6 @@ fileprivate struct UniffiCallbackInterfaceClientSessionDelegate { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceClientSessionDelegate.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface ClientSessionDelegate: handle missing in uniffiFree") - } } )] } @@ -39841,6 +37845,20 @@ fileprivate struct UniffiCallbackInterfaceEnableRecoveryProgressListener { // 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: [UniffiVTableCallbackInterfaceEnableRecoveryProgressListener] = [UniffiVTableCallbackInterfaceEnableRecoveryProgressListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceEnableRecoveryProgressListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface EnableRecoveryProgressListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceEnableRecoveryProgressListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface EnableRecoveryProgressListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, status: RustBuffer, @@ -39864,12 +37882,6 @@ fileprivate struct UniffiCallbackInterfaceEnableRecoveryProgressListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceEnableRecoveryProgressListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface EnableRecoveryProgressListener: handle missing in uniffiFree") - } } )] } @@ -39957,6 +37969,20 @@ fileprivate struct UniffiCallbackInterfaceGeneratedQrLoginProgressListener { // 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: [UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener] = [UniffiVTableCallbackInterfaceGeneratedQrLoginProgressListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceGeneratedQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface GeneratedQrLoginProgressListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceGeneratedQrLoginProgressListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface GeneratedQrLoginProgressListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -39980,12 +38006,6 @@ fileprivate struct UniffiCallbackInterfaceGeneratedQrLoginProgressListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceGeneratedQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface GeneratedQrLoginProgressListener: handle missing in uniffiFree") - } } )] } @@ -40073,6 +38093,20 @@ fileprivate struct UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListener // 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: [UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener] = [UniffiVTableCallbackInterfaceGrantGeneratedQrLoginProgressListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceGrantGeneratedQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface GrantGeneratedQrLoginProgressListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceGrantGeneratedQrLoginProgressListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface GrantGeneratedQrLoginProgressListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -40096,12 +38130,6 @@ fileprivate struct UniffiCallbackInterfaceGrantGeneratedQrLoginProgressListener makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceGrantGeneratedQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface GrantGeneratedQrLoginProgressListener: handle missing in uniffiFree") - } } )] } @@ -40189,6 +38217,20 @@ fileprivate struct UniffiCallbackInterfaceGrantQrLoginProgressListener { // 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: [UniffiVTableCallbackInterfaceGrantQrLoginProgressListener] = [UniffiVTableCallbackInterfaceGrantQrLoginProgressListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceGrantQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface GrantQrLoginProgressListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceGrantQrLoginProgressListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface GrantQrLoginProgressListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -40212,12 +38254,6 @@ fileprivate struct UniffiCallbackInterfaceGrantQrLoginProgressListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceGrantQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface GrantQrLoginProgressListener: handle missing in uniffiFree") - } } )] } @@ -40305,6 +38341,20 @@ fileprivate struct UniffiCallbackInterfaceIdentityStatusChangeListener { // 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: [UniffiVTableCallbackInterfaceIdentityStatusChangeListener] = [UniffiVTableCallbackInterfaceIdentityStatusChangeListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceIdentityStatusChangeListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface IdentityStatusChangeListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceIdentityStatusChangeListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface IdentityStatusChangeListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, identityStatusChange: RustBuffer, @@ -40328,12 +38378,6 @@ fileprivate struct UniffiCallbackInterfaceIdentityStatusChangeListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceIdentityStatusChangeListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface IdentityStatusChangeListener: handle missing in uniffiFree") - } } )] } @@ -40421,6 +38465,20 @@ fileprivate struct UniffiCallbackInterfaceIgnoredUsersListener { // 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: [UniffiVTableCallbackInterfaceIgnoredUsersListener] = [UniffiVTableCallbackInterfaceIgnoredUsersListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceIgnoredUsersListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface IgnoredUsersListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceIgnoredUsersListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface IgnoredUsersListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, ignoredUserIds: RustBuffer, @@ -40444,12 +38502,6 @@ fileprivate struct UniffiCallbackInterfaceIgnoredUsersListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceIgnoredUsersListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface IgnoredUsersListener: handle missing in uniffiFree") - } } )] } @@ -40540,6 +38592,20 @@ fileprivate struct UniffiCallbackInterfaceKnockRequestsListener { // 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: [UniffiVTableCallbackInterfaceKnockRequestsListener] = [UniffiVTableCallbackInterfaceKnockRequestsListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceKnockRequestsListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface KnockRequestsListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceKnockRequestsListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface KnockRequestsListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, joinRequests: RustBuffer, @@ -40563,12 +38629,6 @@ fileprivate struct UniffiCallbackInterfaceKnockRequestsListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceKnockRequestsListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface KnockRequestsListener: handle missing in uniffiFree") - } } )] } @@ -40659,6 +38719,20 @@ fileprivate struct UniffiCallbackInterfaceLiveLocationShareListener { // 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: [UniffiVTableCallbackInterfaceLiveLocationShareListener] = [UniffiVTableCallbackInterfaceLiveLocationShareListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceLiveLocationShareListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface LiveLocationShareListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceLiveLocationShareListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface LiveLocationShareListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, liveLocationShares: RustBuffer, @@ -40682,12 +38756,6 @@ fileprivate struct UniffiCallbackInterfaceLiveLocationShareListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceLiveLocationShareListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface LiveLocationShareListener: handle missing in uniffiFree") - } } )] } @@ -40775,6 +38843,20 @@ fileprivate struct UniffiCallbackInterfaceMediaPreviewConfigListener { // 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: [UniffiVTableCallbackInterfaceMediaPreviewConfigListener] = [UniffiVTableCallbackInterfaceMediaPreviewConfigListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceMediaPreviewConfigListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface MediaPreviewConfigListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceMediaPreviewConfigListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface MediaPreviewConfigListener: handle missing in uniffiClone") + } + }, onChange: { ( uniffiHandle: UInt64, mediaPreviewConfig: RustBuffer, @@ -40798,12 +38880,6 @@ fileprivate struct UniffiCallbackInterfaceMediaPreviewConfigListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceMediaPreviewConfigListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface MediaPreviewConfigListener: handle missing in uniffiFree") - } } )] } @@ -40894,6 +38970,20 @@ fileprivate struct UniffiCallbackInterfaceNotificationSettingsDelegate { // 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: [UniffiVTableCallbackInterfaceNotificationSettingsDelegate] = [UniffiVTableCallbackInterfaceNotificationSettingsDelegate( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceNotificationSettingsDelegate.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface NotificationSettingsDelegate: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceNotificationSettingsDelegate.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface NotificationSettingsDelegate: handle missing in uniffiClone") + } + }, settingsDidChange: { ( uniffiHandle: UInt64, uniffiOutReturn: UnsafeMutableRawPointer, @@ -40915,12 +39005,6 @@ fileprivate struct UniffiCallbackInterfaceNotificationSettingsDelegate { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceNotificationSettingsDelegate.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface NotificationSettingsDelegate: handle missing in uniffiFree") - } } )] } @@ -41008,6 +39092,20 @@ fileprivate struct UniffiCallbackInterfacePaginationStatusListener { // 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: [UniffiVTableCallbackInterfacePaginationStatusListener] = [UniffiVTableCallbackInterfacePaginationStatusListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfacePaginationStatusListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface PaginationStatusListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfacePaginationStatusListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface PaginationStatusListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, status: RustBuffer, @@ -41031,12 +39129,6 @@ fileprivate struct UniffiCallbackInterfacePaginationStatusListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfacePaginationStatusListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface PaginationStatusListener: handle missing in uniffiFree") - } } )] } @@ -41124,6 +39216,20 @@ fileprivate struct UniffiCallbackInterfaceProgressWatcher { // 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: [UniffiVTableCallbackInterfaceProgressWatcher] = [UniffiVTableCallbackInterfaceProgressWatcher( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceProgressWatcher.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface ProgressWatcher: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceProgressWatcher.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface ProgressWatcher: handle missing in uniffiClone") + } + }, transmissionProgress: { ( uniffiHandle: UInt64, progress: RustBuffer, @@ -41147,12 +39253,6 @@ fileprivate struct UniffiCallbackInterfaceProgressWatcher { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceProgressWatcher.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface ProgressWatcher: handle missing in uniffiFree") - } } )] } @@ -41240,6 +39340,20 @@ fileprivate struct UniffiCallbackInterfaceQrLoginProgressListener { // 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: [UniffiVTableCallbackInterfaceQrLoginProgressListener] = [UniffiVTableCallbackInterfaceQrLoginProgressListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface QrLoginProgressListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceQrLoginProgressListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface QrLoginProgressListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -41263,12 +39377,6 @@ fileprivate struct UniffiCallbackInterfaceQrLoginProgressListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceQrLoginProgressListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface QrLoginProgressListener: handle missing in uniffiFree") - } } )] } @@ -41356,6 +39464,20 @@ fileprivate struct UniffiCallbackInterfaceRecoveryStateListener { // 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: [UniffiVTableCallbackInterfaceRecoveryStateListener] = [UniffiVTableCallbackInterfaceRecoveryStateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRecoveryStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RecoveryStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRecoveryStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RecoveryStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, status: RustBuffer, @@ -41379,12 +39501,6 @@ fileprivate struct UniffiCallbackInterfaceRecoveryStateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRecoveryStateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RecoveryStateListener: handle missing in uniffiFree") - } } )] } @@ -41478,6 +39594,20 @@ fileprivate struct UniffiCallbackInterfaceRoomAccountDataListener { // 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: [UniffiVTableCallbackInterfaceRoomAccountDataListener] = [UniffiVTableCallbackInterfaceRoomAccountDataListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomAccountDataListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomAccountDataListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomAccountDataListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomAccountDataListener: handle missing in uniffiClone") + } + }, onChange: { ( uniffiHandle: UInt64, event: RustBuffer, @@ -41503,12 +39633,6 @@ fileprivate struct UniffiCallbackInterfaceRoomAccountDataListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomAccountDataListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomAccountDataListener: handle missing in uniffiFree") - } } )] } @@ -41596,6 +39720,20 @@ fileprivate struct UniffiCallbackInterfaceRoomDirectorySearchEntriesListener { // 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: [UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener] = [UniffiVTableCallbackInterfaceRoomDirectorySearchEntriesListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomDirectorySearchEntriesListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomDirectorySearchEntriesListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomDirectorySearchEntriesListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomDirectorySearchEntriesListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, roomEntriesUpdate: RustBuffer, @@ -41619,12 +39757,6 @@ fileprivate struct UniffiCallbackInterfaceRoomDirectorySearchEntriesListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomDirectorySearchEntriesListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomDirectorySearchEntriesListener: handle missing in uniffiFree") - } } )] } @@ -41712,6 +39844,20 @@ fileprivate struct UniffiCallbackInterfaceRoomInfoListener { // 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: [UniffiVTableCallbackInterfaceRoomInfoListener] = [UniffiVTableCallbackInterfaceRoomInfoListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomInfoListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomInfoListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomInfoListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomInfoListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, roomInfo: RustBuffer, @@ -41735,12 +39881,6 @@ fileprivate struct UniffiCallbackInterfaceRoomInfoListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomInfoListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomInfoListener: handle missing in uniffiFree") - } } )] } @@ -41828,6 +39968,20 @@ fileprivate struct UniffiCallbackInterfaceRoomListEntriesListener { // 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: [UniffiVTableCallbackInterfaceRoomListEntriesListener] = [UniffiVTableCallbackInterfaceRoomListEntriesListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomListEntriesListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomListEntriesListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomListEntriesListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomListEntriesListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, roomEntriesUpdate: RustBuffer, @@ -41851,12 +40005,6 @@ fileprivate struct UniffiCallbackInterfaceRoomListEntriesListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomListEntriesListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomListEntriesListener: handle missing in uniffiFree") - } } )] } @@ -41944,6 +40092,20 @@ fileprivate struct UniffiCallbackInterfaceRoomListLoadingStateListener { // 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: [UniffiVTableCallbackInterfaceRoomListLoadingStateListener] = [UniffiVTableCallbackInterfaceRoomListLoadingStateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomListLoadingStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomListLoadingStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomListLoadingStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomListLoadingStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -41967,12 +40129,6 @@ fileprivate struct UniffiCallbackInterfaceRoomListLoadingStateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomListLoadingStateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomListLoadingStateListener: handle missing in uniffiFree") - } } )] } @@ -42060,6 +40216,20 @@ fileprivate struct UniffiCallbackInterfaceRoomListServiceStateListener { // 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: [UniffiVTableCallbackInterfaceRoomListServiceStateListener] = [UniffiVTableCallbackInterfaceRoomListServiceStateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomListServiceStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomListServiceStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomListServiceStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomListServiceStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -42083,12 +40253,6 @@ fileprivate struct UniffiCallbackInterfaceRoomListServiceStateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomListServiceStateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomListServiceStateListener: handle missing in uniffiFree") - } } )] } @@ -42176,6 +40340,20 @@ fileprivate struct UniffiCallbackInterfaceRoomListServiceSyncIndicatorListener { // 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: [UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener] = [UniffiVTableCallbackInterfaceRoomListServiceSyncIndicatorListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceRoomListServiceSyncIndicatorListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface RoomListServiceSyncIndicatorListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceRoomListServiceSyncIndicatorListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface RoomListServiceSyncIndicatorListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, syncIndicator: RustBuffer, @@ -42199,12 +40377,6 @@ fileprivate struct UniffiCallbackInterfaceRoomListServiceSyncIndicatorListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceRoomListServiceSyncIndicatorListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface RoomListServiceSyncIndicatorListener: handle missing in uniffiFree") - } } )] } @@ -42299,6 +40471,20 @@ fileprivate struct UniffiCallbackInterfaceSendQueueListener { // 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: [UniffiVTableCallbackInterfaceSendQueueListener] = [UniffiVTableCallbackInterfaceSendQueueListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSendQueueListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SendQueueListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSendQueueListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SendQueueListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, update: RustBuffer, @@ -42322,12 +40508,6 @@ fileprivate struct UniffiCallbackInterfaceSendQueueListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSendQueueListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SendQueueListener: handle missing in uniffiFree") - } } )] } @@ -42422,6 +40602,20 @@ fileprivate struct UniffiCallbackInterfaceSendQueueRoomErrorListener { // 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: [UniffiVTableCallbackInterfaceSendQueueRoomErrorListener] = [UniffiVTableCallbackInterfaceSendQueueRoomErrorListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSendQueueRoomErrorListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SendQueueRoomErrorListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSendQueueRoomErrorListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SendQueueRoomErrorListener: handle missing in uniffiClone") + } + }, onError: { ( uniffiHandle: UInt64, roomId: RustBuffer, @@ -42447,12 +40641,6 @@ fileprivate struct UniffiCallbackInterfaceSendQueueRoomErrorListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSendQueueRoomErrorListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SendQueueRoomErrorListener: handle missing in uniffiFree") - } } )] } @@ -42546,6 +40734,20 @@ fileprivate struct UniffiCallbackInterfaceSendQueueRoomUpdateListener { // 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: [UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener] = [UniffiVTableCallbackInterfaceSendQueueRoomUpdateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSendQueueRoomUpdateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SendQueueRoomUpdateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSendQueueRoomUpdateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SendQueueRoomUpdateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, roomId: RustBuffer, @@ -42571,12 +40773,6 @@ fileprivate struct UniffiCallbackInterfaceSendQueueRoomUpdateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSendQueueRoomUpdateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SendQueueRoomUpdateListener: handle missing in uniffiFree") - } } )] } @@ -42676,6 +40872,20 @@ fileprivate struct UniffiCallbackInterfaceSessionVerificationControllerDelegate // 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: [UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate] = [UniffiVTableCallbackInterfaceSessionVerificationControllerDelegate( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSessionVerificationControllerDelegate.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SessionVerificationControllerDelegate: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSessionVerificationControllerDelegate.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SessionVerificationControllerDelegate: handle missing in uniffiClone") + } + }, didReceiveVerificationRequest: { ( uniffiHandle: UInt64, details: RustBuffer, @@ -42833,12 +41043,6 @@ fileprivate struct UniffiCallbackInterfaceSessionVerificationControllerDelegate makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSessionVerificationControllerDelegate.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SessionVerificationControllerDelegate: handle missing in uniffiFree") - } } )] } @@ -42926,6 +41130,20 @@ fileprivate struct UniffiCallbackInterfaceSpaceRoomListEntriesListener { // 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( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSpaceRoomListEntriesListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SpaceRoomListEntriesListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSpaceRoomListEntriesListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SpaceRoomListEntriesListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, rooms: RustBuffer, @@ -42949,12 +41167,6 @@ fileprivate struct UniffiCallbackInterfaceSpaceRoomListEntriesListener { 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") - } } )] } @@ -43042,6 +41254,20 @@ fileprivate struct UniffiCallbackInterfaceSpaceRoomListPaginationStateListener { // 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( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SpaceRoomListPaginationStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSpaceRoomListPaginationStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SpaceRoomListPaginationStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, paginationState: RustBuffer, @@ -43065,12 +41291,6 @@ fileprivate struct UniffiCallbackInterfaceSpaceRoomListPaginationStateListener { 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") - } } )] } @@ -43158,6 +41378,20 @@ fileprivate struct UniffiCallbackInterfaceSpaceRoomListSpaceListener { // 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: [UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener] = [UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSpaceRoomListSpaceListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SpaceRoomListSpaceListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSpaceRoomListSpaceListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SpaceRoomListSpaceListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, space: RustBuffer, @@ -43181,12 +41415,6 @@ fileprivate struct UniffiCallbackInterfaceSpaceRoomListSpaceListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSpaceRoomListSpaceListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SpaceRoomListSpaceListener: handle missing in uniffiFree") - } } )] } @@ -43274,6 +41502,20 @@ fileprivate struct UniffiCallbackInterfaceSpaceServiceJoinedSpacesListener { // 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( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SpaceServiceJoinedSpacesListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSpaceServiceJoinedSpacesListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SpaceServiceJoinedSpacesListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, roomUpdates: RustBuffer, @@ -43297,12 +41539,6 @@ fileprivate struct UniffiCallbackInterfaceSpaceServiceJoinedSpacesListener { 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") - } } )] } @@ -43399,6 +41635,20 @@ fileprivate struct UniffiCallbackInterfaceSyncNotificationListener { // 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: [UniffiVTableCallbackInterfaceSyncNotificationListener] = [UniffiVTableCallbackInterfaceSyncNotificationListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSyncNotificationListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SyncNotificationListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSyncNotificationListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SyncNotificationListener: handle missing in uniffiClone") + } + }, onNotification: { ( uniffiHandle: UInt64, notification: RustBuffer, @@ -43424,12 +41674,6 @@ fileprivate struct UniffiCallbackInterfaceSyncNotificationListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSyncNotificationListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SyncNotificationListener: handle missing in uniffiFree") - } } )] } @@ -43517,6 +41761,20 @@ fileprivate struct UniffiCallbackInterfaceSyncServiceStateObserver { // 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: [UniffiVTableCallbackInterfaceSyncServiceStateObserver] = [UniffiVTableCallbackInterfaceSyncServiceStateObserver( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceSyncServiceStateObserver.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface SyncServiceStateObserver: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceSyncServiceStateObserver.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface SyncServiceStateObserver: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, state: RustBuffer, @@ -43540,12 +41798,6 @@ fileprivate struct UniffiCallbackInterfaceSyncServiceStateObserver { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceSyncServiceStateObserver.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface SyncServiceStateObserver: handle missing in uniffiFree") - } } )] } @@ -43633,6 +41885,20 @@ fileprivate struct UniffiCallbackInterfaceTimelineListener { // 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: [UniffiVTableCallbackInterfaceTimelineListener] = [UniffiVTableCallbackInterfaceTimelineListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceTimelineListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface TimelineListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceTimelineListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface TimelineListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, diff: RustBuffer, @@ -43656,12 +41922,6 @@ fileprivate struct UniffiCallbackInterfaceTimelineListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceTimelineListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface TimelineListener: handle missing in uniffiFree") - } } )] } @@ -43749,6 +42009,20 @@ fileprivate struct UniffiCallbackInterfaceTypingNotificationsListener { // 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: [UniffiVTableCallbackInterfaceTypingNotificationsListener] = [UniffiVTableCallbackInterfaceTypingNotificationsListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceTypingNotificationsListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface TypingNotificationsListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceTypingNotificationsListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface TypingNotificationsListener: handle missing in uniffiClone") + } + }, call: { ( uniffiHandle: UInt64, typingUserIds: RustBuffer, @@ -43772,12 +42046,6 @@ fileprivate struct UniffiCallbackInterfaceTypingNotificationsListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceTypingNotificationsListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface TypingNotificationsListener: handle missing in uniffiFree") - } } )] } @@ -43865,6 +42133,20 @@ fileprivate struct UniffiCallbackInterfaceUnableToDecryptDelegate { // 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: [UniffiVTableCallbackInterfaceUnableToDecryptDelegate] = [UniffiVTableCallbackInterfaceUnableToDecryptDelegate( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceUnableToDecryptDelegate.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface UnableToDecryptDelegate: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceUnableToDecryptDelegate.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface UnableToDecryptDelegate: handle missing in uniffiClone") + } + }, onUtd: { ( uniffiHandle: UInt64, info: RustBuffer, @@ -43888,12 +42170,6 @@ fileprivate struct UniffiCallbackInterfaceUnableToDecryptDelegate { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceUnableToDecryptDelegate.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface UnableToDecryptDelegate: handle missing in uniffiFree") - } } )] } @@ -43981,6 +42257,20 @@ fileprivate struct UniffiCallbackInterfaceVerificationStateListener { // 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: [UniffiVTableCallbackInterfaceVerificationStateListener] = [UniffiVTableCallbackInterfaceVerificationStateListener( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceVerificationStateListener.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface VerificationStateListener: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceVerificationStateListener.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface VerificationStateListener: handle missing in uniffiClone") + } + }, onUpdate: { ( uniffiHandle: UInt64, status: RustBuffer, @@ -44004,12 +42294,6 @@ fileprivate struct UniffiCallbackInterfaceVerificationStateListener { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceVerificationStateListener.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface VerificationStateListener: handle missing in uniffiFree") - } } )] } @@ -44097,6 +42381,20 @@ fileprivate struct UniffiCallbackInterfaceWidgetCapabilitiesProvider { // 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: [UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider] = [UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider( + uniffiFree: { (uniffiHandle: UInt64) -> () in + do { + try FfiConverterCallbackInterfaceWidgetCapabilitiesProvider.handleMap.remove(handle: uniffiHandle) + } catch { + print("Uniffi callback interface WidgetCapabilitiesProvider: handle missing in uniffiFree") + } + }, + uniffiClone: { (uniffiHandle: UInt64) -> UInt64 in + do { + return try FfiConverterCallbackInterfaceWidgetCapabilitiesProvider.handleMap.clone(handle: uniffiHandle) + } catch { + fatalError("Uniffi callback interface WidgetCapabilitiesProvider: handle missing in uniffiClone") + } + }, acquireCapabilities: { ( uniffiHandle: UInt64, capabilities: RustBuffer, @@ -44120,12 +42418,6 @@ fileprivate struct UniffiCallbackInterfaceWidgetCapabilitiesProvider { makeCall: makeCall, writeReturn: writeReturn ) - }, - uniffiFree: { (uniffiHandle: UInt64) -> () in - let result = try? FfiConverterCallbackInterfaceWidgetCapabilitiesProvider.handleMap.remove(handle: uniffiHandle) - if result == nil { - print("Uniffi callback interface WidgetCapabilitiesProvider: handle missing in uniffiFree") - } } )] } @@ -47321,7 +45613,7 @@ public func FfiConverterTypeTimestamp_lower(_ value: Timestamp) -> UInt64 { } private let UNIFFI_RUST_FUTURE_POLL_READY: Int8 = 0 -private let UNIFFI_RUST_FUTURE_POLL_MAYBE_READY: Int8 = 1 +private let UNIFFI_RUST_FUTURE_POLL_WAKE: Int8 = 1 fileprivate let uniffiContinuationHandleMap = UniffiHandleMap>() @@ -47345,7 +45637,9 @@ fileprivate func uniffiRustCallAsync( pollResult = await withUnsafeContinuation { pollFunc( rustFuture, - uniffiFutureContinuationCallback, + { handle, pollResult in + uniffiFutureContinuationCallback(handle: handle, pollResult: pollResult) + }, uniffiContinuationHandleMap.insert(obj: $0) ) } @@ -47366,29 +45660,9 @@ fileprivate func uniffiFutureContinuationCallback(handle: UInt64, pollResult: In print("uniffiFutureContinuationCallback invalid handle") } } -/** - * Creates a [`RoomMessageEventContentWithoutRelation`] given a - * [`MessageContent`] value. - */ -public func contentWithoutRelationFromMessage(message: MessageContent)throws -> RoomMessageEventContentWithoutRelation { - return try FfiConverterTypeRoomMessageEventContentWithoutRelation_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( - FfiConverterTypeMessageContent_lower(message),$0 - ) -}) -} -/** - * Create a caption edit. - * - * If no `formatted_caption` is provided, then it's assumed the `caption` - * represents valid Markdown that can be used as the formatted caption. - */ -public func createCaptionEdit(caption: String?, formattedCaption: FormattedBody?, mentions: Mentions?) -> EditedContent { - return try! FfiConverterTypeEditedContent_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( - FfiConverterOptionString.lower(caption), - FfiConverterOptionTypeFormattedBody.lower(formattedCaption), - FfiConverterOptionTypeMentions.lower(mentions),$0 +public func sdkGitSha() -> String { + return try! FfiConverterString.lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha($0 ) }) } @@ -47398,52 +45672,6 @@ public func genTransactionId() -> String { ) }) } -/** - * Create the actual url that can be used to setup the WebView or IFrame - * that contains the widget. - * - * # Arguments - * * `widget_settings` - The widget settings to generate the url for. - * * `room` - A Matrix room which is used to query the logged in username - * * `props` - Properties from the client that can be used by a widget to adapt - * to the client. e.g. language, font-scale... - */ -public func generateWebviewUrl(widgetSettings: WidgetSettings, room: Room, props: ClientProperties)async throws -> String { - return - try await uniffiRustCallAsync( - rustFutureFunc: { - uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(FfiConverterTypeWidgetSettings_lower(widgetSettings),FfiConverterTypeRoom_lower(room),FfiConverterTypeClientProperties_lower(props) - ) - }, - 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, - errorHandler: FfiConverterTypeParseError_lift - ) -} -/** - * The Capabilities required to run a element call widget. - * - * This is intended to be used in combination with: `acquire_capabilities` of - * the `CapabilitiesProvider`. - * - * `acquire_capabilities` can simply return the `WidgetCapabilities` from this - * function. Even if there are non intersecting permissions to what the widget - * requested. - * - * Editing and extending the capabilities from this function is also possible, - * but should only be done as temporal workarounds until this function is - * adjusted - */ -public func getElementCallRequiredPermissions(ownUserId: String, ownDeviceId: String) -> WidgetCapabilities { - return try! FfiConverterTypeWidgetCapabilities_lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( - FfiConverterString.lower(ownUserId), - FfiConverterString.lower(ownDeviceId),$0 - ) -}) -} /** * Sets up logs and the tokio runtime for the current application. * @@ -47459,6 +45687,29 @@ public func initPlatform(config: TracingConfiguration, useLightweightTokioRuntim ) } } +/** + * Updates the tracing subscriber with a new file writer based on the provided + * configuration. + * + * This method will throw if `init_platform` hasn't been called, or if it was + * called with `write_to_files` set to `None`. + */ +public func reloadTracingFileWriter(configuration: TracingFileConfiguration)throws {try rustCallWithError(FfiConverterTypeClientError_lift) { + uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( + FfiConverterTypeTracingFileConfiguration_lower(configuration),$0 + ) +} +} +/** + * Generates a `matrix.to` permalink to the given room alias. + */ +public func matrixToRoomAliasPermalink(roomAlias: String)throws -> String { + return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { + uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( + FfiConverterString.lower(roomAlias),$0 + ) +}) +} /** * Verifies the passed `String` matches the expected room alias format: * @@ -47474,53 +45725,58 @@ public func isRoomAliasFormatValid(alias: String) -> Bool { }) } /** - * Log an event. - * - * The target should be something like a module path, and can be referenced in - * the filter string given to `init_platform`. `level` and `target` for a - * callsite are fixed at the first `log_event` call for that callsite and can - * not be changed afterwards, i.e. the level and target passed for second and - * following `log_event`s with the same callsite will be ignored. - * - * This function leaks a little bit of memory for each unique (file + line + - * level + target) 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. + * Transforms a Room's display name into a valid room alias name. */ -public func logEvent(file: String, line: UInt32?, level: LogLevel, target: String, message: String) {try! rustCall() { - uniffi_matrix_sdk_ffi_fn_func_log_event( - FfiConverterString.lower(file), - FfiConverterOptionUInt32.lower(line), - FfiConverterTypeLogLevel_lower(level), - FfiConverterString.lower(target), - FfiConverterString.lower(message),$0 +public func roomAliasNameFromRoomDisplayName(roomName: String) -> String { + return try! FfiConverterString.lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( + FfiConverterString.lower(roomName),$0 ) +}) } +/** + * Generates a `matrix.to` permalink to the given userID. + */ +public func matrixToUserPermalink(userId: String)throws -> String { + return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { + uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( + FfiConverterString.lower(userId),$0 + ) +}) } -public func makeWidgetDriver(settings: WidgetSettings)throws -> WidgetDriverAndHandle { - return try FfiConverterTypeWidgetDriverAndHandle_lift(try rustCallWithError(FfiConverterTypeParseError_lift) { - uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( - FfiConverterTypeWidgetSettings_lower(settings),$0 +/** + * 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 ) }) } /** - * Generates a `matrix.to` permalink to the given room alias. + * 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 matrixToRoomAliasPermalink(roomAlias: String)throws -> String { - return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_func_matrix_to_room_alias_permalink( - FfiConverterString.lower(roomAlias),$0 +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( + FfiConverterTypePowerLevel_lower(powerLevel),$0 ) }) } /** - * Generates a `matrix.to` permalink to the given userID. + * Creates a [`RoomMessageEventContentWithoutRelation`] given a + * [`MessageContent`] value. */ -public func matrixToUserPermalink(userId: String)throws -> String { - return try FfiConverterString.lift(try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_func_matrix_to_user_permalink( - FfiConverterString.lower(userId),$0 +public func contentWithoutRelationFromMessage(message: MessageContent)throws -> RoomMessageEventContentWithoutRelation { + return try FfiConverterTypeRoomMessageEventContentWithoutRelation_lift(try rustCallWithError(FfiConverterTypeClientError_lift) { + uniffi_matrix_sdk_ffi_fn_func_content_without_relation_from_message( + FfiConverterTypeMessageContent_lower(message),$0 ) }) } @@ -47561,29 +45817,6 @@ public func messageEventContentNew(msgtype: MessageType)throws -> RoomMessageEv ) }) } -/** - * `WidgetSettings` are usually created from a state event. - * (currently unimplemented) - * - * In some cases the client wants to create custom `WidgetSettings` - * for specific rooms based on other conditions. - * This function returns a `WidgetSettings` object which can be used - * to setup a widget using `run_client_widget_api` - * and to generate the correct url for the widget. - * - * # Arguments - * - * * `props` - A struct containing the configuration parameters for a element - * call widget. - */ -public func newVirtualElementCallWidget(props: VirtualElementCallWidgetProperties, config: VirtualElementCallWidgetConfig)throws -> WidgetSettings { - return try FfiConverterTypeWidgetSettings_lift(try rustCallWithError(FfiConverterTypeParseError_lift) { - uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( - FfiConverterTypeVirtualElementCallWidgetProperties_lower(props), - FfiConverterTypeVirtualElementCallWidgetConfig_lower(config),$0 - ) -}) -} /** * Parse a matrix entity from a given URI, be it either * a `matrix.to` link or a `matrix:` URI @@ -47596,56 +45829,117 @@ public func parseMatrixEntityFrom(uri: String) -> MatrixEntity? { }) } /** - * Updates the tracing subscriber with a new file writer based on the provided - * configuration. + * Create a caption edit. * - * This method will throw if `init_platform` hasn't been called, or if it was - * called with `write_to_files` set to `None`. + * If no `formatted_caption` is provided, then it's assumed the `caption` + * represents valid Markdown that can be used as the formatted caption. */ -public func reloadTracingFileWriter(configuration: TracingFileConfiguration)throws {try rustCallWithError(FfiConverterTypeClientError_lift) { - uniffi_matrix_sdk_ffi_fn_func_reload_tracing_file_writer( - FfiConverterTypeTracingFileConfiguration_lower(configuration),$0 +public func createCaptionEdit(caption: String?, formattedCaption: FormattedBody?, mentions: Mentions?) -> EditedContent { + return try! FfiConverterTypeEditedContent_lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_create_caption_edit( + FfiConverterOptionString.lower(caption), + FfiConverterOptionTypeFormattedBody.lower(formattedCaption), + FfiConverterOptionTypeMentions.lower(mentions),$0 ) -} +}) } /** - * Transforms a Room's display name into a valid room alias name. + * Log an event. + * + * The target should be something like a module path, and can be referenced in + * the filter string given to `init_platform`. `level` and `target` for a + * callsite are fixed at the first `log_event` call for that callsite and can + * not be changed afterwards, i.e. the level and target passed for second and + * following `log_event`s with the same callsite will be ignored. + * + * This function leaks a little bit of memory for each unique (file + line + + * level + target) 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. */ -public func roomAliasNameFromRoomDisplayName(roomName: String) -> String { - return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_func_room_alias_name_from_room_display_name( - FfiConverterString.lower(roomName),$0 +public func logEvent(file: String, line: UInt32?, level: LogLevel, target: String, message: String) {try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_log_event( + FfiConverterString.lower(file), + FfiConverterOptionUInt32.lower(line), + FfiConverterTypeLogLevel_lower(level), + FfiConverterString.lower(target), + FfiConverterString.lower(message),$0 ) -}) } -public func sdkGitSha() -> String { - return try! FfiConverterString.lift(try! rustCall() { - uniffi_matrix_sdk_ffi_fn_func_sdk_git_sha($0 - ) -}) } /** - * Get the suggested power level for the given role. + * Create the actual url that can be used to setup the WebView or IFrame + * that contains the widget. * - * Returns an error if the value of the power level is unsupported. + * # Arguments + * * `widget_settings` - The widget settings to generate the url for. + * * `room` - A Matrix room which is used to query the logged in username + * * `props` - Properties from the client that can be used by a widget to adapt + * to the client. e.g. language, font-scale... */ -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 generateWebviewUrl(widgetSettings: WidgetSettings, room: Room, props: ClientProperties)async throws -> String { + return + try await uniffiRustCallAsync( + rustFutureFunc: { + uniffi_matrix_sdk_ffi_fn_func_generate_webview_url(FfiConverterTypeWidgetSettings_lower(widgetSettings),FfiConverterTypeRoom_lower(room),FfiConverterTypeClientProperties_lower(props) + ) + }, + 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, + errorHandler: FfiConverterTypeParseError_lift + ) +} +/** + * The Capabilities required to run a element call widget. + * + * This is intended to be used in combination with: `acquire_capabilities` of + * the `CapabilitiesProvider`. + * + * `acquire_capabilities` can simply return the `WidgetCapabilities` from this + * function. Even if there are non intersecting permissions to what the widget + * requested. + * + * Editing and extending the capabilities from this function is also possible, + * but should only be done as temporal workarounds until this function is + * adjusted + */ +public func getElementCallRequiredPermissions(ownUserId: String, ownDeviceId: String) -> WidgetCapabilities { + return try! FfiConverterTypeWidgetCapabilities_lift(try! rustCall() { + uniffi_matrix_sdk_ffi_fn_func_get_element_call_required_permissions( + FfiConverterString.lower(ownUserId), + FfiConverterString.lower(ownDeviceId),$0 + ) +}) +} +public func makeWidgetDriver(settings: WidgetSettings)throws -> WidgetDriverAndHandle { + return try FfiConverterTypeWidgetDriverAndHandle_lift(try rustCallWithError(FfiConverterTypeParseError_lift) { + uniffi_matrix_sdk_ffi_fn_func_make_widget_driver( + FfiConverterTypeWidgetSettings_lower(settings),$0 ) }) } /** - * Get the suggested role for the given power level. + * `WidgetSettings` are usually created from a state event. + * (currently unimplemented) * - * Returns an error if the value of the power level is out of range for numbers - * accepted in canonical JSON. + * In some cases the client wants to create custom `WidgetSettings` + * for specific rooms based on other conditions. + * This function returns a `WidgetSettings` object which can be used + * to setup a widget using `run_client_widget_api` + * and to generate the correct url for the widget. + * + * # Arguments + * + * * `props` - A struct containing the configuration parameters for a element + * call widget. */ -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( - FfiConverterTypePowerLevel_lower(powerLevel),$0 +public func newVirtualElementCallWidget(props: VirtualElementCallWidgetProperties, config: VirtualElementCallWidgetConfig)throws -> WidgetSettings { + return try FfiConverterTypeWidgetSettings_lift(try rustCallWithError(FfiConverterTypeParseError_lift) { + uniffi_matrix_sdk_ffi_fn_func_new_virtual_element_call_widget( + FfiConverterTypeVirtualElementCallWidgetProperties_lower(props), + FfiConverterTypeVirtualElementCallWidgetConfig_lower(config),$0 ) }) } @@ -47659,1606 +45953,1606 @@ private enum InitializationResult { // the code inside is only computed once. private let initializationResult: InitializationResult = { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 29 + let bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib let scaffolding_contract_version = ffi_matrix_sdk_ffi_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { return InitializationResult.contractVersionMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message() != 1366) { + if (uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 4038) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit() != 33992) { + if (uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() != 50486) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_gen_transaction_id() != 15808) { + if (uniffi_matrix_sdk_ffi_checksum_func_init_platform() != 14462) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url() != 48529) { + if (uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() != 7613) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions() != 30181) { + if (uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink() != 4370) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_init_platform() != 11113) { + if (uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid() != 32456) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_is_room_alias_format_valid() != 54845) { + if (uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() != 64531) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_log_event() != 55646) { + if (uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() != 8284) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver() != 34206) { + if (uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 52982) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_matrix_to_room_alias_permalink() != 13776) { + if (uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 1141) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_matrix_to_user_permalink() != 46473) { + if (uniffi_matrix_sdk_ffi_checksum_func_content_without_relation_from_message() != 11794) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html() != 37203) { + if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html() != 47401) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote() != 8938) { + if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_html_as_emote() != 56994) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown() != 58385) { + if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown() != 53788) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() != 20152) { + if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_from_markdown_as_emote() != 33485) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() != 57839) { + if (uniffi_matrix_sdk_ffi_checksum_func_message_event_content_new() != 33472) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() != 7233) { + if (uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() != 43356) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_parse_matrix_entity_from() != 49710) { + if (uniffi_matrix_sdk_ffi_checksum_func_create_caption_edit() != 57776) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_reload_tracing_file_writer() != 1447) { + if (uniffi_matrix_sdk_ffi_checksum_func_log_event() != 28696) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_room_alias_name_from_room_display_name() != 65010) { + if (uniffi_matrix_sdk_ffi_checksum_func_generate_webview_url() != 42271) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_sdk_git_sha() != 4038) { + if (uniffi_matrix_sdk_ffi_checksum_func_get_element_call_required_permissions() != 40493) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_suggested_power_level_for_role() != 29703) { + if (uniffi_matrix_sdk_ffi_checksum_func_make_widget_driver() != 16495) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_func_suggested_role_for_power_level() != 13856) { + if (uniffi_matrix_sdk_ffi_checksum_func_new_virtual_element_call_widget() != 6216) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send() != 50179) { + if (uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions() != 23475) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth() != 53440) { + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version() != 8075) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_account_data() != 50433) { + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts() != 39919) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_account_url() != 42373) { + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login() != 22858) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() != 29688) { + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() != 1406) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() != 35296) { + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() != 19696) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url() != 27867) { + if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() != 19766) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo() != 18126) { + if (uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish() != 56350) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 50226) { + if (uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() != 633) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() != 39890) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_abort_oidc_auth() != 17052) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches() != 55711) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_account_data() != 23790) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 52700) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_account_url() != 53991) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt() != 19710) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_available_sliding_sync_versions() != 46726) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() != 20658) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url() != 26042) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 45990) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo() != 5412) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_device_id() != 44340) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 30527) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_display_name() != 56259) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_can_deactivate_account() != 27747) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() != 30834) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_clear_caches() != 61351) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() != 10688) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_create_room() != 12931) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_encryption() != 9657) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_custom_login_with_jwt() != 16219) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config() != 15595) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_deactivate_account() != 7894) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room() != 5137) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_delete_pusher() != 20472) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy() != 46953) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_device_id() != 63337) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size() != 12661) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_display_name() != 20054) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content() != 40308) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_enable_all_send_queues() != 53800) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file() != 20094) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_enable_send_queue_upload_progress() != 30956) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy() != 19264) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_encryption() != 13362) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail() != 52601) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_fetch_media_preview_config() != 53942) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings() != 49769) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_dm_room() != 3705) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 60062) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_invite_avatars_display_policy() != 16387) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() != 43545) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_max_media_upload_size() != 54634) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 22399) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_content() != 30321) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_room() != 30376) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_file() != 41198) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias() != 7674) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_preview_display_policy() != 62158) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id() != 36348) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_media_thumbnail() != 23704) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 55934) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_notification_settings() != 625) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes() != 30209) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_profile() != 3999) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 32541) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 43351) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_homeserver() != 26427) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_room() != 63699) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details() != 63487) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_alias() != 48007) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user() != 14588) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview_from_room_id() != 58119) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users() != 49620) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 64657) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported() != 34863) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_store_sizes() != 47046) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported() != 17934) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_url() != 46254) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available() != 23322) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_homeserver() != 26707) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id() != 64032) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_homeserver_login_details() != 63281) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias() != 18521) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_ignore_user() != 30519) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_knock() != 48652) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_ignored_users() != 57288) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_login() != 33276) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_is_livekit_rtc_supported() != 48327) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email() != 11789) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_is_report_room_api_supported() != 48577) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 32591) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_is_room_alias_available() != 53090) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_logout() != 42911) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id() != 28397) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler() != 48299) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_join_room_by_id_or_alias() != 16138) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler() != 4124) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_knock() != 40592) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_notification_client() != 37308) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_login() != 48373) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event() != 13906) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_email() != 22630) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event() != 15699) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_login_with_oidc_callback() != 63441) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores() != 18852) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_logout() != 54411) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler() != 47103) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_new_grant_login_with_qr_code_handler() != 59558) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() != 29033) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_new_login_with_qr_code_handler() != 37543) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions() != 32820) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_notification_client() != 17687) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known() != 61934) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_observe_account_data_event() != 40713) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() != 3551) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_observe_room_account_data_event() != 46899) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_restore_session() != 56125) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_optimize_stores() != 53467) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with() != 20927) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_handler() != 46860) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists() != 20359) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() != 12536) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search() != 39855) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions() != 12909) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_rooms() != 29558) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known() != 52054) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_search_users() != 42927) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() != 16053) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_server() != 63276) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_restore_session() != 56243) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() != 51933) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_restore_session_with() != 21462) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_session() != 8085) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_room_alias_exists() != 5713) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data() != 18256) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search() != 4257) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate() != 46437) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_rooms() != 57092) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name() != 15292) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_search_users() != 23484) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy() != 48457) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_server() != 11140) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy() != 24080) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_server_vendor_info() != 25767) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy() != 2414) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_session() != 47980) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() != 41975) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data() != 56242) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate() != 37720) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_delegate() != 377) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() != 4957) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_display_name() != 47937) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_space_service() != 31959) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_invite_avatars_display_policy() != 57486) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() != 34571) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_media_preview_display_policy() != 27881) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users() != 23285) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_media_retention_policy() != 45052) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config() != 47047) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_pusher() != 51438) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info() != 41103) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_set_utd_delegate() != 38853) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status() != 57403) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_sliding_sync_version() != 55440) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates() != 33603) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_space_service() != 33556) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_sync_service() != 52812) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_start_sso_login() != 11891) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room() != 56986) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_ignored_users() != 10184) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user() != 8489) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_media_preview_config() != 11612) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar() != 64486) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_room_info() != 3308) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() != 51195) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_status() != 39397) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 19369) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_subscribe_to_send_queue_updates() != 53470) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_user_id() != 40531) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_sync_service() != 47464) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name() != 57725) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_track_recently_visited_room() != 40498) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates() != 14763) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_unignore_user() != 2582) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups() != 44502) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_upload_avatar() != 14839) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing() != 37167) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_upload_media() != 19621) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy() != 11959) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_url_for_oidc() != 50450) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 56018) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_user_id() != 11375) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() != 46627) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_user_id_server_name() != 52727) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings() != 34715) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_add_recent_emoji() != 15952) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh() != 43839) { + if (uniffi_matrix_sdk_ffi_checksum_method_client_get_recent_emojis() != 49975) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates() != 47525) { + if (uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path() != 42046) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification() != 2334) { + if (uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() != 34214) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock() != 42214) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_add_root_certificates() != 60910) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite() != 3856) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_backups() != 19978) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url() != 28347) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_auto_enable_cross_signing() != 41588) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store() != 28117) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_backup_download_strategy() != 5278) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy() != 5659) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_build() != 21717) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config() != 58783) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_cross_process_store_locks_holder_name() != 56336) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy() != 41183) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_decryption_settings() != 36533) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name() != 29096) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_automatic_token_refresh() != 60164) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url() != 30022) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_built_in_root_certificates() != 34380) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths() != 40778) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_disable_ssl_verification() != 17095) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate() != 8576) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_oidc_refresh_lock() != 54805) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() != 39381) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_enable_share_history_on_invite() != 47743) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store() != 55579) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_homeserver_url() != 27846) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 30452) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_in_memory_store() != 7770) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 23935) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_proxy() != 56894) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() != 13719) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_request_config() != 41133) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username() != 45302) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_room_key_recipient_strategy() != 7083) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server() != 45490) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name() != 27235) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state() != 51049) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_server_name_or_homeserver_url() != 11561) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener() != 14246) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_session_paths() != 52143) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key() != 58425) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_set_session_delegate() != 35713) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery() != 18699) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sliding_sync_version_builder() != 39928) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key() != 11864) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_sqlite_store() != 54280) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups() != 55446) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_system_is_memory_constrained() != 64472) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery() != 64351) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_threads_enabled() != 10698) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against() != 7561) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_user_agent() != 31638) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device() != 27955) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientbuilder_username() != 9349) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recover() != 33712) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_exists_on_server() != 16984) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset() != 12902) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state() != 60707) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state() != 54051) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_backup_state_listener() != 14813) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener() != 36612) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_curve25519_key() != 25462) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity() != 13780) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_disable_recovery() != 43697) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 20380) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_ed25519_key() != 30741) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() != 17575) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_backups() != 61920) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29114) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_enable_recovery() != 2033) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() != 59806) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_has_devices_to_verify_against() != 50754) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() != 37503) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_is_last_device() != 54322) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks() != 41585) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recover() != 14635) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate() != 56670) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recover_and_reset() != 48062) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan() != 60730) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state() != 28660) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_sliding_sync_version() != 36573) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_recovery_state_listener() != 17926) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supported_oidc_prompts() != 63396) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_identity() != 47257) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_oidc_login() != 46090) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 15954) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_password_login() != 33501) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_user_identity() != 39850) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_supports_sso_login() != 37773) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29580) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_homeserverlogindetails_url() != 61326) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() != 30914) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type() != 43501) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() != 28614) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel() != 57622) { + if (uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_e2ee_initialization_tasks() != 23168) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset() != 11997) { + if (uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_auth_type() != 21421) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event() != 36106) { + if (uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_cancel() != 14034) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id() != 5876) { + if (uniffi_matrix_sdk_ffi_checksum_method_identityresethandle_reset() != 29457) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept() != 25656) { + if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation() != 36877) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline() != 65054) { + if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified() != 27675) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban() != 26242) { + if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key() != 44140) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen() != 36036) { + if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin() != 64915) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis() != 5211) { + if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified() != 10595) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info() != 55450) { + if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification() != 8452) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle() != 46057) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() != 64715) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields() != 12518) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type() != 38023) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave() != 54036) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() != 16913) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms() != 50920) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id() != 3965) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate() != 59689) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() != 31754) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() != 53560) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 47425) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_path() != 16357) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications() != 55817) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_mediafilehandle_persist() != 12883) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room() != 22250) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() != 23306) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() != 46370) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() != 62692) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() != 24557) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 52873) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules() != 31603) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notifications() != 64372) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode() != 44201) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_room() != 26581) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules() != 22761) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() != 37323) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings() != 44589) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() != 21251) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules() != 23908) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_contains_keywords_rules() != 60025) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode() != 13690) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_default_room_notification_mode() != 36211) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled() != 42573) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_raw_push_rules() != 17884) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled() != 24945) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_room_notification_settings() != 55295) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled() != 4073) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_rooms_with_user_defined_rules() != 19849) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled() != 17837) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_get_user_defined_room_notification_mode() != 18228) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode() != 12358) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_call_enabled() != 12210) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled() != 17088) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_invite_for_me_enabled() != 533) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule() != 49373) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_room_mention_enabled() != 13304) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode() != 29804) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_is_user_mention_enabled() != 49857) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate() != 39042) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_restore_default_room_notification_mode() != 35399) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled() != 34082) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_call_enabled() != 16823) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled() != 63495) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_custom_push_rule() != 465) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode() != 21942) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_default_room_notification_mode() != 9426) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled() != 22017) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_delegate() != 57636) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room() != 54475) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_invite_for_me_enabled() != 11988) { + if (uniffi_matrix_sdk_ffi_checksum_method_checkcodesender_send() != 2180) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_mention_enabled() != 31650) { + if (uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_generate() != 59049) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_room_notification_mode() != 4135) { + if (uniffi_matrix_sdk_ffi_checksum_method_grantloginwithqrcodehandler_scan() != 35786) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_set_user_mention_enabled() != 56594) { + if (uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_generate() != 27889) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_unmute_room() != 47580) { + if (uniffi_matrix_sdk_ffi_checksum_method_loginwithqrcodehandler_scan() != 55947) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() != 30173) { + if (uniffi_matrix_sdk_ffi_checksum_method_qrcodedata_server_name() != 52906) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count() != 61905) { + if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_accept() != 60529) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants() != 41533) { + if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline() != 20051) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases() != 28555) { + if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_decline_and_ban() != 23767) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes() != 44206) { + if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestactions_mark_as_seen() != 20986) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url() != 34637) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_active_members_count() != 10052) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_ban_user() != 35046) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_active_room_call_participants() != 61411) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias() != 19786) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_alternative_aliases() != 30946) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft() != 59182) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_apply_power_level_changes() != 56335) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage() != 13838) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_avatar_url() != 4697) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_decline_call() != 36115) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_ban_user() != 54282) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key() != 18081) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_canonical_alias() != 5795) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_display_name() != 64194) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_clear_composer_draft() != 12270) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_edit() != 61956) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_clear_event_cache_storage() != 14531) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption() != 14669) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_decline_call() != 12323) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue() != 23914) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_discard_room_key() != 57692) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 9101) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_display_name() != 45762) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() != 51696) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_edit() != 6689) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_forget() != 37840) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_enable_encryption() != 16452) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels() != 47640) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_enable_send_queue() != 32996) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility() != 412) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 35766) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() != 33588) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() != 37784) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_heroes() != 22313) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_forget() != 10622) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_id() != 61990) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels() != 33125) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend() != 39984) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_get_room_visibility() != 49289) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user() != 62239) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() != 1287) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id() != 41133) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_heroes() != 38402) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count() != 1023) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_id() != 34667) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_inviter() != 18103) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_ignore_device_trust_and_resend() != 24786) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_is_direct() != 10462) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_ignore_user() != 45929) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted() != 63995) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_invite_user_by_id() != 27806) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_is_public() != 57746) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_invited_members_count() != 44865) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled() != 36591) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_inviter() != 7247) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_is_space() != 16919) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_is_direct() != 61932) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_join() != 9240) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_is_encrypted() != 37204) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count() != 55835) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_is_public() != 31529) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_kick_user() != 28600) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_is_send_queue_enabled() != 5651) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state() != 16843) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_is_space() != 19377) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_latest_event() != 39083) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_join() != 65464) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_leave() != 63688) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_joined_members_count() != 55525) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft() != 62856) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_kick_user() != 64949) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event() != 12703) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_latest_encryption_state() != 9465) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked() != 24981) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_latest_event() != 57709) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read() != 57806) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_leave() != 3346) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink() != 36705) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_load_composer_draft() != 61910) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink() != 47781) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_load_or_fetch_event() != 47103) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_member() != 48980) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_fully_read_unchecked() != 1608) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url() != 29492) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_mark_as_read() != 38075) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name() != 33206) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_event_permalink() != 30684) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info() != 64964) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_matrix_to_permalink() != 10281) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_members() != 42691) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_member() != 58977) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync() != 3255) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_member_avatar_url() != 44092) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 45951) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_member_display_name() != 26431) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() != 11947) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_member_with_sender_info() != 36075) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 39510) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_members() != 13926) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room() != 22093) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_members_no_sync() != 8950) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_preview_room() != 60431) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 65038) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory() != 13924) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_new_latest_event() != 27925) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_raw_name() != 15453) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 32346) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_redact() != 45810) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_predecessor_room() != 21931) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar() != 7230) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_preview_room() != 20509) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory() != 16926) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_publish_room_alias_in_room_directory() != 2302) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 16529) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_raw_name() != 65346) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 6449) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_redact() != 56590) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() != 5060) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_remove_avatar() != 3551) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string() != 37832) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_remove_room_alias_from_room_directory() != 26389) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_room_info() != 41146) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_report_content() != 27264) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() != 27585) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_report_room() != 372) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() != 34248) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_reset_power_levels() != 32610) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_send_raw() != 20486) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_room_events_debug_string() != 35772) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite() != 64403) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_room_info() != 62185) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority() != 48070) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_save_composer_draft() != 42915) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 52127) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_send_live_location() != 36351) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() != 48337) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_send_raw() != 63831) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 5576) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_is_favourite() != 1289) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag() != 2381) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_is_low_priority() != 44950) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share() != 11488) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 33828) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share() != 19983) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() != 55986) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events() != 62256) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 40525) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes() != 8526) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag() != 38235) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests() != 30649) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_start_live_location_share() != 43479) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares() != 57037) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_stop_live_location_share() != 19603) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates() != 48209) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_call_decline_events() != 21456) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates() != 17661) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_identity_status_changes() != 49969) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications() != 38524) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_knock_requests() != 43535) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_successor_room() != 27360) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_live_location_shares() != 48977) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user() != 47787) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_room_info_updates() != 32254) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_timeline() != 51477) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_send_queue_updates() != 36773) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration() != 35159) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_subscribe_to_typing_notifications() != 12198) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_topic() != 59745) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_successor_room() != 17951) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice() != 28642) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_suggested_role_for_user() != 58040) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_unban_user() != 1803) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_timeline() != 51168) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias() != 25065) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_timeline_with_configuration() != 46904) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility() != 26248) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_topic() != 33844) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules() != 49303) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_typing_notice() != 26086) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users() != 52057) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_unban_user() != 25834) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility() != 64724) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_update_canonical_alias() != 35023) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar() != 19069) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_update_history_visibility() != 29249) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend() != 33485) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_update_join_rules() != 62193) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page() != 34221) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users() != 46007) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages() != 2923) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_update_room_visibility() != 46267) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page() != 29305) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar() != 43932) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results() != 30207) { + if (uniffi_matrix_sdk_ffi_checksum_method_room_withdraw_verification_and_resend() != 13926) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search() != 24438) { + if (uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len() != 59145) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters() != 36097) { + if (uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk() != 47532) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with() != 21746) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban() != 52576) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() != 21585) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite() != 55467) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 62491) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick() != 8759) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() != 47748) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin() != 64005) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page() != 61352) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other() != 10630) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter() != 61202) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own() != 10164) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller() != 36258) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message() != 27531) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream() != 56632) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state() != 17089) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms() != 49704) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification() != 59279) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 60695) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban() != 12687) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() != 64650) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite() != 26290) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms() != 5528) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick() != 3923) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator() != 16821) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin() != 20659) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_len() != 39835) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other() != 54198) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roommembersiterator_next_chunk() != 23186) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own() != 59218) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roommessageeventcontentwithoutrelation_with_mentions() != 8867) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message() != 45517) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_ban() != 7183) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state() != 40995) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_invite() != 57708) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification() != 35381) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_kick() != 461) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels() != 48829) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_pin_unpin() != 52852) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values() != 62886) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_other() != 60699) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_is_at_last_page() != 31168) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_redact_own() != 32905) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_loaded_pages() != 59827) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_message() != 2424) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_next_page() != 14719) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_send_state() != 33539) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_results() != 21645) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_own_user_trigger_room_notification() != 64150) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearch_search() != 38611) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_ban() != 57457) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters() != 19021) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_invite() != 41275) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_entries_with_dynamic_adapters_with() != 25653) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_kick() != 51066) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() != 2181) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_pin_unpin() != 4609) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 50761) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_other() != 52543) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() != 47488) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_redact_own() != 2983) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_reset_to_one_page() != 4391) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_message() != 48291) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_set_filter() != 8696) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_send_state() != 14792) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_controller() != 21030) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_can_user_trigger_room_notification() != 26319) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieswithdynamicadaptersresult_entries_stream() != 22467) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_user_power_levels() != 16221) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_all_rooms() != 4638) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompowerlevels_values() != 38774) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 40756) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() != 18179) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() != 41751) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 50237) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_subscribe_to_rooms() != 1302) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() != 1297) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_sync_indicator() != 48386) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave() != 21886) { + if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications() != 57541) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details() != 46321) { + if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count() != 60202) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel() != 62384) { + if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() != 27272) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join() != 1903) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_forget() != 42918) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel() != 7014) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_info() != 16635) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join() != 57901) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_inviter() != 54424) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort() != 11570) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_leave() != 52262) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend() != 28691) { + if (uniffi_matrix_sdk_ffi_checksum_method_roompreview_own_membership_details() != 16335) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request() != 53466) { + if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_to_json() != 19277) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request() != 37982) { + if (uniffi_matrix_sdk_ffi_checksum_method_mediasource_url() != 53516) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification() != 27140) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_accept_verification_request() != 56039) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification() != 32994) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_acknowledge_verification_request() != 22948) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification() != 64345) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_approve_verification() != 26553) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification() != 4777) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_cancel_verification() != 32557) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification() != 26149) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_decline_verification() != 9058) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate() != 42324) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_device_verification() != 20402) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification() != 16328) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_request_user_verification() != 11869) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description() != 21346) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_set_delegate() != 65112) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() != 46075) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontroller_start_sas_verification() != 56151) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() != 57707) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_description() != 45746) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() != 33381) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationemoji_symbol() != 54870) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 24664) { + if (uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_leave() != 64951) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() != 25368) { + if (uniffi_matrix_sdk_ffi_checksum_method_leavespacehandle_rooms() != 40216) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 16775) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_paginate() != 14784) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 55793) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_pagination_state() != 6614) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 26327) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 65022) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space() != 31295) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() != 63772) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces() != 62969) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 15348) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child() != 18724) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 52629) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 54285) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 31589) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space() != 7949) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_add_child_to_space() != 64688) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space() != 14438) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_editable_spaces() != 1160) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() != 6768) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_parents_of_child() != 40037) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() != 10090) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 25459) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_span_enter() != 8900) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_leave_space() != 57139) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_span_exit() != 47924) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_remove_child_from_space() != 22535) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_span_is_none() != 33327) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list() != 14788) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size() != 52005) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservice_subscribe_to_joined_spaces() != 8077) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit() != 18671) { + if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_cache_size() != 61803) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase() != 58378) { + if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_journal_size_limit() != 23095) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size() != 65399) { + if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_passphrase() != 45337) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained() != 16295) { + if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_pool_max_size() != 41218) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_ssohandler_finish() != 64706) { + if (uniffi_matrix_sdk_ffi_checksum_method_sqlitestorebuilder_system_is_memory_constrained() != 19368) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_ssohandler_url() != 10889) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() != 5808) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_expire_sessions() != 45579) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() != 39986) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_room_list_service() != 26426) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() != 42766) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_start() != 16010) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_state() != 56378) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_state() != 61806) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop() != 40415) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservice_stop() != 42435) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish() != 29725) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_finish() != 22814) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() != 17911) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() != 56326) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode() != 48885) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_offline_mode() != 16958) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos() != 21315) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_share_pos() != 18892) { + if (uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() != 12353) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() != 9124) { + if (uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished() != 17040) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_taskhandle_is_finished() != 29008) { + if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_contains_only_emojis() != 57596) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event() != 52917) { + if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_debug_info() != 797) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies() != 10634) { + if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_send_handle() != 279) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener() != 18746) { + if (uniffi_matrix_sdk_ffi_checksum_method_lazytimelineitemprovider_get_shields() != 46064) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content() != 21811) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_cancel() != 5666) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll() != 37925) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendattachmentjoinhandle_join() != 22211) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_edit() != 42189) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendhandle_abort() != 2406) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll() != 32659) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendhandle_try_resend() != 50142) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event() != 54068) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_add_listener() != 38550) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members() != 37994) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_create_message_content() != 54719) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id() != 33999) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_create_poll() != 33924) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id() != 18266) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_edit() != 46968) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() != 54225) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_end_poll() != 2766) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read() != 20604) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_details_for_event() != 22240) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards() != 36829) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_fetch_members() != 22294) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards() != 30268) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_event_id() != 40008) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event() != 41687) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event_id() != 31074) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event() != 48707) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() != 11426) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption() != 21112) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_mark_as_read() != 58804) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send() != 9553) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards() != 53026) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 36723) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_forwards() != 35094) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 4740) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event() != 40498) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() != 61071) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event() != 42154) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 29043) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption() != 39219) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 39080) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send() != 24846) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response() != 7453) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_audio() != 52753) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 37532) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_file() != 19448) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 11149) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_image() != 31845) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 52974) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_location() != 21302) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 41701) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_poll_response() != 41951) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 46161) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_read_receipt() != 6077) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 13555) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_reply() != 25065) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_video() != 21275) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_id() != 11088) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_voice_message() != 33769) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_event_type() != 12922) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_subscribe_to_back_pagination_status() != 27990) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_sender_id() != 18142) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 42673) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_thread_root_event_id() != 56465) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 18514) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineevent_timestamp() != 50929) { + if (uniffi_matrix_sdk_ffi_checksum_method_timeline_send_gallery() != 64895) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event() != 6106) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_event() != 46788) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual() != 50960) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_as_virtual() != 58215) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug() != 38094) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_fmt_debug() != 59080) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id() != 39945) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelineitem_unique_id() != 32877) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_has_notifications() != 33024) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_cancel() != 23182) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_highlight_count() != 35997) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendgalleryjoinhandle_join() != 30455) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_unreadnotificationscount_notification_count() != 35655) { + if (uniffi_matrix_sdk_ffi_checksum_method_threadsummary_latest_event() != 49553) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_has_verification_violation() != 2948) { + if (uniffi_matrix_sdk_ffi_checksum_method_threadsummary_num_replies() != 47977) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_is_verified() != 61954) { + if (uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event() != 52000) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_master_key() != 4041) { + if (uniffi_matrix_sdk_ffi_checksum_method_inreplytodetails_event_id() != 55998) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_pin() != 62925) { + if (uniffi_matrix_sdk_ffi_checksum_method_span_enter() != 15935) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_was_previously_verified() != 41686) { + if (uniffi_matrix_sdk_ffi_checksum_method_span_exit() != 2919) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_useridentity_withdraw_verification() != 3578) { + if (uniffi_matrix_sdk_ffi_checksum_method_span_is_none() != 59307) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run() != 7519) { + if (uniffi_matrix_sdk_ffi_checksum_method_widgetdriver_run() != 61502) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv() != 2662) { + if (uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_recv() != 10867) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send() != 18689) { + if (uniffi_matrix_sdk_ffi_checksum_method_widgetdriverhandle_send() != 27865) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() != 27991) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_clientbuilder_new() != 40475) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() != 10564) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() != 55735) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() != 11983) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_json() != 60091) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_qrcodedata_from_bytes() != 32675) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_mediasource_from_url() != 37564) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 53698) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new() != 604) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_span_new() != 8957) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() != 17142) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span() != 63835) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() != 18137) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_sqlitestorebuilder_new() != 51363) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_span_current() != 2135) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_exclude() != 53805) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_span_new() != 47713) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_constructor_timelineeventtypefilter_include() != 25498) { + if (uniffi_matrix_sdk_ffi_checksum_constructor_span_new_bridge_span() != 51316) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change() != 16189) { + if (uniffi_matrix_sdk_ffi_checksum_method_accountdatalistener_on_change() != 13017) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update() != 12849) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error() != 38563) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update() != 41052) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain() != 43233) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call() != 13016) { + if (uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain() != 4452) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientdelegate_did_receive_auth_error() != 26350) { + if (uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call() != 6068) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_retrieve_session_from_keychain() != 43954) { + if (uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change() != 45931) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_clientsessiondelegate_save_session_in_keychain() != 53223) { + if (uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() != 41998) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update() != 13538) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change() != 54581) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update() != 28731) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error() != 601) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update() != 2320) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update() != 56104) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update() != 35830) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification() != 39259) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call() != 57311) { + if (uniffi_matrix_sdk_ffi_checksum_method_backupstatelistener_on_update() != 43998) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_ignoreduserslistener_call() != 47519) { + if (uniffi_matrix_sdk_ffi_checksum_method_backupsteadystatelistener_on_update() != 56068) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call() != 10077) { + if (uniffi_matrix_sdk_ffi_checksum_method_enablerecoveryprogresslistener_on_update() != 27773) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call() != 34519) { + if (uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() != 34195) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_mediapreviewconfiglistener_on_change() != 14770) { + if (uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() != 33992) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change() != 51708) { + if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettingsdelegate_settings_did_change() != 52554) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update() != 65318) { + if (uniffi_matrix_sdk_ffi_checksum_method_generatedqrloginprogresslistener_on_update() != 30858) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_progresswatcher_transmission_progress() != 41133) { + if (uniffi_matrix_sdk_ffi_checksum_method_grantgeneratedqrloginprogresslistener_on_update() != 23453) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update() != 9758) { + if (uniffi_matrix_sdk_ffi_checksum_method_grantqrloginprogresslistener_on_update() != 63807) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_recoverystatelistener_on_update() != 64575) { + if (uniffi_matrix_sdk_ffi_checksum_method_qrloginprogresslistener_on_update() != 62487) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomaccountdatalistener_on_change() != 58105) { + if (uniffi_matrix_sdk_ffi_checksum_method_calldeclinelistener_call() != 6360) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update() != 41968) { + if (uniffi_matrix_sdk_ffi_checksum_method_identitystatuschangelistener_call() != 13891) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call() != 44934) { + if (uniffi_matrix_sdk_ffi_checksum_method_knockrequestslistener_call() != 17262) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update() != 12576) { + if (uniffi_matrix_sdk_ffi_checksum_method_livelocationsharelistener_call() != 15280) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update() != 23169) { + if (uniffi_matrix_sdk_ffi_checksum_method_roominfolistener_call() != 61614) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update() != 24823) { + if (uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update() != 62056) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update() != 36937) { + if (uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 36696) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendqueuelistener_on_update() != 24843) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomdirectorysearchentrieslistener_on_update() != 6069) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomerrorlistener_on_error() != 38224) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistentrieslistener_on_update() != 12283) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sendqueueroomupdatelistener_on_update() != 11544) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistloadingstatelistener_on_update() != 34444) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request() != 3417) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservicestatelistener_on_update() != 60435) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request() != 3733) { + if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservicesyncindicatorlistener_on_update() != 47433) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification() != 56833) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_request() != 58189) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data() != 30840) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_accept_verification_request() != 43661) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail() != 32164) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_start_sas_verification() != 8006) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel() != 3367) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_receive_verification_data() != 8698) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() != 37905) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_fail() != 45076) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() != 31502) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_cancel() != 36580) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 11960) { + if (uniffi_matrix_sdk_ffi_checksum_method_sessionverificationcontrollerdelegate_did_finish() != 53036) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() != 39714) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistentrieslistener_on_update() != 20303) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 19262) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 4634) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncnotificationlistener_on_notification() != 38017) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() != 21212) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() != 62231) { + if (uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 21383) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 53990) { + if (uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() != 7272) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 64299) { + if (uniffi_matrix_sdk_ffi_checksum_method_paginationstatuslistener_on_update() != 53207) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd() != 61791) { + if (uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 35518) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() != 38998) { + if (uniffi_matrix_sdk_ffi_checksum_method_unabletodecryptdelegate_on_utd() != 3448) { return InitializationResult.apiChecksumMismatch } - if (uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() != 12846) { + if (uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() != 3738) { return InitializationResult.apiChecksumMismatch } @@ -49305,10 +47599,10 @@ private let initializationResult: InitializationResult = { uniffiCallbackInitVerificationStateListener() uniffiCallbackInitWidgetCapabilitiesProvider() uniffiEnsureMatrixSdkBaseInitialized() - uniffiEnsureMatrixSdkUiInitialized() - uniffiEnsureMatrixSdkInitialized() - uniffiEnsureMatrixSdkCryptoInitialized() uniffiEnsureMatrixSdkCommonInitialized() + uniffiEnsureMatrixSdkCryptoInitialized() + uniffiEnsureMatrixSdkInitialized() + uniffiEnsureMatrixSdkUiInitialized() return InitializationResult.ok }() diff --git a/swift/matrix_sdk_ui.swift b/swift/matrix_sdk_ui.swift index cbb43f5..7978f62 100644 --- a/swift/matrix_sdk_ui.swift +++ b/swift/matrix_sdk_ui.swift @@ -352,21 +352,31 @@ private func uniffiTraitInterfaceCallWithError( callStatus.pointee.errorBuf = FfiConverterString.lower(String(describing: error)) } } +// Initial value and increment amount for handles. +// These ensure that SWIFT handles always have the lowest bit set +fileprivate let UNIFFI_HANDLEMAP_INITIAL: UInt64 = 1 +fileprivate let UNIFFI_HANDLEMAP_DELTA: UInt64 = 2 + fileprivate final class UniffiHandleMap: @unchecked Sendable { // All mutation happens with this lock held, which is why we implement @unchecked Sendable. private let lock = NSLock() private var map: [UInt64: T] = [:] - private var currentHandle: UInt64 = 1 + private var currentHandle: UInt64 = UNIFFI_HANDLEMAP_INITIAL func insert(obj: T) -> UInt64 { lock.withLock { - let handle = currentHandle - currentHandle += 1 - map[handle] = obj - return handle + return doInsert(obj) } } + // Low-level insert function, this assumes `lock` is held. + private func doInsert(_ obj: T) -> UInt64 { + let handle = currentHandle + currentHandle += UNIFFI_HANDLEMAP_DELTA + map[handle] = obj + return handle + } + func get(handle: UInt64) throws -> T { try lock.withLock { guard let obj = map[handle] else { @@ -376,6 +386,15 @@ fileprivate final class UniffiHandleMap: @unchecked Sendable { } } + func clone(handle: UInt64) throws -> UInt64 { + try lock.withLock { + guard let obj = map[handle] else { + throw UniffiInternalError.unexpectedStaleHandle + } + return doInsert(obj) + } + } + @discardableResult func remove(handle: UInt64) throws -> T { try lock.withLock { @@ -468,7 +487,7 @@ fileprivate struct FfiConverterString: FfiConverter { * Where this event came. */ -public enum EventItemOrigin { +public enum EventItemOrigin: Equatable, Hashable { /** * The event was created locally. @@ -486,9 +505,13 @@ public enum EventItemOrigin { * The event came from a cache. */ case cache -} + + + +} + #if compiler(>=6) extension EventItemOrigin: Sendable {} #endif @@ -554,20 +577,13 @@ public func FfiConverterTypeEventItemOrigin_lower(_ value: EventItemOrigin) -> R } -extension EventItemOrigin: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The type of change between the previous and current pinned events. */ -public enum RoomPinnedEventsChange { +public enum RoomPinnedEventsChange: Equatable, Hashable { /** * Only new event ids were added. @@ -581,9 +597,13 @@ public enum RoomPinnedEventsChange { * Some change other than only adding or only removing ids happened. */ case changed -} + + + +} + #if compiler(>=6) extension RoomPinnedEventsChange: Sendable {} #endif @@ -643,24 +663,21 @@ public func FfiConverterTypeRoomPinnedEventsChange_lower(_ value: RoomPinnedEven } -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 { +public enum SpaceRoomListPaginationState: Equatable, Hashable { case idle(endReached: Bool ) case loading -} + + + +} + #if compiler(>=6) extension SpaceRoomListPaginationState: Sendable {} #endif @@ -716,20 +733,13 @@ public func FfiConverterTypeSpaceRoomListPaginationState_lower(_ value: SpaceRoo } -extension SpaceRoomListPaginationState: Equatable, Hashable {} - - - - - - // Note that we don't yet support `indirect` for enums. // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion. /** * The level of read receipt tracking for the timeline. */ -public enum TimelineReadReceiptTracking { +public enum TimelineReadReceiptTracking: Equatable, Hashable { /** * Track read receipts for all events. @@ -743,9 +753,13 @@ public enum TimelineReadReceiptTracking { * Disable read receipt tracking. */ case disabled -} + + + +} + #if compiler(>=6) extension TimelineReadReceiptTracking: Sendable {} #endif @@ -805,13 +819,6 @@ public func FfiConverterTypeTimelineReadReceiptTracking_lower(_ value: TimelineR } -extension TimelineReadReceiptTracking: Equatable, Hashable {} - - - - - - private enum InitializationResult { case ok case contractVersionMismatch @@ -821,7 +828,7 @@ private enum InitializationResult { // the code inside is only computed once. private let initializationResult: InitializationResult = { // Get the bindings contract version from our ComponentInterface - let bindings_contract_version = 29 + let bindings_contract_version = 30 // Get the scaffolding contract version by calling the into the dylib let scaffolding_contract_version = ffi_matrix_sdk_ui_uniffi_contract_version() if bindings_contract_version != scaffolding_contract_version { diff --git a/yarn.lock b/yarn.lock index eb53d63..b448b24 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4577,7 +4577,7 @@ __metadata: tar: ^7.4.3 turbo: ^1.10.7 typescript: ^5.2.2 - uniffi-bindgen-react-native: 0.29.3-1 + uniffi-bindgen-react-native: 0.31.0-2 peerDependencies: react: "*" react-native: "*" @@ -14444,13 +14444,13 @@ __metadata: languageName: node linkType: hard -"uniffi-bindgen-react-native@npm:0.29.3-1": - version: 0.29.3-1 - resolution: "uniffi-bindgen-react-native@npm:0.29.3-1" +"uniffi-bindgen-react-native@npm:0.31.0-2": + version: 0.31.0-2 + resolution: "uniffi-bindgen-react-native@npm:0.31.0-2" bin: ubrn: bin/cli.cjs uniffi-bindgen-react-native: bin/cli.cjs - checksum: 1cd0da57d11178823658c5e9a080570b65ec3f973ffac3c9ae131399681b5825727aa3ac397060e5e9aebe524194f9dddcd70acd14968d7c8f23f1bf66e7032b + checksum: 7cd9a7a2714edc6c2e5416126362c6d9120071b917115667fa0bb5498df3797aa4c11a64480995b6b73f3b979d368420b1d60bf11a43c7a5cc3131c5b722a4ad languageName: node linkType: hard From 2ecf2bf050cbc3682e6461a1fedf56c6cf9011a0 Mon Sep 17 00:00:00 2001 From: Valentin Weiss <10179089+WeissDev@users.noreply.github.com> Date: Fri, 27 Mar 2026 14:27:50 +0100 Subject: [PATCH 2/2] fix: regenerate ubrn patch with patch-package The manually written patch could not be parsed by patch-package. Regenerated it properly using npx patch-package. --- patches/uniffi-bindgen-react-native+0.31.0-2.patch | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/patches/uniffi-bindgen-react-native+0.31.0-2.patch b/patches/uniffi-bindgen-react-native+0.31.0-2.patch index 2e0fd52..a4e73eb 100644 --- a/patches/uniffi-bindgen-react-native+0.31.0-2.patch +++ b/patches/uniffi-bindgen-react-native+0.31.0-2.patch @@ -1,8 +1,9 @@ diff --git a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs -index 1234567..abcdefg 100644 +index 3a9d438..c9158b9 100644 --- a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs +++ b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/android/commands.rs -@@ -208,12 +208,16 @@ impl AndroidBuildArgs { +@@ -208,13 +208,17 @@ impl AndroidBuildArgs { + .next() .context("Need at least one library file to generate native Kotlin bindings")?; let out_dir = config.android.src_main_java_dir(config.project_root()); - generate_native_kotlin_bindings(GenerateOptions { @@ -20,11 +21,13 @@ index 1234567..abcdefg 100644 + result?; Ok(()) } + diff --git a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs -index 1234567..abcdefg 100644 +index b9ba204..6e6bc58 100644 --- a/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs +++ b/node_modules/uniffi-bindgen-react-native/crates/ubrn_cli/src/jsi/ios/commands.rs -@@ -193,12 +193,16 @@ impl IosBuildArgs { +@@ -192,13 +192,17 @@ impl IosBuildArgs { + rm_dir(&out_dir)?; } ubrn_common::mk_dir(&out_dir)?; - generate_native_swift_bindings(GenerateOptions { @@ -42,3 +45,4 @@ index 1234567..abcdefg 100644 + result?; Ok(()) } +