WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

Commit 5bfecde

Browse files
author
github-actions
committed
Bump SDK version to 25.12.2 (matrix-rust-sdk to 017644864a46d16be2fc8009ebd54eee883c547b)
1 parent 579c396 commit 5bfecde

File tree

3 files changed

+122
-24
lines changed

3 files changed

+122
-24
lines changed
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
object BuildVersionsSDK {
22
const val majorVersion = 25
3-
const val minorVersion = 11
4-
const val patchVersion = 26
3+
const val minorVersion = 12
4+
const val patchVersion = 2
55
}

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

Lines changed: 77 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,10 @@ import uniffi.matrix_sdk_ui.EventItemOrigin
7474
import uniffi.matrix_sdk_ui.FfiConverterTypeEventItemOrigin
7575
import uniffi.matrix_sdk_ui.FfiConverterTypeRoomPinnedEventsChange
7676
import uniffi.matrix_sdk_ui.FfiConverterTypeSpaceRoomListPaginationState
77+
import uniffi.matrix_sdk_ui.FfiConverterTypeTimelineReadReceiptTracking
7778
import uniffi.matrix_sdk_ui.RoomPinnedEventsChange
7879
import uniffi.matrix_sdk_ui.SpaceRoomListPaginationState
80+
import uniffi.matrix_sdk_ui.TimelineReadReceiptTracking
7981
import uniffi.matrix_sdk.RustBuffer as RustBufferBackupDownloadStrategy
8082
import uniffi.matrix_sdk.RustBuffer as RustBufferOAuthAuthorizationData
8183
import uniffi.matrix_sdk.RustBuffer as RustBufferRoomMemberRole
@@ -94,6 +96,7 @@ import uniffi.matrix_sdk_crypto.RustBuffer as RustBufferUtdCause
9496
import uniffi.matrix_sdk_ui.RustBuffer as RustBufferEventItemOrigin
9597
import uniffi.matrix_sdk_ui.RustBuffer as RustBufferRoomPinnedEventsChange
9698
import uniffi.matrix_sdk_ui.RustBuffer as RustBufferSpaceRoomListPaginationState
99+
import uniffi.matrix_sdk_ui.RustBuffer as RustBufferTimelineReadReceiptTracking
97100

