@@ -3106,6 +3106,13 @@ public func FfiConverterTypeNotificationClientBuilder_lower(_ value: Notificatio
31063106
31073107public protocol NotificationSettingsProtocol : AnyObject {
31083108
3109+ /**
3110+ * Check whether [MSC 4028 push rule][rule] is enabled on the homeserver.
3111+ *
3112+ * [rule]: https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md
3113+ */
3114+ func canHomeserverPushEncryptedEventToDevice() async -> Bool
3115+
31093116 /**
31103117 * Returns true if [MSC 4028 push rule][rule] is supported and enabled.
31113118 *
@@ -3273,6 +3280,28 @@ open class NotificationSettings:
32733280
32743281
32753282
3283+ /**
3284+ * Check whether [MSC 4028 push rule][rule] is enabled on the homeserver.
3285+ *
3286+ * [rule]: https://github.com/matrix-org/matrix-spec-proposals/blob/giomfo/push_encrypted_events/proposals/4028-push-all-encrypted-events-except-for-muted-rooms.md
3287+ */
3288+ open func canHomeserverPushEncryptedEventToDevice() async -> Bool {
3289+ return try! await uniffiRustCallAsync(
3290+ rustFutureFunc: {
3291+ uniffi_matrix_sdk_ffi_fn_method_notificationsettings_can_homeserver_push_encrypted_event_to_device(
3292+ self.uniffiClonePointer()
3293+ )
3294+ },
3295+ pollFunc: ffi_matrix_sdk_ffi_rust_future_poll_i8,
3296+ completeFunc: ffi_matrix_sdk_ffi_rust_future_complete_i8,
3297+ freeFunc: ffi_matrix_sdk_ffi_rust_future_free_i8,
3298+ liftFunc: FfiConverterBool.lift,
3299+ errorHandler: nil
3300+
3301+ )
3302+ }
3303+
3304+
32763305 /**
32773306 * Returns true if [MSC 4028 push rule][rule] is supported and enabled.
32783307 *
@@ -15310,7 +15339,8 @@ public enum OtherState {
1531015339 )
1531115340 case roomPinnedEvents
1531215341 case roomPowerLevels(
15313- users: [String: Int64]
15342+ users: [String: Int64],
15343+ previous: [String: Int64]?
1531415344 )
1531515345 case roomServerAcl
1531615346 case roomThirdPartyInvite(
@@ -15365,7 +15395,8 @@ public struct FfiConverterTypeOtherState: FfiConverterRustBuffer {
1536515395 case 13: return .roomPinnedEvents
1536615396
1536715397 case 14: return .roomPowerLevels(
15368- users: try FfiConverterDictionaryStringInt64.read(from: &buf)
15398+ users: try FfiConverterDictionaryStringInt64.read(from: &buf),
15399+ previous: try FfiConverterOptionDictionaryStringInt64.read(from: &buf)
1536915400 )
1537015401
1537115402 case 15: return .roomServerAcl
@@ -15450,9 +15481,10 @@ public struct FfiConverterTypeOtherState: FfiConverterRustBuffer {
1545015481 writeInt(&buf, Int32(13))
1545115482
1545215483
15453- case let .roomPowerLevels(users):
15484+ case let .roomPowerLevels(users,previous ):
1545415485 writeInt(&buf, Int32(14))
1545515486 FfiConverterDictionaryStringInt64.write(users, into: &buf)
15487+ FfiConverterOptionDictionaryStringInt64.write(previous, into: &buf)
1545615488
1545715489
1545815490 case .roomServerAcl:
@@ -21313,6 +21345,27 @@ fileprivate struct FfiConverterOptionSequenceTypeRoomMember: FfiConverterRustBuf
2131321345 }
2131421346}
2131521347
21348+ fileprivate struct FfiConverterOptionDictionaryStringInt64: FfiConverterRustBuffer {
21349+ typealias SwiftType = [String: Int64]?
21350+
21351+ public static func write(_ value: SwiftType, into buf: inout [UInt8]) {
21352+ guard let value = value else {
21353+ writeInt(&buf, Int8(0))
21354+ return
21355+ }
21356+ writeInt(&buf, Int8(1))
21357+ FfiConverterDictionaryStringInt64.write(value, into: &buf)
21358+ }
21359+
21360+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
21361+ switch try readInt(&buf) as Int8 {
21362+ case 0: return nil
21363+ case 1: return try FfiConverterDictionaryStringInt64.read(from: &buf)
21364+ default: throw UniffiInternalError.unexpectedOptionalTag
21365+ }
21366+ }
21367+ }
21368+
2131621369fileprivate struct FfiConverterOptionTypeEventItemOrigin: FfiConverterRustBuffer {
2131721370 typealias SwiftType = EventItemOrigin?
2131821371
@@ -22515,6 +22568,9 @@ private var initializationResult: InitializationResult {
2251522568 if (uniffi_matrix_sdk_ffi_checksum_method_notificationclientbuilder_finish() != 40007) {
2251622569 return InitializationResult.apiChecksumMismatch
2251722570 }
22571+ if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() != 37323) {
22572+ return InitializationResult.apiChecksumMismatch
22573+ }
2251822574 if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() != 21251) {
2251922575 return InitializationResult.apiChecksumMismatch
2252022576 }
0 commit comments