mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-11 03:09:29 +00:00
Update package index on 3rd party URLs change.
Closes #637 Closes #906 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { injectable } from '@theia/core/shared/inversify';
|
||||
import {
|
||||
import type {
|
||||
NotificationServiceServer,
|
||||
NotificationServiceClient,
|
||||
AttachedBoardsChangeEvent,
|
||||
@@ -7,52 +7,79 @@ import {
|
||||
LibraryPackage,
|
||||
Config,
|
||||
Sketch,
|
||||
ProgressMessage,
|
||||
} from '../common/protocol';
|
||||
|
||||
@injectable()
|
||||
export class NotificationServiceServerImpl
|
||||
implements NotificationServiceServer
|
||||
{
|
||||
protected readonly clients: NotificationServiceClient[] = [];
|
||||
private readonly clients: NotificationServiceClient[] = [];
|
||||
|
||||
notifyIndexUpdated(): void {
|
||||
this.clients.forEach((client) => client.notifyIndexUpdated());
|
||||
notifyIndexWillUpdate(progressId: string): void {
|
||||
this.clients.forEach((client) => client.notifyIndexWillUpdate(progressId));
|
||||
}
|
||||
|
||||
notifyDaemonStarted(port: string): void {
|
||||
this.clients.forEach((client) => client.notifyDaemonStarted(port));
|
||||
notifyIndexUpdateDidProgress(progressMessage: ProgressMessage): void {
|
||||
this.clients.forEach((client) =>
|
||||
client.notifyIndexUpdateDidProgress(progressMessage)
|
||||
);
|
||||
}
|
||||
|
||||
notifyDaemonStopped(): void {
|
||||
this.clients.forEach((client) => client.notifyDaemonStopped());
|
||||
notifyIndexDidUpdate(progressId: string): void {
|
||||
this.clients.forEach((client) => client.notifyIndexDidUpdate(progressId));
|
||||
}
|
||||
|
||||
notifyPlatformInstalled(event: { item: BoardsPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyPlatformInstalled(event));
|
||||
notifyIndexUpdateDidFail({
|
||||
progressId,
|
||||
message,
|
||||
}: {
|
||||
progressId: string;
|
||||
message: string;
|
||||
}): void {
|
||||
this.clients.forEach((client) =>
|
||||
client.notifyIndexUpdateDidFail({ progressId, message })
|
||||
);
|
||||
}
|
||||
|
||||
notifyPlatformUninstalled(event: { item: BoardsPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyPlatformUninstalled(event));
|
||||
notifyDaemonDidStart(port: string): void {
|
||||
this.clients.forEach((client) => client.notifyDaemonDidStart(port));
|
||||
}
|
||||
|
||||
notifyLibraryInstalled(event: { item: LibraryPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyLibraryInstalled(event));
|
||||
notifyDaemonDidStop(): void {
|
||||
this.clients.forEach((client) => client.notifyDaemonDidStop());
|
||||
}
|
||||
|
||||
notifyLibraryUninstalled(event: { item: LibraryPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyLibraryUninstalled(event));
|
||||
notifyPlatformDidInstall(event: { item: BoardsPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyPlatformDidInstall(event));
|
||||
}
|
||||
|
||||
notifyAttachedBoardsChanged(event: AttachedBoardsChangeEvent): void {
|
||||
this.clients.forEach((client) => client.notifyAttachedBoardsChanged(event));
|
||||
notifyPlatformDidUninstall(event: { item: BoardsPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyPlatformDidUninstall(event));
|
||||
}
|
||||
|
||||
notifyConfigChanged(event: { config: Config | undefined }): void {
|
||||
this.clients.forEach((client) => client.notifyConfigChanged(event));
|
||||
notifyLibraryDidInstall(event: { item: LibraryPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyLibraryDidInstall(event));
|
||||
}
|
||||
|
||||
notifyRecentSketchesChanged(event: { sketches: Sketch[] }): void {
|
||||
this.clients.forEach((client) => client.notifyRecentSketchesChanged(event));
|
||||
notifyLibraryDidUninstall(event: { item: LibraryPackage }): void {
|
||||
this.clients.forEach((client) => client.notifyLibraryDidUninstall(event));
|
||||
}
|
||||
|
||||
notifyAttachedBoardsDidChange(event: AttachedBoardsChangeEvent): void {
|
||||
this.clients.forEach((client) =>
|
||||
client.notifyAttachedBoardsDidChange(event)
|
||||
);
|
||||
}
|
||||
|
||||
notifyConfigDidChange(event: { config: Config | undefined }): void {
|
||||
this.clients.forEach((client) => client.notifyConfigDidChange(event));
|
||||
}
|
||||
|
||||
notifyRecentSketchesDidChange(event: { sketches: Sketch[] }): void {
|
||||
this.clients.forEach((client) =>
|
||||
client.notifyRecentSketchesDidChange(event)
|
||||
);
|
||||
}
|
||||
|
||||
setClient(client: NotificationServiceClient): void {
|
||||
|
||||
Reference in New Issue
Block a user