@ionic-native/network
Advanced tools
Comparing version 5.0.0-beta.21 to 5.0.0-beta.22
import { IonicNativePlugin } from '@ionic-native/core'; | ||
import { Observable } from 'rxjs'; | ||
export declare enum Connection { | ||
UNKNOWN = 0, | ||
ETHERNET = 1, | ||
WIFI = 2, | ||
CELL_2G = 3, | ||
CELL_3G = 4, | ||
CELL_4G = 5, | ||
CELL = 6, | ||
NONE = 7 | ||
} | ||
/** | ||
@@ -10,3 +20,3 @@ * @name Network | ||
* ```typescript | ||
* import { Network } from '@ionic-native/network'; | ||
* import { Network } from '@ionic-native/network/ngx'; | ||
* | ||
@@ -17,3 +27,3 @@ * constructor(private network: Network) { } | ||
* | ||
* // watch network for a disconnect | ||
* // watch network for a disconnection | ||
* let disconnectSubscription = this.network.onDisconnect().subscribe(() => { | ||
@@ -49,2 +59,15 @@ * console.log('network was disconnected :-('); | ||
/** | ||
* Constants for possible connection types | ||
*/ | ||
Connection: { | ||
UNKNOWN: string; | ||
ETHERNET: string; | ||
WIFI: string; | ||
CELL_2G: string; | ||
CELL_3G: string; | ||
CELL_4G: string; | ||
CELL: string; | ||
NONE: string; | ||
}; | ||
/** | ||
* Connection type | ||
@@ -51,0 +74,0 @@ * @return {string} |
38
index.js
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
} | ||
return function (d, b) { | ||
@@ -13,6 +16,31 @@ extendStatics(d, b); | ||
import { Observable, merge } from 'rxjs'; | ||
export var Connection; | ||
(function (Connection) { | ||
Connection[Connection["UNKNOWN"] = 0] = "UNKNOWN"; | ||
Connection[Connection["ETHERNET"] = 1] = "ETHERNET"; | ||
Connection[Connection["WIFI"] = 2] = "WIFI"; | ||
Connection[Connection["CELL_2G"] = 3] = "CELL_2G"; | ||
Connection[Connection["CELL_3G"] = 4] = "CELL_3G"; | ||
Connection[Connection["CELL_4G"] = 5] = "CELL_4G"; | ||
Connection[Connection["CELL"] = 6] = "CELL"; | ||
Connection[Connection["NONE"] = 7] = "NONE"; | ||
})(Connection || (Connection = {})); | ||
var NetworkOriginal = /** @class */ (function (_super) { | ||
__extends(NetworkOriginal, _super); | ||
function NetworkOriginal() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
/** | ||
* Constants for possible connection types | ||
*/ | ||
_this.Connection = { | ||
UNKNOWN: 'unknown', | ||
ETHERNET: 'ethernet', | ||
WIFI: 'wifi', | ||
CELL_2G: '2g', | ||
CELL_3G: '3g', | ||
CELL_4G: '4g', | ||
CELL: 'cellular', | ||
NONE: 'none' | ||
}; | ||
return _this; | ||
} | ||
@@ -50,2 +78,2 @@ NetworkOriginal.prototype.onchange = function () { | ||
export { Network }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL25ldHdvcmsvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7OztBQUNBLE9BQU8seUZBTU4sTUFBTSxvQkFBb0IsQ0FBQztBQUM1QixPQUFPLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQzs7SUFzRFosMkJBQWlCOzs7O0lBa0I1QywwQkFBUTs7O21EQUFvQjtnQkFDMUIsT0FBTyxLQUFLLENBQUMsS0FBSSxDQUFDLFNBQVMsRUFBRSxFQU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ZG92YVByb3BlcnR5KCkgZG93bmxpbmtNYXg6IHN0cmluZztcblxuICAvKipcbiAgICogUmV0dXJucyBhbiBvYnNlcnZhYmxlIHRvIHdhdGNoIGNvbm5lY3Rpb24gY2hhbmdlc1xuICAgKiBAcmV0dXJuIHtPYnNlcnZhYmxlPGFueT59XG4gICAqL1xuICBAQ29yZG92YUNoZWNrKClcbiAgb25jaGFuZ2UoKTogT2JzZXJ2YWJsZTxhbnk+IHtcbiAgICByZXR1cm4gbWVyZ2UodGhpcy5vbkNvbm5lY3QoKSwgdGhpcy5vbkRpc2Nvbm5lY3QoKSk7XG4gIH1cblxuICAvKipcbiAgICogR2V0IG5vdGlmaWVkIHdoZW4gdGhlIGRldmljZSBnb2VzIG9mZmxpbmVcbiAgICogQHJldHVybnMge09ic2VydmFibGU8YW55Pn0gUmV0dXJucyBhbiBvYnNlcnZhYmxlLlxuICAgKi9cbiAgQENvcmRvdmEoe1xuICAgIGV2ZW50T2JzZXJ2YWJsZTogdHJ1ZSxcbiAgICBldmVudDogJ29mZmxpbmUnLFxuICAgIGVsZW1lbnQ6IGRvY3VtZW50XG4gIH0pXG4gIG9uRGlzY29ubmVjdCgpOiBPYnNlcnZhYmxlPGFueT4ge1xuICAgIHJldHVybjtcbiAgfVxuXG4gIC8qKlxuICAgKiBHZXQgbm90aWZpZWQgd2hlbiB0aGUgZGV2aWNlIGdvZXMgb25saW5lXG4gICAqIEByZXR1cm5zIHtPYnNlcnZhYmxlPGFueT59IFJldHVybnMgYW4gb2JzZXJ2YWJsZS5cbiAgICovXG4gIEBDb3Jkb3ZhKHtcbiAgICBldmVudE9ic2VydmFibGU6IHRydWUsXG4gICAgZXZlbnQ6ICdvbmxpbmUnLFxuICAgIGVsZW1lbnQ6IGRvY3VtZW50XG4gIH0pXG4gIG9uQ29ubmVjdCgpOiBPYnNlcnZhYmxlPGFueT4ge1xuICAgIHJldHVybjtcbiAgfVxufVxuIl19 |
import { IonicNativePlugin } from '@ionic-native/core'; | ||
import { Observable } from 'rxjs'; | ||
export declare enum Connection { | ||
UNKNOWN = 0, | ||
ETHERNET = 1, | ||
WIFI = 2, | ||
CELL_2G = 3, | ||
CELL_3G = 4, | ||
CELL_4G = 5, | ||
CELL = 6, | ||
NONE = 7 | ||
} | ||
/** | ||
@@ -10,3 +20,3 @@ * @name Network | ||
* ```typescript | ||
* import { Network } from '@ionic-native/network'; | ||
* import { Network } from '@ionic-native/network/ngx'; | ||
* | ||
@@ -17,3 +27,3 @@ * constructor(private network: Network) { } | ||
* | ||
* // watch network for a disconnect | ||
* // watch network for a disconnection | ||
* let disconnectSubscription = this.network.onDisconnect().subscribe(() => { | ||
@@ -49,2 +59,15 @@ * console.log('network was disconnected :-('); | ||
/** | ||
* Constants for possible connection types | ||
*/ | ||
Connection: { | ||
UNKNOWN: string; | ||
ETHERNET: string; | ||
WIFI: string; | ||
CELL_2G: string; | ||
CELL_3G: string; | ||
CELL_4G: string; | ||
CELL: string; | ||
NONE: string; | ||
}; | ||
/** | ||
* Connection type | ||
@@ -51,0 +74,0 @@ * @return {string} |
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
var extendStatics = function (d, b) { | ||
extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return extendStatics(d, b); | ||
} | ||
return function (d, b) { | ||
@@ -20,6 +23,31 @@ extendStatics(d, b); | ||
import { Observable, merge } from 'rxjs'; | ||
export var Connection; | ||
(function (Connection) { | ||
Connection[Connection["UNKNOWN"] = 0] = "UNKNOWN"; | ||
Connection[Connection["ETHERNET"] = 1] = "ETHERNET"; | ||
Connection[Connection["WIFI"] = 2] = "WIFI"; | ||
Connection[Connection["CELL_2G"] = 3] = "CELL_2G"; | ||
Connection[Connection["CELL_3G"] = 4] = "CELL_3G"; | ||
Connection[Connection["CELL_4G"] = 5] = "CELL_4G"; | ||
Connection[Connection["CELL"] = 6] = "CELL"; | ||
Connection[Connection["NONE"] = 7] = "NONE"; | ||
})(Connection || (Connection = {})); | ||
var Network = /** @class */ (function (_super) { | ||
__extends(Network, _super); | ||
function Network() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
/** | ||
* Constants for possible connection types | ||
*/ | ||
_this.Connection = { | ||
UNKNOWN: 'unknown', | ||
ETHERNET: 'ethernet', | ||
WIFI: 'wifi', | ||
CELL_2G: '2g', | ||
CELL_3G: '3g', | ||
CELL_4G: '4g', | ||
CELL: 'cellular', | ||
NONE: 'none' | ||
}; | ||
return _this; | ||
} | ||
@@ -59,2 +87,2 @@ Network.prototype.onchange = function () { | ||
export { Network }; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL25ldHdvcmsvbmd4L2luZGV4LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQSxPQUFPLEVBQUUsVUFBVSxFQUFFLE1BQU0sZUFBZSxDQUFDO0FBQzNDLE9BQU8seUZBTU4sTUFBTSxvQkFBb0IsQ0FBQztBQUM1QixPQUFPLEVBQUUsVUFBVSxFQUFFLEtBQUssRUFBRSxNQUFNLE1BQU0sQ0FBQzs7SUFzRFosMkJBQWlCOzs7O0lBa0I1QywwQkFBUTs7O21EQUFvQjtnQkFDMUIsT0FBTyxLQUFLLENBQUMsS0FBSSxDQUFDLFNBQVMsRUFBRSxFQUFFLEtBQUksQ0FBQyxZQUFZLEVBQUU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ZTxhbnk+fVxuICAgKi9cbiAgQENvcmRvdmFDaGVjaygpXG4gIG9uY2hhbmdlKCk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgcmV0dXJuIG1lcmdlKHRoaXMub25Db25uZWN0KCksIHRoaXMub25EaXNjb25uZWN0KCkpO1xuICB9XG5cbiAgLyoqXG4gICAqIEdldCBub3RpZmllZCB3aGVuIHRoZSBkZXZpY2UgZ29lcyBvZmZsaW5lXG4gICAqIEByZXR1cm5zIHtPYnNlcnZhYmxlPGFueT59IFJldHVybnMgYW4gb2JzZXJ2YWJsZS5cbiAgICovXG4gIEBDb3Jkb3ZhKHtcbiAgICBldmVudE9ic2VydmFibGU6IHRydWUsXG4gICAgZXZlbnQ6ICdvZmZsaW5lJyxcbiAgICBlbGVtZW50OiBkb2N1bWVudFxuICB9KVxuICBvbkRpc2Nvbm5lY3QoKTogT2JzZXJ2YWJsZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cblxuICAvKipcbiAgICogR2V0IG5vdGlmaWVkIHdoZW4gdGhlIGRldmljZSBnb2VzIG9ubGluZVxuICAgKiBAcmV0dXJucyB7T2JzZXJ2YWJsZTxhbnk+fSBSZXR1cm5zIGFuIG9ic2VydmFibGUuXG4gICAqL1xuICBAQ29yZG92YSh7XG4gICAgZXZlbnRPYnNlcnZhYmxlOiB0cnVlLFxuICAgIGV2ZW50OiAnb25saW5lJyxcbiAgICBlbGVtZW50OiBkb2N1bWVudFxuICB9KVxuICBvbkNvbm5lY3QoKTogT2JzZXJ2YWJsZTxhbnk+IHtcbiAgICByZXR1cm47XG4gIH1cbn1cbiJdfQ== | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi9zcmMvQGlvbmljLW5hdGl2ZS9wbHVnaW5zL25ldHdvcmsvbmd4L2luZGV4LnRzIl0sIm5hbWVzIjp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ZXJ2YWJsZTogdHJ1ZSxcbiAgICBldmVudDogJ29ubGluZScsXG4gICAgZWxlbWVudDogZG9jdW1lbnRcbiAgfSlcbiAgb25Db25uZWN0KCk6IE9ic2VydmFibGU8YW55PiB7XG4gICAgcmV0dXJuO1xuICB9XG59XG4iXX0= |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":4,"metadata":{"Network":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin","line":62,"character":29},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":61,"character":1}}],"members":{"type":[{"__symbolic":"property"}],"downlinkMax":[{"__symbolic":"property"}],"onchange":[{"__symbolic":"method"}],"onDisconnect":[{"__symbolic":"method"}],"onConnect":[{"__symbolic":"method"}]}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"Connection":{"UNKNOWN":0,"ETHERNET":1,"WIFI":2,"CELL_2G":3,"CELL_3G":4,"CELL_4G":5,"CELL":6,"NONE":7},"Network":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"@ionic-native/core","name":"IonicNativePlugin","line":73,"character":29},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable","line":72,"character":1}}],"members":{"type":[{"__symbolic":"property"}],"downlinkMax":[{"__symbolic":"property"}],"onchange":[{"__symbolic":"method"}],"onDisconnect":[{"__symbolic":"method"}],"onConnect":[{"__symbolic":"method"}]}}}}] |
@@ -1,1 +0,1 @@ | ||
{"description":"Ionic Native - Native plugins for ionic apps","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/network","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"*","@ionic-native/core":"5.0.0-beta.21"},"version":"5.0.0-beta.21"} | ||
{"description":"Ionic Native - Native plugins for ionic apps","module":"index.js","typings":"index.d.ts","author":"ionic","license":"MIT","repository":{"type":"git","url":"https://github.com/ionic-team/ionic-native.git"},"name":"@ionic-native/network","dependencies":{"@types/cordova":"latest"},"peerDependencies":{"rxjs":"*","@ionic-native/core":"5.0.0-beta.22"},"version":"5.0.0-beta.22"} |
@@ -1,2 +0,2 @@ | ||
<a style="float:right;font-size:12px;" href="http://github.com/ionic-team/ionic-native/edit/master/src/@ionic-native/plugins/network/index.ts#L10"> | ||
<a style="float:right;font-size:12px;" href="http://github.com/ionic-team/ionic-native/edit/master/src/@ionic-native/plugins/network/index.ts#L21"> | ||
Improve this doc | ||
@@ -3,0 +3,0 @@ </a> |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25879
352