import BrowserSession from '../BrowserSession';
export declare function saveToFile(data: any, filename: string): void;
export interface ConnectionStateDetails {
    connectionState: RTCPeerConnectionState;
    previousConnectionState: RTCPeerConnectionState;
    iceConnectionState: RTCIceConnectionState;
    iceGatheringState: RTCIceGatheringState;
    signalingState: RTCSignalingState;
    dtlsState?: RTCDtlsTransportState;
    dtlsCipher?: string;
    srtpCipher?: string;
    tlsVersion?: string;
    sctpState?: RTCSctpTransportState;
    localCandidateType?: string;
    remoteCandidateType?: string;
    candidatePairState?: RTCStatsIceCandidatePairState;
    selectedCandidatePair?: {
        local: {
            address: string;
            port: number;
            protocol: string;
            candidateType: string;
        };
        remote: {
            address: string;
            port: number;
            protocol: string;
            candidateType: string;
        };
    };
}
export declare function getConnectionStateDetails(pc: RTCPeerConnection, previousConnectionState: RTCPeerConnectionState): Promise<ConnectionStateDetails>;
export interface IceCandidateErrorDetails {
    errorCode: number;
    errorText: string;
    url: string;
    address: string | null;
    port: number | null;
    connectionState: RTCPeerConnectionState;
    iceConnectionState: RTCIceConnectionState;
    iceGatheringState: RTCIceGatheringState;
    signalingState: RTCSignalingState;
    localDescriptionType?: RTCSdpType;
    remoteDescriptionType?: RTCSdpType;
}
export declare function getIceCandidateErrorDetails(event: RTCPeerConnectionIceErrorEvent, pc: RTCPeerConnection): IceCandidateErrorDetails;
export declare type WebRTCStatsReporter = {
    isRunning: boolean;
    start: (peerConnection: RTCPeerConnection, peerId: string, connectionId: string) => Promise<void>;
    stop: (debugOutput: string) => Promise<void>;
    reportConnectionStateChange: (details: ConnectionStateDetails) => void;
    reportIceCandidateError: (details: IceCandidateErrorDetails) => void;
};
export declare function createWebRTCStatsReporter(session: BrowserSession, callID: string): WebRTCStatsReporter;
