@@ -801,6 +801,9 @@ internal interface UniffiCallbackInterfaceSpaceRoomListEntriesListenerMethod0 :
801
801
internal interface UniffiCallbackInterfaceSpaceRoomListPaginationStateListenerMethod0 : com.sun.jna.Callback {
802
802
fun callback(`uniffiHandle`: Long,`paginationState`: RustBufferSpaceRoomListPaginationState.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,)
803
803
}
804
+ internal interface UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 : com.sun.jna.Callback {
805
+ fun callback(`uniffiHandle`: Long,`space`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,)
806
+ }
804
807
internal interface UniffiCallbackInterfaceSpaceServiceJoinedSpacesListenerMethod0 : com.sun.jna.Callback {
805
808
fun callback(`uniffiHandle`: Long,`roomUpdates`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,)
806
809
}
@@ -1290,6 +1293,22 @@ internal open class UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateLis
1290
1293
`uniffiFree` = other.`uniffiFree`
1291
1294
}
1292
1295
1296
+ }
1297
+ @Structure.FieldOrder("onUpdate", "uniffiFree")
1298
+ internal open class UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener(
1299
+ @JvmField internal var `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0? = null,
1300
+ @JvmField internal var `uniffiFree`: UniffiCallbackInterfaceFree? = null,
1301
+ ) : Structure() {
1302
+ class UniffiByValue(
1303
+ `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0? = null,
1304
+ `uniffiFree`: UniffiCallbackInterfaceFree? = null,
1305
+ ): UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener(`onUpdate`,`uniffiFree`,), Structure.ByValue
1306
+
1307
+ internal fun uniffiSetValue(other: UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener) {
1308
+ `onUpdate` = other.`onUpdate`
1309
+ `uniffiFree` = other.`uniffiFree`
1310
+ }
1311
+
1293
1312
}
1294
1313
@Structure.FieldOrder("onUpdate", "uniffiFree")
1295
1314
internal open class UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener(
@@ -2521,6 +2540,12 @@ internal open class UniffiVTableCallbackInterfaceWidgetCapabilitiesProvider(
2521
2540
2522
2541
2523
2542
2543
+
2544
+
2545
+
2546
+
2547
+
2548
+
2524
2549
2525
2550
2526
2551
@@ -2566,6 +2591,7 @@ internal interface UniffiLib : Library {
2566
2591
uniffiCallbackInterfaceSessionVerificationControllerDelegate.register(lib)
2567
2592
uniffiCallbackInterfaceSpaceRoomListEntriesListener.register(lib)
2568
2593
uniffiCallbackInterfaceSpaceRoomListPaginationStateListener.register(lib)
2594
+ uniffiCallbackInterfaceSpaceRoomListSpaceListener.register(lib)
2569
2595
uniffiCallbackInterfaceSpaceServiceJoinedSpacesListener.register(lib)
2570
2596
uniffiCallbackInterfaceSyncServiceStateObserver.register(lib)
2571
2597
uniffiCallbackInterfaceTimelineListener.register(lib)
@@ -3400,10 +3426,14 @@ internal interface UniffiLib : Library {
3400
3426
): RustBufferSpaceRoomListPaginationState.ByValue
3401
3427
fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_rooms(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
3402
3428
): RustBuffer.ByValue
3429
+ fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
3430
+ ): RustBuffer.ByValue
3403
3431
fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_pagination_state_updates(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus,
3404
3432
): Pointer
3405
3433
fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_room_update(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus,
3406
3434
): Pointer
3435
+ fun uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates(`ptr`: Pointer,`listener`: Long,uniffi_out_err: UniffiRustCallStatus,
3436
+ ): Pointer
3407
3437
fun uniffi_matrix_sdk_ffi_fn_clone_spaceservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
3408
3438
): Pointer
3409
3439
fun uniffi_matrix_sdk_ffi_fn_free_spaceservice(`ptr`: Pointer,uniffi_out_err: UniffiRustCallStatus,
@@ -3668,6 +3698,8 @@ internal interface UniffiLib : Library {
3668
3698
): Unit
3669
3699
fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistpaginationstatelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListPaginationStateListener,
3670
3700
): Unit
3701
+ fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener(`vtable`: UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener,
3702
+ ): Unit
3671
3703
fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceservicejoinedspaceslistener(`vtable`: UniffiVTableCallbackInterfaceSpaceServiceJoinedSpacesListener,
3672
3704
): Unit
3673
3705
fun uniffi_matrix_sdk_ffi_fn_init_callback_vtable_syncservicestateobserver(`vtable`: UniffiVTableCallbackInterfaceSyncServiceStateObserver,
@@ -4584,10 +4616,14 @@ internal interface UniffiLib : Library {
4584
4616
): Short
4585
4617
fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms(
4586
4618
): Short
4619
+ fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space(
4620
+ ): Short
4587
4621
fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates(
4588
4622
): Short
4589
4623
fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update(
4590
4624
): Short
4625
+ fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates(
4626
+ ): Short
4591
4627
fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces(
4592
4628
): Short
4593
4629
fun uniffi_matrix_sdk_ffi_checksum_method_spaceservice_space_room_list(
@@ -4814,6 +4850,8 @@ internal interface UniffiLib : Library {
4814
4850
): Short
4815
4851
fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update(
4816
4852
): Short
4853
+ fun uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update(
4854
+ ): Short
4817
4855
fun uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update(
4818
4856
): Short
4819
4857
fun uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update(
@@ -5958,12 +5996,18 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
5958
5996
if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_rooms() != 24664.toShort()) {
5959
5997
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5960
5998
}
5999
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_space() != 25368.toShort()) {
6000
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6001
+ }
5961
6002
if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_pagination_state_updates() != 16775.toShort()) {
5962
6003
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5963
6004
}
5964
6005
if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_room_update() != 55793.toShort()) {
5965
6006
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5966
6007
}
6008
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlist_subscribe_to_space_updates() != 26327.toShort()) {
6009
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6010
+ }
5967
6011
if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservice_joined_spaces() != 54285.toShort()) {
5968
6012
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
5969
6013
}
@@ -6303,6 +6347,9 @@ private fun uniffiCheckApiChecksums(lib: UniffiLib) {
6303
6347
if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistpaginationstatelistener_on_update() != 11960.toShort()) {
6304
6348
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6305
6349
}
6350
+ if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceroomlistspacelistener_on_update() != 39714.toShort()) {
6351
+ throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6352
+ }
6306
6353
if (lib.uniffi_matrix_sdk_ffi_checksum_method_spaceservicejoinedspaceslistener_on_update() != 19262.toShort()) {
6307
6354
throw RuntimeException("UniFFI API checksum mismatch: try cleaning and rebuilding your project")
6308
6355
}
@@ -22317,6 +22364,11 @@ public interface SpaceRoomListInterface {
22317
22364
*/
22318
22365
fun `rooms`(): List<SpaceRoom>
22319
22366
22367
+ /**
22368
+ * Returns the space of the room list if known.
22369
+ */
22370
+ fun `space`(): SpaceRoom?
22371
+
22320
22372
/**
22321
22373
* Subscribe to pagination updates.
22322
22374
*/
@@ -22327,6 +22379,11 @@ public interface SpaceRoomListInterface {
22327
22379
*/
22328
22380
fun `subscribeToRoomUpdate`(`listener`: SpaceRoomListEntriesListener): TaskHandle
22329
22381
22382
+ /**
22383
+ * Subscribe to space updates.
22384
+ */
22385
+ fun `subscribeToSpaceUpdates`(`listener`: SpaceRoomListSpaceListener): TaskHandle
22386
+
22330
22387
companion object
22331
22388
}
22332
22389
@@ -22479,6 +22536,21 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface {
22479
22536
22480
22537
22481
22538
22539
+ /**
22540
+ * Returns the space of the room list if known.
22541
+ */override fun `space`(): SpaceRoom? {
22542
+ return FfiConverterOptionalTypeSpaceRoom.lift(
22543
+ callWithPointer {
22544
+ uniffiRustCall() { _status ->
22545
+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_space(
22546
+ it, _status)
22547
+ }
22548
+ }
22549
+ )
22550
+ }
22551
+
22552
+
22553
+
22482
22554
/**
22483
22555
* Subscribe to pagination updates.
22484
22556
*/override fun `subscribeToPaginationStateUpdates`(`listener`: SpaceRoomListPaginationStateListener): TaskHandle {
@@ -22509,6 +22581,21 @@ open class SpaceRoomList: Disposable, AutoCloseable, SpaceRoomListInterface {
22509
22581
22510
22582
22511
22583
22584
+ /**
22585
+ * Subscribe to space updates.
22586
+ */override fun `subscribeToSpaceUpdates`(`listener`: SpaceRoomListSpaceListener): TaskHandle {
22587
+ return FfiConverterTypeTaskHandle.lift(
22588
+ callWithPointer {
22589
+ uniffiRustCall() { _status ->
22590
+ UniffiLib.INSTANCE.uniffi_matrix_sdk_ffi_fn_method_spaceroomlist_subscribe_to_space_updates(
22591
+ it, FfiConverterTypeSpaceRoomListSpaceListener.lower(`listener`),_status)
22592
+ }
22593
+ }
22594
+ )
22595
+ }
22596
+
22597
+
22598
+
22512
22599
22513
22600
22514
22601
@@ -46397,6 +46484,55 @@ public object FfiConverterTypeSpaceRoomListPaginationStateListener: FfiConverter
46397
46484
46398
46485
46399
46486
46487
+ public interface SpaceRoomListSpaceListener {
46488
+
46489
+ fun `onUpdate`(`space`: SpaceRoom?)
46490
+
46491
+ companion object
46492
+ }
46493
+
46494
+
46495
+
46496
+ // Put the implementation in an object so we don't pollute the top-level namespace
46497
+ internal object uniffiCallbackInterfaceSpaceRoomListSpaceListener {
46498
+ internal object `onUpdate`: UniffiCallbackInterfaceSpaceRoomListSpaceListenerMethod0 {
46499
+ override fun callback(`uniffiHandle`: Long,`space`: RustBuffer.ByValue,`uniffiOutReturn`: Pointer,uniffiCallStatus: UniffiRustCallStatus,) {
46500
+ val uniffiObj = FfiConverterTypeSpaceRoomListSpaceListener.handleMap.get(uniffiHandle)
46501
+ val makeCall = { ->
46502
+ uniffiObj.`onUpdate`(
46503
+ FfiConverterOptionalTypeSpaceRoom.lift(`space`),
46504
+ )
46505
+ }
46506
+ val writeReturn = { _: Unit -> Unit }
46507
+ uniffiTraitInterfaceCall(uniffiCallStatus, makeCall, writeReturn)
46508
+ }
46509
+ }
46510
+
46511
+ internal object uniffiFree: UniffiCallbackInterfaceFree {
46512
+ override fun callback(handle: Long) {
46513
+ FfiConverterTypeSpaceRoomListSpaceListener.handleMap.remove(handle)
46514
+ }
46515
+ }
46516
+
46517
+ internal var vtable = UniffiVTableCallbackInterfaceSpaceRoomListSpaceListener.UniffiByValue(
46518
+ `onUpdate`,
46519
+ uniffiFree,
46520
+ )
46521
+
46522
+ // Registers the foreign callback with the Rust side.
46523
+ // This method is generated for each callback interface.
46524
+ internal fun register(lib: UniffiLib) {
46525
+ lib.uniffi_matrix_sdk_ffi_fn_init_callback_vtable_spaceroomlistspacelistener(vtable)
46526
+ }
46527
+ }
46528
+
46529
+ // The ffiConverter which transforms the Callbacks in to handles to pass to Rust.
46530
+ public object FfiConverterTypeSpaceRoomListSpaceListener: FfiConverterCallbackInterface<SpaceRoomListSpaceListener>()
46531
+
46532
+
46533
+
46534
+
46535
+
46400
46536
public interface SpaceServiceJoinedSpacesListener {
46401
46537
46402
46538
fun `onUpdate`(`roomUpdates`: List<SpaceListUpdate>)
@@ -47812,6 +47948,35 @@ public object FfiConverterOptionalTypeRoomMemberWithSenderInfo: FfiConverterRust
47812
47948
47813
47949
47814
47950
47951
+ public object FfiConverterOptionalTypeSpaceRoom: FfiConverterRustBuffer<SpaceRoom?> {
47952
+ override fun read(buf: ByteBuffer): SpaceRoom? {
47953
+ if (buf.get().toInt() == 0) {
47954
+ return null
47955
+ }
47956
+ return FfiConverterTypeSpaceRoom.read(buf)
47957
+ }
47958
+
47959
+ override fun allocationSize(value: SpaceRoom?): ULong {
47960
+ if (value == null) {
47961
+ return 1UL
47962
+ } else {
47963
+ return 1UL + FfiConverterTypeSpaceRoom.allocationSize(value)
47964
+ }
47965
+ }
47966
+
47967
+ override fun write(value: SpaceRoom?, buf: ByteBuffer) {
47968
+ if (value == null) {
47969
+ buf.put(0)
47970
+ } else {
47971
+ buf.put(1)
47972
+ FfiConverterTypeSpaceRoom.write(value, buf)
47973
+ }
47974
+ }
47975
+ }
47976
+
47977
+
47978
+
47979
+
47815
47980
public object FfiConverterOptionalTypeSuccessorRoom: FfiConverterRustBuffer<SuccessorRoom?> {
47816
47981
override fun read(buf: ByteBuffer): SuccessorRoom? {
47817
47982
if (buf.get().toInt() == 0) {
0 commit comments