@@ -1833,9 +1833,7 @@ public func FfiConverterTypeMessage_lower(_ value: Message) -> UnsafeMutableRawP
18331833
18341834
18351835public protocol NotificationClientProtocol {
1836- func `getNotificationWithContext`(`roomId`: String, `eventId`: String) throws -> NotificationItem?
1837- func `getNotificationWithSlidingSync`(`roomId`: String, `eventId`: String) throws -> NotificationItem?
1838- func `legacyGetNotification`(`roomId`: String, `eventId`: String) throws -> NotificationItem?
1836+ func `getNotification`(`roomId`: String, `eventId`: String) throws -> NotificationItem?
18391837
18401838}
18411839
@@ -1858,35 +1856,11 @@ public class NotificationClient: NotificationClientProtocol {
18581856
18591857
18601858
1861- public func `getNotificationWithContext `(`roomId`: String, `eventId`: String) throws -> NotificationItem? {
1859+ public func `getNotification `(`roomId`: String, `eventId`: String) throws -> NotificationItem? {
18621860 return try FfiConverterOptionTypeNotificationItem.lift(
18631861 try
18641862 rustCallWithError(FfiConverterTypeClientError.lift) {
1865- uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification_with_context(self.pointer,
1866- FfiConverterString.lower(`roomId`),
1867- FfiConverterString.lower(`eventId`),$0
1868- )
1869- }
1870- )
1871- }
1872-
1873- public func `getNotificationWithSlidingSync`(`roomId`: String, `eventId`: String) throws -> NotificationItem? {
1874- return try FfiConverterOptionTypeNotificationItem.lift(
1875- try
1876- rustCallWithError(FfiConverterTypeClientError.lift) {
1877- uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification_with_sliding_sync(self.pointer,
1878- FfiConverterString.lower(`roomId`),
1879- FfiConverterString.lower(`eventId`),$0
1880- )
1881- }
1882- )
1883- }
1884-
1885- public func `legacyGetNotification`(`roomId`: String, `eventId`: String) throws -> NotificationItem? {
1886- return try FfiConverterOptionTypeNotificationItem.lift(
1887- try
1888- rustCallWithError(FfiConverterTypeClientError.lift) {
1889- uniffi_matrix_sdk_ffi_fn_method_notificationclient_legacy_get_notification(self.pointer,
1863+ uniffi_matrix_sdk_ffi_fn_method_notificationclient_get_notification(self.pointer,
18901864 FfiConverterString.lower(`roomId`),
18911865 FfiConverterString.lower(`eventId`),$0
18921866 )
@@ -6534,14 +6508,12 @@ public func FfiConverterTypeNotificationRoomInfo_lower(_ value: NotificationRoom
65346508
65356509
65366510public struct NotificationSenderInfo {
6537- public var `userId`: String
65386511 public var `displayName`: String?
65396512 public var `avatarUrl`: String?
65406513
65416514 // Default memberwise initializers are never public by default, so we
65426515 // declare one manually.
6543- public init(`userId`: String, `displayName`: String?, `avatarUrl`: String?) {
6544- self.`userId` = `userId`
6516+ public init(`displayName`: String?, `avatarUrl`: String?) {
65456517 self.`displayName` = `displayName`
65466518 self.`avatarUrl` = `avatarUrl`
65476519 }
@@ -6550,9 +6522,6 @@ public struct NotificationSenderInfo {
65506522
65516523extension NotificationSenderInfo: Equatable, Hashable {
65526524 public static func ==(lhs: NotificationSenderInfo, rhs: NotificationSenderInfo) -> Bool {
6553- if lhs.`userId` != rhs.`userId` {
6554- return false
6555- }
65566525 if lhs.`displayName` != rhs.`displayName` {
65576526 return false
65586527 }
@@ -6563,7 +6532,6 @@ extension NotificationSenderInfo: Equatable, Hashable {
65636532 }
65646533
65656534 public func hash(into hasher: inout Hasher) {
6566- hasher.combine(`userId`)
65676535 hasher.combine(`displayName`)
65686536 hasher.combine(`avatarUrl`)
65696537 }
@@ -6573,14 +6541,12 @@ extension NotificationSenderInfo: Equatable, Hashable {
65736541public struct FfiConverterTypeNotificationSenderInfo: FfiConverterRustBuffer {
65746542 public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> NotificationSenderInfo {
65756543 return try NotificationSenderInfo(
6576- `userId`: FfiConverterString.read(from: &buf),
65776544 `displayName`: FfiConverterOptionString.read(from: &buf),
65786545 `avatarUrl`: FfiConverterOptionString.read(from: &buf)
65796546 )
65806547 }
65816548
65826549 public static func write(_ value: NotificationSenderInfo, into buf: inout [UInt8]) {
6583- FfiConverterString.write(value.`userId`, into: &buf)
65846550 FfiConverterOptionString.write(value.`displayName`, into: &buf)
65856551 FfiConverterOptionString.write(value.`avatarUrl`, into: &buf)
65866552 }
@@ -9019,7 +8985,7 @@ public func FfiConverterTypeMessageType_lower(_ value: MessageType) -> RustBuffe
90198985public enum NotificationEvent {
90208986
90218987 case `timeline`(`event`: TimelineEvent)
9022- case `invite`(`senderId `: String)
8988+ case `invite`(`sender `: String)
90238989}
90248990
90258991public struct FfiConverterTypeNotificationEvent: FfiConverterRustBuffer {
@@ -9034,7 +9000,7 @@ public struct FfiConverterTypeNotificationEvent: FfiConverterRustBuffer {
90349000 )
90359001
90369002 case 2: return .`invite`(
9037- `senderId `: try FfiConverterString.read(from: &buf)
9003+ `sender `: try FfiConverterString.read(from: &buf)
90389004 )
90399005
90409006 default: throw UniffiInternalError.unexpectedEnumCase
@@ -9050,9 +9016,9 @@ public struct FfiConverterTypeNotificationEvent: FfiConverterRustBuffer {
90509016 FfiConverterTypeTimelineEvent.write(`event`, into: &buf)
90519017
90529018
9053- case let .`invite`(`senderId `):
9019+ case let .`invite`(`sender `):
90549020 writeInt(&buf, Int32(2))
9055- FfiConverterString.write(`senderId `, into: &buf)
9021+ FfiConverterString.write(`sender `, into: &buf)
90569022
90579023 }
90589024 }
@@ -12506,7 +12472,7 @@ extension FfiConverterCallbackInterfaceSyncServiceStateObserver : FfiConverter {
1250612472// Declaration and FfiConverters for TimelineListener Callback Interface
1250712473
1250812474public protocol TimelineListener : AnyObject {
12509- func `onUpdate`(`diff`: TimelineDiff)
12475+ func `onUpdate`(`diff`: [ TimelineDiff] )
1251012476
1251112477}
1251212478
@@ -12519,7 +12485,7 @@ fileprivate let foreignCallbackCallbackInterfaceTimelineListener : ForeignCallba
1251912485 var reader = createReader(data: Data(bytes: argsData, count: Int(argsLen)))
1252012486 func makeCall() throws -> Int32 {
1252112487 try swiftCallbackInterface.`onUpdate`(
12522- `diff`: try FfiConverterTypeTimelineDiff .read(from: &reader)
12488+ `diff`: try FfiConverterSequenceTypeTimelineDiff .read(from: &reader)
1252312489 )
1252412490 return UNIFFI_CALLBACK_SUCCESS
1252512491 }
@@ -13537,6 +13503,28 @@ fileprivate struct FfiConverterSequenceTypeSessionVerificationEmoji: FfiConverte
1353713503 }
1353813504}
1353913505
13506+ fileprivate struct FfiConverterSequenceTypeTimelineDiff: FfiConverterRustBuffer {
13507+ typealias SwiftType = [TimelineDiff]
13508+
13509+ public static func write(_ value: [TimelineDiff], into buf: inout [UInt8]) {
13510+ let len = Int32(value.count)
13511+ writeInt(&buf, len)
13512+ for item in value {
13513+ FfiConverterTypeTimelineDiff.write(item, into: &buf)
13514+ }
13515+ }
13516+
13517+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> [TimelineDiff] {
13518+ let len: Int32 = try readInt(&buf)
13519+ var seq = [TimelineDiff]()
13520+ seq.reserveCapacity(Int(len))
13521+ for _ in 0 ..< len {
13522+ seq.append(try FfiConverterTypeTimelineDiff.read(from: &buf))
13523+ }
13524+ return seq
13525+ }
13526+ }
13527+
1354013528fileprivate struct FfiConverterSequenceTypeTimelineItem: FfiConverterRustBuffer {
1354113529 typealias SwiftType = [TimelineItem]
1354213530
@@ -15489,13 +15477,7 @@ private var initializationResult: InitializationResult {
1548915477 if (uniffi_matrix_sdk_ffi_checksum_method_message_msgtype() != 50686) {
1549015478 return InitializationResult.apiChecksumMismatch
1549115479 }
15492- if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification_with_context() != 64399) {
15493- return InitializationResult.apiChecksumMismatch
15494- }
15495- if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification_with_sliding_sync() != 45569) {
15496- return InitializationResult.apiChecksumMismatch
15497- }
15498- if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_legacy_get_notification() != 12969) {
15480+ if (uniffi_matrix_sdk_ffi_checksum_method_notificationclient_get_notification() != 9907) {
1549915481 return InitializationResult.apiChecksumMismatch
1550015482 }
1550115483 if (uniffi_matrix_sdk_ffi_checksum_method_notificationclientbuilder_filter_by_push_rules() != 10529) {
@@ -16026,7 +16008,7 @@ private var initializationResult: InitializationResult {
1602616008 if (uniffi_matrix_sdk_ffi_checksum_method_syncservicestateobserver_on_update() != 52830) {
1602716009 return InitializationResult.apiChecksumMismatch
1602816010 }
16029- if (uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 30798 ) {
16011+ if (uniffi_matrix_sdk_ffi_checksum_method_timelinelistener_on_update() != 974 ) {
1603016012 return InitializationResult.apiChecksumMismatch
1603116013 }
1603216014
0 commit comments