UNPKG

@sussudio/platform

Version:

Internal APIs for VS Code's service injection the base services.

54 lines (52 loc) 2.7 kB
/*--------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ import { IRemoteTunnelAccount, IRemoteTunnelService, TunnelStatus } from '../common/remoteTunnel.mjs'; import { ITelemetryService } from '../../telemetry/common/telemetry.mjs'; import { INativeEnvironmentService } from '../../environment/common/environment.mjs'; import { Disposable } from '@sussudio/base/common/lifecycle.mjs'; import { ILoggerService } from '../../log/common/log.mjs'; import { IProductService } from '../../product/common/productService.mjs'; import { ISharedProcessLifecycleService } from '../../lifecycle/electron-browser/sharedProcessLifecycleService.mjs'; import { IConfigurationService } from '../../configuration/common/configuration.mjs'; /** * This service runs on the shared service. It is running the `code-tunnel` command * to make the current machine available for remote access. */ export declare class RemoteTunnelService extends Disposable implements IRemoteTunnelService { private readonly telemetryService; private readonly productService; private readonly environmentService; private readonly configurationService; readonly _serviceBrand: undefined; private readonly _onDidTokenFailedEmitter; readonly onDidTokenFailed: import('@sussudio/base/common/event.mjs').Event<boolean>; private readonly _onDidChangeTunnelStatusEmitter; readonly onDidChangeTunnelStatus: import('@sussudio/base/common/event.mjs').Event<TunnelStatus>; private readonly _onDidChangeAccountEmitter; readonly onDidChangeAccount: import('@sussudio/base/common/event.mjs').Event<IRemoteTunnelAccount | undefined>; private readonly _logger; private _account; private _tunnelProcess; private _tunnelStatus; private _startTunnelProcessDelayer; private _tunnelCommand; constructor( telemetryService: ITelemetryService, productService: IProductService, environmentService: INativeEnvironmentService, loggerService: ILoggerService, sharedProcessLifecycleService: ISharedProcessLifecycleService, configurationService: IConfigurationService, ); getAccount(): Promise<IRemoteTunnelAccount | undefined>; updateAccount(account: IRemoteTunnelAccount | undefined): Promise<TunnelStatus>; private getTunnelCommandLocation; private updateTunnelProcess; getTunnelStatus(): Promise<TunnelStatus>; private setTunnelStatus; private runCodeTunneCommand; getHostName(): Promise<string | undefined>; private _getHostName; }