Skip to content

Commit 1436e7f

Browse files
committed
Bump to version v1.1.67 (matrix-rust-sdk/main cbb92cacce1d16673a949204e4f88b78e9917026)
1 parent 1e40c52 commit 1436e7f

File tree

2 files changed

+118
-2
lines changed

2 files changed

+118
-2
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 = "c93d13be80d129dd029ad1aa9842c888a27ea02950a888059255a6bb87676c54"
5-
let version = "v1.1.66"
4+
let checksum = "14c38c190f3c1a27680847a7bb7d792a780ffd1c86fed5eaee3f2fa441536b61"
5+
let version = "v1.1.67"
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_crypto.swift

+116
Original file line numberDiff line numberDiff line change
@@ -503,6 +503,122 @@ extension LocalTrust: Equatable, Hashable {}
503503

504504

505505

506+
// Note that we don't yet support `indirect` for enums.
507+
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
508+
/**
509+
* Error type for the decoding of the [`QrCodeData`].
510+
*/
511+
512+
public enum LoginQrCodeDecodeError {
513+
514+
/**
515+
* The QR code data is no long enough, it's missing some fields.
516+
*/
517+
case notEnoughData
518+
/**
519+
* One of the URLs in the QR code data is not a valid UTF-8 encoded string.
520+
*/
521+
case notUtf8
522+
/**
523+
* One of the URLs in the QR code data could not be parsed.
524+
*/
525+
case urlParse
526+
/**
527+
* The QR code data contains an invalid mode, we expect the login (0x03)
528+
* mode or the reciprocate mode (0x04).
529+
*/
530+
case invalidMode
531+
/**
532+
* The QR code data contains an unsupported version.
533+
*/
534+
case invalidVersion
535+
/**
536+
* The base64 encoded variant of the QR code data is not a valid base64
537+
* string.
538+
*/
539+
case base64
540+
/**
541+
* The QR code data doesn't contain the expected `MATRIX` prefix.
542+
*/
543+
case invalidPrefix
544+
}
545+
546+
547+
public struct FfiConverterTypeLoginQrCodeDecodeError: FfiConverterRustBuffer {
548+
typealias SwiftType = LoginQrCodeDecodeError
549+
550+
public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LoginQrCodeDecodeError {
551+
let variant: Int32 = try readInt(&buf)
552+
switch variant {
553+
554+
case 1: return .notEnoughData
555+
556+
case 2: return .notUtf8
557+
558+
case 3: return .urlParse
559+
560+
case 4: return .invalidMode
561+
562+
case 5: return .invalidVersion
563+
564+
case 6: return .base64
565+
566+
case 7: return .invalidPrefix
567+
568+
default: throw UniffiInternalError.unexpectedEnumCase
569+
}
570+
}
571+
572+
public static func write(_ value: LoginQrCodeDecodeError, into buf: inout [UInt8]) {
573+
switch value {
574+
575+
576+
case .notEnoughData:
577+
writeInt(&buf, Int32(1))
578+
579+
580+
case .notUtf8:
581+
writeInt(&buf, Int32(2))
582+
583+
584+
case .urlParse:
585+
writeInt(&buf, Int32(3))
586+
587+
588+
case .invalidMode:
589+
writeInt(&buf, Int32(4))
590+
591+
592+
case .invalidVersion:
593+
writeInt(&buf, Int32(5))
594+
595+
596+
case .base64:
597+
writeInt(&buf, Int32(6))
598+
599+
600+
case .invalidPrefix:
601+
writeInt(&buf, Int32(7))
602+
603+
}
604+
}
605+
}
606+
607+
608+
public func FfiConverterTypeLoginQrCodeDecodeError_lift(_ buf: RustBuffer) throws -> LoginQrCodeDecodeError {
609+
return try FfiConverterTypeLoginQrCodeDecodeError.lift(buf)
610+
}
611+
612+
public func FfiConverterTypeLoginQrCodeDecodeError_lower(_ value: LoginQrCodeDecodeError) -> RustBuffer {
613+
return FfiConverterTypeLoginQrCodeDecodeError.lower(value)
614+
}
615+
616+
617+
618+
extension LoginQrCodeDecodeError: Equatable, Hashable {}
619+
620+
621+
506622
// Note that we don't yet support `indirect` for enums.
507623
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
508624
/**

0 commit comments

Comments
 (0)