@@ -3106,6 +3106,13 @@ public func FfiConverterTypeNotificationClientBuilder_lower(_ value: Notificatio
3106
3106
3107
3107
public protocol NotificationSettingsProtocol : AnyObject {
3108
3108
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
+
3109
3116
/**
3110
3117
* Returns true if [MSC 4028 push rule][rule] is supported and enabled.
3111
3118
*
@@ -3273,6 +3280,28 @@ open class NotificationSettings:
3273
3280
3274
3281
3275
3282
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
+
3276
3305
/**
3277
3306
* Returns true if [MSC 4028 push rule][rule] is supported and enabled.
3278
3307
*
@@ -15310,7 +15339,8 @@ public enum OtherState {
15310
15339
)
15311
15340
case roomPinnedEvents
15312
15341
case roomPowerLevels(
15313
- users: [String: Int64]
15342
+ users: [String: Int64],
15343
+ previous: [String: Int64]?
15314
15344
)
15315
15345
case roomServerAcl
15316
15346
case roomThirdPartyInvite(
@@ -15365,7 +15395,8 @@ public struct FfiConverterTypeOtherState: FfiConverterRustBuffer {
15365
15395
case 13: return .roomPinnedEvents
15366
15396
15367
15397
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)
15369
15400
)
15370
15401
15371
15402
case 15: return .roomServerAcl
@@ -15450,9 +15481,10 @@ public struct FfiConverterTypeOtherState: FfiConverterRustBuffer {
15450
15481
writeInt(&buf, Int32(13))
15451
15482
15452
15483
15453
- case let .roomPowerLevels(users):
15484
+ case let .roomPowerLevels(users,previous ):
15454
15485
writeInt(&buf, Int32(14))
15455
15486
FfiConverterDictionaryStringInt64.write(users, into: &buf)
15487
+ FfiConverterOptionDictionaryStringInt64.write(previous, into: &buf)
15456
15488
15457
15489
15458
15490
case .roomServerAcl:
@@ -21313,6 +21345,27 @@ fileprivate struct FfiConverterOptionSequenceTypeRoomMember: FfiConverterRustBuf
21313
21345
}
21314
21346
}
21315
21347
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
+
21316
21369
fileprivate struct FfiConverterOptionTypeEventItemOrigin: FfiConverterRustBuffer {
21317
21370
typealias SwiftType = EventItemOrigin?
21318
21371
@@ -22515,6 +22568,9 @@ private var initializationResult: InitializationResult {
22515
22568
if (uniffi_matrix_sdk_ffi_checksum_method_notificationclientbuilder_finish() != 40007) {
22516
22569
return InitializationResult.apiChecksumMismatch
22517
22570
}
22571
+ if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_homeserver_push_encrypted_event_to_device() != 37323) {
22572
+ return InitializationResult.apiChecksumMismatch
22573
+ }
22518
22574
if (uniffi_matrix_sdk_ffi_checksum_method_notificationsettings_can_push_encrypted_event_to_device() != 21251) {
22519
22575
return InitializationResult.apiChecksumMismatch
22520
22576
}
0 commit comments