From 28ee511437fd439b53feb1259bc5e54ce2e8ab1d Mon Sep 17 00:00:00 2001 From: Guille Date: Sun, 17 Jul 2016 19:51:30 +0200 Subject: [PATCH] refactor(hotspot): --- src/plugins/hotspot.ts | 88 +++++++++++++++++++++--------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/src/plugins/hotspot.ts b/src/plugins/hotspot.ts index 9932a0f7a..0c927e6ce 100644 --- a/src/plugins/hotspot.ts +++ b/src/plugins/hotspot.ts @@ -1,4 +1,4 @@ -import {Plugin, Cordova} from './plugin'; +import { Cordova, Plugin } from './plugin'; /** * @name Hotspot @@ -24,10 +24,10 @@ import {Plugin, Cordova} from './plugin'; export class Hotspot { @Cordova() - static isAvailable(): Promise {return; } + static isAvailable(): Promise { return; } @Cordova() - static toggleWifi(): Promise {return; } + static toggleWifi(): Promise { return; } /** * Configures and starts hotspot with SSID and Password @@ -39,7 +39,7 @@ export class Hotspot { * @return {Promise} - Promise to call once hotspot is started, or reject upon failure */ @Cordova() - static createHotspot(ssid: string, mode: string, password: string): Promise {return; } + static createHotspot(ssid: string, mode: string, password: string): Promise { return; } /** * Turns on Access Point @@ -47,7 +47,7 @@ export class Hotspot { * @return {Promise} - true if AP is started */ @Cordova() - static startHotspot(): Promise {return; } + static startHotspot(): Promise { return; } /** * Configures hotspot with SSID and Password @@ -59,7 +59,7 @@ export class Hotspot { * @return {Promise} - Promise to call when hotspot is configured, or reject upon failure */ @Cordova() - static configureHotspot(ssid: string, mode: string, password: string): Promise {return; } + static configureHotspot(ssid: string, mode: string, password: string): Promise { return; } /** * Turns off Access Point @@ -67,7 +67,7 @@ export class Hotspot { * @return {Promise} - Promise to turn off the hotspot, true on success, false on failure */ @Cordova() - static stopHotspot(): Promise {return; } + static stopHotspot(): Promise { return; } /** * Checks if hotspot is enabled @@ -75,10 +75,10 @@ export class Hotspot { * @return {Promise} - Promise that hotspot is enabled, rejected if it is not enabled */ @Cordova() - static isHotspotEnabled(): Promise {return; } + static isHotspotEnabled(): Promise { return; } @Cordova() - static getAllHotspotDevices(): Promise> {return; } + static getAllHotspotDevices(): Promise> { return; } /** * Connect to a WiFi network @@ -92,25 +92,25 @@ export class Hotspot { * Promise that connection to the WiFi network was successfull, rejected if unsuccessful */ @Cordova() - static connectToWifi(ssid: string, password: string): Promise {return; } + static connectToWifi(ssid: string, password: string): Promise { return; } - /** - * Connect to a WiFi network - * - * @param {string} ssid - * SSID to connect - * @param {string} password - * Password to use - * @param {string} authentication - * Authentication modes to use (LEAP, SHARED, OPEN) - * @param {string[]} encryption - * Encryption modes to use (CCMP, TKIP, WEP104, WEP40) - * - * @return {Promise} - * Promise that connection to the WiFi network was successfull, rejected if unsuccessful - */ + /** + * Connect to a WiFi network + * + * @param {string} ssid + * SSID to connect + * @param {string} password + * Password to use + * @param {string} authentication + * Authentication modes to use (LEAP, SHARED, OPEN) + * @param {string[]} encryption + * Encryption modes to use (CCMP, TKIP, WEP104, WEP40) + * + * @return {Promise} + * Promise that connection to the WiFi network was successfull, rejected if unsuccessful + */ @Cordova() - static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array): Promise {return; } + static connectToWifiAuthEncrypt(ssid: string, password: string, authentication: string, encryption: Array): Promise { return; } /** * Add a WiFi network @@ -126,7 +126,7 @@ export class Hotspot { * Promise that adding the WiFi network was successfull, rejected if unsuccessful */ @Cordova() - static addWifiNetwork(ssid: string, mode: string, password: string): Promise {return; } + static addWifiNetwork(ssid: string, mode: string, password: string): Promise { return; } /** * Remove a WiFi network @@ -138,43 +138,43 @@ export class Hotspot { * Promise that removing the WiFi network was successfull, rejected if unsuccessful */ @Cordova() - static removeWifiNetwork(ssid: string): Promise {return; } + static removeWifiNetwork(ssid: string): Promise { return; } @Cordova() - static isConnectedToInternet(): Promise {return; } + static isConnectedToInternet(): Promise { return; } @Cordova() - static isConnectedToInternetViaWifi(): Promise {return; } + static isConnectedToInternetViaWifi(): Promise { return; } @Cordova() - static isWifiOn(): Promise {return; } + static isWifiOn(): Promise { return; } @Cordova() - static isWifiSupported(): Promise {return; } + static isWifiSupported(): Promise { return; } @Cordova() - static isWifiDirectSupported(): Promise {return; } + static isWifiDirectSupported(): Promise { return; } @Cordova() - static scanWifi(): Promise> {return; } + static scanWifi(): Promise> { return; } @Cordova() - static scanWifiByLevel(): Promise> {return; } + static scanWifiByLevel(): Promise> { return; } @Cordova() - static startWifiPeriodicallyScan(interval: number, duration: number): Promise {return; } + static startWifiPeriodicallyScan(interval: number, duration: number): Promise { return; } @Cordova() - static stopWifiPeriodicallyScan(): Promise {return; } + static stopWifiPeriodicallyScan(): Promise { return; } @Cordova() - static getNetConfig(): Promise {return; } + static getNetConfig(): Promise { return; } @Cordova() - static getConnectionInfo(): Promise {return; } + static getConnectionInfo(): Promise { return; } @Cordova() - static pingHost(ip: string): Promise {return; } + static pingHost(ip: string): Promise { return; } /** * Gets MAC Address associated with IP Address from ARP File @@ -184,7 +184,7 @@ export class Hotspot { * @return {Promise} - A Promise for the MAC Address */ @Cordova() - static getMacAddressOfHost(ip: string): Promise {return; } + static getMacAddressOfHost(ip: string): Promise { return; } /** * Checks if IP is live using DNS @@ -194,7 +194,7 @@ export class Hotspot { * @return {Promise} - A Promise for whether the IP Address is reachable */ @Cordova() - static isDnsLive(ip: string): Promise {return; } + static isDnsLive(ip: string): Promise { return; } /** * Checks if IP is live using socket And PORT @@ -204,7 +204,7 @@ export class Hotspot { * @return {Promise} - A Promise for whether the IP Address is reachable */ @Cordova() - static isPortLive(ip: string): Promise {return; } + static isPortLive(ip: string): Promise { return; } /** * Checks if device is rooted @@ -212,7 +212,7 @@ export class Hotspot { * @return {Promise} - A Promise for whether the device is rooted */ @Cordova() - static isRooted(): Promise {return; } + static isRooted(): Promise { return; } }