@@ -2412,6 +2412,10 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
24122412
24132413
24142414
2415+ 
2416+ 
2417+ 
2418+ 
24152419
24162420
24172421
@@ -2929,6 +2933,8 @@ internal interface UniffiLib : Library {
29292933    ): Unit
29302934    fun uniffi_matrix_sdk_ffi_fn_method_room_encryption_state(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus, 
29312935    ): RustBufferEncryptionState.ByValue
2936+     fun uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription(`ptr`: Pointer,`threadRootEventId`: RustBuffer.ByValue,
2937+     ): Long
29322938    fun uniffi_matrix_sdk_ffi_fn_method_room_forget(`ptr`: Pointer,
29332939    ): Long
29342940    fun uniffi_matrix_sdk_ffi_fn_method_room_get_power_levels(`ptr`: Pointer,
@@ -3037,6 +3043,8 @@ internal interface UniffiLib : Library {
30373043    ): Long
30383044    fun uniffi_matrix_sdk_ffi_fn_method_room_set_name(`ptr`: Pointer,`name`: RustBuffer.ByValue,
30393045    ): Long
3046+     fun uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription(`ptr`: Pointer,`threadRootEventId`: RustBuffer.ByValue,`subscribed`: Byte,
3047+     ): Long
30403048    fun uniffi_matrix_sdk_ffi_fn_method_room_set_topic(`ptr`: Pointer,`topic`: RustBuffer.ByValue,
30413049    ): Long
30423050    fun uniffi_matrix_sdk_ffi_fn_method_room_set_unread_flag(`ptr`: Pointer,`newValue`: Byte,
@@ -4141,6 +4149,8 @@ internal interface UniffiLib : Library {
41414149    ): Short
41424150    fun uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state(
41434151    ): Short
4152+     fun uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription(
4153+     ): Short
41444154    fun uniffi_matrix_sdk_ffi_checksum_method_room_forget(
41454155    ): Short
41464156    fun uniffi_matrix_sdk_ffi_checksum_method_room_get_power_levels(
@@ -4249,6 +4259,8 @@ internal interface UniffiLib : Library {
42494259    ): Short
42504260    fun uniffi_matrix_sdk_ffi_checksum_method_room_set_name(
42514261    ): Short
4262+     fun uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription(
4263+     ): Short
42524264    fun uniffi_matrix_sdk_ffi_checksum_method_room_set_topic(
42534265    ): Short
42544266    fun uniffi_matrix_sdk_ffi_checksum_method_room_set_unread_flag(
@@ -5341,6 +5353,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
53415353    if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_encryption_state() != 9101.toShort()) {
53425354        throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
53435355    }
5356+     if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_fetch_thread_subscription() != 51696.toShort()) {
5357+         throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5358+     }
53445359    if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_forget() != 37840.toShort()) {
53455360        throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
53465361    }
@@ -5503,6 +5518,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
55035518    if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_name() != 52127.toShort()) {
55045519        throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
55055520    }
5521+     if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_thread_subscription() != 3684.toShort()) {
5522+         throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5523+     }
55065524    if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_set_topic() != 5576.toShort()) {
55075525        throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
55085526    }
@@ -14503,6 +14521,16 @@ public interface RoomInterface {
1450314521
1450414522    fun `encryptionState`(): EncryptionState
1450514523
14524+     /**
14525+      * Return the current MSC4306 thread subscription for the given thread root
14526+      * in this room.
14527+      *
14528+      * Returns `None` if the thread doesn't exist, or isn't subscribed to, or
14529+      * the server can't handle MSC4306; otherwise, returns the thread
14530+      * subscription status.
14531+      */
14532+     suspend fun `fetchThreadSubscription`(`threadRootEventId`: kotlin.String): ThreadSubscription?
14533+     
1450614534    /**
1450714535     * Forget this room.
1450814536     *
@@ -14826,6 +14854,21 @@ public interface RoomInterface {
1482614854     */
1482714855    suspend fun `setName`(`name`: kotlin.String)
1482814856
14857+     /**
14858+      * Toggle a MSC4306 subscription to a thread in this room, based on the
14859+      * thread root event id.
14860+      *
14861+      * If `subscribed` is `true`, it will subscribe to the thread, with a
14862+      * precision that the subscription was manually requested by the user
14863+      * (i.e. not automatic).
14864+      *
14865+      * If the thread was already subscribed to (resp. unsubscribed from), while
14866+      * trying to subscribe to it (resp. unsubscribe from it), it will do
14867+      * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an
14868+      * idempotent operation.
14869+      */
14870+     suspend fun `setThreadSubscription`(`threadRootEventId`: kotlin.String, `subscribed`: kotlin.Boolean)
14871+     
1482914872    /**
1483014873     * Sets a new topic in the room.
1483114874     */
@@ -15336,6 +15379,35 @@ open class Room: Disposable, AutoCloseable, RoomInterface {
1533615379
1533715380
1533815381
15382+     /**
15383+      * Return the current MSC4306 thread subscription for the given thread root
15384+      * in this room.
15385+      *
15386+      * Returns `None` if the thread doesn't exist, or isn't subscribed to, or
15387+      * the server can't handle MSC4306; otherwise, returns the thread
15388+      * subscription status.
15389+      */
15390+     @Throws(ClientException::class)
15391+     @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
15392+     override suspend fun `fetchThreadSubscription`(`threadRootEventId`: kotlin.String) : ThreadSubscription? {
15393+         return uniffiRustCallAsync(
15394+         callWithPointer { thisPtr ->
15395+             UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_fetch_thread_subscription(
15396+                 thisPtr,
15397+                 FfiConverterString.lower(`threadRootEventId`),
15398+             )
15399+         },
15400+         { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer(future, callback, continuation) },
15401+         { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer(future, continuation) },
15402+         { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_rust_buffer(future) },
15403+         // lift function
15404+         { FfiConverterOptionalTypeThreadSubscription.lift(it) },
15405+         // Error FFI converter
15406+         ClientException.ErrorHandler,
15407+     )
15408+     }
15409+ 
15410+     
1533915411    /**
1534015412     * Forget this room.
1534115413     *
@@ -16593,6 +16665,41 @@ open class Room: Disposable, AutoCloseable, RoomInterface {
1659316665    }
1659416666
1659516667
16668+     /**
16669+      * Toggle a MSC4306 subscription to a thread in this room, based on the
16670+      * thread root event id.
16671+      *
16672+      * If `subscribed` is `true`, it will subscribe to the thread, with a
16673+      * precision that the subscription was manually requested by the user
16674+      * (i.e. not automatic).
16675+      *
16676+      * If the thread was already subscribed to (resp. unsubscribed from), while
16677+      * trying to subscribe to it (resp. unsubscribe from it), it will do
16678+      * nothing, i.e. subscribing (resp. unsubscribing) to a thread is an
16679+      * idempotent operation.
16680+      */
16681+     @Throws(ClientException::class)
16682+     @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
16683+     override suspend fun `setThreadSubscription`(`threadRootEventId`: kotlin.String, `subscribed`: kotlin.Boolean) {
16684+         return uniffiRustCallAsync(
16685+         callWithPointer { thisPtr ->
16686+             UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_set_thread_subscription(
16687+                 thisPtr,
16688+                 FfiConverterString.lower(`threadRootEventId`),FfiConverterBoolean.lower(`subscribed`),
16689+             )
16690+         },
16691+         { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) },
16692+         { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) },
16693+         { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_void(future) },
16694+         // lift function
16695+         { Unit },
16696+         
16697+         // Error FFI converter
16698+         ClientException.ErrorHandler,
16699+     )
16700+     }
16701+ 
16702+     
1659616703    /**
1659716704     * Sets a new topic in the room.
1659816705     */
@@ -29357,7 +29464,16 @@ data class RoomInfo (
2935729464     *
2935829465     * Can be missing if the room power levels event is missing from the store.
2935929466     */
29360-     var `powerLevels`: RoomPowerLevels?
29467+     var `powerLevels`: RoomPowerLevels?, 
29468+     /**
29469+      * This room's version.
29470+      */
29471+     var `roomVersion`: kotlin.String?, 
29472+     /**
29473+      * Whether creators are privileged over every other user (have infinite
29474+      * power level).
29475+      */
29476+     var `privilegedCreatorsRole`: kotlin.Boolean
2936129477) : Disposable {
2936229478
2936329479    @Suppress("UNNECESSARY_SAFE_CALL") // codegen is much simpler if we unconditionally emit safe calls here
@@ -29429,6 +29545,10 @@ data class RoomInfo (
2942929545
2943029546        Disposable.destroy(this.`powerLevels`)
2943129547
29548+         Disposable.destroy(this.`roomVersion`)
29549+     
29550+         Disposable.destroy(this.`privilegedCreatorsRole`)
29551+     
2943229552    }
2943329553
2943429554    companion object
@@ -29470,6 +29590,8 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer<RoomInfo> {
2947029590            FfiConverterOptionalTypeJoinRule.read(buf),
2947129591            FfiConverterTypeRoomHistoryVisibility.read(buf),
2947229592            FfiConverterOptionalTypeRoomPowerLevels.read(buf),
29593+             FfiConverterOptionalString.read(buf),
29594+             FfiConverterBoolean.read(buf),
2947329595        )
2947429596    }
2947529597
@@ -29506,7 +29628,9 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer<RoomInfo> {
2950629628            FfiConverterSequenceString.allocationSize(value.`pinnedEventIds`) +
2950729629            FfiConverterOptionalTypeJoinRule.allocationSize(value.`joinRule`) +
2950829630            FfiConverterTypeRoomHistoryVisibility.allocationSize(value.`historyVisibility`) +
29509-             FfiConverterOptionalTypeRoomPowerLevels.allocationSize(value.`powerLevels`)
29631+             FfiConverterOptionalTypeRoomPowerLevels.allocationSize(value.`powerLevels`) +
29632+             FfiConverterOptionalString.allocationSize(value.`roomVersion`) +
29633+             FfiConverterBoolean.allocationSize(value.`privilegedCreatorsRole`)
2951029634    )
2951129635
2951229636    override fun write(value: RoomInfo, buf: ByteBuffer) {
@@ -29543,6 +29667,8 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer<RoomInfo> {
2954329667            FfiConverterOptionalTypeJoinRule.write(value.`joinRule`, buf)
2954429668            FfiConverterTypeRoomHistoryVisibility.write(value.`historyVisibility`, buf)
2954529669            FfiConverterOptionalTypeRoomPowerLevels.write(value.`powerLevels`, buf)
29670+             FfiConverterOptionalString.write(value.`roomVersion`, buf)
29671+             FfiConverterBoolean.write(value.`privilegedCreatorsRole`, buf)
2954629672    }
2954729673}
2954829674
@@ -30386,6 +30512,38 @@ public object FfiConverterTypeTextMessageContent: FfiConverterRustBuffer<TextMes
3038630512
3038730513
3038830514
30515+ /**
30516+  * Status of a thread subscription (MSC4306).
30517+  */
30518+ data class ThreadSubscription (
30519+     /**
30520+      * Whether the thread subscription happened automatically (e.g. after a
30521+      * mention) or if it was manually requested by the user.
30522+      */
30523+     var `automatic`: kotlin.Boolean
30524+ ) {
30525+     
30526+     companion object
30527+ }
30528+ 
30529+ public object FfiConverterTypeThreadSubscription: FfiConverterRustBuffer<ThreadSubscription> {
30530+     override fun read(buf: ByteBuffer): ThreadSubscription {
30531+         return ThreadSubscription(
30532+             FfiConverterBoolean.read(buf),
30533+         )
30534+     }
30535+ 
30536+     override fun allocationSize(value: ThreadSubscription) = (
30537+             FfiConverterBoolean.allocationSize(value.`automatic`)
30538+     )
30539+ 
30540+     override fun write(value: ThreadSubscription, buf: ByteBuffer) {
30541+             FfiConverterBoolean.write(value.`automatic`, buf)
30542+     }
30543+ }
30544+ 
30545+ 
30546+ 
3038930547data class ThumbnailInfo (
3039030548    var `height`: kotlin.ULong?, 
3039130549    var `width`: kotlin.ULong?, 
@@ -46042,6 +46200,35 @@ public object FfiConverterOptionalTypeSuccessorRoom: FfiConverterRustBuffer<Succ
4604246200
4604346201
4604446202
46203+ public object FfiConverterOptionalTypeThreadSubscription: FfiConverterRustBuffer<ThreadSubscription?> {
46204+     override fun read(buf: ByteBuffer): ThreadSubscription? {
46205+         if (buf.get().toInt() == 0) {
46206+             return null
46207+         }
46208+         return FfiConverterTypeThreadSubscription.read(buf)
46209+     }
46210+ 
46211+     override fun allocationSize(value: ThreadSubscription?): ULong {
46212+         if (value == null) {
46213+             return 1UL
46214+         } else {
46215+             return 1UL + FfiConverterTypeThreadSubscription.allocationSize(value)
46216+         }
46217+     }
46218+ 
46219+     override fun write(value: ThreadSubscription?, buf: ByteBuffer) {
46220+         if (value == null) {
46221+             buf.put(0)
46222+         } else {
46223+             buf.put(1)
46224+             FfiConverterTypeThreadSubscription.write(value, buf)
46225+         }
46226+     }
46227+ }
46228+ 
46229+ 
46230+ 
46231+ 
4604546232public object FfiConverterOptionalTypeThumbnailInfo: FfiConverterRustBuffer<ThumbnailInfo?> {
4604646233    override fun read(buf: ByteBuffer): ThumbnailInfo? {
4604746234        if (buf.get().toInt() == 0) {
0 commit comments