import { MenuItemOptions } from './menu'; import { Subject, Observable } from 'rxjs'; export interface ClipboardContent { text: string; html?: string; } export interface MessageBoxOptions { type: 'warning' | 'error'; message: string; detail?: string; buttons: string[]; defaultId?: number; cancelId?: number; } export interface MessageBoxResult { response: number; } export declare abstract class FileTransfer { abstract getName(): string; abstract getMode(): number; abstract getSize(): number; abstract close(): void; getSpeed(): number; getCompletedBytes(): number; isComplete(): boolean; isCancelled(): boolean; cancel(): void; protected increaseProgress(bytes: number): void; private completedBytes; private lastChunkStartTime; private lastChunkSpeed; private cancelled; } export declare abstract class FileDownload extends FileTransfer { abstract write(buffer: Uint8Array): Promise; } export declare abstract class FileUpload extends FileTransfer { abstract read(): Promise; readAll(): Promise; } export interface FileUploadOptions { multiple: boolean; } export declare class DirectoryUpload { private name; private childrens; constructor(name?: string); getName(): string; getChildrens(): (FileUpload | DirectoryUpload)[]; pushChildren(item: FileUpload | DirectoryUpload): void; } export type PlatformTheme = 'light' | 'dark'; export declare abstract class PlatformService { supportsWindowControls: boolean; get fileTransferStarted$(): Observable; get displayMetricsChanged$(): Observable; get themeChanged$(): Observable; protected fileTransferStarted: Subject; protected displayMetricsChanged: Subject; protected themeChanged: Subject; abstract readClipboard(): string; abstract setClipboard(content: ClipboardContent): void; abstract loadConfig(): Promise; abstract saveConfig(content: string): Promise; abstract startDownload(name: string, mode: number, size: number): Promise; abstract startUpload(options?: FileUploadOptions): Promise; abstract startUploadDirectory(paths?: string[]): Promise; startUploadFromDragEvent(event: DragEvent, multiple?: boolean): Promise; getConfigPath(): string | null; showItemInFolder(path: string): void; isProcessRunning(name: string): Promise; installPlugin(name: string, version: string): Promise; uninstallPlugin(name: string): Promise; getWinSCPPath(): string | null; exec(app: string, argv: string[]): Promise; isShellIntegrationSupported(): boolean; isShellIntegrationInstalled(): Promise; installShellIntegration(): Promise; uninstallShellIntegration(): Promise; openPath(path: string): void; getTheme(): PlatformTheme; abstract getOSRelease(): string; abstract getAppVersion(): string; abstract openExternal(url: string): void; abstract listFonts(): Promise; abstract setErrorHandler(handler: (_: any) => void): void; abstract popupContextMenu(menu: MenuItemOptions[], event?: MouseEvent): void; abstract showMessageBox(options: MessageBoxOptions): Promise; abstract pickDirectory(): Promise; abstract quit(): void; } export declare class HTMLFileUpload extends FileUpload { private file; private stream; private reader; constructor(file: File); getName(): string; getMode(): number; getSize(): number; read(): Promise; bringToFront(): void; close(): void; }