@@ -1710,6 +1710,10 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
17101710
17111711
17121712
1713+
1714+
1715+
1716+
17131717
17141718
17151719
@@ -1825,6 +1829,8 @@ internal interface UniffiLib : Library {
18251829 ): RustBuffer.ByValue
18261830 fun uniffi_matrix_sdk_ffi_fn_method_client_get_recently_visited_rooms(`ptr`: Pointer,
18271831 ): Long
1832+ fun uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview(`ptr`: Pointer,`roomIdOrAlias`: RustBuffer.ByValue,
1833+ ): Long
18281834 fun uniffi_matrix_sdk_ffi_fn_method_client_get_session_verification_controller(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
18291835 ): Pointer
18301836 fun uniffi_matrix_sdk_ffi_fn_method_client_homeserver(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
@@ -1843,6 +1849,8 @@ internal interface UniffiLib : Library {
18431849 ): Pointer
18441850 fun uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
18451851 ): Unit
1852+ fun uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias(`ptr`: Pointer,`roomAlias`: RustBuffer.ByValue,
1853+ ): Long
18461854 fun uniffi_matrix_sdk_ffi_fn_method_client_restore_session(`ptr`: Pointer,`session`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
18471855 ): Unit
18481856 fun uniffi_matrix_sdk_ffi_fn_method_client_room_directory_search(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
@@ -2803,6 +2811,8 @@ internal interface UniffiLib : Library {
28032811 ): Short
28042812 fun uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms(
28052813 ): Short
2814+ fun uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview(
2815+ ): Short
28062816 fun uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller(
28072817 ): Short
28082818 fun uniffi_matrix_sdk_ffi_checksum_method_client_homeserver(
@@ -2821,6 +2831,8 @@ internal interface UniffiLib : Library {
28212831 ): Short
28222832 fun uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar(
28232833 ): Short
2834+ fun uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias(
2835+ ): Short
28242836 fun uniffi_matrix_sdk_ffi_checksum_method_client_restore_session(
28252837 ): Short
28262838 fun uniffi_matrix_sdk_ffi_checksum_method_client_room_directory_search(
@@ -3577,6 +3589,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
35773589 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_recently_visited_rooms() != 22399.toShort()) {
35783590 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
35793591 }
3592+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_room_preview() != 16738.toShort()) {
3593+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
3594+ }
35803595 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_get_session_verification_controller() != 62335.toShort()) {
35813596 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
35823597 }
@@ -3604,6 +3619,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
36043619 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() != 60365.toShort()) {
36053620 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
36063621 }
3622+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() != 40454.toShort()) {
3623+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
3624+ }
36073625 if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_restore_session() != 19641.toShort()) {
36083626 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
36093627 }
@@ -5427,6 +5445,11 @@ public interface ClientInterface {
54275445
54285446 suspend fun `getRecentlyVisitedRooms`(): List<kotlin.String>
54295447
5448+ /**
5449+ * Get the preview of a room, to interact with it.
5450+ */
5451+ suspend fun `getRoomPreview`(`roomIdOrAlias`: kotlin.String): RoomPreview
5452+
54305453 fun `getSessionVerificationController`(): SessionVerificationController
54315454
54325455 /**
@@ -5456,6 +5479,11 @@ public interface ClientInterface {
54565479
54575480 fun `removeAvatar`()
54585481
5482+ /**
5483+ * Resolves the given room alias to a room id, if possible.
5484+ */
5485+ suspend fun `resolveRoomAlias`(`roomAlias`: kotlin.String): kotlin.String
5486+
54595487 /**
54605488 * Restores the client from a `Session`.
54615489 */
@@ -5824,6 +5852,29 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
58245852 )
58255853 }
58265854
5855+ /**
5856+ * Get the preview of a room, to interact with it.
5857+ */
5858+ @Throws(ClientException::class)
5859+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
5860+ override suspend fun `getRoomPreview`(`roomIdOrAlias`: kotlin.String) : RoomPreview {
5861+ return uniffiRustCallAsync(
5862+ callWithPointer { thisPtr ->
5863+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_get_room_preview(
5864+ thisPtr,
5865+ FfiConverterString.lower(`roomIdOrAlias`),
5866+ )
5867+ },
5868+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) },
5869+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) },
5870+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) },
5871+ // lift function
5872+ { FfiConverterTypeRoomPreview.lift(it) },
5873+ // Error FFI converter
5874+ ClientException.ErrorHandler,
5875+ )
5876+ }
5877+
58275878 @Throws(ClientException::class)override fun `getSessionVerificationController`(): SessionVerificationController =
58285879 callWithPointer {
58295880 uniffiRustCallWithError(ClientException) { _status ->
@@ -5975,6 +6026,29 @@ open class Client: Disposable, AutoCloseable, ClientInterface {
59756026
59766027
59776028
6029+ /**
6030+ * Resolves the given room alias to a room id, if possible.
6031+ */
6032+ @Throws(ClientException::class)
6033+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
6034+ override suspend fun `resolveRoomAlias`(`roomAlias`: kotlin.String) : kotlin.String {
6035+ return uniffiRustCallAsync(
6036+ callWithPointer { thisPtr ->
6037+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias(
6038+ thisPtr,
6039+ FfiConverterString.lower(`roomAlias`),
6040+ )
6041+ },
6042+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) },
6043+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) },
6044+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) },
6045+ // lift function
6046+ { FfiConverterString.lift(it) },
6047+ // Error FFI converter
6048+ ClientException.ErrorHandler,
6049+ )
6050+ }
6051+
59786052 /**
59796053 * Restores the client from a `Session`.
59806054 */
@@ -20504,6 +20578,114 @@ public object FfiConverterTypeRoomPowerLevels: FfiConverterRustBuffer<RoomPowerL
2050420578
2050520579
2050620580
20581+ /**
20582+ * The preview of a room, be it invited/joined/left, or not.
20583+ */
20584+ data class RoomPreview (
20585+ /**
20586+ * The room id for this room.
20587+ */
20588+ var `roomId`: kotlin.String,
20589+ /**
20590+ * The canonical alias for the room.
20591+ */
20592+ var `canonicalAlias`: kotlin.String?,
20593+ /**
20594+ * The room's name, if set.
20595+ */
20596+ var `name`: kotlin.String?,
20597+ /**
20598+ * The room's topic, if set.
20599+ */
20600+ var `topic`: kotlin.String?,
20601+ /**
20602+ * The MXC URI to the room's avatar, if set.
20603+ */
20604+ var `avatarUrl`: kotlin.String?,
20605+ /**
20606+ * The number of joined members.
20607+ */
20608+ var `numJoinedMembers`: kotlin.ULong,
20609+ /**
20610+ * The room type (space, custom) or nothing, if it's a regular room.
20611+ */
20612+ var `roomType`: kotlin.String?,
20613+ /**
20614+ * Is the history world-readable for this room?
20615+ */
20616+ var `isHistoryWorldReadable`: kotlin.Boolean,
20617+ /**
20618+ * Is the room joined by the current user?
20619+ */
20620+ var `isJoined`: kotlin.Boolean,
20621+ /**
20622+ * Is the current user invited to this room?
20623+ */
20624+ var `isInvited`: kotlin.Boolean,
20625+ /**
20626+ * is the join rule public for this room?
20627+ */
20628+ var `isPublic`: kotlin.Boolean,
20629+ /**
20630+ * Can we knock (or restricted-knock) to this room?
20631+ */
20632+ var `canKnock`: kotlin.Boolean
20633+ ) {
20634+
20635+ companion object
20636+ }
20637+
20638+ public object FfiConverterTypeRoomPreview: FfiConverterRustBuffer<RoomPreview> {
20639+ override fun read(buf: ByteBuffer): RoomPreview {
20640+ return RoomPreview(
20641+ FfiConverterString.read(buf),
20642+ FfiConverterOptionalString.read(buf),
20643+ FfiConverterOptionalString.read(buf),
20644+ FfiConverterOptionalString.read(buf),
20645+ FfiConverterOptionalString.read(buf),
20646+ FfiConverterULong.read(buf),
20647+ FfiConverterOptionalString.read(buf),
20648+ FfiConverterBoolean.read(buf),
20649+ FfiConverterBoolean.read(buf),
20650+ FfiConverterBoolean.read(buf),
20651+ FfiConverterBoolean.read(buf),
20652+ FfiConverterBoolean.read(buf),
20653+ )
20654+ }
20655+
20656+ override fun allocationSize(value: RoomPreview) = (
20657+ FfiConverterString.allocationSize(value.`roomId`) +
20658+ FfiConverterOptionalString.allocationSize(value.`canonicalAlias`) +
20659+ FfiConverterOptionalString.allocationSize(value.`name`) +
20660+ FfiConverterOptionalString.allocationSize(value.`topic`) +
20661+ FfiConverterOptionalString.allocationSize(value.`avatarUrl`) +
20662+ FfiConverterULong.allocationSize(value.`numJoinedMembers`) +
20663+ FfiConverterOptionalString.allocationSize(value.`roomType`) +
20664+ FfiConverterBoolean.allocationSize(value.`isHistoryWorldReadable`) +
20665+ FfiConverterBoolean.allocationSize(value.`isJoined`) +
20666+ FfiConverterBoolean.allocationSize(value.`isInvited`) +
20667+ FfiConverterBoolean.allocationSize(value.`isPublic`) +
20668+ FfiConverterBoolean.allocationSize(value.`canKnock`)
20669+ )
20670+
20671+ override fun write(value: RoomPreview, buf: ByteBuffer) {
20672+ FfiConverterString.write(value.`roomId`, buf)
20673+ FfiConverterOptionalString.write(value.`canonicalAlias`, buf)
20674+ FfiConverterOptionalString.write(value.`name`, buf)
20675+ FfiConverterOptionalString.write(value.`topic`, buf)
20676+ FfiConverterOptionalString.write(value.`avatarUrl`, buf)
20677+ FfiConverterULong.write(value.`numJoinedMembers`, buf)
20678+ FfiConverterOptionalString.write(value.`roomType`, buf)
20679+ FfiConverterBoolean.write(value.`isHistoryWorldReadable`, buf)
20680+ FfiConverterBoolean.write(value.`isJoined`, buf)
20681+ FfiConverterBoolean.write(value.`isInvited`, buf)
20682+ FfiConverterBoolean.write(value.`isPublic`, buf)
20683+ FfiConverterBoolean.write(value.`canKnock`, buf)
20684+ }
20685+ }
20686+
20687+
20688+
2050720689data class RoomSubscription (
2050820690 var `requiredState`: List<RequiredState>?,
2050920691 var `timelineLimit`: kotlin.UInt?
0 commit comments