@@ -1730,6 +1730,10 @@ public protocol EncryptionProtocol : AnyObject {
1730
1730
1731
1731
func resetRecoveryKey() async throws -> String
1732
1732
1733
+ func verificationState() -> VerificationState
1734
+
1735
+ func verificationStateListener(listener: VerificationStateListener) -> TaskHandle
1736
+
1733
1737
func waitForBackupUploadSteadyState(progressListener: BackupSteadyStateListener?) async throws
1734
1738
1735
1739
}
@@ -1960,6 +1964,27 @@ open class Encryption:
1960
1964
}
1961
1965
1962
1966
1967
+ open func verificationState() -> VerificationState {
1968
+ return try! FfiConverterTypeVerificationState.lift(
1969
+ try!
1970
+ rustCall() {
1971
+
1972
+ uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state(self.uniffiClonePointer(), $0
1973
+ )
1974
+ }
1975
+ )
1976
+ }
1977
+ open func verificationStateListener(listener: VerificationStateListener) -> TaskHandle {
1978
+ return try! FfiConverterTypeTaskHandle.lift(
1979
+ try!
1980
+ rustCall() {
1981
+
1982
+ uniffi_matrix_sdk_ffi_fn_method_encryption_verification_state_listener(self.uniffiClonePointer(),
1983
+ FfiConverterCallbackInterfaceVerificationStateListener.lower(listener),$0
1984
+ )
1985
+ }
1986
+ )
1987
+ }
1963
1988
open func waitForBackupUploadSteadyState(progressListener: BackupSteadyStateListener?) async throws {
1964
1989
return try await uniffiRustCallAsync(
1965
1990
rustFutureFunc: {
@@ -6820,6 +6845,8 @@ public protocol SyncServiceBuilderProtocol : AnyObject {
6820
6845
6821
6846
func withCrossProcessLock(appIdentifier: String?) -> SyncServiceBuilder
6822
6847
6848
+ func withUnifiedInvitesInRoomList(withUnifiedInvites: Bool) -> SyncServiceBuilder
6849
+
6823
6850
}
6824
6851
6825
6852
open class SyncServiceBuilder:
@@ -6887,6 +6914,17 @@ open class SyncServiceBuilder:
6887
6914
uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_cross_process_lock(self.uniffiClonePointer(),
6888
6915
FfiConverterOptionString.lower(appIdentifier),$0
6889
6916
)
6917
+ }
6918
+ )
6919
+ }
6920
+ open func withUnifiedInvitesInRoomList(withUnifiedInvites: Bool) -> SyncServiceBuilder {
6921
+ return try! FfiConverterTypeSyncServiceBuilder.lift(
6922
+ try!
6923
+ rustCall() {
6924
+
6925
+ uniffi_matrix_sdk_ffi_fn_method_syncservicebuilder_with_unified_invites_in_room_list(self.uniffiClonePointer(),
6926
+ FfiConverterBool.lower(withUnifiedInvites),$0
6927
+ )
6890
6928
}
6891
6929
)
6892
6930
}
@@ -18275,6 +18313,65 @@ public func FfiConverterTypeTimelineItemContentKind_lower(_ value: TimelineItemC
18275
18313
18276
18314
18277
18315
18316
+ // Note that we don't yet support `indirect` for enums.
18317
+ // See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
18318
+ public enum VerificationState {
18319
+
18320
+ case unknown
18321
+ case verified
18322
+ case unverified
18323
+ }
18324
+
18325
+ public struct FfiConverterTypeVerificationState: FfiConverterRustBuffer {
18326
+ typealias SwiftType = VerificationState
18327
+
18328
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> VerificationState {
18329
+ let variant: Int32 = try readInt(&buf)
18330
+ switch variant {
18331
+
18332
+ case 1: return .unknown
18333
+
18334
+ case 2: return .verified
18335
+
18336
+ case 3: return .unverified
18337
+
18338
+ default: throw UniffiInternalError.unexpectedEnumCase
18339
+ }
18340
+ }
18341
+
18342
+ public static func write(_ value: VerificationState, into buf: inout [UInt8]) {
18343
+ switch value {
18344
+
18345
+
18346
+ case .unknown:
18347
+ writeInt(&buf, Int32(1))
18348
+
18349
+
18350
+ case .verified:
18351
+ writeInt(&buf, Int32(2))
18352
+
18353
+
18354
+ case .unverified:
18355
+ writeInt(&buf, Int32(3))
18356
+
18357
+ }
18358
+ }
18359
+ }
18360
+
18361
+
18362
+ public func FfiConverterTypeVerificationState_lift(_ buf: RustBuffer) throws -> VerificationState {
18363
+ return try FfiConverterTypeVerificationState.lift(buf)
18364
+ }
18365
+
18366
+ public func FfiConverterTypeVerificationState_lower(_ value: VerificationState) -> RustBuffer {
18367
+ return FfiConverterTypeVerificationState.lower(value)
18368
+ }
18369
+
18370
+
18371
+ extension VerificationState: Equatable, Hashable {}
18372
+
18373
+
18374
+
18278
18375
// Note that we don't yet support `indirect` for enums.
18279
18376
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
18280
18377
/**
@@ -20195,6 +20292,88 @@ extension FfiConverterCallbackInterfaceTypingNotificationsListener : FfiConverte
20195
20292
20196
20293
20197
20294
20295
+ public protocol VerificationStateListener : AnyObject {
20296
+
20297
+ func onUpdate(status: VerificationState)
20298
+
20299
+ }
20300
+
20301
+
20302
+
20303
+ // Put the implementation in a struct so we don't pollute the top-level namespace
20304
+ fileprivate struct UniffiCallbackInterfaceVerificationStateListener {
20305
+
20306
+ // Create the VTable using a series of closures.
20307
+ // Swift automatically converts these into C callback functions.
20308
+ static var vtable: UniffiVTableCallbackInterfaceVerificationStateListener = UniffiVTableCallbackInterfaceVerificationStateListener(
20309
+ onUpdate: { (
20310
+ uniffiHandle: UInt64,
20311
+ status: RustBuffer,
20312
+ uniffiOutReturn: UnsafeMutableRawPointer,
20313
+ uniffiCallStatus: UnsafeMutablePointer<RustCallStatus>
20314
+ ) in
20315
+ let uniffiObj: VerificationStateListener
20316
+ do {
20317
+ try uniffiObj = FfiConverterCallbackInterfaceVerificationStateListener.handleMap.get(handle: uniffiHandle)
20318
+ } catch {
20319
+ uniffiCallStatus.pointee.code = CALL_UNEXPECTED_ERROR
20320
+ uniffiCallStatus.pointee.errorBuf = FfiConverterString.lower("Callback handle map error: \(error)")
20321
+ return
20322
+ }
20323
+ let makeCall = { uniffiObj.onUpdate(
20324
+ status: try FfiConverterTypeVerificationState.lift(status)
20325
+ ) }
20326
+
20327
+ let writeReturn = { () }
20328
+ uniffiTraitInterfaceCall(
20329
+ callStatus: uniffiCallStatus,
20330
+ makeCall: makeCall,
20331
+ writeReturn: writeReturn
20332
+ )
20333
+ },
20334
+ uniffiFree: { (uniffiHandle: UInt64) -> () in
20335
+ let result = try? FfiConverterCallbackInterfaceVerificationStateListener.handleMap.remove(handle: uniffiHandle)
20336
+ if result == nil {
20337
+ print("Uniffi callback interface VerificationStateListener: handle missing in uniffiFree")
20338
+ }
20339
+ }
20340
+ )
20341
+ }
20342
+
20343
+ private func uniffiCallbackInitVerificationStateListener() {
20344
+ uniffi_matrix_sdk_ffi_fn_init_callback_vtable_verificationstatelistener(&UniffiCallbackInterfaceVerificationStateListener.vtable)
20345
+ }
20346
+
20347
+ // FfiConverter protocol for callback interfaces
20348
+ fileprivate struct FfiConverterCallbackInterfaceVerificationStateListener {
20349
+ fileprivate static var handleMap = UniffiHandleMap<VerificationStateListener>()
20350
+ }
20351
+
20352
+ extension FfiConverterCallbackInterfaceVerificationStateListener : FfiConverter {
20353
+ typealias SwiftType = VerificationStateListener
20354
+ typealias FfiType = UInt64
20355
+
20356
+ public static func lift(_ handle: UInt64) throws -> SwiftType {
20357
+ try handleMap.get(handle: handle)
20358
+ }
20359
+
20360
+ public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> SwiftType {
20361
+ let handle: UInt64 = try readInt(&buf)
20362
+ return try lift(handle)
20363
+ }
20364
+
20365
+ public static func lower(_ v: SwiftType) -> UInt64 {
20366
+ return handleMap.insert(obj: v)
20367
+ }
20368
+
20369
+ public static func write(_ v: SwiftType, into buf: inout [UInt8]) {
20370
+ writeInt(&buf, lower(v))
20371
+ }
20372
+ }
20373
+
20374
+
20375
+
20376
+
20198
20377
public protocol WidgetCapabilitiesProvider : AnyObject {
20199
20378
20200
20379
func acquireCapabilities(capabilities: WidgetCapabilities) -> WidgetCapabilities
@@ -22478,6 +22657,12 @@ private var initializationResult: InitializationResult {
22478
22657
if (uniffi_matrix_sdk_ffi_checksum_method_encryption_reset_recovery_key() != 20380) {
22479
22658
return InitializationResult.apiChecksumMismatch
22480
22659
}
22660
+ if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state() != 29114) {
22661
+ return InitializationResult.apiChecksumMismatch
22662
+ }
22663
+ if (uniffi_matrix_sdk_ffi_checksum_method_encryption_verification_state_listener() != 26187) {
22664
+ return InitializationResult.apiChecksumMismatch
22665
+ }
22481
22666
if (uniffi_matrix_sdk_ffi_checksum_method_encryption_wait_for_backup_upload_steady_state() != 16813) {
22482
22667
return InitializationResult.apiChecksumMismatch
22483
22668
}
@@ -22955,6 +23140,9 @@ private var initializationResult: InitializationResult {
22955
23140
if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_cross_process_lock() != 43169) {
22956
23141
return InitializationResult.apiChecksumMismatch
22957
23142
}
23143
+ if (uniffi_matrix_sdk_ffi_checksum_method_syncservicebuilder_with_unified_invites_in_room_list() != 46590) {
23144
+ return InitializationResult.apiChecksumMismatch
23145
+ }
22958
23146
if (uniffi_matrix_sdk_ffi_checksum_method_taskhandle_cancel() != 9124) {
22959
23147
return InitializationResult.apiChecksumMismatch
22960
23148
}
@@ -23213,6 +23401,9 @@ private var initializationResult: InitializationResult {
23213
23401
if (uniffi_matrix_sdk_ffi_checksum_method_typingnotificationslistener_call() != 50844) {
23214
23402
return InitializationResult.apiChecksumMismatch
23215
23403
}
23404
+ if (uniffi_matrix_sdk_ffi_checksum_method_verificationstatelistener_on_update() != 9392) {
23405
+ return InitializationResult.apiChecksumMismatch
23406
+ }
23216
23407
if (uniffi_matrix_sdk_ffi_checksum_method_widgetcapabilitiesprovider_acquire_capabilities() != 43759) {
23217
23408
return InitializationResult.apiChecksumMismatch
23218
23409
}
@@ -23236,6 +23427,7 @@ private var initializationResult: InitializationResult {
23236
23427
uniffiCallbackInitSyncServiceStateObserver()
23237
23428
uniffiCallbackInitTimelineListener()
23238
23429
uniffiCallbackInitTypingNotificationsListener()
23430
+ uniffiCallbackInitVerificationStateListener()
23239
23431
uniffiCallbackInitWidgetCapabilitiesProvider()
23240
23432
return InitializationResult.ok
23241
23433
}
0 commit comments