Skip to content

Commit 0031d98

Browse files
committed
Bump to version v1.1.68 (matrix-rust-sdk/main f770248b24fa6c353cada0ada20fc3f235f53ea3)
1 parent c386c70 commit 0031d98

File tree

5 files changed

+2261
-466
lines changed

5 files changed

+2261
-466
lines changed

Package.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// swift-tools-version:5.5
22
// The swift-tools-version declares the minimum version of Swift required to build this package.
33
import PackageDescription
4-
let checksum = "14c38c190f3c1a27680847a7bb7d792a780ffd1c86fed5eaee3f2fa441536b61"
5-
let version = "v1.1.67"
4+
let checksum = "462ccb2de5c92405cf842885f1d44eed1b62723bbecc97b1bcc2af1ee5e18959"
5+
let version = "v1.1.68"
66
let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
77
let package = Package(
88
name: "MatrixRustSDK",

Sources/MatrixRustSDK/matrix_sdk.swift

+223
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,229 @@ extension BackupDownloadStrategy: Equatable, Hashable {}
704704

705705

706706

707+
// Note that we don't yet support `indirect` for enums.
708+
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
709+
/**
710+
* Current state of a [`Paginator`].
711+
*/
712+
713+
public enum PaginatorState {
714+
715+
/**
716+
* The initial state of the paginator.
717+
*/
718+
case initial
719+
/**
720+
* The paginator is fetching the target initial event.
721+
*/
722+
case fetchingTargetEvent
723+
/**
724+
* The target initial event could be found, zero or more paginations have
725+
* happened since then, and the paginator is at rest now.
726+
*/
727+
case idle
728+
/**
729+
* The paginator is… paginating one direction or another.
730+
*/
731+
case paginating
732+
}
733+
734+
735+
public struct FfiConverterTypePaginatorState: FfiConverterRustBuffer {
736+
typealias SwiftType = PaginatorState
737+
738+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> PaginatorState {
739+
let variant: Int32 = try readInt(&buf)
740+
switch variant {
741+
742+
case 1: return .initial
743+
744+
case 2: return .fetchingTargetEvent
745+
746+
case 3: return .idle
747+
748+
case 4: return .paginating
749+
750+
default: throw UniffiInternalError.unexpectedEnumCase
751+
}
752+
}
753+
754+
public static func write(_ value: PaginatorState, into buf: inout [UInt8]) {
755+
switch value {
756+
757+
758+
case .initial:
759+
writeInt(&buf, Int32(1))
760+
761+
762+
case .fetchingTargetEvent:
763+
writeInt(&buf, Int32(2))
764+
765+
766+
case .idle:
767+
writeInt(&buf, Int32(3))
768+
769+
770+
case .paginating:
771+
writeInt(&buf, Int32(4))
772+
773+
}
774+
}
775+
}
776+
777+
778+
public func FfiConverterTypePaginatorState_lift(_ buf: RustBuffer) throws -> PaginatorState {
779+
return try FfiConverterTypePaginatorState.lift(buf)
780+
}
781+
782+
public func FfiConverterTypePaginatorState_lower(_ value: PaginatorState) -> RustBuffer {
783+
return FfiConverterTypePaginatorState.lower(value)
784+
}
785+
786+
787+
788+
extension PaginatorState: Equatable, Hashable {}
789+
790+
791+
792+
// Note that we don't yet support `indirect` for enums.
793+
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
794+
/**
795+
* The error type for failures while trying to log in a new device using a QR
796+
* code.
797+
*/
798+
799+
public enum QrCodeLoginError {
800+
801+
/**
802+
* An error happened while we were communicating with the OIDC provider.
803+
*/
804+
case oidc
805+
/**
806+
* The other device has signaled to us that the login has failed.
807+
*/
808+
case loginFailure
809+
/**
810+
* An unexpected message was received from the other device.
811+
*/
812+
case unexpectedMessage
813+
/**
814+
* An error happened while exchanging messages with the other device.
815+
*/
816+
case secureChannel
817+
/**
818+
* The cross-process refresh lock failed to be initialized.
819+
*/
820+
case crossProcessRefreshLock
821+
/**
822+
* An error happened while we were trying to discover our user and device
823+
* ID, after we have acquired an access token from the OIDC provider.
824+
*/
825+
case userIdDiscovery
826+
/**
827+
* We failed to set the session tokens after we figured out our device and
828+
* user IDs.
829+
*/
830+
case sessionTokens
831+
/**
832+
* The device keys failed to be uploaded after we successfully logged in.
833+
*/
834+
case deviceKeyUpload
835+
/**
836+
* The secrets bundle we received from the existing device failed to be
837+
* imported.
838+
*/
839+
case secretImport
840+
}
841+
842+
843+
public struct FfiConverterTypeQRCodeLoginError: FfiConverterRustBuffer {
844+
typealias SwiftType = QrCodeLoginError
845+
846+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> QrCodeLoginError {
847+
let variant: Int32 = try readInt(&buf)
848+
switch variant {
849+
850+
case 1: return .oidc
851+
852+
case 2: return .loginFailure
853+
854+
case 3: return .unexpectedMessage
855+
856+
case 4: return .secureChannel
857+
858+
case 5: return .crossProcessRefreshLock
859+
860+
case 6: return .userIdDiscovery
861+
862+
case 7: return .sessionTokens
863+
864+
case 8: return .deviceKeyUpload
865+
866+
case 9: return .secretImport
867+
868+
default: throw UniffiInternalError.unexpectedEnumCase
869+
}
870+
}
871+
872+
public static func write(_ value: QrCodeLoginError, into buf: inout [UInt8]) {
873+
switch value {
874+
875+
876+
case .oidc:
877+
writeInt(&buf, Int32(1))
878+
879+
880+
case .loginFailure:
881+
writeInt(&buf, Int32(2))
882+
883+
884+
case .unexpectedMessage:
885+
writeInt(&buf, Int32(3))
886+
887+
888+
case .secureChannel:
889+
writeInt(&buf, Int32(4))
890+
891+
892+
case .crossProcessRefreshLock:
893+
writeInt(&buf, Int32(5))
894+
895+
896+
case .userIdDiscovery:
897+
writeInt(&buf, Int32(6))
898+
899+
900+
case .sessionTokens:
901+
writeInt(&buf, Int32(7))
902+
903+
904+
case .deviceKeyUpload:
905+
writeInt(&buf, Int32(8))
906+
907+
908+
case .secretImport:
909+
writeInt(&buf, Int32(9))
910+
911+
}
912+
}
913+
}
914+
915+
916+
public func FfiConverterTypeQRCodeLoginError_lift(_ buf: RustBuffer) throws -> QrCodeLoginError {
917+
return try FfiConverterTypeQRCodeLoginError.lift(buf)
918+
}
919+
920+
public func FfiConverterTypeQRCodeLoginError_lower(_ value: QrCodeLoginError) -> RustBuffer {
921+
return FfiConverterTypeQRCodeLoginError.lower(value)
922+
}
923+
924+
925+
926+
extension QrCodeLoginError: Equatable, Hashable {}
927+
928+
929+
707930
// Note that we don't yet support `indirect` for enums.
708931
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
709932
/**

0 commit comments

Comments
 (0)