Skip to content

Commit

Permalink
swift bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
zaneschepke committed Oct 31, 2024
1 parent 181a5a2 commit 103131b
Showing 1 changed file with 34 additions and 8 deletions.
42 changes: 34 additions & 8 deletions nym-vpn-core/crates/nym-vpn-lib/uniffi/nym_vpn_lib.swift
Original file line number Diff line number Diff line change
Expand Up @@ -4511,8 +4511,12 @@ public enum VpnError {
case OutOfBandwidth
case InvalidStateError(details: String
)
case Account(details: String
)
case AccountReady
case NoAccountStored
case AccountNotActive
case NoActiveSubscription
case AccountDeviceNotRegistered
case AccountDeviceNotActive
}


Expand Down Expand Up @@ -4542,9 +4546,12 @@ public struct FfiConverterTypeVpnError: FfiConverterRustBuffer {
case 6: return .InvalidStateError(
details: try FfiConverterString.read(from: &buf)
)
case 7: return .Account(
details: try FfiConverterString.read(from: &buf)
)
case 7: return .AccountReady
case 8: return .NoAccountStored
case 9: return .AccountNotActive
case 10: return .NoActiveSubscription
case 11: return .AccountDeviceNotRegistered
case 12: return .AccountDeviceNotActive

default: throw UniffiInternalError.unexpectedEnumCase
}
Expand Down Expand Up @@ -4586,10 +4593,29 @@ public struct FfiConverterTypeVpnError: FfiConverterRustBuffer {
FfiConverterString.write(details, into: &buf)


case let .Account(details):
case .AccountReady:
writeInt(&buf, Int32(7))
FfiConverterString.write(details, into: &buf)



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


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


case .NoActiveSubscription:
writeInt(&buf, Int32(10))


case .AccountDeviceNotRegistered:
writeInt(&buf, Int32(11))


case .AccountDeviceNotActive:
writeInt(&buf, Int32(12))

}
}
}
Expand Down

0 comments on commit 103131b

Please sign in to comment.