Add connection event listeners (#6540)

This commit is contained in:
Karl Burtram
2019-07-31 11:52:58 -07:00
committed by GitHub
parent 2c79d49487
commit bc4b527de0
5 changed files with 78 additions and 2 deletions

View File

@@ -8,4 +8,22 @@
import * as vscode from 'vscode';
declare module 'azdata' {
/**
* Namespace for connection management
*/
export namespace connection {
export type ConnectionEventType =
| 'onConnect'
| 'onDisconnect'
| 'onConnectionChanged';
export interface ConnectionEventListener {
onConnectionEvent(type: ConnectionEventType, ownerUri: string, args: IConnectionProfile): void;
}
/**
* Register a connection event listener
*/
export function registerConnectionEventListener(listener: connection.ConnectionEventListener): void;
}
}