mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2026-05-02 00:07:23 +08:00
Merge in v5 code
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { Cordova, Plugin, IonicNativePlugin } from '@ionic-native/core';
|
||||
import { Cordova, IonicNativePlugin, Plugin } from '@ionic-native/core';
|
||||
|
||||
export interface HotspotConnectionInfo {
|
||||
|
||||
@@ -63,6 +63,7 @@ export interface HotspotNetwork {
|
||||
capabilities: string;
|
||||
|
||||
}
|
||||
|
||||
export interface HotspotNetworkConfig {
|
||||
|
||||
/**
|
||||
@@ -139,13 +140,17 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isAvailable(): Promise<boolean> { return; }
|
||||
isAvailable(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
toggleWifi(): Promise<boolean> { return; }
|
||||
toggleWifi(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures and starts hotspot with SSID and Password
|
||||
@@ -157,7 +162,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
|
||||
*/
|
||||
@Cordova()
|
||||
createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||
createHotspot(ssid: string, mode: string, password: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns on Access Point
|
||||
@@ -165,7 +172,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>} - true if AP is started
|
||||
*/
|
||||
@Cordova()
|
||||
startHotspot(): Promise<boolean> { return; }
|
||||
startHotspot(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures hotspot with SSID and Password
|
||||
@@ -177,7 +186,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
|
||||
*/
|
||||
@Cordova()
|
||||
configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||
configureHotspot(ssid: string, mode: string, password: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Turns off Access Point
|
||||
@@ -185,7 +196,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
|
||||
*/
|
||||
@Cordova()
|
||||
stopHotspot(): Promise<boolean> { return; }
|
||||
stopHotspot(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if hotspot is enabled
|
||||
@@ -193,13 +206,17 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
|
||||
*/
|
||||
@Cordova()
|
||||
isHotspotEnabled(): Promise<void> { return; }
|
||||
isHotspotEnabled(): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotDevice>>}
|
||||
*/
|
||||
@Cordova()
|
||||
getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
|
||||
getAllHotspotDevices(): Promise<Array<HotspotDevice>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to a WiFi network
|
||||
@@ -213,7 +230,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
connectToWifi(ssid: string, password: string): Promise<void> { return; }
|
||||
connectToWifi(ssid: string, password: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Connect to a WiFi network
|
||||
@@ -231,7 +250,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
|
||||
connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add a WiFi network
|
||||
@@ -247,7 +268,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||
addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove a WiFi network
|
||||
@@ -259,79 +282,105 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
|
||||
*/
|
||||
@Cordova()
|
||||
removeWifiNetwork(ssid: string): Promise<void> { return; }
|
||||
removeWifiNetwork(ssid: string): Promise<void> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isConnectedToInternet(): Promise<boolean> { return; }
|
||||
isConnectedToInternet(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isConnectedToInternetViaWifi(): Promise<boolean> { return; }
|
||||
isConnectedToInternetViaWifi(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isWifiOn(): Promise<boolean> { return; }
|
||||
isWifiOn(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isWifiSupported(): Promise<boolean> { return; }
|
||||
isWifiSupported(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<boolean>}
|
||||
*/
|
||||
@Cordova()
|
||||
isWifiDirectSupported(): Promise<boolean> { return; }
|
||||
isWifiDirectSupported(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifi(): Promise<Array<HotspotNetwork>> { return; }
|
||||
scanWifi(): Promise<Array<HotspotNetwork>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<Array<HotspotNetwork>>}
|
||||
*/
|
||||
@Cordova()
|
||||
scanWifiByLevel(): Promise<Array<HotspotNetwork>> { return; }
|
||||
scanWifiByLevel(): Promise<Array<HotspotNetwork>> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
|
||||
startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<any>}
|
||||
*/
|
||||
@Cordova()
|
||||
stopWifiPeriodicallyScan(): Promise<any> { return; }
|
||||
stopWifiPeriodicallyScan(): Promise<any> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<HotspotNetworkConfig>}
|
||||
*/
|
||||
@Cordova()
|
||||
getNetConfig(): Promise<HotspotNetworkConfig> { return; }
|
||||
getNetConfig(): Promise<HotspotNetworkConfig> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<HotspotConnectionInfo>}
|
||||
*/
|
||||
@Cordova()
|
||||
getConnectionInfo(): Promise<HotspotConnectionInfo> { return; }
|
||||
getConnectionInfo(): Promise<HotspotConnectionInfo> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* @returns {Promise<string>}
|
||||
*/
|
||||
@Cordova()
|
||||
pingHost(ip: string): Promise<string> { return; }
|
||||
pingHost(ip: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets MAC Address associated with IP Address from ARP File
|
||||
@@ -341,7 +390,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<string>} - A Promise for the MAC Address
|
||||
*/
|
||||
@Cordova()
|
||||
getMacAddressOfHost(ip: string): Promise<string> { return; }
|
||||
getMacAddressOfHost(ip: string): Promise<string> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if IP is live using DNS
|
||||
@@ -351,7 +402,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||
*/
|
||||
@Cordova()
|
||||
isDnsLive(ip: string): Promise<boolean> { return; }
|
||||
isDnsLive(ip: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if IP is live using socket And PORT
|
||||
@@ -361,7 +414,9 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||
*/
|
||||
@Cordova()
|
||||
isPortLive(ip: string): Promise<boolean> { return; }
|
||||
isPortLive(ip: string): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if device is rooted
|
||||
@@ -369,6 +424,8 @@ export class Hotspot extends IonicNativePlugin {
|
||||
* @returns {Promise<boolean>} - A Promise for whether the device is rooted
|
||||
*/
|
||||
@Cordova()
|
||||
isRooted(): Promise<boolean> { return; }
|
||||
isRooted(): Promise<boolean> {
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user