@@ -2078,6 +2078,12 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
20782078
20792079
20802080
2081+
2082+
2083+
2084+
2085+
2086+
20812087
20822088
20832089
@@ -2501,6 +2507,8 @@ internal interface UniffiLib : Library {
25012507 ): Long
25022508 fun uniffi_matrix_sdk_ffi_fn_method_room_can_user_kick(`ptr`: Pointer,`userId`: RustBuffer.ByValue,
25032509 ): Long
2510+ fun uniffi_matrix_sdk_ffi_fn_method_room_can_user_pin_unpin(`ptr`: Pointer,`userId`: RustBuffer.ByValue,
2511+ ): Long
25042512 fun uniffi_matrix_sdk_ffi_fn_method_room_can_user_redact_other(`ptr`: Pointer,`userId`: RustBuffer.ByValue,
25052513 ): Long
25062514 fun uniffi_matrix_sdk_ffi_fn_method_room_can_user_redact_own(`ptr`: Pointer,`userId`: RustBuffer.ByValue,
@@ -2843,6 +2851,8 @@ internal interface UniffiLib : Library {
28432851 ): Long
28442852 fun uniffi_matrix_sdk_ffi_fn_method_timeline_paginate_backwards(`ptr`: Pointer,`numEvents`: Short,
28452853 ): Long
2854+ fun uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue,
2855+ ): Long
28462856 fun uniffi_matrix_sdk_ffi_fn_method_timeline_redact_event(`ptr`: Pointer,`item`: Pointer,`reason`: RustBuffer.ByValue,
28472857 ): Long
28482858 fun uniffi_matrix_sdk_ffi_fn_method_timeline_retry_decryption(`ptr`: Pointer,`sessionIds`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
@@ -2871,6 +2881,8 @@ internal interface UniffiLib : Library {
28712881 ): Long
28722882 fun uniffi_matrix_sdk_ffi_fn_method_timeline_toggle_reaction(`ptr`: Pointer,`eventId`: RustBuffer.ByValue,`key`: RustBuffer.ByValue,
28732883 ): Long
2884+ fun uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(`ptr`: Pointer,`eventId`: RustBuffer.ByValue,
2885+ ): Long
28742886 fun uniffi_matrix_sdk_ffi_fn_clone_timelinediff(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
28752887 ): Pointer
28762888 fun uniffi_matrix_sdk_ffi_fn_free_timelinediff(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
@@ -3511,6 +3523,8 @@ internal interface UniffiLib : Library {
35113523 ): Short
35123524 fun uniffi_matrix_sdk_ffi_checksum_method_room_can_user_kick(
35133525 ): Short
3526+ fun uniffi_matrix_sdk_ffi_checksum_method_room_can_user_pin_unpin(
3527+ ): Short
35143528 fun uniffi_matrix_sdk_ffi_checksum_method_room_can_user_redact_other(
35153529 ): Short
35163530 fun uniffi_matrix_sdk_ffi_checksum_method_room_can_user_redact_own(
@@ -3781,6 +3795,8 @@ internal interface UniffiLib : Library {
37813795 ): Short
37823796 fun uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards(
37833797 ): Short
3798+ fun uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event(
3799+ ): Short
37843800 fun uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event(
37853801 ): Short
37863802 fun uniffi_matrix_sdk_ffi_checksum_method_timeline_retry_decryption(
@@ -3809,6 +3825,8 @@ internal interface UniffiLib : Library {
38093825 ): Short
38103826 fun uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction(
38113827 ): Short
3828+ fun uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event(
3829+ ): Short
38123830 fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append(
38133831 ): Short
38143832 fun uniffi_matrix_sdk_ffi_checksum_method_timelinediff_change(
@@ -4483,6 +4501,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
44834501 if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_can_user_kick() != 12773.toShort()) {
44844502 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
44854503 }
4504+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_can_user_pin_unpin() != 8341.toShort()) {
4505+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4506+ }
44864507 if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_can_user_redact_other() != 13274.toShort()) {
44874508 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
44884509 }
@@ -4888,6 +4909,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
48884909 if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_paginate_backwards() != 65175.toShort()) {
48894910 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
48904911 }
4912+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_pin_event() != 41687.toShort()) {
4913+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4914+ }
48914915 if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_redact_event() != 8574.toShort()) {
48924916 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
48934917 }
@@ -4930,6 +4954,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
49304954 if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_toggle_reaction() != 10294.toShort()) {
49314955 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
49324956 }
4957+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_timeline_unpin_event() != 52414.toShort()) {
4958+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4959+ }
49334960 if (lib.uniffi_matrix_sdk_ffi_checksum_method_timelinediff_append() != 8453.toShort()) {
49344961 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
49354962 }
@@ -11435,6 +11462,8 @@ public interface RoomInterface {
1143511462
1143611463 suspend fun `canUserKick`(`userId`: kotlin.String): kotlin.Boolean
1143711464
11465+ suspend fun `canUserPinUnpin`(`userId`: kotlin.String): kotlin.Boolean
11466+
1143811467 suspend fun `canUserRedactOther`(`userId`: kotlin.String): kotlin.Boolean
1143911468
1144011469 suspend fun `canUserRedactOwn`(`userId`: kotlin.String): kotlin.Boolean
@@ -11967,6 +11996,27 @@ open class Room: Disposable, AutoCloseable, RoomInterface {
1196711996 }
1196811997
1196911998
11999+ @Throws(ClientException::class)
12000+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
12001+ override suspend fun `canUserPinUnpin`(`userId`: kotlin.String) : kotlin.Boolean {
12002+ return uniffiRustCallAsync(
12003+ callWithPointer { thisPtr ->
12004+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_can_user_pin_unpin(
12005+ thisPtr,
12006+ FfiConverterString.lower(`userId`),
12007+ )
12008+ },
12009+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) },
12010+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) },
12011+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_i8(future) },
12012+ // lift function
12013+ { FfiConverterBoolean.lift(it) },
12014+ // Error FFI converter
12015+ ClientException.ErrorHandler,
12016+ )
12017+ }
12018+
12019+
1197012020 @Throws(ClientException::class)
1197112021 @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
1197212022 override suspend fun `canUserRedactOther`(`userId`: kotlin.String) : kotlin.Boolean {
@@ -18424,6 +18474,15 @@ public interface TimelineInterface {
1842418474 */
1842518475 suspend fun `paginateBackwards`(`numEvents`: kotlin.UShort): kotlin.Boolean
1842618476
18477+ /**
18478+ * Adds a new pinned event by sending an updated `m.room.pinned_events`
18479+ * event containing the new event id.
18480+ *
18481+ * Returns `true` if we sent the request, `false` if the event was already
18482+ * pinned.
18483+ */
18484+ suspend fun `pinEvent`(`eventId`: kotlin.String): kotlin.Boolean
18485+
1842718486 /**
1842818487 * Redacts an event from the timeline.
1842918488 *
@@ -18471,6 +18530,15 @@ public interface TimelineInterface {
1847118530
1847218531 suspend fun `toggleReaction`(`eventId`: kotlin.String, `key`: kotlin.String)
1847318532
18533+ /**
18534+ * Adds a new pinned event by sending an updated `m.room.pinned_events`
18535+ * event without the event id we want to remove.
18536+ *
18537+ * Returns `true` if we sent the request, `false` if the event wasn't
18538+ * pinned
18539+ */
18540+ suspend fun `unpinEvent`(`eventId`: kotlin.String): kotlin.Boolean
18541+
1847418542 companion object
1847518543}
1847618544
@@ -18876,6 +18944,34 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface {
1887618944 }
1887718945
1887818946
18947+ /**
18948+ * Adds a new pinned event by sending an updated `m.room.pinned_events`
18949+ * event containing the new event id.
18950+ *
18951+ * Returns `true` if we sent the request, `false` if the event was already
18952+ * pinned.
18953+ */
18954+ @Throws(ClientException::class)
18955+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
18956+ override suspend fun `pinEvent`(`eventId`: kotlin.String) : kotlin.Boolean {
18957+ return uniffiRustCallAsync(
18958+ callWithPointer { thisPtr ->
18959+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_pin_event(
18960+ thisPtr,
18961+ FfiConverterString.lower(`eventId`),
18962+ )
18963+ },
18964+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) },
18965+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) },
18966+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_i8(future) },
18967+ // lift function
18968+ { FfiConverterBoolean.lift(it) },
18969+ // Error FFI converter
18970+ ClientException.ErrorHandler,
18971+ )
18972+ }
18973+
18974+
1887918975 /**
1888018976 * Redacts an event from the timeline.
1888118977 *
@@ -19138,6 +19234,34 @@ open class Timeline: Disposable, AutoCloseable, TimelineInterface {
1913819234 }
1913919235
1914019236
19237+ /**
19238+ * Adds a new pinned event by sending an updated `m.room.pinned_events`
19239+ * event without the event id we want to remove.
19240+ *
19241+ * Returns `true` if we sent the request, `false` if the event wasn't
19242+ * pinned
19243+ */
19244+ @Throws(ClientException::class)
19245+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
19246+ override suspend fun `unpinEvent`(`eventId`: kotlin.String) : kotlin.Boolean {
19247+ return uniffiRustCallAsync(
19248+ callWithPointer { thisPtr ->
19249+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_timeline_unpin_event(
19250+ thisPtr,
19251+ FfiConverterString.lower(`eventId`),
19252+ )
19253+ },
19254+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_i8(future, callback, continuation) },
19255+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_i8(future, continuation) },
19256+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_i8(future) },
19257+ // lift function
19258+ { FfiConverterBoolean.lift(it) },
19259+ // Error FFI converter
19260+ ClientException.ErrorHandler,
19261+ )
19262+ }
19263+
19264+
1914119265
1914219266
1914319267
@@ -22580,7 +22704,6 @@ public object FfiConverterTypePusherIdentifiers: FfiConverterRustBuffer<PusherId
2258022704
2258122705data class Reaction (
2258222706 var `key`: kotlin.String,
22583- var `count`: kotlin.ULong,
2258422707 var `senders`: List<ReactionSenderData>
2258522708) {
2258622709
@@ -22591,20 +22714,17 @@ public object FfiConverterTypeReaction: FfiConverterRustBuffer<Reaction> {
2259122714 override fun read(buf: ByteBuffer): Reaction {
2259222715 return Reaction(
2259322716 FfiConverterString.read(buf),
22594- FfiConverterULong.read(buf),
2259522717 FfiConverterSequenceTypeReactionSenderData.read(buf),
2259622718 )
2259722719 }
2259822720
2259922721 override fun allocationSize(value: Reaction) = (
2260022722 FfiConverterString.allocationSize(value.`key`) +
22601- FfiConverterULong.allocationSize(value.`count`) +
2260222723 FfiConverterSequenceTypeReactionSenderData.allocationSize(value.`senders`)
2260322724 )
2260422725
2260522726 override fun write(value: Reaction, buf: ByteBuffer) {
2260622727 FfiConverterString.write(value.`key`, buf)
22607- FfiConverterULong.write(value.`count`, buf)
2260822728 FfiConverterSequenceTypeReactionSenderData.write(value.`senders`, buf)
2260922729 }
2261022730}
@@ -22919,7 +23039,11 @@ data class RoomInfo (
2291923039 * Events causing mentions/highlights for the user, according to their
2292023040 * notification settings.
2292123041 */
22922- var `numUnreadMentions`: kotlin.ULong
23042+ var `numUnreadMentions`: kotlin.ULong,
23043+ /**
23044+ * The currently pinned event ids
23045+ */
23046+ var `pinnedEventIds`: List<kotlin.String>
2292323047) {
2292423048
2292523049 companion object
@@ -22956,6 +23080,7 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer<RoomInfo> {
2295623080 FfiConverterULong.read(buf),
2295723081 FfiConverterULong.read(buf),
2295823082 FfiConverterULong.read(buf),
23083+ FfiConverterSequenceString.read(buf),
2295923084 )
2296023085 }
2296123086
@@ -22987,7 +23112,8 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer<RoomInfo> {
2298723112 FfiConverterBoolean.allocationSize(value.`isMarkedUnread`) +
2298823113 FfiConverterULong.allocationSize(value.`numUnreadMessages`) +
2298923114 FfiConverterULong.allocationSize(value.`numUnreadNotifications`) +
22990- FfiConverterULong.allocationSize(value.`numUnreadMentions`)
23115+ FfiConverterULong.allocationSize(value.`numUnreadMentions`) +
23116+ FfiConverterSequenceString.allocationSize(value.`pinnedEventIds`)
2299123117 )
2299223118
2299323119 override fun write(value: RoomInfo, buf: ByteBuffer) {
@@ -23019,6 +23145,7 @@ public object FfiConverterTypeRoomInfo: FfiConverterRustBuffer<RoomInfo> {
2301923145 FfiConverterULong.write(value.`numUnreadMessages`, buf)
2302023146 FfiConverterULong.write(value.`numUnreadNotifications`, buf)
2302123147 FfiConverterULong.write(value.`numUnreadMentions`, buf)
23148+ FfiConverterSequenceString.write(value.`pinnedEventIds`, buf)
2302223149 }
2302323150}
2302423151
0 commit comments