Skip to content

Commit

Permalink
Bump to version v1.1.67 (matrix-rust-sdk/main cbb92cacce1d16673a94920…
Browse files Browse the repository at this point in the history
…4e4f88b78e9917026)
  • Loading branch information
pixlwave committed May 14, 2024
1 parent 1e40c52 commit 1436e7f
Show file tree
Hide file tree
Showing 2 changed files with 118 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
// swift-tools-version:5.5
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let checksum = "c93d13be80d129dd029ad1aa9842c888a27ea02950a888059255a6bb87676c54"
let version = "v1.1.66"
let checksum = "14c38c190f3c1a27680847a7bb7d792a780ffd1c86fed5eaee3f2fa441536b61"
let version = "v1.1.67"
let url = "https://github.com/matrix-org/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
let package = Package(
name: "MatrixRustSDK",
Expand Down
116 changes: 116 additions & 0 deletions Sources/MatrixRustSDK/matrix_sdk_crypto.swift
Original file line number Diff line number Diff line change
Expand Up @@ -503,6 +503,122 @@ extension LocalTrust: Equatable, Hashable {}



// Note that we don't yet support `indirect` for enums.
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
/**
* Error type for the decoding of the [`QrCodeData`].
*/

public enum LoginQrCodeDecodeError {

/**
* The QR code data is no long enough, it's missing some fields.
*/
case notEnoughData
/**
* One of the URLs in the QR code data is not a valid UTF-8 encoded string.
*/
case notUtf8
/**
* One of the URLs in the QR code data could not be parsed.
*/
case urlParse
/**
* The QR code data contains an invalid mode, we expect the login (0x03)
* mode or the reciprocate mode (0x04).
*/
case invalidMode
/**
* The QR code data contains an unsupported version.
*/
case invalidVersion
/**
* The base64 encoded variant of the QR code data is not a valid base64
* string.
*/
case base64
/**
* The QR code data doesn't contain the expected `MATRIX` prefix.
*/
case invalidPrefix
}


public struct FfiConverterTypeLoginQrCodeDecodeError: FfiConverterRustBuffer {
typealias SwiftType = LoginQrCodeDecodeError

public static func read(from buf: inout (data: Data, offset: Data.Index)) throws -> LoginQrCodeDecodeError {
let variant: Int32 = try readInt(&buf)
switch variant {

case 1: return .notEnoughData

case 2: return .notUtf8

case 3: return .urlParse

case 4: return .invalidMode

case 5: return .invalidVersion

case 6: return .base64

case 7: return .invalidPrefix

default: throw UniffiInternalError.unexpectedEnumCase
}
}

public static func write(_ value: LoginQrCodeDecodeError, into buf: inout [UInt8]) {
switch value {


case .notEnoughData:
writeInt(&buf, Int32(1))


case .notUtf8:
writeInt(&buf, Int32(2))


case .urlParse:
writeInt(&buf, Int32(3))


case .invalidMode:
writeInt(&buf, Int32(4))


case .invalidVersion:
writeInt(&buf, Int32(5))


case .base64:
writeInt(&buf, Int32(6))


case .invalidPrefix:
writeInt(&buf, Int32(7))

}
}
}


public func FfiConverterTypeLoginQrCodeDecodeError_lift(_ buf: RustBuffer) throws -> LoginQrCodeDecodeError {
return try FfiConverterTypeLoginQrCodeDecodeError.lift(buf)
}

public func FfiConverterTypeLoginQrCodeDecodeError_lower(_ value: LoginQrCodeDecodeError) -> RustBuffer {
return FfiConverterTypeLoginQrCodeDecodeError.lower(value)
}



extension LoginQrCodeDecodeError: Equatable, Hashable {}



// Note that we don't yet support `indirect` for enums.
// See https://github.com/mozilla/uniffi-rs/issues/396 for further discussion.
/**
Expand Down

0 comments on commit 1436e7f

Please sign in to comment.