@@ -2171,6 +2171,8 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
21712171
21722172
21732173
2174+
2175+
21742176
21752177
21762178
@@ -2683,6 +2685,8 @@ internal interface UniffiLib : Library {
26832685 ): Long
26842686 fun uniffi_matrix_sdk_ffi_fn_method_room_membership(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
26852687 ): RustBuffer.ByValue
2688+ fun uniffi_matrix_sdk_ffi_fn_method_room_message_filtered_timeline(`ptr`: Pointer,`internalIdPrefix`: RustBuffer.ByValue,`allowedMessageTypes`: RustBuffer.ByValue,
2689+ ): Long
26862690 fun uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
26872691 ): RustBuffer.ByValue
26882692 fun uniffi_matrix_sdk_ffi_fn_method_room_pinned_events_timeline(`ptr`: Pointer,`internalIdPrefix`: RustBuffer.ByValue,`maxEventsToLoad`: Short,`maxConcurrentRequests`: Short,
@@ -3745,6 +3749,8 @@ internal interface UniffiLib : Library {
37453749 ): Short
37463750 fun uniffi_matrix_sdk_ffi_checksum_method_room_membership(
37473751 ): Short
3752+ fun uniffi_matrix_sdk_ffi_checksum_method_room_message_filtered_timeline(
3753+ ): Short
37483754 fun uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id(
37493755 ): Short
37503756 fun uniffi_matrix_sdk_ffi_checksum_method_room_pinned_events_timeline(
@@ -4809,6 +4815,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
48094815 if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 26065.toShort()) {
48104816 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
48114817 }
4818+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_message_filtered_timeline() != 47862.toShort()) {
4819+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4820+ }
48124821 if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 39510.toShort()) {
48134822 throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
48144823 }
@@ -12495,6 +12504,24 @@ public interface RoomInterface {
1249512504
1249612505 fun `membership`(): Membership
1249712506
12507+ /**
12508+ * A timeline instance that can be configured to only include RoomMessage
12509+ * type events and filter those further based on their message type.
12510+ *
12511+ * Virtual timeline items will still be provided and the
12512+ * `default_event_filter` will be applied before everything else.
12513+ *
12514+ * # Arguments
12515+ *
12516+ * * `internal_id_prefix` - An optional String that will be prepended to
12517+ * all the timeline item's internal IDs, making it possible to
12518+ * distinguish different timeline instances from each other.
12519+ *
12520+ * * `allowed_message_types` - A list of `RoomMessageEventMessageType` that
12521+ * will be allowed to appear in the timeline
12522+ */
12523+ suspend fun `messageFilteredTimeline`(`internalIdPrefix`: kotlin.String?, `allowedMessageTypes`: List<RoomMessageEventMessageType>): Timeline
12524+
1249812525 fun `ownUserId`(): kotlin.String
1249912526
1250012527 suspend fun `pinnedEventsTimeline`(`internalIdPrefix`: kotlin.String?, `maxEventsToLoad`: kotlin.UShort, `maxConcurrentRequests`: kotlin.UShort): Timeline
@@ -13713,6 +13740,43 @@ open class Room: Disposable, AutoCloseable, RoomInterface {
1371313740 }
1371413741
1371513742
13743+
13744+ /**
13745+ * A timeline instance that can be configured to only include RoomMessage
13746+ * type events and filter those further based on their message type.
13747+ *
13748+ * Virtual timeline items will still be provided and the
13749+ * `default_event_filter` will be applied before everything else.
13750+ *
13751+ * # Arguments
13752+ *
13753+ * * `internal_id_prefix` - An optional String that will be prepended to
13754+ * all the timeline item's internal IDs, making it possible to
13755+ * distinguish different timeline instances from each other.
13756+ *
13757+ * * `allowed_message_types` - A list of `RoomMessageEventMessageType` that
13758+ * will be allowed to appear in the timeline
13759+ */
13760+ @Throws(ClientException::class)
13761+ @Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
13762+ override suspend fun `messageFilteredTimeline`(`internalIdPrefix`: kotlin.String?, `allowedMessageTypes`: List<RoomMessageEventMessageType>) : Timeline {
13763+ return uniffiRustCallAsync(
13764+ callWithPointer { thisPtr ->
13765+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_message_filtered_timeline(
13766+ thisPtr,
13767+ FfiConverterOptionalString.lower(`internalIdPrefix`),FfiConverterSequenceTypeRoomMessageEventMessageType.lower(`allowedMessageTypes`),
13768+ )
13769+ },
13770+ { future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) },
13771+ { future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) },
13772+ { future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) },
13773+ // lift function
13774+ { FfiConverterTypeTimeline.lift(it) },
13775+ // Error FFI converter
13776+ ClientException.ErrorHandler,
13777+ )
13778+ }
13779+
1371613780 override fun `ownUserId`(): kotlin.String {
1371713781 return FfiConverterString.lift(
1371813782 callWithPointer {
@@ -32715,6 +32779,42 @@ public object FfiConverterTypeRoomListServiceSyncIndicator: FfiConverterRustBuff
3271532779
3271632780
3271732781
32782+
32783+ enum class RoomMessageEventMessageType {
32784+
32785+ AUDIO,
32786+ EMOTE,
32787+ FILE,
32788+ IMAGE,
32789+ LOCATION,
32790+ NOTICE,
32791+ SERVER_NOTICE,
32792+ TEXT,
32793+ VIDEO,
32794+ VERIFICATION_REQUEST,
32795+ OTHER;
32796+ companion object
32797+ }
32798+
32799+
32800+ public object FfiConverterTypeRoomMessageEventMessageType: FfiConverterRustBuffer<RoomMessageEventMessageType> {
32801+ override fun read(buf: ByteBuffer) = try {
32802+ RoomMessageEventMessageType.values()[buf.getInt() - 1]
32803+ } catch (e: IndexOutOfBoundsException) {
32804+ throw RuntimeException("invalid enum value, something is very wrong!!", e)
32805+ }
32806+
32807+ override fun allocationSize(value: RoomMessageEventMessageType) = 4UL
32808+
32809+ override fun write(value: RoomMessageEventMessageType, buf: ByteBuffer) {
32810+ buf.putInt(value.ordinal + 1)
32811+ }
32812+ }
32813+
32814+
32815+
32816+
32817+
3271832818/**
3271932819 * Enum representing the push notification modes for a room.
3272032820 */
@@ -38429,6 +38529,31 @@ public object FfiConverterSequenceTypeRoomListEntriesUpdate: FfiConverterRustBuf
3842938529
3843038530
3843138531
38532+ public object FfiConverterSequenceTypeRoomMessageEventMessageType: FfiConverterRustBuffer<List<RoomMessageEventMessageType>> {
38533+ override fun read(buf: ByteBuffer): List<RoomMessageEventMessageType> {
38534+ val len = buf.getInt()
38535+ return List<RoomMessageEventMessageType>(len) {
38536+ FfiConverterTypeRoomMessageEventMessageType.read(buf)
38537+ }
38538+ }
38539+
38540+ override fun allocationSize(value: List<RoomMessageEventMessageType>): ULong {
38541+ val sizeForLength = 4UL
38542+ val sizeForItems = value.map { FfiConverterTypeRoomMessageEventMessageType.allocationSize(it) }.sum()
38543+ return sizeForLength + sizeForItems
38544+ }
38545+
38546+ override fun write(value: List<RoomMessageEventMessageType>, buf: ByteBuffer) {
38547+ buf.putInt(value.size)
38548+ value.iterator().forEach {
38549+ FfiConverterTypeRoomMessageEventMessageType.write(it, buf)
38550+ }
38551+ }
38552+ }
38553+
38554+
38555+
38556+
3843238557public object FfiConverterSequenceTypeSlidingSyncVersion: FfiConverterRustBuffer<List<SlidingSyncVersion>> {
3843338558 override fun read(buf: ByteBuffer): List<SlidingSyncVersion> {
3843438559 val len = buf.getInt()
0 commit comments