diff --git a/src/plugins/hotspot.ts b/src/plugins/hotspot.ts index 8e26fa51..3de1e612 100644 --- a/src/plugins/hotspot.ts +++ b/src/plugins/hotspot.ts @@ -1,5 +1,107 @@ import { Cordova, Plugin } from './plugin'; +export interface HotspotConnectionInfo { + + /** + * The service set identifier (SSID) of the current 802.11 network. + */ + SSID: string; + + /** + * The basic service set identifier (BSSID) of the current access point. + */ + BSSID: string; + + /** + * The current link speed in Mbps + */ + linkSpeed: string; + + /** + * The IP Address + */ + IPAddress: string; + + /** + * Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant. + */ + networkID: string; + +} + +export interface HotspotNetwork { + + /** + * Human readable network name + */ + SSID: string; + + /** + * MAC Address of the access point + */ + BSSID: string; + + /** + * The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating with the access point. + */ + frequency: number; + + /** + * The detected signal level in dBm, also known as the RSSI. + */ + level: number; + + /** + * Timestamp in microseconds (since boot) when this result was last seen. + */ + timestamp: number; + + /** + * Describes the authentication, key management, and encryption schemes supported by the access point. + */ + capabilities: string; + +} +export interface HotspotNetworkConfig { + + /** + * Device IP Address + */ + deviceIPAddress: string; + + /** + * Device MAC Address + */ + deviceMacAddress: string; + + /** + * Gateway IP Address + */ + gatewayIPAddress: string; + + /** + * Gateway MAC Address + */ + gatewayMacAddress: string; + +} + +export interface HotspotDevice { + + /** + * ip + * Hotspot IP Address + */ + ip: string; + + /** + * mac + * Hotspot MAC Address + */ + mac: string; + +} + /** * @name Hotspot * @description @@ -13,6 +115,11 @@ import { Cordova, Plugin } from './plugin'; * }); * * ``` + * @interfaces + * HotspotConnectionInfo + * HotspotNetwork + * HotspotNetworkConfig + * HotspotDevice */ @Plugin({ pluginName: 'Hotspot', @@ -210,10 +317,10 @@ export class Hotspot { static getNetConfig(): Promise { return; } /** - * @returns {Promise} + * @returns {Promise} */ @Cordova() - static getConnectionInfo(): Promise { return; } + static getConnectionInfo(): Promise { return; } /** * @returns {Promise} @@ -260,94 +367,3 @@ export class Hotspot { static isRooted(): Promise { return; } } - -export interface ConnectionInfo { - /** - * SSID - * The service set identifier (SSID) of the current 802.11 network. - */ - SSID: string; - /** - * BSSID - * The basic service set identifier (BSSID) of the current access point. - */ - BSSID: string; - /** - * linkSpeed - * The current link speed in Mbps - */ - linkSpeed: string; - /** - * IPAddress - * The IP Address - */ - IPAddress: string; - /** - * networkID - * Each configured network has a unique small integer ID, used to identify the network when performing operations on the supplicant. - */ - networkID: string; -} - -export interface HotspotNetwork { - /** - * SSID - * Human readable network name - */ - SSID: string; - /** - * BSSID - * MAC Address of the access point - */ - BSSID: string; - /** - * frequency - * The primary 20 MHz frequency (in MHz) of the channel over which the client is communicating with the access point. - */ - frequency: number; - /** - * level - * The detected signal level in dBm, also known as the RSSI. - */ - level: number; - /** - * timestamp - * Timestamp in microseconds (since boot) when this result was last seen. - */ - timestamp: number; - /** - * capabilities - * Describes the authentication, key management, and encryption schemes supported by the access point. - */ - capabilities: string; -} -export interface HotspotNetworkConfig { - /** - * deviceIPAddress - Device IP Address - */ - deviceIPAddress: string; - /** - * deviceMacAddress - Device MAC Address - */ - deviceMacAddress: string; - /** - * gatewayIPAddress - Gateway IP Address - */ - gatewayIPAddress: string; - /** - * gatewayMacAddress - Gateway MAC Address - */ - gatewayMacAddress: string; -} -export interface HotspotDevice { - /** - * ip - * Hotspot IP Address - */ - ip: string; - /** - * mac - * Hotspot MAC Address - */ - mac: string; -} diff --git a/src/plugins/http.ts b/src/plugins/http.ts index e6d0e6d9..a5bb8c47 100644 --- a/src/plugins/http.ts +++ b/src/plugins/http.ts @@ -1,4 +1,24 @@ import { Plugin, Cordova } from './plugin'; + +export interface HTTPResponse { + /** + * The status number of the response + */ + status: number; + /** + * The data that is in the response. This property usually exists when a promise returned by a request method resolves. + */ + data?: any; + /** + * The headers of the response + */ + headers: any; + /** + * Error response from the server. This property usually exists when a promise returned by a request method rejects. + */ + error?: string; +} + /** * @name HTTP * @description @@ -137,22 +157,3 @@ export class HTTP { @Cordova() static downloadFile(url: string, body: any, headers: any, filePath: string): Promise { return; } } - -export interface HTTPResponse { - /** - * The status number of the response - */ - status: number; - /** - * The data that is in the response. This property usually exists when a promise returned by a request method resolves. - */ - data?: any; - /** - * The headers of the response - */ - headers: any; - /** - * Error response from the server. This property usually exists when a promise returned by a request method rejects. - */ - error?: string; -}