/// <reference types="node" />
import 'stream.finished/auto';
import { RemoteHost } from '@fitbit/fdb-debugger';
import stream, { Duplex } from 'stream';
import { SyncEvent } from 'ts-events';
import { DeviceType, HostType } from './HostTypes';
import StreamTap from './StreamTap';
export declare class HostConnection {
    stream: stream.Duplex;
    host: RemoteHost;
    private constructor();
    static getDumpStreamTap(): {
        preSerializeTransform: StreamTap;
        postDeserializeTransform: StreamTap;
    } | undefined;
    static connect(stream: Duplex): Promise<HostConnection>;
}
export declare type HostAddedEvent = {
    hostType: HostType;
    host: RemoteHost;
};
export interface Host {
    connect(): Promise<Duplex>;
    displayName: string;
    available: boolean;
    roles: string[];
}
declare class HostConnections {
    onHostAdded: SyncEvent<HostAddedEvent>;
    appHost?: HostConnection;
    companionHost?: HostConnection;
    connect(host: Host, deviceType: DeviceType): Promise<HostConnection>;
    listOfType(deviceType: DeviceType): Promise<Host[]>;
}
export default HostConnections;
//# sourceMappingURL=HostConnections.d.ts.map