Skip to content

Commit

Permalink
fix(network): update API
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Dec 16, 2016
1 parent 28f316e commit ec5e27b
Showing 1 changed file with 25 additions and 3 deletions.
28 changes: 25 additions & 3 deletions src/plugins/network.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Cordova, CordovaProperty, Plugin } from './plugin';
import {Cordova, CordovaProperty, Plugin, CordovaFunctionOverride} from './plugin';
import { Observable } from 'rxjs/Observable';


Expand Down Expand Up @@ -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<any>}
*/
@CordovaFunctionOverride()
static onchange(): Observable<any> { return; }

/**
* Returns an observable to watch connection type changes
* @return {Observable<any>}
*/
@CordovaFunctionOverride()
static ontypechange(): Observable<any> { return; }

/**
* Get notified when the device goes offline
Expand Down

0 comments on commit ec5e27b

Please sign in to comment.