@@ -6279,7 +6279,7 @@ public protocol RoomListProtocol : AnyObject {
6279
6279
6280
6280
func loadingState(listener: RoomListLoadingStateListener) throws -> RoomListLoadingStateResult
6281
6281
6282
- func room(roomId: String) async throws -> RoomListItem
6282
+ func room(roomId: String) throws -> RoomListItem
6283
6283
6284
6284
}
6285
6285
@@ -6349,21 +6349,12 @@ open func loadingState(listener: RoomListLoadingStateListener)throws -> RoomLis
6349
6349
})
6350
6350
}
6351
6351
6352
- open func room(roomId: String)async throws -> RoomListItem {
6353
- return
6354
- try await uniffiRustCallAsync(
6355
- rustFutureFunc: {
6356
- uniffi_matrix_sdk_ffi_fn_method_roomlist_room(
6357
- self.uniffiClonePointer(),
6358
- FfiConverterString.lower(roomId)
6359
- )
6360
- },
6361
- pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer,
6362
- completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer,
6363
- freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer,
6364
- liftFunc: FfiConverterTypeRoomListItem.lift,
6365
- errorHandler: FfiConverterTypeRoomListError.lift
6366
- )
6352
+ open func room(roomId: String)throws -> RoomListItem {
6353
+ return try FfiConverterTypeRoomListItem.lift(try rustCallWithError(FfiConverterTypeRoomListError.lift) {
6354
+ uniffi_matrix_sdk_ffi_fn_method_roomlist_room(self.uniffiClonePointer(),
6355
+ FfiConverterString.lower(roomId),$0
6356
+ )
6357
+ })
6367
6358
}
6368
6359
6369
6360
@@ -6816,7 +6807,7 @@ public protocol RoomListServiceProtocol : AnyObject {
6816
6807
6817
6808
func applyInput(input: RoomListInput) async throws
6818
6809
6819
- func room(roomId: String) async throws -> RoomListItem
6810
+ func room(roomId: String) throws -> RoomListItem
6820
6811
6821
6812
func state(listener: RoomListServiceStateListener) -> TaskHandle
6822
6813
@@ -6899,21 +6890,12 @@ open func applyInput(input: RoomListInput)async throws {
6899
6890
)
6900
6891
}
6901
6892
6902
- open func room(roomId: String)async throws -> RoomListItem {
6903
- return
6904
- try await uniffiRustCallAsync(
6905
- rustFutureFunc: {
6906
- uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(
6907
- self.uniffiClonePointer(),
6908
- FfiConverterString.lower(roomId)
6909
- )
6910
- },
6911
- pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_pointer,
6912
- completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_pointer,
6913
- freeFunc: ffi_matrix_sdk_ffi_rust_future_free_pointer,
6914
- liftFunc: FfiConverterTypeRoomListItem.lift,
6915
- errorHandler: FfiConverterTypeRoomListError.lift
6916
- )
6893
+ open func room(roomId: String)throws -> RoomListItem {
6894
+ return try FfiConverterTypeRoomListItem.lift(try rustCallWithError(FfiConverterTypeRoomListError.lift) {
6895
+ uniffi_matrix_sdk_ffi_fn_method_roomlistservice_room(self.uniffiClonePointer(),
6896
+ FfiConverterString.lower(roomId),$0
6897
+ )
6898
+ })
6917
6899
}
6918
6900
6919
6901
open func state(listener: RoomListServiceStateListener) -> TaskHandle {
@@ -8274,8 +8256,6 @@ public protocol TimelineProtocol : AnyObject {
8274
8256
*/
8275
8257
func getEventTimelineItemByTransactionId(transactionId: String) async throws -> EventTimelineItem
8276
8258
8277
- func latestEvent() async -> EventTimelineItem?
8278
-
8279
8259
/**
8280
8260
* Load the reply details for the given event id.
8281
8261
*
@@ -8578,24 +8558,6 @@ open func getEventTimelineItemByTransactionId(transactionId: String)async throws
8578
8558
)
8579
8559
}
8580
8560
8581
- open func latestEvent()async -> EventTimelineItem? {
8582
- return
8583
- try! await uniffiRustCallAsync(
8584
- rustFutureFunc: {
8585
- uniffi_matrix_sdk_ffi_fn_method_timeline_latest_event(
8586
- self.uniffiClonePointer()
8587
-
8588
- )
8589
- },
8590
- pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_rust_buffer,
8591
- completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_rust_buffer,
8592
- freeFunc: ffi_matrix_sdk_ffi_rust_future_free_rust_buffer,
8593
- liftFunc: FfiConverterOptionTypeEventTimelineItem.lift,
8594
- errorHandler: nil
8595
-
8596
- )
8597
- }
8598
-
8599
8561
/**
8600
8562
* Load the reply details for the given event id.
8601
8563
*
@@ -12233,7 +12195,6 @@ public struct RoomInfo {
12233
12195
public var canonicalAlias: String?
12234
12196
public var alternativeAliases: [String]
12235
12197
public var membership: Membership
12236
- public var latestEvent: EventTimelineItem?
12237
12198
/**
12238
12199
* Member who invited the current user to a room that's in the invited
12239
12200
* state.
@@ -12280,7 +12241,7 @@ public struct RoomInfo {
12280
12241
*/displayName: String?,
12281
12242
/**
12282
12243
* Room name as defined by the room state event only.
12283
- */rawName: String?, topic: String?, avatarUrl: String?, isDirect: Bool, isPublic: Bool, isSpace: Bool, isTombstoned: Bool, isFavourite: Bool, canonicalAlias: String?, alternativeAliases: [String], membership: Membership, latestEvent: EventTimelineItem?,
12244
+ */rawName: String?, topic: String?, avatarUrl: String?, isDirect: Bool, isPublic: Bool, isSpace: Bool, isTombstoned: Bool, isFavourite: Bool, canonicalAlias: String?, alternativeAliases: [String], membership: Membership,
12284
12245
/**
12285
12246
* Member who invited the current user to a room that's in the invited
12286
12247
* state.
@@ -12316,7 +12277,6 @@ public struct RoomInfo {
12316
12277
self.canonicalAlias = canonicalAlias
12317
12278
self.alternativeAliases = alternativeAliases
12318
12279
self.membership = membership
12319
- self.latestEvent = latestEvent
12320
12280
self.inviter = inviter
12321
12281
self.activeMembersCount = activeMembersCount
12322
12282
self.invitedMembersCount = invitedMembersCount
@@ -12336,6 +12296,124 @@ public struct RoomInfo {
12336
12296
12337
12297
12338
12298
12299
+ extension RoomInfo: Equatable, Hashable {
12300
+ public static func ==(lhs: RoomInfo, rhs: RoomInfo) -> Bool {
12301
+ if lhs.id != rhs.id {
12302
+ return false
12303
+ }
12304
+ if lhs.displayName != rhs.displayName {
12305
+ return false
12306
+ }
12307
+ if lhs.rawName != rhs.rawName {
12308
+ return false
12309
+ }
12310
+ if lhs.topic != rhs.topic {
12311
+ return false
12312
+ }
12313
+ if lhs.avatarUrl != rhs.avatarUrl {
12314
+ return false
12315
+ }
12316
+ if lhs.isDirect != rhs.isDirect {
12317
+ return false
12318
+ }
12319
+ if lhs.isPublic != rhs.isPublic {
12320
+ return false
12321
+ }
12322
+ if lhs.isSpace != rhs.isSpace {
12323
+ return false
12324
+ }
12325
+ if lhs.isTombstoned != rhs.isTombstoned {
12326
+ return false
12327
+ }
12328
+ if lhs.isFavourite != rhs.isFavourite {
12329
+ return false
12330
+ }
12331
+ if lhs.canonicalAlias != rhs.canonicalAlias {
12332
+ return false
12333
+ }
12334
+ if lhs.alternativeAliases != rhs.alternativeAliases {
12335
+ return false
12336
+ }
12337
+ if lhs.membership != rhs.membership {
12338
+ return false
12339
+ }
12340
+ if lhs.inviter != rhs.inviter {
12341
+ return false
12342
+ }
12343
+ if lhs.activeMembersCount != rhs.activeMembersCount {
12344
+ return false
12345
+ }
12346
+ if lhs.invitedMembersCount != rhs.invitedMembersCount {
12347
+ return false
12348
+ }
12349
+ if lhs.joinedMembersCount != rhs.joinedMembersCount {
12350
+ return false
12351
+ }
12352
+ if lhs.userPowerLevels != rhs.userPowerLevels {
12353
+ return false
12354
+ }
12355
+ if lhs.highlightCount != rhs.highlightCount {
12356
+ return false
12357
+ }
12358
+ if lhs.notificationCount != rhs.notificationCount {
12359
+ return false
12360
+ }
12361
+ if lhs.userDefinedNotificationMode != rhs.userDefinedNotificationMode {
12362
+ return false
12363
+ }
12364
+ if lhs.hasRoomCall != rhs.hasRoomCall {
12365
+ return false
12366
+ }
12367
+ if lhs.activeRoomCallParticipants != rhs.activeRoomCallParticipants {
12368
+ return false
12369
+ }
12370
+ if lhs.isMarkedUnread != rhs.isMarkedUnread {
12371
+ return false
12372
+ }
12373
+ if lhs.numUnreadMessages != rhs.numUnreadMessages {
12374
+ return false
12375
+ }
12376
+ if lhs.numUnreadNotifications != rhs.numUnreadNotifications {
12377
+ return false
12378
+ }
12379
+ if lhs.numUnreadMentions != rhs.numUnreadMentions {
12380
+ return false
12381
+ }
12382
+ return true
12383
+ }
12384
+
12385
+ public func hash(into hasher: inout Hasher) {
12386
+ hasher.combine(id)
12387
+ hasher.combine(displayName)
12388
+ hasher.combine(rawName)
12389
+ hasher.combine(topic)
12390
+ hasher.combine(avatarUrl)
12391
+ hasher.combine(isDirect)
12392
+ hasher.combine(isPublic)
12393
+ hasher.combine(isSpace)
12394
+ hasher.combine(isTombstoned)
12395
+ hasher.combine(isFavourite)
12396
+ hasher.combine(canonicalAlias)
12397
+ hasher.combine(alternativeAliases)
12398
+ hasher.combine(membership)
12399
+ hasher.combine(inviter)
12400
+ hasher.combine(activeMembersCount)
12401
+ hasher.combine(invitedMembersCount)
12402
+ hasher.combine(joinedMembersCount)
12403
+ hasher.combine(userPowerLevels)
12404
+ hasher.combine(highlightCount)
12405
+ hasher.combine(notificationCount)
12406
+ hasher.combine(userDefinedNotificationMode)
12407
+ hasher.combine(hasRoomCall)
12408
+ hasher.combine(activeRoomCallParticipants)
12409
+ hasher.combine(isMarkedUnread)
12410
+ hasher.combine(numUnreadMessages)
12411
+ hasher.combine(numUnreadNotifications)
12412
+ hasher.combine(numUnreadMentions)
12413
+ }
12414
+ }
12415
+
12416
+
12339
12417
public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
12340
12418
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomInfo {
12341
12419
return
@@ -12353,7 +12431,6 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
12353
12431
canonicalAlias: FfiConverterOptionString.read(from: &buf),
12354
12432
alternativeAliases: FfiConverterSequenceString.read(from: &buf),
12355
12433
membership: FfiConverterTypeMembership.read(from: &buf),
12356
- latestEvent: FfiConverterOptionTypeEventTimelineItem.read(from: &buf),
12357
12434
inviter: FfiConverterOptionTypeRoomMember.read(from: &buf),
12358
12435
activeMembersCount: FfiConverterUInt64.read(from: &buf),
12359
12436
invitedMembersCount: FfiConverterUInt64.read(from: &buf),
@@ -12385,7 +12462,6 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
12385
12462
FfiConverterOptionString.write(value.canonicalAlias, into: &buf)
12386
12463
FfiConverterSequenceString.write(value.alternativeAliases, into: &buf)
12387
12464
FfiConverterTypeMembership.write(value.membership, into: &buf)
12388
- FfiConverterOptionTypeEventTimelineItem.write(value.latestEvent, into: &buf)
12389
12465
FfiConverterOptionTypeRoomMember.write(value.inviter, into: &buf)
12390
12466
FfiConverterUInt64.write(value.activeMembersCount, into: &buf)
12391
12467
FfiConverterUInt64.write(value.invitedMembersCount, into: &buf)
@@ -25743,7 +25819,7 @@ private var initializationResult: InitializationResult {
25743
25819
if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_loading_state() != 21585) {
25744
25820
return InitializationResult.apiChecksumMismatch
25745
25821
}
25746
- if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 36256 ) {
25822
+ if (uniffi_matrix_sdk_ffi_checksum_method_roomlist_room() != 8801 ) {
25747
25823
return InitializationResult.apiChecksumMismatch
25748
25824
}
25749
25825
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistdynamicentriescontroller_add_one_page() != 47748) {
@@ -25797,7 +25873,7 @@ private var initializationResult: InitializationResult {
25797
25873
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_apply_input() != 31607) {
25798
25874
return InitializationResult.apiChecksumMismatch
25799
25875
}
25800
- if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 11566 ) {
25876
+ if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_room() != 5185 ) {
25801
25877
return InitializationResult.apiChecksumMismatch
25802
25878
}
25803
25879
if (uniffi_matrix_sdk_ffi_checksum_method_roomlistservice_state() != 64650) {
@@ -25911,9 +25987,6 @@ private var initializationResult: InitializationResult {
25911
25987
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_get_event_timeline_item_by_transaction_id() != 64706) {
25912
25988
return InitializationResult.apiChecksumMismatch
25913
25989
}
25914
- if (uniffi_matrix_sdk_ffi_checksum_method_timeline_latest_event() != 11115) {
25915
- return InitializationResult.apiChecksumMismatch
25916
- }
25917
25990
if (uniffi_matrix_sdk_ffi_checksum_method_timeline_load_reply_details() != 52892) {
25918
25991
return InitializationResult.apiChecksumMismatch
25919
25992
}
0 commit comments