Skip to content

Commit 0cd46a9

Browse files
author
github-actions
committed
Bump SDK version to 0.2.6 (matrix-rust-sdk to 0c98e26a055a305812fdda5c19110f492aaa6b72)
1 parent 3336237 commit 0cd46a9

File tree

2 files changed

+99
-20
lines changed

2 files changed

+99
-20
lines changed
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object BuildVersionsSDK {
22
const val majorVersion = 0
33
const val minorVersion = 2
4-
const val patchVersion = 5
4+
const val patchVersion = 6
55
}

sdk/sdk-android/src/main/kotlin/org/matrix/rustcomponents/sdk/matrix_sdk_ffi.kt

Lines changed: 98 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2070,7 +2070,7 @@ internal interface UniffiLib : Library {
20702070
): Long
20712071
fun uniffi_matrix_sdk_ffi_fn_method_room_unban_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`reason`: RustBuffer.ByValue,
20722072
): Long
2073-
fun uniffi_matrix_sdk_ffi_fn_method_room_update_power_level_for_user(`ptr`: Pointer,`userId`: RustBuffer.ByValue,`powerLevel`: Long,
2073+
fun uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users(`ptr`: Pointer,`updates`: RustBuffer.ByValue,
20742074
): Long
20752075
fun uniffi_matrix_sdk_ffi_fn_method_room_upload_avatar(`ptr`: Pointer,`mimeType`: RustBuffer.ByValue,`data`: RustBuffer.ByValue,`mediaInfo`: RustBuffer.ByValue,uniffi_out_err: UniffiRustCallStatus,
20762076
): Unit
@@ -2946,7 +2946,7 @@ internal interface UniffiLib : Library {
29462946
): Short
29472947
fun uniffi_matrix_sdk_ffi_checksum_method_room_unban_user(
29482948
): Short
2949-
fun uniffi_matrix_sdk_ffi_checksum_method_room_update_power_level_for_user(
2949+
fun uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users(
29502950
): Short
29512951
fun uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar(
29522952
): Short
@@ -3826,7 +3826,7 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
38263826
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_unban_user() != 51089.toShort()) {
38273827
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
38283828
}
3829-
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_power_level_for_user() != 61757.toShort()) {
3829+
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_update_power_levels_for_users() != 34363.toShort()) {
38303830
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
38313831
}
38323832
if (lib.uniffi_matrix_sdk_ffi_checksum_method_room_upload_avatar() != 34800.toShort()) {
@@ -10043,7 +10043,7 @@ public interface RoomInterface {
1004310043

1004410044
suspend fun `unbanUser`(`userId`: String, `reason`: String?)
1004510045

10046-
suspend fun `updatePowerLevelForUser`(`userId`: String, `powerLevel`: Long)
10046+
suspend fun `updatePowerLevelsForUsers`(`updates`: List<UserPowerLevelUpdate>)
1004710047

1004810048
/**
1004910049
* Upload and set the room's avatar.
@@ -11117,12 +11117,12 @@ open class Room: Disposable, AutoCloseable, RoomInterface {
1111711117

1111811118
@Throws(ClientException::class)
1111911119
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
11120-
override suspend fun `updatePowerLevelForUser`(`userId`: String, `powerLevel`: Long) {
11120+
override suspend fun `updatePowerLevelsForUsers`(`updates`: List<UserPowerLevelUpdate>) {
1112111121
return uniffiRustCallAsync(
1112211122
callWithPointer { thisPtr ->
11123-
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_power_level_for_user(
11123+
UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_room_update_power_levels_for_users(
1112411124
thisPtr,
11125-
FfiConverterString.lower(`userId`),FfiConverterLong.lower(`powerLevel`),
11125+
FfiConverterSequenceTypeUserPowerLevelUpdate.lower(`updates`),
1112611126
)
1112711127
},
1112811128
{ future, callback, continuation -> UniffiLib.INSTANCE.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) },
@@ -19742,6 +19742,44 @@ public object FfiConverterTypeUnstableVoiceContent: FfiConverterRustBuffer<Unsta
1974219742

1974319743

1974419744

19745+
/**
19746+
* An update for a particular user's power level within the room.
19747+
*/
19748+
data class UserPowerLevelUpdate (
19749+
/**
19750+
* The user ID of the user to update.
19751+
*/
19752+
var `userId`: String,
19753+
/**
19754+
* The power level to assign to the user.
19755+
*/
19756+
var `powerLevel`: Long
19757+
) {
19758+
19759+
companion object
19760+
}
19761+
19762+
public object FfiConverterTypeUserPowerLevelUpdate: FfiConverterRustBuffer<UserPowerLevelUpdate> {
19763+
override fun read(buf: ByteBuffer): UserPowerLevelUpdate {
19764+
return UserPowerLevelUpdate(
19765+
FfiConverterString.read(buf),
19766+
FfiConverterLong.read(buf),
19767+
)
19768+
}
19769+
19770+
override fun allocationSize(value: UserPowerLevelUpdate) = (
19771+
FfiConverterString.allocationSize(value.`userId`) +
19772+
FfiConverterLong.allocationSize(value.`powerLevel`)
19773+
)
19774+
19775+
override fun write(value: UserPowerLevelUpdate, buf: ByteBuffer) {
19776+
FfiConverterString.write(value.`userId`, buf)
19777+
FfiConverterLong.write(value.`powerLevel`, buf)
19778+
}
19779+
}
19780+
19781+
19782+
1974519783
data class UserProfile (
1974619784
var `userId`: String,
1974719785
var `displayName`: String?,
@@ -25346,6 +25384,9 @@ sealed class TimelineItemContentKind: Disposable {
2534625384
companion object
2534725385
}
2534825386

25387+
object CallInvite : TimelineItemContentKind()
25388+
25389+
2534925390
data class UnableToDecrypt(
2535025391

2535125392
val `msg`: EncryptedMessage
@@ -25432,6 +25473,8 @@ sealed class TimelineItemContentKind: Disposable {
2543225473
this.`endTime`,
2543325474
this.`hasBeenEdited`)
2543425475

25476+
}
25477+
is TimelineItemContentKind.CallInvite -> {// Nothing to destroy
2543525478
}
2543625479
is TimelineItemContentKind.UnableToDecrypt -> {
2543725480

@@ -25502,28 +25545,29 @@ public object FfiConverterTypeTimelineItemContentKind : FfiConverterRustBuffer<T
2550225545
FfiConverterOptionalULong.read(buf),
2550325546
FfiConverterBoolean.read(buf),
2550425547
)
25505-
5 -> TimelineItemContentKind.UnableToDecrypt(
25548+
5 -> TimelineItemContentKind.CallInvite
25549+
6 -> TimelineItemContentKind.UnableToDecrypt(
2550625550
FfiConverterTypeEncryptedMessage.read(buf),
2550725551
)
25508-
6 -> TimelineItemContentKind.RoomMembership(
25552+
7 -> TimelineItemContentKind.RoomMembership(
2550925553
FfiConverterString.read(buf),
2551025554
FfiConverterOptionalTypeMembershipChange.read(buf),
2551125555
)
25512-
7 -> TimelineItemContentKind.ProfileChange(
25556+
8 -> TimelineItemContentKind.ProfileChange(
2551325557
FfiConverterOptionalString.read(buf),
2551425558
FfiConverterOptionalString.read(buf),
2551525559
FfiConverterOptionalString.read(buf),
2551625560
FfiConverterOptionalString.read(buf),
2551725561
)
25518-
8 -> TimelineItemContentKind.State(
25562+
9 -> TimelineItemContentKind.State(
2551925563
FfiConverterString.read(buf),
2552025564
FfiConverterTypeOtherState.read(buf),
2552125565
)
25522-
9 -> TimelineItemContentKind.FailedToParseMessageLike(
25566+
10 -> TimelineItemContentKind.FailedToParseMessageLike(
2552325567
FfiConverterString.read(buf),
2552425568
FfiConverterString.read(buf),
2552525569
)
25526-
10 -> TimelineItemContentKind.FailedToParseState(
25570+
11 -> TimelineItemContentKind.FailedToParseState(
2552725571
FfiConverterString.read(buf),
2552825572
FfiConverterString.read(buf),
2552925573
FfiConverterString.read(buf),
@@ -25567,6 +25611,12 @@ public object FfiConverterTypeTimelineItemContentKind : FfiConverterRustBuffer<T
2556725611
+ FfiConverterBoolean.allocationSize(value.`hasBeenEdited`)
2556825612
)
2556925613
}
25614+
is TimelineItemContentKind.CallInvite -> {
25615+
// Add the size for the Int that specifies the variant plus the size needed for all fields
25616+
(
25617+
4
25618+
)
25619+
}
2557025620
is TimelineItemContentKind.UnableToDecrypt -> {
2557125621
// Add the size for the Int that specifies the variant plus the size needed for all fields
2557225622
(
@@ -25647,39 +25697,43 @@ public object FfiConverterTypeTimelineItemContentKind : FfiConverterRustBuffer<T
2564725697
FfiConverterBoolean.write(value.`hasBeenEdited`, buf)
2564825698
Unit
2564925699
}
25650-
is TimelineItemContentKind.UnableToDecrypt -> {
25700+
is TimelineItemContentKind.CallInvite -> {
2565125701
buf.putInt(5)
25702+
Unit
25703+
}
25704+
is TimelineItemContentKind.UnableToDecrypt -> {
25705+
buf.putInt(6)
2565225706
FfiConverterTypeEncryptedMessage.write(value.`msg`, buf)
2565325707
Unit
2565425708
}
2565525709
is TimelineItemContentKind.RoomMembership -> {
25656-
buf.putInt(6)
25710+
buf.putInt(7)
2565725711
FfiConverterString.write(value.`userId`, buf)
2565825712
FfiConverterOptionalTypeMembershipChange.write(value.`change`, buf)
2565925713
Unit
2566025714
}
2566125715
is TimelineItemContentKind.ProfileChange -> {
25662-
buf.putInt(7)
25716+
buf.putInt(8)
2566325717
FfiConverterOptionalString.write(value.`displayName`, buf)
2566425718
FfiConverterOptionalString.write(value.`prevDisplayName`, buf)
2566525719
FfiConverterOptionalString.write(value.`avatarUrl`, buf)
2566625720
FfiConverterOptionalString.write(value.`prevAvatarUrl`, buf)
2566725721
Unit
2566825722
}
2566925723
is TimelineItemContentKind.State -> {
25670-
buf.putInt(8)
25724+
buf.putInt(9)
2567125725
FfiConverterString.write(value.`stateKey`, buf)
2567225726
FfiConverterTypeOtherState.write(value.`content`, buf)
2567325727
Unit
2567425728
}
2567525729
is TimelineItemContentKind.FailedToParseMessageLike -> {
25676-
buf.putInt(9)
25730+
buf.putInt(10)
2567725731
FfiConverterString.write(value.`eventType`, buf)
2567825732
FfiConverterString.write(value.`error`, buf)
2567925733
Unit
2568025734
}
2568125735
is TimelineItemContentKind.FailedToParseState -> {
25682-
buf.putInt(10)
25736+
buf.putInt(11)
2568325737
FfiConverterString.write(value.`eventType`, buf)
2568425738
FfiConverterString.write(value.`stateKey`, buf)
2568525739
FfiConverterString.write(value.`error`, buf)
@@ -28852,6 +28906,31 @@ public object FfiConverterSequenceTypeRoomMember: FfiConverterRustBuffer<List<Ro
2885228906

2885328907

2885428908

28909+
public object FfiConverterSequenceTypeUserPowerLevelUpdate: FfiConverterRustBuffer<List<UserPowerLevelUpdate>> {
28910+
override fun read(buf: ByteBuffer): List<UserPowerLevelUpdate> {
28911+
val len = buf.getInt()
28912+
return List<UserPowerLevelUpdate>(len) {
28913+
FfiConverterTypeUserPowerLevelUpdate.read(buf)
28914+
}
28915+
}
28916+
28917+
override fun allocationSize(value: List<UserPowerLevelUpdate>): Int {
28918+
val sizeForLength = 4
28919+
val sizeForItems = value.map { FfiConverterTypeUserPowerLevelUpdate.allocationSize(it) }.sum()
28920+
return sizeForLength + sizeForItems
28921+
}
28922+
28923+
override fun write(value: List<UserPowerLevelUpdate>, buf: ByteBuffer) {
28924+
buf.putInt(value.size)
28925+
value.iterator().forEach {
28926+
FfiConverterTypeUserPowerLevelUpdate.write(it, buf)
28927+
}
28928+
}
28929+
}
28930+
28931+
28932+
28933+
2885528934
public object FfiConverterSequenceTypeUserProfile: FfiConverterRustBuffer<List<UserProfile>> {
2885628935
override fun read(buf: ByteBuffer): List<UserProfile> {
2885728936
val len = buf.getInt()

0 commit comments

Comments
 (0)