From ec5e27be4b1455ad5b0ee4ea2da5592e63be3dea Mon Sep 17 00:00:00 2001 From: Ibby Date: Fri, 16 Dec 2016 14:12:58 -0500 Subject: [PATCH] fix(network): update API --- src/plugins/network.ts | 28 +++++++++++++++++++++++++--- 1 file changed, 25 insertions(+), 3 deletions(-) diff --git a/src/plugins/network.ts b/src/plugins/network.ts index 5493dde7..0108e2f6 100644 --- a/src/plugins/network.ts +++ b/src/plugins/network.ts @@ -1,4 +1,4 @@ -import { Cordova, CordovaProperty, Plugin } from './plugin'; +import {Cordova, CordovaProperty, Plugin, CordovaFunctionOverride} from './plugin'; import { Observable } from 'rxjs/Observable'; @@ -52,10 +52,32 @@ declare var navigator: any; export class Network { /** - * Return the network connection type + * Connection type + * @return {string} */ @CordovaProperty - static connection: string; + static type: string; + + /** + * Downlink Max Speed + * @return {string} + */ + @CordovaProperty + static downlinkMax: string; + + /** + * Returns an observable to watch connection changes + * @return {Observable} + */ + @CordovaFunctionOverride() + static onchange(): Observable { return; } + + /** + * Returns an observable to watch connection type changes + * @return {Observable} + */ + @CordovaFunctionOverride() + static ontypechange(): Observable { return; } /** * Get notified when the device goes offline