/// <reference types="node" />
import { EventEmitter } from 'events';
import * as Hashes from 'stanza-shims';
import { FileDescription, Hash, Jingle } from '../protocol';
import ICESession from './ICESession';
import { ActionCallback } from './Session';
export declare class Sender extends EventEmitter {
    file?: File;
    channel?: RTCDataChannel;
    hash: Hashes.Hash;
    private config;
    constructor(opts?: {});
    send(file: File, channel: RTCDataChannel): void;
}
interface ReceiverMetadata extends FileDescription {
    actualhash?: string;
    hash?: Hash;
}
export declare class Receiver extends EventEmitter {
    metadata: ReceiverMetadata;
    private config;
    private receiveBuffer;
    private received;
    private channel?;
    private hash;
    constructor(opts?: {});
    receive(metadata: ReceiverMetadata, channel: RTCDataChannel): void;
}
export default class FileTransferSession extends ICESession {
    private sender?;
    private receiver?;
    private file?;
    private receivedFile?;
    private channel?;
    private contentName?;
    constructor(opts: any);
    start(file?: File | ActionCallback, next?: ActionCallback): Promise<void>;
    accept(next?: ActionCallback): Promise<void>;
    protected onSessionInitiate(changes: Jingle, cb: ActionCallback): Promise<void>;
    protected onSessionInfo(changes: Jingle, cb: ActionCallback): void;
    private _maybeReceivedFile;
}
export {};
