From 0892555f12d8305bf8d06654bddc6672adfd2765 Mon Sep 17 00:00:00 2001 From: Joao Moreno Date: Wed, 21 Sep 2016 10:39:47 +0200 Subject: [PATCH] ipc: stub messageIpc --- .../services/message/common/messageIpc.ts | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 src/vs/workbench/services/message/common/messageIpc.ts diff --git a/src/vs/workbench/services/message/common/messageIpc.ts b/src/vs/workbench/services/message/common/messageIpc.ts new file mode 100644 index 00000000000..1a7c86aaef4 --- /dev/null +++ b/src/vs/workbench/services/message/common/messageIpc.ts @@ -0,0 +1,42 @@ +/*--------------------------------------------------------------------------------------------- + * Copyright (c) Microsoft Corporation. All rights reserved. + * Licensed under the MIT License. See License.txt in the project root for license information. + *--------------------------------------------------------------------------------------------*/ + +'use strict'; + +import { TPromise } from 'vs/base/common/winjs.base'; +import { IChannel } from 'vs/base/parts/ipc/common/ipc'; +import { IChoiceService/*, Severity*/ } from 'vs/platform/message/common/message'; + +// TODO@Sandeep implement these guys + +export interface IChoiceChannel extends IChannel { + // call(command: 'getInstalled'): TPromise; + call(command: string, arg: any): TPromise; +} + +export class ChoiceChannel implements IChoiceChannel { + + constructor(private service: IChoiceService) { + } + + call(command: string, arg: any): TPromise { + switch (command) { + // case 'getInstalled': return this.service.getInstalled(arg); + } + + return TPromise.wrapError('invalid command'); + } +} + +export class ChoiceChannelClient /*implements IChoiceService*/ { + + _serviceBrand: any; + + constructor(private channel: IChoiceChannel) { } + + // getInstalled(type: LocalExtensionType = null): TPromise { + // return this.channel.call('getInstalled', type); + // } +} \ No newline at end of file -- GitLab