import { Event } from '../events';
import { BaseModel } from './BaseModel';
import { DownloadFile } from './DownloadFile';

export declare class ChunkProcessedEvent extends Event {
    chunkStart: number;
    chunkEnd: number;
    chunkSize: number;
    fileID: string;
    static readonly type: string;
    constructor(chunkStart: number, chunkEnd: number, chunkSize: number, fileID: string);
}
export declare class ChunkRetriedEvent extends Event {
    retryCount: number;
    fileID: string;
    static readonly type: string;
    constructor(retryCount: number, fileID: string);
}
/** Download chunk */
export declare class DownloadChunk extends BaseModel {
    readonly fromByte: number;
    readonly toByte: number;
    readonly path: string;
    private retryCount;
    readonly maxRetryCount: number;
    private processed;
    readonly file: DownloadFile;
    constructor(id: string, fromByte: number, toByte: number, path: string, retryCount: number, maxRetryCount: number, processed: boolean, file: DownloadFile, version?: number);
    static create(file: DownloadFile, fromByte: number, toByte: number, maxRetryCount: number): DownloadChunk;
    get size(): number;
    equals(chunk: DownloadChunk): boolean;
    clone(): DownloadChunk;
    isProcessed(): boolean;
    hasFailed(): boolean;
    inProgress(): boolean;
    markProcessed(): void;
    getRetryCount(): number;
    retry(msg?: string | undefined): void;
    fail(msg?: string | undefined): void;
    createProcessedEvent(): ChunkProcessedEvent;
    createRetriedEvent(): ChunkRetriedEvent;
}
