mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-03-04 00:13:06 +08:00
refactor(hotspot):
This commit is contained in:
parent
712f201bf2
commit
28ee511437
@ -1,4 +1,4 @@
|
|||||||
import {Plugin, Cordova} from './plugin';
|
import { Cordova, Plugin } from './plugin';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @name Hotspot
|
* @name Hotspot
|
||||||
@ -24,10 +24,10 @@ import {Plugin, Cordova} from './plugin';
|
|||||||
export class Hotspot {
|
export class Hotspot {
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isAvailable(): Promise<boolean> {return; }
|
static isAvailable(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static toggleWifi(): Promise<boolean> {return; }
|
static toggleWifi(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures and starts hotspot with SSID and Password
|
* Configures and starts hotspot with SSID and Password
|
||||||
@ -39,7 +39,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
|
* @return {Promise<void>} - Promise to call once hotspot is started, or reject upon failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static createHotspot(ssid: string, mode: string, password: string): Promise<void> {return; }
|
static createHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns on Access Point
|
* Turns on Access Point
|
||||||
@ -47,7 +47,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - true if AP is started
|
* @return {Promise<boolean>} - true if AP is started
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startHotspot(): Promise<boolean> {return; }
|
static startHotspot(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Configures hotspot with SSID and Password
|
* Configures hotspot with SSID and Password
|
||||||
@ -59,7 +59,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
|
* @return {Promise<void>} - Promise to call when hotspot is configured, or reject upon failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> {return; }
|
static configureHotspot(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turns off Access Point
|
* Turns off Access Point
|
||||||
@ -67,7 +67,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
|
* @return {Promise<boolean>} - Promise to turn off the hotspot, true on success, false on failure
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopHotspot(): Promise<boolean> {return; }
|
static stopHotspot(): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if hotspot is enabled
|
* Checks if hotspot is enabled
|
||||||
@ -75,10 +75,10 @@ export class Hotspot {
|
|||||||
* @return {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
|
* @return {Promise<void>} - Promise that hotspot is enabled, rejected if it is not enabled
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isHotspotEnabled(): Promise<void> {return; }
|
static isHotspotEnabled(): Promise<void> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> {return; }
|
static getAllHotspotDevices(): Promise<Array<HotspotDevice>> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a WiFi network
|
* Connect to a WiFi network
|
||||||
@ -92,25 +92,25 @@ export class Hotspot {
|
|||||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToWifi(ssid: string, password: string): Promise<void> {return; }
|
static connectToWifi(ssid: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Connect to a WiFi network
|
* Connect to a WiFi network
|
||||||
*
|
*
|
||||||
* @param {string} ssid
|
* @param {string} ssid
|
||||||
* SSID to connect
|
* SSID to connect
|
||||||
* @param {string} password
|
* @param {string} password
|
||||||
* Password to use
|
* Password to use
|
||||||
* @param {string} authentication
|
* @param {string} authentication
|
||||||
* Authentication modes to use (LEAP, SHARED, OPEN)
|
* Authentication modes to use (LEAP, SHARED, OPEN)
|
||||||
* @param {string[]} encryption
|
* @param {string[]} encryption
|
||||||
* Encryption modes to use (CCMP, TKIP, WEP104, WEP40)
|
* Encryption modes to use (CCMP, TKIP, WEP104, WEP40)
|
||||||
*
|
*
|
||||||
* @return {Promise<void>}
|
* @return {Promise<void>}
|
||||||
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
* Promise that connection to the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> {return; }
|
static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array<string>): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a WiFi network
|
* Add a WiFi network
|
||||||
@ -126,7 +126,7 @@ export class Hotspot {
|
|||||||
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
|
* Promise that adding the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> {return; }
|
static addWifiNetwork(ssid: string, mode: string, password: string): Promise<void> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Remove a WiFi network
|
* Remove a WiFi network
|
||||||
@ -138,43 +138,43 @@ export class Hotspot {
|
|||||||
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
|
* Promise that removing the WiFi network was successfull, rejected if unsuccessful
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static removeWifiNetwork(ssid: string): Promise<void> {return; }
|
static removeWifiNetwork(ssid: string): Promise<void> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnectedToInternet(): Promise<boolean> {return; }
|
static isConnectedToInternet(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isConnectedToInternetViaWifi(): Promise<boolean> {return; }
|
static isConnectedToInternetViaWifi(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiOn(): Promise<boolean> {return; }
|
static isWifiOn(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiSupported(): Promise<boolean> {return; }
|
static isWifiSupported(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isWifiDirectSupported(): Promise<boolean> {return; }
|
static isWifiDirectSupported(): Promise<boolean> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scanWifi(): Promise<Array<Network>> {return; }
|
static scanWifi(): Promise<Array<Network>> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static scanWifiByLevel(): Promise<Array<Network>> {return; }
|
static scanWifiByLevel(): Promise<Array<Network>> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> {return; }
|
static startWifiPeriodicallyScan(interval: number, duration: number): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static stopWifiPeriodicallyScan(): Promise<any> {return; }
|
static stopWifiPeriodicallyScan(): Promise<any> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getNetConfig(): Promise<NetworkConfig> {return; }
|
static getNetConfig(): Promise<NetworkConfig> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getConnectionInfo(): Promise<ConnectionInfo> {return; }
|
static getConnectionInfo(): Promise<ConnectionInfo> { return; }
|
||||||
|
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static pingHost(ip: string): Promise<string> {return; }
|
static pingHost(ip: string): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Gets MAC Address associated with IP Address from ARP File
|
* Gets MAC Address associated with IP Address from ARP File
|
||||||
@ -184,7 +184,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<string>} - A Promise for the MAC Address
|
* @return {Promise<string>} - A Promise for the MAC Address
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static getMacAddressOfHost(ip: string): Promise<string> {return; }
|
static getMacAddressOfHost(ip: string): Promise<string> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if IP is live using DNS
|
* Checks if IP is live using DNS
|
||||||
@ -194,7 +194,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isDnsLive(ip: string): Promise<boolean> {return; }
|
static isDnsLive(ip: string): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if IP is live using socket And PORT
|
* Checks if IP is live using socket And PORT
|
||||||
@ -204,7 +204,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
* @return {Promise<boolean>} - A Promise for whether the IP Address is reachable
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isPortLive(ip: string): Promise<boolean> {return; }
|
static isPortLive(ip: string): Promise<boolean> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Checks if device is rooted
|
* Checks if device is rooted
|
||||||
@ -212,7 +212,7 @@ export class Hotspot {
|
|||||||
* @return {Promise<boolean>} - A Promise for whether the device is rooted
|
* @return {Promise<boolean>} - A Promise for whether the device is rooted
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
static isRooted(): Promise<boolean> {return; }
|
static isRooted(): Promise<boolean> { return; }
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user