Skip to content

Commit

Permalink
Bump SDK version to 0.2.69 (matrix-rust-sdk to ee93c278dff6f343b322bb…
Browse files Browse the repository at this point in the history
…f2a8be4115cfb30b40)
  • Loading branch information
github-actions committed Dec 5, 2024
1 parent 3982047 commit dcd919a
Show file tree
Hide file tree
Showing 3 changed files with 142 additions and 2 deletions.
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/BuildVersionsSDK.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
object BuildVersionsSDK {
const val majorVersion = 0
const val minorVersion = 2
const val patchVersion = 68
const val patchVersion = 69
}
Original file line number Diff line number Diff line change
Expand Up @@ -2171,6 +2171,8 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(








Expand Down Expand Up @@ -2683,6 +2685,8 @@ internal interface UniffiLib : Library {
): Long
fun uniffi_matrix_sdk_ffi_fn_method_room_membership(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
): RustBuffer.ByValue
fun uniffi_matrix_sdk_ffi_fn_method_room_message_filtered_timeline(`ptr`: Pointer,`internalIdPrefix`: RustBuffer.ByValue,`allowedMessageTypes`: RustBuffer.ByValue,
): Long
fun uniffi_matrix_sdk_ffi_fn_method_room_own_user_id(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
): RustBuffer.ByValue
fun uniffi_matrix_sdk_ffi_fn_method_room_pinned_events_timeline(`ptr`: Pointer,`internalIdPrefix`: RustBuffer.ByValue,`maxEventsToLoad`: Short,`maxConcurrentRequests`: Short,
Expand Down Expand Up @@ -3745,6 +3749,8 @@ internal interface UniffiLib : Library {
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_room_membership(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_room_message_filtered_timeline(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id(
): Short
fun uniffi_matrix_sdk_ffi_checksum_method_room_pinned_events_timeline(
Expand Down Expand Up @@ -4809,6 +4815,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_membership() != 26065.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_message_filtered_timeline() != 47862.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_own_user_id() != 39510.toShort()) {
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
}
Expand Down Expand Up @@ -12495,6 +12504,24 @@ public interface RoomInterface {

fun `membership`(): Membership

/**
* A timeline instance that can be configured to only include RoomMessage
* type events and filter those further based on their message type.
*
* Virtual timeline items will still be provided and the
* `default_event_filter` will be applied before everything else.
*
* # Arguments
*
* * `internal_id_prefix` - An optional String that will be prepended to
* all the timeline item's internal IDs, making it possible to
* distinguish different timeline instances from each other.
*
* * `allowed_message_types` - A list of `RoomMessageEventMessageType` that
* will be allowed to appear in the timeline
*/
suspend fun `messageFilteredTimeline`(`internalIdPrefix`: kotlin.String?, `allowedMessageTypes`: List<RoomMessageEventMessageType>): Timeline

fun `ownUserId`(): kotlin.String

suspend fun `pinnedEventsTimeline`(`internalIdPrefix`: kotlin.String?, `maxEventsToLoad`: kotlin.UShort, `maxConcurrentRequests`: kotlin.UShort): Timeline
Expand Down Expand Up @@ -13713,6 +13740,43 @@ open class Room: Disposable, AutoCloseable, RoomInterface {
}



/**
* A timeline instance that can be configured to only include RoomMessage
* type events and filter those further based on their message type.
*
* Virtual timeline items will still be provided and the
* `default_event_filter` will be applied before everything else.
*
* # Arguments
*
* * `internal_id_prefix` - An optional String that will be prepended to
* all the timeline item's internal IDs, making it possible to
* distinguish different timeline instances from each other.
*
* * `allowed_message_types` - A list of `RoomMessageEventMessageType` that
* will be allowed to appear in the timeline
*/
@Throws(ClientException::class)
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
override suspend fun `messageFilteredTimeline`(`internalIdPrefix`: kotlin.String?, `allowedMessageTypes`: List<RoomMessageEventMessageType>) : Timeline {
return uniffiRustCallAsync(
callWithPointer { thisPtr ->
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_message_filtered_timeline(
thisPtr,
FfiConverterOptionalString.lower(`internalIdPrefix`),FfiConverterSequenceTypeRoomMessageEventMessageType.lower(`allowedMessageTypes`),
)
},
{ future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_pointer(future, callback, continuation) },
{ future, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_complete_pointer(future, continuation) },
{ future -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_free_pointer(future) },
// lift function
{ FfiConverterTypeTimeline.lift(it) },
// Error FFI converter
ClientException.ErrorHandler,
)
}

override fun `ownUserId`(): kotlin.String {
return FfiConverterString.lift(
callWithPointer {
Expand Down Expand Up @@ -32715,6 +32779,42 @@ public object FfiConverterTypeRoomListServiceSyncIndicator: FfiConverterRustBuff




enum class RoomMessageEventMessageType {

AUDIO,
EMOTE,
FILE,
IMAGE,
LOCATION,
NOTICE,
SERVER_NOTICE,
TEXT,
VIDEO,
VERIFICATION_REQUEST,
OTHER;
companion object
}


public object FfiConverterTypeRoomMessageEventMessageType: FfiConverterRustBuffer<RoomMessageEventMessageType> {
override fun read(buf: ByteBuffer) = try {
RoomMessageEventMessageType.values()[buf.getInt() - 1]
} catch (e: IndexOutOfBoundsException) {
throw RuntimeException("invalid enum value, something is very wrong!!", e)
}

override fun allocationSize(value: RoomMessageEventMessageType) = 4UL

override fun write(value: RoomMessageEventMessageType, buf: ByteBuffer) {
buf.putInt(value.ordinal + 1)
}
}





/**
* Enum representing the push notification modes for a room.
*/
Expand Down Expand Up @@ -38429,6 +38529,31 @@ public object FfiConverterSequenceTypeRoomListEntriesUpdate: FfiConverterRustBuf



public object FfiConverterSequenceTypeRoomMessageEventMessageType: FfiConverterRustBuffer<List<RoomMessageEventMessageType>> {
override fun read(buf: ByteBuffer): List<RoomMessageEventMessageType> {
val len = buf.getInt()
return List<RoomMessageEventMessageType>(len) {
FfiConverterTypeRoomMessageEventMessageType.read(buf)
}
}

override fun allocationSize(value: List<RoomMessageEventMessageType>): ULong {
val sizeForLength = 4UL
val sizeForItems = value.map { FfiConverterTypeRoomMessageEventMessageType.allocationSize(it) }.sum()
return sizeForLength + sizeForItems
}

override fun write(value: List<RoomMessageEventMessageType>, buf: ByteBuffer) {
buf.putInt(value.size)
value.iterator().forEach {
FfiConverterTypeRoomMessageEventMessageType.write(it, buf)
}
}
}




public object FfiConverterSequenceTypeSlidingSyncVersion: FfiConverterRustBuffer<List<SlidingSyncVersion>> {
override fun read(buf: ByteBuffer): List<SlidingSyncVersion> {
val len = buf.getInt()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,22 @@ enum class UtdCause {
* be confused with pre-join or pre-invite messages (see
* [`UtdCause::SentBeforeWeJoined`] for that).
*/
HISTORICAL_MESSAGE;
HISTORICAL_MESSAGE,
/**
* The keys for this event are intentionally withheld.
*
* The sender has refused to share the key because our device does not meet
* the sender's security requirements.
*/
WITHHELD_FOR_UNVERIFIED_OR_INSECURE_DEVICE,
/**
* The keys for this event are missing, likely because the sender was
* unable to share them (e.g., failure to establish an Olm 1:1
* channel). Alternatively, the sender may have deliberately excluded
* this device by cherry-picking and blocking it, in which case, no action
* can be taken on our side.
*/
WITHHELD_BY_SENDER;
companion object
}

Expand Down

0 comments on commit dcd919a

Please sign in to comment.