Swift SDK: Swift Package wrapping libquicproquo_ffi with QpqClient class (connect, login, send, receive, disconnect) for iOS 15+ / macOS 13+. Kotlin SDK: JNI bridge to libquicproquo_ffi with QpqClient class for Android (aarch64, armv7) and JVM, Gradle build configuration. Adds RegisterPushToken RPC (method ID 710) to device.proto for APNs/FCM/WebPush device push token registration.
24 lines
840 B
Swift
24 lines
840 B
Swift
/// Errors returned by the QuicProQuo SDK.
|
|
public enum QpqError: Error, Sendable, CustomStringConvertible {
|
|
/// Connection to the server failed.
|
|
case connectionFailed(String)
|
|
/// OPAQUE authentication failed (bad credentials).
|
|
case authFailed(String)
|
|
/// The operation timed out.
|
|
case timeout(String)
|
|
/// The client is not connected.
|
|
case notConnected
|
|
/// A generic error from the FFI layer.
|
|
case ffiError(String)
|
|
|
|
public var description: String {
|
|
switch self {
|
|
case .connectionFailed(let msg): return "connection failed: \(msg)"
|
|
case .authFailed(let msg): return "auth failed: \(msg)"
|
|
case .timeout(let msg): return "timeout: \(msg)"
|
|
case .notConnected: return "not connected"
|
|
case .ffiError(let msg): return "FFI error: \(msg)"
|
|
}
|
|
}
|
|
}
|