UNPKG

1.43 kBTypeScriptView Raw
1import { CancellationToken } from '../common/cancellation';
2import { ProgressClient } from '../common/progress-service-protocol';
3import { ProgressMessage, ProgressUpdate } from '../common/message-service-protocol';
4import { Event, Emitter } from '../common/event';
5export interface LocationProgress {
6 show: boolean;
7}
8export declare class ProgressLocationService implements ProgressClient {
9 protected emitters: Map<string, Emitter<LocationProgress>[]>;
10 protected lastEvents: Map<string, LocationProgress>;
11 getProgress(locationId: string): LocationProgress | undefined;
12 onProgress(locationId: string): Event<LocationProgress>;
13 protected addEmitter(locationId: string): Emitter<LocationProgress>;
14 protected readonly progressByLocation: Map<string, Set<string>>;
15 showProgress(progressId: string, message: ProgressMessage, cancellationToken: CancellationToken): Promise<string | undefined>;
16 protected processEvent(progressId: string, locationId: string, event: 'start' | 'done'): void;
17 protected fireEvent(locationId: string, show: boolean): void;
18 protected getOrCreateEmitters(locationId: string): Emitter<LocationProgress>[];
19 protected getLocationId(message: ProgressMessage): string;
20 reportProgress(progressId: string, update: ProgressUpdate, message: ProgressMessage, cancellationToken: CancellationToken): Promise<void>;
21}
22//# sourceMappingURL=progress-location-service.d.ts.map
\No newline at end of file