import Foundation
import CoreGraphics

public enum SessionState: Equatable, Sendable {
    case idle
    case connecting
    case authenticating
    case connected(framebufferSize: FramebufferSize)
    case disconnected(reason: DisconnectReason)
}

public struct FramebufferSize: Equatable, Sendable, Hashable {
    public let width: Int
    public let height: Int
    public init(width: Int, height: Int) {
        self.width = width
        self.height = height
    }
}

public enum DisconnectReason: Equatable, Sendable {
    case userRequested
    case authenticationFailed
    case networkError(String)
    case protocolError(String)
    case remoteClosed
}
