@@ -4637,6 +4637,11 @@ public protocol RoomProtocol : AnyObject {
4637
4637
*/
4638
4638
func hasActiveRoomCall() -> Bool
4639
4639
4640
+ /**
4641
+ * Returns the room heroes for this room.
4642
+ */
4643
+ func heroes() -> [RoomHero]
4644
+
4640
4645
func id() -> String
4641
4646
4642
4647
/**
@@ -5209,6 +5214,16 @@ open func hasActiveRoomCall() -> Bool {
5209
5214
uniffi_matrix_sdk_ffi_fn_method_room_has_active_room_call(self.uniffiClonePointer(),$0
5210
5215
)
5211
5216
})
5217
+ }
5218
+
5219
+ /**
5220
+ * Returns the room heroes for this room.
5221
+ */
5222
+ open func heroes() -> [RoomHero] {
5223
+ return try! FfiConverterSequenceTypeRoomHero.lift(try! rustCall() {
5224
+ uniffi_matrix_sdk_ffi_fn_method_room_heroes(self.uniffiClonePointer(),$0
5225
+ )
5226
+ })
5212
5227
}
5213
5228
5214
5229
open func id() -> String {
@@ -12174,6 +12189,92 @@ public func FfiConverterTypeRoomDirectorySearchEntriesResult_lower(_ value: Room
12174
12189
}
12175
12190
12176
12191
12192
+ /**
12193
+ * Information about a member considered to be a room hero.
12194
+ */
12195
+ public struct RoomHero {
12196
+ /**
12197
+ * The user ID of the hero.
12198
+ */
12199
+ public var userId: String
12200
+ /**
12201
+ * The display name of the hero.
12202
+ */
12203
+ public var displayName: String?
12204
+ /**
12205
+ * The avatar URL of the hero.
12206
+ */
12207
+ public var avatarUrl: String?
12208
+
12209
+ // Default memberwise initializers are never public by default, so we
12210
+ // declare one manually.
12211
+ public init(
12212
+ /**
12213
+ * The user ID of the hero.
12214
+ */userId: String,
12215
+ /**
12216
+ * The display name of the hero.
12217
+ */displayName: String?,
12218
+ /**
12219
+ * The avatar URL of the hero.
12220
+ */avatarUrl: String?) {
12221
+ self.userId = userId
12222
+ self.displayName = displayName
12223
+ self.avatarUrl = avatarUrl
12224
+ }
12225
+ }
12226
+
12227
+
12228
+
12229
+ extension RoomHero: Equatable, Hashable {
12230
+ public static func ==(lhs: RoomHero, rhs: RoomHero) -> Bool {
12231
+ if lhs.userId != rhs.userId {
12232
+ return false
12233
+ }
12234
+ if lhs.displayName != rhs.displayName {
12235
+ return false
12236
+ }
12237
+ if lhs.avatarUrl != rhs.avatarUrl {
12238
+ return false
12239
+ }
12240
+ return true
12241
+ }
12242
+
12243
+ public func hash(into hasher: inout Hasher) {
12244
+ hasher.combine(userId)
12245
+ hasher.combine(displayName)
12246
+ hasher.combine(avatarUrl)
12247
+ }
12248
+ }
12249
+
12250
+
12251
+ public struct FfiConverterTypeRoomHero: FfiConverterRustBuffer {
12252
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> RoomHero {
12253
+ return
12254
+ try RoomHero(
12255
+ userId: FfiConverterString.read(from: &buf),
12256
+ displayName: FfiConverterOptionString.read(from: &buf),
12257
+ avatarUrl: FfiConverterOptionString.read(from: &buf)
12258
+ )
12259
+ }
12260
+
12261
+ public static func write(_ value: RoomHero, into buf: inout [UInt8]) {
12262
+ FfiConverterString.write(value.userId, into: &buf)
12263
+ FfiConverterOptionString.write(value.displayName, into: &buf)
12264
+ FfiConverterOptionString.write(value.avatarUrl, into: &buf)
12265
+ }
12266
+ }
12267
+
12268
+
12269
+ public func FfiConverterTypeRoomHero_lift(_ buf: RustBuffer) throws -> RoomHero {
12270
+ return try FfiConverterTypeRoomHero.lift(buf)
12271
+ }
12272
+
12273
+ public func FfiConverterTypeRoomHero_lower(_ value: RoomHero) -> RustBuffer {
12274
+ return FfiConverterTypeRoomHero.lower(value)
12275
+ }
12276
+
12277
+
12177
12278
public struct RoomInfo {
12178
12279
public var id: String
12179
12280
/**
@@ -12203,6 +12304,7 @@ public struct RoomInfo {
12203
12304
* store.
12204
12305
*/
12205
12306
public var inviter: RoomMember?
12307
+ public var heroes: [RoomHero]
12206
12308
public var activeMembersCount: UInt64
12207
12309
public var invitedMembersCount: UInt64
12208
12310
public var joinedMembersCount: UInt64
@@ -12248,7 +12350,7 @@ public struct RoomInfo {
12248
12350
*
12249
12351
* Can be missing if the room membership invite event is missing from the
12250
12352
* store.
12251
- */inviter: RoomMember?, activeMembersCount: UInt64, invitedMembersCount: UInt64, joinedMembersCount: UInt64, userPowerLevels: [String: Int64], highlightCount: UInt64, notificationCount: UInt64, userDefinedNotificationMode: RoomNotificationMode?, hasRoomCall: Bool, activeRoomCallParticipants: [String],
12353
+ */inviter: RoomMember?, heroes: [RoomHero], activeMembersCount: UInt64, invitedMembersCount: UInt64, joinedMembersCount: UInt64, userPowerLevels: [String: Int64], highlightCount: UInt64, notificationCount: UInt64, userDefinedNotificationMode: RoomNotificationMode?, hasRoomCall: Bool, activeRoomCallParticipants: [String],
12252
12354
/**
12253
12355
* Whether this room has been explicitly marked as unread
12254
12356
*/isMarkedUnread: Bool,
@@ -12278,6 +12380,7 @@ public struct RoomInfo {
12278
12380
self.alternativeAliases = alternativeAliases
12279
12381
self.membership = membership
12280
12382
self.inviter = inviter
12383
+ self.heroes = heroes
12281
12384
self.activeMembersCount = activeMembersCount
12282
12385
self.invitedMembersCount = invitedMembersCount
12283
12386
self.joinedMembersCount = joinedMembersCount
@@ -12340,6 +12443,9 @@ extension RoomInfo: Equatable, Hashable {
12340
12443
if lhs.inviter != rhs.inviter {
12341
12444
return false
12342
12445
}
12446
+ if lhs.heroes != rhs.heroes {
12447
+ return false
12448
+ }
12343
12449
if lhs.activeMembersCount != rhs.activeMembersCount {
12344
12450
return false
12345
12451
}
@@ -12397,6 +12503,7 @@ extension RoomInfo: Equatable, Hashable {
12397
12503
hasher.combine(alternativeAliases)
12398
12504
hasher.combine(membership)
12399
12505
hasher.combine(inviter)
12506
+ hasher.combine(heroes)
12400
12507
hasher.combine(activeMembersCount)
12401
12508
hasher.combine(invitedMembersCount)
12402
12509
hasher.combine(joinedMembersCount)
@@ -12432,6 +12539,7 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
12432
12539
alternativeAliases: FfiConverterSequenceString.read(from: &buf),
12433
12540
membership: FfiConverterTypeMembership.read(from: &buf),
12434
12541
inviter: FfiConverterOptionTypeRoomMember.read(from: &buf),
12542
+ heroes: FfiConverterSequenceTypeRoomHero.read(from: &buf),
12435
12543
activeMembersCount: FfiConverterUInt64.read(from: &buf),
12436
12544
invitedMembersCount: FfiConverterUInt64.read(from: &buf),
12437
12545
joinedMembersCount: FfiConverterUInt64.read(from: &buf),
@@ -12463,6 +12571,7 @@ public struct FfiConverterTypeRoomInfo: FfiConverterRustBuffer {
12463
12571
FfiConverterSequenceString.write(value.alternativeAliases, into: &buf)
12464
12572
FfiConverterTypeMembership.write(value.membership, into: &buf)
12465
12573
FfiConverterOptionTypeRoomMember.write(value.inviter, into: &buf)
12574
+ FfiConverterSequenceTypeRoomHero.write(value.heroes, into: &buf)
12466
12575
FfiConverterUInt64.write(value.activeMembersCount, into: &buf)
12467
12576
FfiConverterUInt64.write(value.invitedMembersCount, into: &buf)
12468
12577
FfiConverterUInt64.write(value.joinedMembersCount, into: &buf)
@@ -24491,6 +24600,28 @@ fileprivate struct FfiConverterSequenceTypeRoomDescription: FfiConverterRustBuff
24491
24600
}
24492
24601
}
24493
24602
24603
+ fileprivate struct FfiConverterSequenceTypeRoomHero: FfiConverterRustBuffer {
24604
+ typealias SwiftType = [RoomHero]
24605
+
24606
+ public static func write(_ value: [RoomHero], into buf: inout [UInt8]) {
24607
+ let len = Int32(value.count)
24608
+ writeInt(&buf, len)
24609
+ for item in value {
24610
+ FfiConverterTypeRoomHero.write(item, into: &buf)
24611
+ }
24612
+ }
24613
+
24614
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [RoomHero] {
24615
+ let len: Int32 = try readInt(&buf)
24616
+ var seq = [RoomHero]()
24617
+ seq.reserveCapacity(Int(len))
24618
+ for _ in 0 ..< len {
24619
+ seq.append(try FfiConverterTypeRoomHero.read(from: &buf))
24620
+ }
24621
+ return seq
24622
+ }
24623
+ }
24624
+
24494
24625
fileprivate struct FfiConverterSequenceTypeRoomListRange: FfiConverterRustBuffer {
24495
24626
typealias SwiftType = [RoomListRange]
24496
24627
@@ -25656,6 +25787,9 @@ private var initializationResult: InitializationResult {
25656
25787
if (uniffi_matrix_sdk_ffi_checksum_method_room_has_active_room_call() != 33588) {
25657
25788
return InitializationResult.apiChecksumMismatch
25658
25789
}
25790
+ if (uniffi_matrix_sdk_ffi_checksum_method_room_heroes() != 22313) {
25791
+ return InitializationResult.apiChecksumMismatch
25792
+ }
25659
25793
if (uniffi_matrix_sdk_ffi_checksum_method_room_id() != 61990) {
25660
25794
return InitializationResult.apiChecksumMismatch
25661
25795
}
0 commit comments