@@ -2123,6 +2123,10 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
21232123
21242124
21252125
2126+
2127+
2128+
2129+
21262130
21272131
21282132
@@ -2202,6 +2206,8 @@ internal interface UniffiLib : Library {
22022206 ): Long
22032207 fun uniffi_matrix_sdk_ffi_fn_method_client_avatar_url(`ptr`: Pointer,
22042208 ): Long
2209+ fun uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo(`ptr`: Pointer,`roomId`: RustBuffer.ByValue,
2210+ ): Long
22052211 fun uniffi_matrix_sdk_ffi_fn_method_client_cached_avatar_url(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
22062212 ): RustBuffer.ByValue
22072213 fun uniffi_matrix_sdk_ffi_fn_method_client_create_room(`ptr`: Pointer,`request`: RustBuffer.ByValue,
@@ -2274,6 +2280,8 @@ internal interface UniffiLib : Library {
22742280 ): RustBuffer.ByValue
22752281 fun uniffi_matrix_sdk_ffi_fn_method_client_search_users(`ptr`: Pointer,`searchTerm`: RustBuffer.ByValue,`limit`: Long,
22762282 ): Long
2283+ fun uniffi_matrix_sdk_ffi_fn_method_client_server(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
2284+ ): RustBuffer.ByValue
22772285 fun uniffi_matrix_sdk_ffi_fn_method_client_session(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
22782286 ): RustBuffer.ByValue
22792287 fun uniffi_matrix_sdk_ffi_fn_method_client_set_account_data(`ptr`: Pointer,`eventType`: RustBuffer.ByValue,`content`: RustBuffer.ByValue,
@@ -3292,6 +3300,8 @@ internal interface UniffiLib : Library {
32923300 ): Short
32933301 fun uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url(
32943302 ): Short
3303+ fun uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo(
3304+ ): Short
32953305 fun uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url(
32963306 ): Short
32973307 fun uniffi_matrix_sdk_ffi_checksum_method_client_create_room(
@@ -3364,6 +3374,8 @@ internal interface UniffiLib : Library {
33643374 ): Short
33653375 fun uniffi_matrix_sdk_ffi_checksum_method_client_search_users(
33663376 ): Short
3377+ fun uniffi_matrix_sdk_ffi_checksum_method_client_server(
3378+ ): Short
33673379 fun uniffi_matrix_sdk_ffi_checksum_method_client_session(
33683380 ): Short
33693381 fun uniffi_matrix_sdk_ffi_checksum_method_client_set_account_data(
@@ -4147,6 +4159,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
41474159 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_avatar_url() != 27867.toShort()) {
41484160 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
41494161 }
4162+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_await_room_remote_echo() != 18126.toShort()) {
4163+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4164+ }
41504165 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_cached_avatar_url() != 58990.toShort()) {
41514166 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
41524167 }
@@ -4255,6 +4270,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
42554270 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_search_users() != 42927.toShort()) {
42564271 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
42574272 }
4273+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_server() != 63276.toShort()) {
4274+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4275+ }
42584276 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_session() != 8085.toShort()) {
42594277 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
42604278 }
@@ -5819,6 +5837,15 @@ public interface ClientInterface {
58195837 */
58205838 suspend fun `avatarUrl`(): kotlin.String?
58215839
5840+ /**
5841+ * Waits until an at least partially synced room is received, and returns
5842+ * it.
5843+ *
5844+ * **Note: this function will loop endlessly until either it finds the room
5845+ * or an externally set timeout happens.**
5846+ */
5847+ suspend fun `awaitRoomRemoteEcho`(`roomId`: kotlin.String): Room
5848+
58225849 /**
58235850 * Retrieves an avatar cached from a previous call to [`Self::avatar_url`].
58245851 */
@@ -5969,6 +5996,21 @@ public interface ClientInterface {
59695996
59705997 suspend fun `searchUsers`(`searchTerm`: kotlin.String, `limit`: kotlin.ULong): SearchUsersResults
59715998
5999+ /**
6000+ * The URL of the server.
6001+ *
6002+ * Not to be confused with the `Self::homeserver`. `server` is usually
6003+ * the server part in a user ID, e.g. with `@mnt_io:matrix.org`, here
6004+ * `matrix.org` is the server, whilst `matrix-client.matrix.org` is the
6005+ * homeserver (at the time of writing — 2024-08-28).
6006+ *
6007+ * This value is optional depending on how the `Client` has been built.
6008+ * If it's been built from a homeserver URL directly, we don't know the
6009+ * server. However, if the `Client` has been built from a server URL or
6010+ * name, then the homeserver has been discovered, and we know both.
6011+ */
6012+ fun `server`(): kotlin.String?
6013+
59726014 fun `session`(): Session
59736015
59746016 /**
@@ -6245,6 +6287,34 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
62456287 }
62466288
62476289
6290+ /**
6291+ * Waits until an at least partially synced room is received, and returns
6292+ * it.
6293+ *
6294+ * **Note: this function will loop endlessly until either it finds the room
6295+ * or an externally set timeout happens.**
6296+ */
6297+ @Throws(ClientException::class)
6298+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
6299+ override suspend fun `awaitRoomRemoteEcho`(`roomId`: kotlin.String) : Room {
6300+ return uniffiRustCallAsync(
6301+ callWithPointer { thisPtr ->
6302+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_await_room_remote_echo(
6303+ thisPtr,
6304+ FfiConverterString.lower(`roomId`),
6305+ )
6306+ },
6307+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) },
6308+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) },
6309+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) },
6310+ // lift function
6311+ { FfiConverterTypeRoom.lift(it) },
6312+ // Error FFI converter
6313+ ClientException.ErrorHandler,
6314+ )
6315+ }
6316+
6317+
62486318 /**
62496319 * Retrieves an avatar cached from a previous call to [`Self::avatar_url`].
62506320 */
@@ -7017,6 +7087,31 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
70177087 }
70187088
70197089
7090+ /**
7091+ * The URL of the server.
7092+ *
7093+ * Not to be confused with the `Self::homeserver`. `server` is usually
7094+ * the server part in a user ID, e.g. with `@mnt_io:matrix.org`, here
7095+ * `matrix.org` is the server, whilst `matrix-client.matrix.org` is the
7096+ * homeserver (at the time of writing — 2024-08-28).
7097+ *
7098+ * This value is optional depending on how the `Client` has been built.
7099+ * If it's been built from a homeserver URL directly, we don't know the
7100+ * server. However, if the `Client` has been built from a server URL or
7101+ * name, then the homeserver has been discovered, and we know both.
7102+ */override fun `server`(): kotlin.String? {
7103+ return FfiConverterOptionalString.lift(
7104+ callWithPointer {
7105+ uniffiRustCall() { _status ->
7106+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_server(
7107+ it, _status)
7108+ }
7109+ }
7110+ )
7111+ }
7112+
7113+
7114+
70207115 @Throws(ClientException::class)override fun `session`(): Session {
70217116 return FfiConverterTypeSession.lift(
70227117 callWithPointer {
@@ -22596,7 +22691,8 @@ public object FfiConverterTypeElementCallWellKnown: FfiConverterRustBuffer<Eleme
2259622691 * Element specific well-known settings
2259722692 */
2259822693data class ElementWellKnown (
22599- var `call`: ElementCallWellKnown
22694+ var `call`: ElementCallWellKnown?,
22695+ var `registrationHelperUrl`: kotlin.String?
2260022696) {
2260122697
2260222698 companion object
@@ -22605,16 +22701,19 @@ data class ElementWellKnown (
2260522701public object FfiConverterTypeElementWellKnown: FfiConverterRustBuffer<ElementWellKnown> {
2260622702 override fun read(buf: ByteBuffer): ElementWellKnown {
2260722703 return ElementWellKnown(
22608- FfiConverterTypeElementCallWellKnown.read(buf),
22704+ FfiConverterOptionalTypeElementCallWellKnown.read(buf),
22705+ FfiConverterOptionalString.read(buf),
2260922706 )
2261022707 }
2261122708
2261222709 override fun allocationSize(value: ElementWellKnown) = (
22613- FfiConverterTypeElementCallWellKnown.allocationSize(value.`call`)
22710+ FfiConverterOptionalTypeElementCallWellKnown.allocationSize(value.`call`) +
22711+ FfiConverterOptionalString.allocationSize(value.`registrationHelperUrl`)
2261422712 )
2261522713
2261622714 override fun write(value: ElementWellKnown, buf: ByteBuffer) {
22617- FfiConverterTypeElementCallWellKnown.write(value.`call`, buf)
22715+ FfiConverterOptionalTypeElementCallWellKnown.write(value.`call`, buf)
22716+ FfiConverterOptionalString.write(value.`registrationHelperUrl`, buf)
2261822717 }
2261922718}
2262022719
@@ -34618,6 +34717,35 @@ public object FfiConverterOptionalTypeComposerDraft: FfiConverterRustBuffer<Comp
3461834717
3461934718
3462034719
34720+ public object FfiConverterOptionalTypeElementCallWellKnown: FfiConverterRustBuffer<ElementCallWellKnown?> {
34721+ override fun read(buf: ByteBuffer): ElementCallWellKnown? {
34722+ if (buf.get().toInt() == 0) {
34723+ return null
34724+ }
34725+ return FfiConverterTypeElementCallWellKnown.read(buf)
34726+ }
34727+
34728+ override fun allocationSize(value: ElementCallWellKnown?): ULong {
34729+ if (value == null) {
34730+ return 1UL
34731+ } else {
34732+ return 1UL + FfiConverterTypeElementCallWellKnown.allocationSize(value)
34733+ }
34734+ }
34735+
34736+ override fun write(value: ElementCallWellKnown?, buf: ByteBuffer) {
34737+ if (value == null) {
34738+ buf.put(0)
34739+ } else {
34740+ buf.put(1)
34741+ FfiConverterTypeElementCallWellKnown.write(value, buf)
34742+ }
34743+ }
34744+ }
34745+
34746+
34747+
34748+
3462134749public object FfiConverterOptionalTypeFileInfo: FfiConverterRustBuffer<FileInfo?> {
3462234750 override fun read(buf: ByteBuffer): FileInfo? {
3462334751 if (buf.get().toInt() == 0) {
0 commit comments