import { Signal } from '@angular/core'; import { Protocol } from './protocol.class'; import { HookTypeEnum, UploaderHook } from './uploader-hook.class'; import { FileFilter } from './file-filter.class'; import { TransferOptionsInterface } from '../interfaces'; import { TransferInterface } from '../interfaces/transfer.interface'; import { FileManagerInterface } from '../interfaces/file-manager.interface'; /** * An abstract class for the transport functionality * * @export */ export declare abstract class Transfer implements TransferInterface { type: string; private transferOptionsDefault; options: TransferOptionsInterface; private _id; private _queueSignal; private _hooks; private _isHTML5; private _isDragAndDrop; private _protocol; get id(): any; readonly queue: Signal; get queueSnapshot(): FileManagerInterface[]; /** * Creates an instance of Transfer. * * @memberOf Transfer */ constructor(type: string, options?: TransferOptionsInterface); /** * Bind options to FileManagerInterface * * @memberOf Transfer */ bindOptions(options: TransferOptionsInterface): void; /** * It gives HTML5 check back * * @memberOf Transfer */ isHTML5(): boolean; /** * It gives DragAndDrop check back * * @memberOf Transfer */ isDragAndDrop(): boolean; /** * To implement a hock * * @memberOf Transfer */ hook(hook: UploaderHook): void; /** * Remove a hook * * @memberOf Transfer */ removeHook(hook: UploaderHook): boolean; activeHooks(): string[]; addFile(file: FileManagerInterface): boolean; removeFile(_file: FileManagerInterface): boolean; inQueue(_file: FileManagerInterface): number; addFilter(_filter: FileFilter): void; validate(_file: FileManagerInterface): boolean; setProtocol(_protocol: Protocol): void; getProtocol(): Protocol; /** * Validate response status code. * * @memberOf Transfer */ isSuccessCode(status: number): boolean; /** * Upload functions */ upload(): void; cancel(): void; remove(): void; uploadFile(item: FileManagerInterface): void; cancelUploadFile(item: FileManagerInterface): void; /** * Overwrite functions */ onAddFile(_file: FileManagerInterface): void; onAddFileError(_file: FileManagerInterface): void; onRemoveFile(_file: FileManagerInterface): void; onBeforeUploadAll(_uploader: TransferInterface): void; onBeforeUpload(_file: FileManagerInterface): void; onProgress(_uploader: TransferInterface, _progress: any): void; onProgressFile(_file: FileManagerInterface, _progress: number): void; onProgressFileSpeed(_file: FileManagerInterface, _progress: any): void; onSuccess(_file: FileManagerInterface, _response: any, _status: number, _headers: any): void; onError(_file: FileManagerInterface, _response: any, _status: number, _headers: any): void; onCancel(_file: FileManagerInterface, _response: any, _status: number, _headers: any): void; onComplete(_file: FileManagerInterface, _response: any, _status: number, _headers: any): void; onCompleteAll(_uploader: TransferInterface): void; /** * Internal functions */ _onAddFile(_file: FileManagerInterface): void; _onAddFileError(_file: FileManagerInterface): void; _onRemoveFile(_file: FileManagerInterface): void; _onBeforeUploadAll(): void; _onBeforeUpload(_file: FileManagerInterface): void; _onProgressFileSpeed(_file: FileManagerInterface, _speed: any): void; _onProgressFile(_file: FileManagerInterface, _progress: number): void; _onProgress(): void; _onSuccessFile(_file: FileManagerInterface, response: any, status: number, headers: any): void; _onErrorFile(_file: FileManagerInterface, response: any, status: number, headers: any): void; _onCancelFile(_file: FileManagerInterface, response: any, status: number, headers: any): void; _onCompleteFile(_file: FileManagerInterface, response: any, status: number, headers: any): void; _onCompleteAll(): void; _parseHeaders(headers: any): any; _transformResponse(response: any, _headers: any): any; _runHook(type: HookTypeEnum, ...args: any[]): void; private _hookExists; private _filterExists; abstract init(): void; abstract destroy(): void; }