/** * CastManager: lazy-loaded manager for cast sessions within the daemon. * Wraps CastSession with start/stop lifecycle and SSE broadcasting. * Server state is the single source of truth — pushed to clients via SSE. */ import { EventEmitter } from "node:events"; import type { ServerResponse } from "node:http"; import { CastSession } from "../cast/session.js"; export interface CastStartOptions { listenPort?: number; resolution?: string; width?: number; height?: number; } export declare class CastManager extends EventEmitter { private session; private sseClients; private questIp; private configuredDevice; private statsInterval; private starting; constructor(device?: string); get isActive(): boolean; getSession(): CastSession | null; /** Build full status snapshot from current session state. */ getStatus(): Record; start(opts?: CastStartOptions): Promise; stop(): Promise; restart(): Promise; private stopSession; /** Get the first connected ADB device serial (e.g. USB serial or IP:port) */ private getAdbSerial; private getQuestIp; broadcast(event: string, data: unknown): void; /** Broadcast full status snapshot as SSE "status" event. */ broadcastStatus(): void; broadcastToast(msg: string): void; addSSEClient(res: ServerResponse): void; removeSSEClient(res: ServerResponse): void; cleanup(): void; } //# sourceMappingURL=cast-manager.d.ts.map