98101
// This is a helper for safely working with byte buffers returned from the Rust code.
99102
// A rust-owned buffer is represented by its capacity, its current length, and a
@@ -1827,7 +1830,9 @@ external fun uniffi_matrix_sdk_ffi_checksum_method_client_register_notification_
18271830
): Short
18281831
external fun uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar(
18291832
): Short
1830-
external fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_server_info(
1833+
external fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions(
1834+
): Short
1835+
external fun uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known(
18311836
): Short
18321837
external fun uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias(
18331838
): Short
@@ -2781,11 +2786,11 @@ internal object UniffiLib {
27812786
uniffiCallbackInterfaceUnableToDecryptDelegate.register(this)
27822787
uniffiCallbackInterfaceVerificationStateListener.register(this)
27832788
uniffiCallbackInterfaceWidgetCapabilitiesProvider.register(this)
2784-
uniffi.matrix_sdk_ui.uniffiEnsureInitialized()
2785-
uniffi.matrix_sdk_crypto.uniffiEnsureInitialized()
2786-
uniffi.matrix_sdk_base.uniffiEnsureInitialized()
2787-
uniffi.matrix_sdk_common.uniffiEnsureInitialized()
27882789
uniffi.matrix_sdk.uniffiEnsureInitialized()
2790+
uniffi.matrix_sdk_common.uniffiEnsureInitialized()
2791+
uniffi.matrix_sdk_base.uniffiEnsureInitialized()
2792+
uniffi.matrix_sdk_crypto.uniffiEnsureInitialized()
2793+
uniffi.matrix_sdk_ui.uniffiEnsureInitialized()
27892794

27902795
}
27912796
external fun uniffi_matrix_sdk_ffi_fn_clone_checkcodesender(`handle`: Long,uniffi_out_err: UniffiRustCallStatus,
@@ -2912,7 +2917,9 @@ external fun uniffi_matrix_sdk_ffi_fn_method_client_register_notification_handle
29122917
): Long
29132918
external fun uniffi_matrix_sdk_ffi_fn_method_client_remove_avatar(`ptr`: Long,
29142919
): Long
2915-
external fun uniffi_matrix_sdk_ffi_fn_method_client_reset_server_info(`ptr`: Long,
2920+
external fun uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions(`ptr`: Long,
2921+
): Long
2922+
external fun uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known(`ptr`: Long,
29162923
): Long
29172924
external fun uniffi_matrix_sdk_ffi_fn_method_client_resolve_room_alias(`ptr`: Long,`roomAlias`: RustBuffer.ByValue,
29182925
): Long
@@ -4395,7 +4402,10 @@ private fun uniffiCheckApiChecksums(lib: IntegrityCheckingUniffiLib) {
43954402
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_remove_avatar() != 29033.toShort()) {
43964403
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
43974404
}
4398-
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_server_info() != 16333.toShort()) {
4405+
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_supported_versions() != 32820.toShort()) {
4406+
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
4407+
}
4408+
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_reset_well_known() != 61934.toShort()) {
43994409
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
44004410
}
44014411
if (lib.uniffi_matrix_sdk_ffi_checksum_method_client_resolve_room_alias() != 3551.toShort()) {
@@ -7039,11 +7049,20 @@ public interface ClientInterface {
70397049
/**
70407050
* Empty the server version and unstable features cache.
70417051
*
7042-
* Since the SDK caches server info (versions, unstable features,
7043-
* well-known etc), it's possible to have a stale entry in the cache.
7044-
* This functions makes it possible to force reset it.
7052+
* Since the SDK caches the supported versions, it's possible to have a
7053+
* stale entry in the cache. This functions makes it possible to force
7054+
* reset it.
70457055
*/
7046-
suspend fun `resetServerInfo`()
7056+
suspend fun `resetSupportedVersions`()
7057+
7058+
/**
7059+
* Empty the well-known cache.
7060+
*
7061+
* Since the SDK caches the well-known, it's possible to have a stale
7062+
* entry in the cache. This functions makes it possible to force reset
7063+
* it.
7064+
*/
7065+
suspend fun `resetWellKnown`()
70477066

70487067
/**
70497068
* Resolves the given room alias to a room ID (and a list of servers), if
@@ -8719,16 +8738,45 @@ open class Client: Disposable, AutoCloseable, ClientInterface
87198738
/**
87208739
* Empty the server version and unstable features cache.
87218740
*
8722-
* Since the SDK caches server info (versions, unstable features,
8723-
* well-known etc), it's possible to have a stale entry in the cache.
8724-
* This functions makes it possible to force reset it.
8741+
* Since the SDK caches the supported versions, it's possible to have a
8742+
* stale entry in the cache. This functions makes it possible to force
8743+
* reset it.
87258744
*/
87268745
@Throws(ClientException::class)
87278746
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
8728-
override suspend fun `resetServerInfo`() {
8747+
override suspend fun `resetSupportedVersions`() {
87298748
return uniffiRustCallAsync(
87308749
callWithHandle { uniffiHandle ->
8731-
UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_reset_server_info(
8750+
UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_reset_supported_versions(
8751+
uniffiHandle,
8752+
8753+
)
8754+
},
8755+
{ future, callback, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_poll_void(future, callback, continuation) },
8756+
{ future, continuation -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_complete_void(future, continuation) },
8757+
{ future -> UniffiLib.ffi_matrix_sdk_ffi_rust_future_free_void(future) },
8758+
// lift function
8759+
{ Unit },
8760+
8761+
// Error FFI converter
8762+
ClientException.ErrorHandler,
8763+
)
8764+
}
8765+
8766+
8767+
/**
8768+
* Empty the well-known cache.
8769+
*
8770+
* Since the SDK caches the well-known, it's possible to have a stale
8771+
* entry in the cache. This functions makes it possible to force reset
8772+
* it.
8773+
*/
8774+
@Throws(ClientException::class)
8775+
@Suppress("ASSIGNED_BUT_NEVER_ACCESSED_VARIABLE")
8776+
override suspend fun `resetWellKnown`() {
8777+
return uniffiRustCallAsync(
8778+
callWithHandle { uniffiHandle ->
8779+
UniffiLib.uniffi_matrix_sdk_ffi_fn_method_client_reset_well_known(
87328780
uniffiHandle,
87338781

87348782
)
@@ -32408,6 +32456,8 @@ data class NotificationRoomInfo (
3240832456
var `isEncrypted`: kotlin.Boolean?
3240932457
,
3241032458
var `isDirect`: kotlin.Boolean
32459+
,
32460+
var `isSpace`: kotlin.Boolean
3241132461

3241232462
){
3241332463

@@ -32430,6 +32480,7 @@ public object FfiConverterTypeNotificationRoomInfo: FfiConverterRustBuffer<Notif
3243032480
FfiConverterULong.read(buf),
3243132481
FfiConverterOptionalBoolean.read(buf),
3243232482
FfiConverterBoolean.read(buf),
32483+
FfiConverterBoolean.read(buf),
3243332484
)
3243432485
}
3243532486

@@ -32441,7 +32492,8 @@ public object FfiConverterTypeNotificationRoomInfo: FfiConverterRustBuffer<Notif
3244132492
FfiConverterOptionalTypeJoinRule.allocationSize(value.`joinRule`) +
3244232493
FfiConverterULong.allocationSize(value.`joinedMembersCount`) +
3244332494
FfiConverterOptionalBoolean.allocationSize(value.`isEncrypted`) +
32444-
FfiConverterBoolean.allocationSize(value.`isDirect`)
32495+
FfiConverterBoolean.allocationSize(value.`isDirect`) +
32496+
FfiConverterBoolean.allocationSize(value.`isSpace`)
3244532497
)
3244632498

3244732499
override fun write(value: NotificationRoomInfo, buf: ByteBuffer) {
@@ -32453,6 +32505,7 @@ public object FfiConverterTypeNotificationRoomInfo: FfiConverterRustBuffer<Notif
3245332505
FfiConverterULong.write(value.`joinedMembersCount`, buf)
3245432506
FfiConverterOptionalBoolean.write(value.`isEncrypted`, buf)
3245532507
FfiConverterBoolean.write(value.`isDirect`, buf)
32508+
FfiConverterBoolean.write(value.`isSpace`, buf)
3245632509
}
3245732510
}
3245832511

@@ -34892,12 +34945,12 @@ data class TimelineConfiguration (
3489234945
,
3489334946
/**
3489434947
* Should the read receipts and read markers be tracked for the timeline
34895-
* items in this instance?
34948+
* items in this instance and on which event types?
3489634949
*
3489734950
* As this has a non negligible performance impact, make sure to enable it
3489834951
* only when you need it.
3489934952
*/
34900-
var `trackReadReceipts`: kotlin.Boolean
34953+
var `trackReadReceipts`: TimelineReadReceiptTracking
3490134954
,
3490234955
/**
3490334956
* Whether this timeline instance should report UTDs through the client's
@@ -34935,7 +34988,7 @@ public object FfiConverterTypeTimelineConfiguration: FfiConverterRustBuffer<Time
3493534988
FfiConverterTypeTimelineFilter.read(buf),
3493634989
FfiConverterOptionalString.read(buf),
3493734990
FfiConverterTypeDateDividerMode.read(buf),
34938-
FfiConverterBoolean.read(buf),
34991+
FfiConverterTypeTimelineReadReceiptTracking.read(buf),
3493934992
FfiConverterBoolean.read(buf),
3494034993
)
3494134994
}
@@ -34945,7 +34998,7 @@ public object FfiConverterTypeTimelineConfiguration: FfiConverterRustBuffer<Time
3494534998
FfiConverterTypeTimelineFilter.allocationSize(value.`filter`) +
3494634999
FfiConverterOptionalString.allocationSize(value.`internalIdPrefix`) +
3494735000
FfiConverterTypeDateDividerMode.allocationSize(value.`dateDividerMode`) +
34948-
FfiConverterBoolean.allocationSize(value.`trackReadReceipts`) +
35001+
FfiConverterTypeTimelineReadReceiptTracking.allocationSize(value.`trackReadReceipts`) +
3494935002
FfiConverterBoolean.allocationSize(value.`reportUtds`)
3495035003
)
3495135004

@@ -34954,7 +35007,7 @@ public object FfiConverterTypeTimelineConfiguration: FfiConverterRustBuffer<Time
3495435007
FfiConverterTypeTimelineFilter.write(value.`filter`, buf)
3495535008
FfiConverterOptionalString.write(value.`internalIdPrefix`, buf)
3495635009
FfiConverterTypeDateDividerMode.write(value.`dateDividerMode`, buf)
34957-
FfiConverterBoolean.write(value.`trackReadReceipts`, buf)
35010+
FfiConverterTypeTimelineReadReceiptTracking.write(value.`trackReadReceipts`, buf)
3495835011
FfiConverterBoolean.write(value.`reportUtds`, buf)
3495935012
}
3496035013
}
@@ -58064,6 +58117,8 @@ public typealias FfiConverterTypeTimestamp = FfiConverterULong
5806458117

5806558118

5806658119

58120+
58121+
5806758122

5806858123

5806958124

sdk/sdk-android/src/main/kotlin/uniffi/matrix_sdk_ui/matrix_sdk_ui.kt

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1096,3 +1096,46 @@ public object FfiConverterTypeSpaceRoomListPaginationState : FfiConverterRustBuf
10961096

10971097

10981098

1099+
1100+
1101+
/**
1102+
* The level of read receipt tracking for the timeline.
1103+
*/
1104+
1105+
enum class TimelineReadReceiptTracking {
1106+
1107+
/**
1108+
* Track read receipts for all events.
1109+
*/
1110+
ALL_EVENTS,
1111+
/**
1112+
* Track read receipts only for message-like events.
1113+
*/
1114+
MESSAGE_LIKE_EVENTS,
1115+
/**
1116+
* Disable read receipt tracking.
1117+
*/
1118+
DISABLED;
1119+
companion object
1120+
}
1121+
1122+
1123+
/**
1124+
* @suppress
1125+
*/
1126+
public object FfiConverterTypeTimelineReadReceiptTracking: FfiConverterRustBuffer<TimelineReadReceiptTracking> {
1127+
override fun read(buf: ByteBuffer) = try {
1128+
TimelineReadReceiptTracking.values()[buf.getInt() - 1]
1129+
} catch (e: IndexOutOfBoundsException) {
1130+
throw RuntimeException("invalid enum value, something is very wrong!!", e)
1131+
}
1132+
1133+
override fun allocationSize(value: TimelineReadReceiptTracking) = 4UL
1134+
1135+
override fun write(value: TimelineReadReceiptTracking, buf: ByteBuffer) {
1136+
buf.putInt(value.ordinal + 1)
1137+
}
1138+
}
1139+
1140+
1141+

0 commit comments

Comments
 (0)