Skip to content

Commit

Permalink
Bump to version v0.0.1-qr-code-login (matrix-rust-sdk/poljar/qr-login…
Browse files Browse the repository at this point in the history
… c4fd07f2f30f56b7d7fa93b18f403ebdd427017c)
  • Loading branch information
Velin92 committed May 20, 2024
1 parent dfd7a1e commit 215f8b8
Show file tree
Hide file tree
Showing 3 changed files with 668 additions and 64 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.9
// The swift-tools-version declares the minimum version of Swift required to build this package.
import PackageDescription
let checksum = "ade40f5f1512366a82bd00799da99684ce8a1d909ef1e0a861187973d5dcedd6"
let version = "v1.0.1"
let checksum = "dd29992cd975edae91c71d45372a7c413189b4437485fa8c11026d26810ff662"
let version = "v0.0.1-qr-code-login"
let url = "https://github.com/element-hq/matrix-rust-components-swift/releases/download/\(version)/MatrixSDKFFI.xcframework.zip"
let package = Package(
name: "MatrixRustSDK",
Expand Down
104 changes: 104 additions & 0 deletions Sources/MatrixRustSDK/matrix_sdk.swift
Original file line number Diff line number Diff line change
Expand Up @@ -789,6 +789,110 @@ extension PaginatorState: Equatable, Hashable {}



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

public enum QrCodeLoginError {

case oidc
case sessionTokens
case userIdDiscovery
case secretImport
case loginFailure
case unexpectedMessage
case crossProcessRefreshLock
case secureChannel
case deviceKeyUpload
}


public struct FfiConverterTypeQRCodeLoginError: FfiConverterRustBuffer {
typealias SwiftType = QrCodeLoginError

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

case 1: return .oidc

case 2: return .sessionTokens

case 3: return .userIdDiscovery

case 4: return .secretImport

case 5: return .loginFailure

case 6: return .unexpectedMessage

case 7: return .crossProcessRefreshLock

case 8: return .secureChannel

case 9: return .deviceKeyUpload

default: throw UniffiInternalError.unexpectedEnumCase
}
}

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


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


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


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


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


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


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


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


case .secureChannel:
writeInt(&buf, Int32(8))


case .deviceKeyUpload:
writeInt(&buf, Int32(9))

}
}
}


public func FfiConverterTypeQRCodeLoginError_lift(_ buf: RustBuffer) throws -> QrCodeLoginError {
return try FfiConverterTypeQRCodeLoginError.lift(buf)
}

public func FfiConverterTypeQRCodeLoginError_lower(_ value: QrCodeLoginError) -> RustBuffer {
return FfiConverterTypeQRCodeLoginError.lower(value)
}



extension QrCodeLoginError: 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
Loading

0 comments on commit 215f8b8

Please sign in to comment.