/**
 * @license
 * Copyright 2025-2026 Open Home Foundation
 * SPDX-License-Identifier: Apache-2.0
 */
import type { WebServerHandler } from "@matter-server/ws-controller";
import { Observable } from "@matter/main";
import type { createServer } from "node:http";
import { BleProxyConnection } from "./BleProxyConnection.js";
import { type DeviceDiscoveredData, type StartScanArgs } from "./BleProxyProtocol.js";
type HttpServer = ReturnType<typeof createServer>;
/**
 * WebSocket server handler (hub) for the `/ble` BLE proxy endpoint.
 *
 * Accepts any number of proxy client connections, broadcasts scan commands to
 * all of them, and tracks which client owns each discovered peripheral so that
 * per-peripheral traffic routes to a single client.
 */
export declare class BleProxyHandler implements WebServerHandler {
    #private;
    /** Emitted whenever a connection completes its handshake. */
    readonly connectionEstablished: Observable<[], void>;
    /** Emitted for each `device_discovered`, after ownership is updated. */
    readonly deviceDiscovered: Observable<[data: DeviceDiscoveredData, connection: BleProxyConnection], void>;
    /** Emitted once no connection is scanning anymore. */
    readonly scanStopped: Observable<[reason: string], void>;
    get connected(): boolean;
    register(server: HttpServer): Promise<void>;
    unregister(): Promise<void>;
    /** Returns the connection that owns `address`, if it is still connected. */
    getOwner(address: string): BleProxyConnection | undefined;
    startScan(args: StartScanArgs): Promise<void>;
    stopScan(): Promise<void>;
}
export {};
//# sourceMappingURL=BleProxyHandler.d.ts.map