@@ -458,6 +458,344 @@ fileprivate struct FfiConverterString: FfiConverter {
458458}
459459
460460
461+
462+
463+ /**
464+ * Enum for the algorithm-specific secrets for the room key backup.
465+ */
466+ public protocol BackupSecretsProtocol : AnyObject , Sendable {
467+
468+ }
469+ /**
470+ * Enum for the algorithm-specific secrets for the room key backup.
471+ */
472+ open class BackupSecrets : BackupSecretsProtocol , @unchecked Sendable {
473+ fileprivate let handle : UInt64
474+
475+ /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly.
476+ #if swift(>=5.8)
477+ @_documentation ( visibility: private)
478+ #endif
479+ public struct NoHandle {
480+ public init ( ) { }
481+ }
482+
483+ // TODO: We'd like this to be `private` but for Swifty reasons,
484+ // we can't implement `FfiConverter` without making this `required` and we can't
485+ // make it `required` without making it `public`.
486+ #if swift(>=5.8)
487+ @_documentation ( visibility: private)
488+ #endif
489+ required public init ( unsafeFromHandle handle: UInt64 ) {
490+ self . handle = handle
491+ }
492+
493+ // This constructor can be used to instantiate a fake object.
494+ // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject].
495+ //
496+ // - Warning:
497+ // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash.
498+ #if swift(>=5.8)
499+ @_documentation ( visibility: private)
500+ #endif
501+ public init ( noHandle: NoHandle ) {
502+ self . handle = 0
503+ }
504+
505+ #if swift(>=5.8)
506+ @_documentation ( visibility: private)
507+ #endif
508+ public func uniffiCloneHandle( ) -> UInt64 {
509+ return try ! rustCall { uniffi_matrix_sdk_crypto_fn_clone_backupsecrets ( self . handle, $0) }
510+ }
511+ // No primary constructor declared for this class.
512+
513+ deinit {
514+ if handle == 0 {
515+ // Mock objects have handle=0 don't try to free them
516+ return
517+ }
518+
519+ try ! rustCall { uniffi_matrix_sdk_crypto_fn_free_backupsecrets ( handle, $0) }
520+ }
521+
522+
523+
524+
525+
526+
527+ }
528+
529+
530+ #if swift(>=5.8)
531+ @_documentation ( visibility: private)
532+ #endif
533+ public struct FfiConverterTypeBackupSecrets : FfiConverter {
534+ typealias FfiType = UInt64
535+ typealias SwiftType = BackupSecrets
536+
537+ public static func lift( _ handle: UInt64 ) throws -> BackupSecrets {
538+ return BackupSecrets ( unsafeFromHandle: handle)
539+ }
540+
541+ public static func lower( _ value: BackupSecrets ) -> UInt64 {
542+ return value. uniffiCloneHandle ( )
543+ }
544+
545+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> BackupSecrets {
546+ let handle : UInt64 = try readInt ( & buf)
547+ return try lift ( handle)
548+ }
549+
550+ public static func write( _ value: BackupSecrets , into buf: inout [ UInt8 ] ) {
551+ writeInt ( & buf, lower ( value) )
552+ }
553+ }
554+
555+
556+ #if swift(>=5.8)
557+ @_documentation ( visibility: private)
558+ #endif
559+ public func FfiConverterTypeBackupSecrets_lift( _ handle: UInt64 ) throws -> BackupSecrets {
560+ return try FfiConverterTypeBackupSecrets . lift ( handle)
561+ }
562+
563+ #if swift(>=5.8)
564+ @_documentation ( visibility: private)
565+ #endif
566+ public func FfiConverterTypeBackupSecrets_lower( _ value: BackupSecrets ) -> UInt64 {
567+ return FfiConverterTypeBackupSecrets . lower ( value)
568+ }
569+
570+
571+
572+
573+
574+
575+ /**
576+ * Data for the secrets bundle containing the cross-signing keys.
577+ */
578+ public protocol CrossSigningSecretsProtocol : AnyObject , Sendable {
579+
580+ }
581+ /**
582+ * Data for the secrets bundle containing the cross-signing keys.
583+ */
584+ open class CrossSigningSecrets : CrossSigningSecretsProtocol , @unchecked Sendable {
585+ fileprivate let handle : UInt64
586+
587+ /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly.
588+ #if swift(>=5.8)
589+ @_documentation ( visibility: private)
590+ #endif
591+ public struct NoHandle {
592+ public init ( ) { }
593+ }
594+
595+ // TODO: We'd like this to be `private` but for Swifty reasons,
596+ // we can't implement `FfiConverter` without making this `required` and we can't
597+ // make it `required` without making it `public`.
598+ #if swift(>=5.8)
599+ @_documentation ( visibility: private)
600+ #endif
601+ required public init ( unsafeFromHandle handle: UInt64 ) {
602+ self . handle = handle
603+ }
604+
605+ // This constructor can be used to instantiate a fake object.
606+ // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject].
607+ //
608+ // - Warning:
609+ // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash.
610+ #if swift(>=5.8)
611+ @_documentation ( visibility: private)
612+ #endif
613+ public init ( noHandle: NoHandle ) {
614+ self . handle = 0
615+ }
616+
617+ #if swift(>=5.8)
618+ @_documentation ( visibility: private)
619+ #endif
620+ public func uniffiCloneHandle( ) -> UInt64 {
621+ return try ! rustCall { uniffi_matrix_sdk_crypto_fn_clone_crosssigningsecrets ( self . handle, $0) }
622+ }
623+ // No primary constructor declared for this class.
624+
625+ deinit {
626+ if handle == 0 {
627+ // Mock objects have handle=0 don't try to free them
628+ return
629+ }
630+
631+ try ! rustCall { uniffi_matrix_sdk_crypto_fn_free_crosssigningsecrets ( handle, $0) }
632+ }
633+
634+
635+
636+
637+
638+
639+ }
640+
641+
642+ #if swift(>=5.8)
643+ @_documentation ( visibility: private)
644+ #endif
645+ public struct FfiConverterTypeCrossSigningSecrets : FfiConverter {
646+ typealias FfiType = UInt64
647+ typealias SwiftType = CrossSigningSecrets
648+
649+ public static func lift( _ handle: UInt64 ) throws -> CrossSigningSecrets {
650+ return CrossSigningSecrets ( unsafeFromHandle: handle)
651+ }
652+
653+ public static func lower( _ value: CrossSigningSecrets ) -> UInt64 {
654+ return value. uniffiCloneHandle ( )
655+ }
656+
657+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> CrossSigningSecrets {
658+ let handle : UInt64 = try readInt ( & buf)
659+ return try lift ( handle)
660+ }
661+
662+ public static func write( _ value: CrossSigningSecrets , into buf: inout [ UInt8 ] ) {
663+ writeInt ( & buf, lower ( value) )
664+ }
665+ }
666+
667+
668+ #if swift(>=5.8)
669+ @_documentation ( visibility: private)
670+ #endif
671+ public func FfiConverterTypeCrossSigningSecrets_lift( _ handle: UInt64 ) throws -> CrossSigningSecrets {
672+ return try FfiConverterTypeCrossSigningSecrets . lift ( handle)
673+ }
674+
675+ #if swift(>=5.8)
676+ @_documentation ( visibility: private)
677+ #endif
678+ public func FfiConverterTypeCrossSigningSecrets_lower( _ value: CrossSigningSecrets ) -> UInt64 {
679+ return FfiConverterTypeCrossSigningSecrets . lower ( value)
680+ }
681+
682+
683+
684+
685+
686+
687+ /**
688+ * Struct containing the bundle of secrets to fully activate a new devices for
689+ * end-to-end encryption.
690+ */
691+ public protocol SecretsBundleProtocol : AnyObject , Sendable {
692+
693+ }
694+ /**
695+ * Struct containing the bundle of secrets to fully activate a new devices for
696+ * end-to-end encryption.
697+ */
698+ open class SecretsBundle : SecretsBundleProtocol , @unchecked Sendable {
699+ fileprivate let handle : UInt64
700+
701+ /// Used to instantiate a [FFIObject] without an actual handle, for fakes in tests, mostly.
702+ #if swift(>=5.8)
703+ @_documentation ( visibility: private)
704+ #endif
705+ public struct NoHandle {
706+ public init ( ) { }
707+ }
708+
709+ // TODO: We'd like this to be `private` but for Swifty reasons,
710+ // we can't implement `FfiConverter` without making this `required` and we can't
711+ // make it `required` without making it `public`.
712+ #if swift(>=5.8)
713+ @_documentation ( visibility: private)
714+ #endif
715+ required public init ( unsafeFromHandle handle: UInt64 ) {
716+ self . handle = handle
717+ }
718+
719+ // This constructor can be used to instantiate a fake object.
720+ // - Parameter noHandle: Placeholder value so we can have a constructor separate from the default empty one that may be implemented for classes extending [FFIObject].
721+ //
722+ // - Warning:
723+ // Any object instantiated with this constructor cannot be passed to an actual Rust-backed object. Since there isn't a backing handle the FFI lower functions will crash.
724+ #if swift(>=5.8)
725+ @_documentation ( visibility: private)
726+ #endif
727+ public init ( noHandle: NoHandle ) {
728+ self . handle = 0
729+ }
730+
731+ #if swift(>=5.8)
732+ @_documentation ( visibility: private)
733+ #endif
734+ public func uniffiCloneHandle( ) -> UInt64 {
735+ return try ! rustCall { uniffi_matrix_sdk_crypto_fn_clone_secretsbundle ( self . handle, $0) }
736+ }
737+ // No primary constructor declared for this class.
738+
739+ deinit {
740+ if handle == 0 {
741+ // Mock objects have handle=0 don't try to free them
742+ return
743+ }
744+
745+ try ! rustCall { uniffi_matrix_sdk_crypto_fn_free_secretsbundle ( handle, $0) }
746+ }
747+
748+
749+
750+
751+
752+
753+ }
754+
755+
756+ #if swift(>=5.8)
757+ @_documentation ( visibility: private)
758+ #endif
759+ public struct FfiConverterTypeSecretsBundle : FfiConverter {
760+ typealias FfiType = UInt64
761+ typealias SwiftType = SecretsBundle
762+
763+ public static func lift( _ handle: UInt64 ) throws -> SecretsBundle {
764+ return SecretsBundle ( unsafeFromHandle: handle)
765+ }
766+
767+ public static func lower( _ value: SecretsBundle ) -> UInt64 {
768+ return value. uniffiCloneHandle ( )
769+ }
770+
771+ public static func read( from buf: inout ( data: Data , offset: Data . Index ) ) throws -> SecretsBundle {
772+ let handle : UInt64 = try readInt ( & buf)
773+ return try lift ( handle)
774+ }
775+
776+ public static func write( _ value: SecretsBundle , into buf: inout [ UInt8 ] ) {
777+ writeInt ( & buf, lower ( value) )
778+ }
779+ }
780+
781+
782+ #if swift(>=5.8)
783+ @_documentation ( visibility: private)
784+ #endif
785+ public func FfiConverterTypeSecretsBundle_lift( _ handle: UInt64 ) throws -> SecretsBundle {
786+ return try FfiConverterTypeSecretsBundle . lift ( handle)
787+ }
788+
789+ #if swift(>=5.8)
790+ @_documentation ( visibility: private)
791+ #endif
792+ public func FfiConverterTypeSecretsBundle_lower( _ value: SecretsBundle ) -> UInt64 {
793+ return FfiConverterTypeSecretsBundle . lower ( value)
794+ }
795+
796+
797+
798+
461799/**
462800 * Settings for decrypting messages
463801 */
0 commit comments