import { EventEmitter } from 'events'; import * as Hashes from '../platform'; import { FileDescription, Hash, Jingle } from '../protocol'; import ICESession, { ICESessionOpts } 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: ICESessionOpts); start(file?: File | ActionCallback, next?: ActionCallback): Promise; accept(next?: ActionCallback): Promise; protected onSessionInitiate(changes: Jingle, cb: ActionCallback): Promise; protected onSessionInfo(changes: Jingle, cb: ActionCallback): void; private _maybeReceivedFile; } export {};