import { Observable } from 'rxjs'; import { WindowState } from '../types/window-state.type'; import { WindowIdle } from '../types/window-idle.type'; import { NotificationRequest } from '../models/notification'; import { TranslateLoader } from '@ngx-translate/core'; import { StatusCode } from '@ucap-webmessenger/core'; import { UpdateInfo, UpdateCheckConfig } from '../models/update-info'; import { NativeType } from '../types/native.type'; export type NativePathName = | 'home' | 'documents' | 'downloads' | 'music' | 'pictures' | 'videos'; export abstract class NativeService { abstract type(): NativeType; abstract postAppInit(): void; abstract logout(): Observable; abstract changeStatus(): Observable; abstract showSetting(): Observable; abstract getNetworkInfo(): Promise; abstract changeAutoLaunch(autoLaunch: boolean): Promise; abstract changeStartupHideWindow( startupHideWindow: boolean ): Promise; abstract changeDownloadPath(downloadPath: string): Promise; abstract notify(noti: NotificationRequest): void; abstract closeAllNotify(): void; abstract checkForUpdates(currentVersion: string): Promise; abstract checkForInstantUpdates( config: UpdateCheckConfig ): Observable; abstract applyInstantUpdates(): void; abstract showImageViewer(): void; abstract saveFile( buffer: Buffer, fileName: string, mimeType: string, path?: string ): Promise; abstract readFile(path: string): Promise; abstract openDefaultDownloadFolder(): Promise; abstract openTargetFolder( folderPath?: string, make?: boolean ): Promise; abstract openTargetItem(filePath?: string): Promise; abstract getPath(name: NativePathName): Promise; abstract selectDirectory(): Promise; abstract selectSaveFilePath(defaultPath?: string): Promise; abstract windowStateChanged(): Observable; abstract windowClose(): void; abstract windowMinimize(): void; abstract windowMaximize(): void; abstract idleStateChanged(): Observable; abstract chatOpenRoom(): Observable; abstract msgOpenMessage(): Observable; abstract getTranslateLoader( prefix?: string, suffix?: string ): TranslateLoader; abstract openDefaultBrowser(url: string): void; }