feat(sdk): add Swift and Kotlin mobile client foundations with push token proto
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.
This commit is contained in:
23
sdks/swift/Sources/QuicProQuo/QpqError.swift
Normal file
23
sdks/swift/Sources/QuicProQuo/QpqError.swift
Normal file
@@ -0,0 +1,23 @@
|
||||
/// 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)"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user