cordova-plugin-hotspot
Advanced tools
Comparing version 1.0.1 to 1.1.0
{ | ||
"name": "cordova-plugin-hotspot", | ||
"version": "1.0.1", | ||
"version": "1.1.0", | ||
"description": "Cordova WiFi Hotspot Plugin", | ||
@@ -5,0 +5,0 @@ "cordova": { |
@@ -0,1 +1,104 @@ | ||
## Objects | ||
<dl> | ||
<dt><a href="#cordova.plugins.hotspot">cordova.plugins.hotspot</a> : <code>object</code></dt> | ||
<dd></dd> | ||
</dl> | ||
## Typedefs | ||
<dl> | ||
<dt><a href="#errorCallback">errorCallback</a> : <code>function</code></dt> | ||
<dd><p>Callback which provides the error details.</p> | ||
</dd> | ||
<dt><a href="#isAvailableCallback">isAvailableCallback</a> : <code>function</code></dt> | ||
<dd><p>Callback which provides the toggle Wifi info</p> | ||
</dd> | ||
<dt><a href="#toggleWifiCallback">toggleWifiCallback</a> : <code>function</code></dt> | ||
<dd><p>Callback which provides the toggle Wifi info</p> | ||
</dd> | ||
<dt><a href="#createHotspotCallback">createHotspotCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when start was successful</p> | ||
</dd> | ||
<dt><a href="#startHotspotCallback">startHotspotCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when start was successful</p> | ||
</dd> | ||
<dt><a href="#configureHotspotCallback">configureHotspotCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when configuration was successful</p> | ||
</dd> | ||
<dt><a href="#stopHotspotCallback">stopHotspotCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when stop was successful</p> | ||
</dd> | ||
<dt><a href="#isHotspotEnabledCallback">isHotspotEnabledCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when stop was successful</p> | ||
</dd> | ||
<dt><a href="#getAllHotspotDevicesCallback">getAllHotspotDevicesCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when connected successful and is | ||
called with an array of JSON objects.</p> | ||
</dd> | ||
<dt><a href="#connectToWifiCallback">connectToWifiCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when connected successful</p> | ||
</dd> | ||
<dt><a href="#connectToWifiAuthEncryptCallback">connectToWifiAuthEncryptCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when connected successful</p> | ||
</dd> | ||
<dt><a href="#configureHotspotCallback">configureHotspotCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when connected successful</p> | ||
</dd> | ||
<dt><a href="#addWifiNetworkCallback">addWifiNetworkCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when connected successful</p> | ||
</dd> | ||
<dt><a href="#removeWifiNetworkCallback">removeWifiNetworkCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function function to be called when removal was successful</p> | ||
</dd> | ||
<dt><a href="#isConnectedToInternetCallback">isConnectedToInternetCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called with the result</p> | ||
</dd> | ||
<dt><a href="#isConnectedToInternetViaWifiCallback">isConnectedToInternetViaWifiCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when connection is done via wifi</p> | ||
</dd> | ||
<dt><a href="#isWifiOnCallback">isWifiOnCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when WiFi is enabled</p> | ||
</dd> | ||
<dt><a href="#isWifiSupportedCallback">isWifiSupportedCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when WiFi is supported</p> | ||
</dd> | ||
<dt><a href="#isWifiDirectSupportedCallback">isWifiDirectSupportedCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when WiFi is supported</p> | ||
</dd> | ||
<dt><a href="#scanWifiCallback">scanWifiCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when scan is started</p> | ||
</dd> | ||
<dt><a href="#scanWifiCallback">scanWifiCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when scan is started</p> | ||
</dd> | ||
<dt><a href="#startWifiPeriodicallyScanCallback">startWifiPeriodicallyScanCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when scan is started</p> | ||
</dd> | ||
<dt><a href="#stopWifiPeriodicallyScanCallback">stopWifiPeriodicallyScanCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when scan is stopped</p> | ||
</dd> | ||
<dt><a href="#getNetConfigCallback">getNetConfigCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called when scan is started</p> | ||
</dd> | ||
<dt><a href="#getConnectionInfoCallback">getConnectionInfoCallback</a> : <code>function</code></dt> | ||
<dd><p>Callback which provides the connection information.</p> | ||
</dd> | ||
<dt><a href="#pingHostCallback">pingHostCallback</a> : <code>function</code></dt> | ||
<dd><p>Callback which provides the ping information.</p> | ||
</dd> | ||
<dt><a href="#getMacAddressOfHostCallback">getMacAddressOfHostCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called with all information</p> | ||
</dd> | ||
<dt><a href="#isDnsLiveCallback">isDnsLiveCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called with DNS details</p> | ||
</dd> | ||
<dt><a href="#isPortLiveCallback">isPortLiveCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called with DNS details</p> | ||
</dd> | ||
<dt><a href="#isRootedCallback">isRootedCallback</a> : <code>function</code></dt> | ||
<dd><p>A callback function to be called with Rooted information</p> | ||
</dd> | ||
</dl> | ||
<a name="cordova.plugins.hotspot"></a> | ||
@@ -12,5 +115,5 @@ ## cordova.plugins.hotspot : <code>object</code> | ||
* [.stopHotspot(successCB, errorCB)](#cordova.plugins.hotspot+stopHotspot) | ||
* [.isHotspotEnabled(enabledCB, disabledCB)](#cordova.plugins.hotspot+isHotspotEnabled) | ||
* [.getAllHotspotDevices(successCB, errorCB)](#cordova.plugins.hotspot+getAllHotspotDevices) | ||
* [.connectToHotspot(ssid, password, successCB, errorCB)](#cordova.plugins.hotspot+connectToHotspot) | ||
* [.isHotspotEnabled(successCB, errorCB)](#cordova.plugins.hotspot+isHotspotEnabled) | ||
* [.getAllHotspotDevices(A, errorCB)](#cordova.plugins.hotspot+getAllHotspotDevices) | ||
* [.connectToWifi(ssid, password, successCB, errorCB)](#cordova.plugins.hotspot+connectToWifi) | ||
* [.connectToWifiAuthEncrypt(ssid, password, authentication, encryption, successCB, errorCB)](#cordova.plugins.hotspot+connectToWifiAuthEncrypt) | ||
@@ -27,4 +130,4 @@ * [.configureHotspot(ssid, mode, password, successCB, errorCB)](#cordova.plugins.hotspot+configureHotspot) | ||
* [.scanWifiByLevel(successCB, errorCB)](#cordova.plugins.hotspot+scanWifiByLevel) | ||
* [.startPeriodicallyScan(interval, duration, successCB, errorCB)](#cordova.plugins.hotspot+startPeriodicallyScan) | ||
* [.stopPeriodicallyScan(successCB, errorCB)](#cordova.plugins.hotspot+stopPeriodicallyScan) | ||
* [.startWifiPeriodicallyScan(interval, duration, successCB, errorCB)](#cordova.plugins.hotspot+startWifiPeriodicallyScan) | ||
* [.stopWifiPeriodicallyScan(successCB, errorCB)](#cordova.plugins.hotspot+stopWifiPeriodicallyScan) | ||
* [.getNetConfig(successCB, errorCB)](#cordova.plugins.hotspot+getNetConfig) | ||
@@ -46,3 +149,3 @@ * [.getConnectionInfo(successCB, errorCB)](#cordova.plugins.hotspot+getConnectionInfo) | ||
| --- | --- | --- | | ||
| callback | <code>function</code> | A callback function with true or false as response | | ||
| callback | <code>[isAvailableCallback](#isAvailableCallback)</code> | A callback function which is invoked on success. | | ||
@@ -57,4 +160,4 @@ <a name="cordova.plugins.hotspot+toggleWifi"></a> | ||
| --- | --- | --- | | ||
| callback | <code>function</code> | A callback function with true or false as response,true if wifi ON and false if wifi OFF | | ||
| errorCB | <code>Object</code> | A callback function to be called when errors occurr | | ||
| callback | <code>[toggleWifiCallback](#toggleWifiCallback)</code> | A callback function which is invoked on success. | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when errors occurr | | ||
@@ -72,4 +175,4 @@ <a name="cordova.plugins.hotspot+createHotspot"></a> | ||
| password | <code>string</code> | password to use | | ||
| successCB | <code>function</code> | A callback function to be called when start was successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when connection was not successful | | ||
| successCB | <code>[createHotspotCallback](#createHotspotCallback)</code> | A callback function to be called when start was successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when connection was not successful | | ||
@@ -84,4 +187,4 @@ <a name="cordova.plugins.hotspot+startHotspot"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when start was successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when start was not successful | | ||
| successCB | <code>[startHotspotCallback](#startHotspotCallback)</code> | A callback function to be called when start was successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when start was not successful | | ||
@@ -99,4 +202,4 @@ <a name="cordova.plugins.hotspot+configureHotspot"></a> | ||
| password | <code>string</code> | password to use | | ||
| successCB | <code>function</code> | A callback function to be called when configuration was successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when configuration was not successful | | ||
| successCB | <code>[configureHotspotCallback](#configureHotspotCallback)</code> | A callback function to be called when configuration was successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when configuration was not successful | | ||
@@ -111,7 +214,7 @@ <a name="cordova.plugins.hotspot+stopHotspot"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when stop was successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when stop was not successful | | ||
| successCB | <code>[stopHotspotCallback](#stopHotspotCallback)</code> | A callback function to be called when stop was successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when stop was not successful | | ||
<a name="cordova.plugins.hotspot+isHotspotEnabled"></a> | ||
### cordova.plugins.hotspot.isHotspotEnabled(enabledCB, disabledCB) | ||
### cordova.plugins.hotspot.isHotspotEnabled(successCB, errorCB) | ||
Checks if hot spot is enabled | ||
@@ -121,9 +224,9 @@ | ||
| Param | Description | | ||
| --- | --- | | ||
| enabledCB | is called if hotspot is on | | ||
| disabledCB | called if hotspot is off | | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| successCB | <code>[isHotspotEnabledCallback](#isHotspotEnabledCallback)</code> | A callback function with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A error callback function | | ||
<a name="cordova.plugins.hotspot+getAllHotspotDevices"></a> | ||
### cordova.plugins.hotspot.getAllHotspotDevices(successCB, errorCB) | ||
### cordova.plugins.hotspot.getAllHotspotDevices(A, errorCB) | ||
Get all connected devices | ||
@@ -135,8 +238,8 @@ | ||
| --- | --- | --- | | ||
| successCB | <code>ip</code> | <code>mac</code> | A callback function to be called when connected successful and is called with an array of JSON objects: | | ||
| errorCB | | A callback function to be called when connection was not successful | | ||
| A | <code>[getAllHotspotDevicesCallback](#getAllHotspotDevicesCallback)</code> | callback function when hotspot connection is active and info was rad. | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
<a name="cordova.plugins.hotspot+connectToHotspot"></a> | ||
### cordova.plugins.hotspot.connectToHotspot(ssid, password, successCB, errorCB) | ||
Connect to a WiFi Hotspot | ||
<a name="cordova.plugins.hotspot+connectToWifi"></a> | ||
### cordova.plugins.hotspot.connectToWifi(ssid, password, successCB, errorCB) | ||
Connect to a WiFi network | ||
@@ -149,4 +252,4 @@ **Kind**: instance method of <code>[cordova.plugins.hotspot](#cordova.plugins.hotspot)</code> | ||
| password | <code>string</code> | password to use | | ||
| successCB | <code>function</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when connection was not successful | | ||
| successCB | <code>[connectToWifiCallback](#connectToWifiCallback)</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when connection was not successful | | ||
@@ -165,4 +268,4 @@ <a name="cordova.plugins.hotspot+connectToWifiAuthEncrypt"></a> | ||
| encryption | <code>Array.<string></code> | mode use (CCMP, TKIP, WEP104, WEP40) | | ||
| successCB | <code>function</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when connection was not successful | | ||
| successCB | <code>[connectToWifiAuthEncryptCallback](#connectToWifiAuthEncryptCallback)</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when connection was not successful | | ||
@@ -180,4 +283,4 @@ <a name="cordova.plugins.hotspot+configureHotspot"></a> | ||
| password | <code>string</code> | password to use | | ||
| successCB | <code>function</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when connection was not successful | | ||
| successCB | <code>[configureHotspotCallback](#configureHotspotCallback)</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when configuration was not successful | | ||
@@ -195,4 +298,4 @@ <a name="cordova.plugins.hotspot+addWifiNetwork"></a> | ||
| password | <code>string</code> | password to use | | ||
| successCB | <code>function</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when connection was not successful | | ||
| successCB | <code>function</code> | A callback function to be called when adding successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when adding was not successful | | ||
@@ -208,4 +311,4 @@ <a name="cordova.plugins.hotspot+removeWifiNetwork"></a> | ||
| ssid | <code>string</code> | SSID to connect | | ||
| successCB | <code>function</code> | A callback function to be called when connected successful | | ||
| errorCB | <code>Object</code> | A callback function to be called when connection was not successful | | ||
| successCB | <code>function</code> | A callback function function to be called when removal was successful | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | A callback function to be called when removal was not successful | | ||
@@ -220,4 +323,4 @@ <a name="cordova.plugins.hotspot+isConnectedToInternet"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when connection is active | | ||
| errorCB | <code>Object</code> | A callback function to be called when not | | ||
| successCB | <code>[isConnectedToInternetCallback](#isConnectedToInternetCallback)</code> | A callback function to be called with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -232,4 +335,4 @@ <a name="cordova.plugins.hotspot+isConnectedToInternetViaWifi"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when connection is done via wifi | | ||
| errorCB | <code>Object</code> | A callback function to be called when not | | ||
| successCB | <code>[isConnectedToInternetViaWifiCallback](#isConnectedToInternetViaWifiCallback)</code> | A callback function to be called with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -244,4 +347,4 @@ <a name="cordova.plugins.hotspot+isWifiOn"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when WiFi is enabled | | ||
| errorCB | <code>Object</code> | A callback function to be called when WiFi is disabled | | ||
| successCB | <code>[isWifiOnCallback](#isWifiOnCallback)</code> | A callback function with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -256,4 +359,4 @@ <a name="cordova.plugins.hotspot+isWifiSupported"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when WiFi is supported | | ||
| errorCB | <code>Object</code> | A callback function to be called when WiFi is not supported | | ||
| successCB | <code>[isWifiSupportedCallback](#isWifiSupportedCallback)</code> | A callback function with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -268,4 +371,4 @@ <a name="cordova.plugins.hotspot+isWifiDirectSupported"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when WiFi Direct is supported | | ||
| errorCB | <code>Object</code> | A callback function to be called when WiFi Direct is not supported | | ||
| successCB | <code>[isWifiDirectSupportedCallback](#isWifiDirectSupportedCallback)</code> | A callback function with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -280,4 +383,4 @@ <a name="cordova.plugins.hotspot+scanWifi"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when scan is done | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[scanWifiCallback](#scanWifiCallback)</code> | A callback function to be called when scan is started | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -292,8 +395,8 @@ <a name="cordova.plugins.hotspot+scanWifiByLevel"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when scan is done | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>scanWifiByLevelCallback</code> | A callback function to be called when scan is started | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
<a name="cordova.plugins.hotspot+startPeriodicallyScan"></a> | ||
### cordova.plugins.hotspot.startPeriodicallyScan(interval, duration, successCB, errorCB) | ||
Start a perodically scan wifi | ||
<a name="cordova.plugins.hotspot+startWifiPeriodicallyScan"></a> | ||
### cordova.plugins.hotspot.startWifiPeriodicallyScan(interval, duration, successCB, errorCB) | ||
Start a periodically scan wifi | ||
@@ -306,8 +409,8 @@ **Kind**: instance method of <code>[cordova.plugins.hotspot](#cordova.plugins.hotspot)</code> | ||
| duration | <code>long</code> | duration to use | | ||
| successCB | <code>function</code> | A callback function to be called when scan is started | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[startWifiPeriodicallyScanCallback](#startWifiPeriodicallyScanCallback)</code> | A callback function to be called when scan is started | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
<a name="cordova.plugins.hotspot+stopPeriodicallyScan"></a> | ||
### cordova.plugins.hotspot.stopPeriodicallyScan(successCB, errorCB) | ||
Stop a perodically scan wifi | ||
<a name="cordova.plugins.hotspot+stopWifiPeriodicallyScan"></a> | ||
### cordova.plugins.hotspot.stopWifiPeriodicallyScan(successCB, errorCB) | ||
Stop a periodically scan wifi | ||
@@ -318,4 +421,4 @@ **Kind**: instance method of <code>[cordova.plugins.hotspot](#cordova.plugins.hotspot)</code> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called when scan is stopped | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[stopWifiPeriodicallyScanCallback](#stopWifiPeriodicallyScanCallback)</code> | A callback function to be called when scan is stopped | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -330,4 +433,4 @@ <a name="cordova.plugins.hotspot+getNetConfig"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[getNetConfigCallback](#getNetConfigCallback)</code> | A callback function to be called with all information | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -342,4 +445,4 @@ <a name="cordova.plugins.hotspot+getConnectionInfo"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[getConnectionInfoCallback](#getConnectionInfoCallback)</code> | A callback function with the connection details. | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -355,4 +458,4 @@ <a name="cordova.plugins.hotspot+pingHost"></a> | ||
| ip | <code>string</code> | host IP | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[pingHostCallback](#pingHostCallback)</code> | A callback function to be called with all information | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -368,4 +471,4 @@ <a name="cordova.plugins.hotspot+getMacAddressOfHost"></a> | ||
| ip | <code>string</code> | host IP | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>getMacAddressOfHost</code> | A callback function to be called with all information | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -381,8 +484,8 @@ <a name="cordova.plugins.hotspot+isDnsLive"></a> | ||
| ip | <code>string</code> | host IP | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>function</code> | A callback function to be called with the result | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
<a name="cordova.plugins.hotspot+isPortLive"></a> | ||
### cordova.plugins.hotspot.isPortLive(ip, successCB, errorCB) | ||
portLive | ||
is port available | ||
@@ -394,4 +497,4 @@ **Kind**: instance method of <code>[cordova.plugins.hotspot](#cordova.plugins.hotspot)</code> | ||
| ip | <code>string</code> | host IP | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[isPortLiveCallback](#isPortLiveCallback)</code> | A callback function to be called with all information | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
@@ -406,4 +509,250 @@ <a name="cordova.plugins.hotspot+isRooted"></a> | ||
| --- | --- | --- | | ||
| successCB | <code>function</code> | A callback function to be called with all information | | ||
| errorCB | <code>Object</code> | An error callback | | ||
| successCB | <code>[isRootedCallback](#isRootedCallback)</code> | A callback function to be called with all information | | ||
| errorCB | <code>[errorCallback](#errorCallback)</code> | An error callback | | ||
<a name="errorCallback"></a> | ||
## errorCallback : <code>function</code> | ||
Callback which provides the error details. | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| err | <code>Object</code> | error details. | | ||
<a name="isAvailableCallback"></a> | ||
## isAvailableCallback : <code>function</code> | ||
Callback which provides the toggle Wifi info | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| available, | <code>boolean</code> | true or false as response | | ||
<a name="toggleWifiCallback"></a> | ||
## toggleWifiCallback : <code>function</code> | ||
Callback which provides the toggle Wifi info | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| wifiOn, | <code>boolean</code> | true or false as response,true if wifi ON and false if wifi OFF | | ||
<a name="createHotspotCallback"></a> | ||
## createHotspotCallback : <code>function</code> | ||
A callback function to be called when start was successful | ||
**Kind**: global typedef | ||
<a name="startHotspotCallback"></a> | ||
## startHotspotCallback : <code>function</code> | ||
A callback function to be called when start was successful | ||
**Kind**: global typedef | ||
<a name="configureHotspotCallback"></a> | ||
## configureHotspotCallback : <code>function</code> | ||
A callback function to be called when configuration was successful | ||
**Kind**: global typedef | ||
<a name="stopHotspotCallback"></a> | ||
## stopHotspotCallback : <code>function</code> | ||
A callback function to be called when stop was successful | ||
**Kind**: global typedef | ||
<a name="isHotspotEnabledCallback"></a> | ||
## isHotspotEnabledCallback : <code>function</code> | ||
A callback function to be called when stop was successful | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| enabled, | <code>boolean</code> | true if hotspot is off or false as response | | ||
<a name="getAllHotspotDevicesCallback"></a> | ||
## getAllHotspotDevicesCallback : <code>function</code> | ||
A callback function to be called when connected successful and is | ||
called with an array of JSON objects. | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| of | <code>Array</code> | objects: [{ ip, mac }] | | ||
<a name="connectToWifiCallback"></a> | ||
## connectToWifiCallback : <code>function</code> | ||
A callback function to be called when connected successful | ||
**Kind**: global typedef | ||
<a name="connectToWifiAuthEncryptCallback"></a> | ||
## connectToWifiAuthEncryptCallback : <code>function</code> | ||
A callback function to be called when connected successful | ||
**Kind**: global typedef | ||
<a name="configureHotspotCallback"></a> | ||
## configureHotspotCallback : <code>function</code> | ||
A callback function to be called when connected successful | ||
**Kind**: global typedef | ||
<a name="addWifiNetworkCallback"></a> | ||
## addWifiNetworkCallback : <code>function</code> | ||
A callback function to be called when connected successful | ||
**Kind**: global typedef | ||
<a name="removeWifiNetworkCallback"></a> | ||
## removeWifiNetworkCallback : <code>function</code> | ||
A callback function function to be called when removal was successful | ||
**Kind**: global typedef | ||
<a name="isConnectedToInternetCallback"></a> | ||
## isConnectedToInternetCallback : <code>function</code> | ||
A callback function to be called with the result | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| connected, | <code>boolean</code> | true if device is connected to internet, otherwise false | | ||
<a name="isConnectedToInternetViaWifiCallback"></a> | ||
## isConnectedToInternetViaWifiCallback : <code>function</code> | ||
A callback function to be called when connection is done via wifi | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| connected, | <code>boolean</code> | true if device is connected to internet via WiFi, otherwise false | | ||
<a name="isWifiOnCallback"></a> | ||
## isWifiOnCallback : <code>function</code> | ||
A callback function to be called when WiFi is enabled | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| connected, | <code>boolean</code> | true if device if WiFi is on, otherwise false | | ||
<a name="isWifiSupportedCallback"></a> | ||
## isWifiSupportedCallback : <code>function</code> | ||
A callback function to be called when WiFi is supported | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| wifiSupported, | <code>boolean</code> | true if WiFi is supported, otherwise false | | ||
<a name="isWifiDirectSupportedCallback"></a> | ||
## isWifiDirectSupportedCallback : <code>function</code> | ||
A callback function to be called when WiFi is supported | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| wifiSupported, | <code>boolean</code> | true if WiFi Direct is supported, otherwise false | | ||
<a name="scanWifiCallback"></a> | ||
## scanWifiCallback : <code>function</code> | ||
A callback function to be called when scan is started | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| info | <code>Array</code> | An array of JSON objects with the following information: [{ SSID, BSSID, frequency, level, timestamp, capabilities }] | | ||
<a name="scanWifiCallback"></a> | ||
## scanWifiCallback : <code>function</code> | ||
A callback function to be called when scan is started | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| info | <code>Array</code> | An array of JSON objects with the following information: [{ SSID, BSSID, frequency, level, timestamp, capabilities }] | | ||
<a name="startWifiPeriodicallyScanCallback"></a> | ||
## startWifiPeriodicallyScanCallback : <code>function</code> | ||
A callback function to be called when scan is started | ||
**Kind**: global typedef | ||
<a name="stopWifiPeriodicallyScanCallback"></a> | ||
## stopWifiPeriodicallyScanCallback : <code>function</code> | ||
A callback function to be called when scan is stopped | ||
**Kind**: global typedef | ||
<a name="getNetConfigCallback"></a> | ||
## getNetConfigCallback : <code>function</code> | ||
A callback function to be called when scan is started | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| info | <code>Object</code> | An JSON object with the following information: { deviceIPAddress, deviceMacAddress, gatewayIPAddress, gatewayMacAddress } | | ||
<a name="getConnectionInfoCallback"></a> | ||
## getConnectionInfoCallback : <code>function</code> | ||
Callback which provides the connection information. | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| info | <code>Object</code> | An JSON object with the following information: { SSID, linkSpeed, IPAddress } | | ||
<a name="pingHostCallback"></a> | ||
## pingHostCallback : <code>function</code> | ||
Callback which provides the ping information. | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| info | <code>Object</code> | An JSON object with the following information: { requestTimeout, stat: { requestTimeout, time, min, max, stddev } } | | ||
<a name="getMacAddressOfHostCallback"></a> | ||
## getMacAddressOfHostCallback : <code>function</code> | ||
A callback function to be called with all information | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| info | <code>String</code> | the MAC address | | ||
<a name="isDnsLiveCallback"></a> | ||
## isDnsLiveCallback : <code>function</code> | ||
A callback function to be called with DNS details | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| isDnsLive, | <code>boolean</code> | true if device is DNS is live, otherwise false | | ||
<a name="isPortLiveCallback"></a> | ||
## isPortLiveCallback : <code>function</code> | ||
A callback function to be called with DNS details | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| isPortLive, | <code>boolean</code> | true if device is port is available, otherwise false | | ||
<a name="isRootedCallback"></a> | ||
## isRootedCallback : <code>function</code> | ||
A callback function to be called with Rooted information | ||
**Kind**: global typedef | ||
| Param | Type | Description | | ||
| --- | --- | --- | | ||
| isRooted, | <code>boolean</code> | true if device is port is available, otherwise false | | ||
@@ -8,7 +8,9 @@ # Cordova HotSpot Plugin | ||
[](https://nodei.co/npm/cordova-plugin-hotspot/) | ||
[](https://nodei.co/npm/cordova-plugin-hotspot/) | ||
Feel free to **donate** | ||
<a href='http://www.pledgie.com/campaigns/25442'><img alt='Click here to lend your support to: Owncloud Apps and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/23447.png?skin_name=chrome' border='0' /></a> | ||
<a href='https://pledgie.com/campaigns/25442'><img alt='Click here to lend your support to: MobileApps with Cordova and make a donation at pledgie.com !' src='https://pledgie.com/campaigns/25442.png?skin_name=chrome' border='0' ></a> | ||
<a target="_blank" href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=AGPGLZYNV6Y5S"> | ||
@@ -25,11 +27,12 @@ <img alt="" border="0" src="https://www.paypalobjects.com/de_DE/DE/i/btn/btn_donateCC_LG.gif"/> | ||
See [here](./PLUGIN_USAGE.MD) for complete reference. | ||
See [here](./PLUGIN_USAGE.MD) for complete API reference. | ||
For Ionic Guidance see [here](https://github.com/hypery2k/cordova-hotspot-plugin/wiki/Ionic-usage). | ||
You need to make sure that you have the right [Android permissions](https://github.com/hypery2k/cordova-hotspot-plugin/wiki/Android-Configuration). | ||
## Dev | ||
### To run the integration tests before | ||
### To run the tests | ||
```bash | ||
export PLATFORM="android" | ||
./runIntegrationTests.sh | ||
npm test | ||
``` |
@@ -34,8 +34,24 @@ /* | ||
/** | ||
* Callback which provides the error details. | ||
* | ||
* @callback errorCallback | ||
* @param {Object} err - error details. | ||
*/ | ||
HotSpotPlugin.prototype = { | ||
/** | ||
* Callback which provides the toggle Wifi info | ||
* | ||
* @callback isAvailableCallback | ||
* @param {boolean} available, true or false as response | ||
*/ | ||
/** | ||
* Check if plugin is available | ||
* @param {function} callback | ||
* A callback function with true or false as response | ||
* @param {isAvailableCallback} callback | ||
* A callback function which is invoked on success. | ||
*/ | ||
@@ -50,8 +66,16 @@ isAvailable: function (callback) { | ||
/** | ||
* Callback which provides the toggle Wifi info | ||
* | ||
* @callback toggleWifiCallback | ||
* @param {boolean} wifiOn, true or false as response,true if wifi ON and false if wifi OFF | ||
*/ | ||
/** | ||
* Method to Toggle wifi ON/OFF | ||
* | ||
* @param {function} callback | ||
* A callback function with true or false as response,true if wifi ON and false if wifi OFF | ||
* @param {Object} errorCB | ||
* @param {toggleWifiCallback} callback | ||
* A callback function which is invoked on success. | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when errors occurr | ||
@@ -71,3 +95,9 @@ */ | ||
/** | ||
* A callback function to be called when start was successful | ||
* | ||
* @callback createHotspotCallback | ||
*/ | ||
/** | ||
* Create a WiFi Hotspot | ||
@@ -81,5 +111,5 @@ * | ||
* password to use | ||
* @param {function} successCB | ||
* @param {createHotspotCallback} successCB | ||
* A callback function to be called when start was successful | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when connection was not successful | ||
@@ -94,7 +124,13 @@ */ | ||
/** | ||
* A callback function to be called when start was successful | ||
* | ||
* @callback startHotspotCallback | ||
*/ | ||
/** | ||
* Start a default WiFi Hotspot | ||
* | ||
* @param {function} successCB | ||
* @param {startHotspotCallback} successCB | ||
* A callback function to be called when start was successful | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when start was not successful | ||
@@ -109,2 +145,7 @@ */ | ||
/** | ||
* A callback function to be called when configuration was successful | ||
* | ||
* @callback configureHotspotCallback | ||
*/ | ||
/** | ||
* Configure a running WiFi Hotspot | ||
@@ -118,5 +159,5 @@ * | ||
* password to use | ||
* @param {function} successCB | ||
* @param {configureHotspotCallback} successCB | ||
* A callback function to be called when configuration was successful | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when configuration was not successful | ||
@@ -129,8 +170,14 @@ */ | ||
}, | ||
/** | ||
* A callback function to be called when stop was successful | ||
* | ||
* @callback stopHotspotCallback | ||
*/ | ||
/** | ||
* Stop a running default WiFi Hotspot | ||
* | ||
* @param {function} successCB | ||
* @param {stopHotspotCallback} successCB | ||
* A callback function to be called when stop was successful | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when stop was not successful | ||
@@ -143,23 +190,39 @@ */ | ||
}, | ||
/** | ||
* A callback function to be called when stop was successful | ||
* | ||
* @callback isHotspotEnabledCallback | ||
* @param {boolean} enabled, true if hotspot is off or false as response | ||
*/ | ||
/** | ||
* Checks if hot spot is enabled | ||
* @param enabledCB is called if hotspot is on | ||
* @param disabledCB called if hotspot is off | ||
* @param {isHotspotEnabledCallback} successCB | ||
* A callback function with the result | ||
* @param {errorCallback} errorCB | ||
* A error callback function | ||
*/ | ||
isHotspotEnabled: function (enabledCB, disabledCB) { | ||
cordova.exec(enabledCB, function (err) { | ||
disabledCB(err); | ||
isHotspotEnabled: function (successCB, errorCallback) { | ||
cordova.exec(function () { | ||
successCB(true); | ||
}, function () { | ||
successCB(false); | ||
}, "HotSpotPlugin", "isHotspotEnabled", []); | ||
}, | ||
/** | ||
* A callback function to be called when connected successful and is | ||
* called with an array of JSON objects. | ||
* | ||
* @callback getAllHotspotDevicesCallback | ||
* @param {Array} of objects: | ||
* [{ | ||
* ip, | ||
* mac | ||
* }] | ||
*/ | ||
/** | ||
* Get all connected devices | ||
* @param successCB | ||
* A callback function to be called when connected successful and is called with an array of JSON objects: | ||
* { | ||
* ip | mac | ||
* } | ||
* @param errorCB | ||
* A callback function to be called when connection was not successful | ||
* @param {getAllHotspotDevicesCallback} | ||
* A callback function when hotspot connection is active and info was rad. | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
*/ | ||
@@ -173,2 +236,7 @@ getAllHotspotDevices: function (successCB, errorCB) { | ||
/** | ||
* A callback function to be called when connected successful | ||
* | ||
* @callback connectToWifiCallback | ||
*/ | ||
/** | ||
* Connect to a WiFi network | ||
@@ -180,5 +248,5 @@ * | ||
* password to use | ||
* @param {function} successCB | ||
* @param {connectToWifiCallback} successCB | ||
* A callback function to be called when connected successful | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when connection was not successful | ||
@@ -191,4 +259,8 @@ */ | ||
}, | ||
/** | ||
* A callback function to be called when connected successful | ||
* | ||
* @callback connectToWifiAuthEncryptCallback | ||
*/ | ||
/** | ||
* configure current WiFi Hotspot | ||
@@ -204,5 +276,5 @@ * | ||
* mode use (CCMP, TKIP, WEP104, WEP40) | ||
* @param {function} successCB | ||
* @param {connectToWifiAuthEncryptCallback} successCB | ||
* A callback function to be called when connected successful | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when connection was not successful | ||
@@ -215,4 +287,8 @@ */ | ||
}, | ||
/** | ||
* A callback function to be called when connected successful | ||
* | ||
* @callback configureHotspotCallback | ||
*/ | ||
/** | ||
* configure current WiFi Hotspot | ||
@@ -226,6 +302,6 @@ * | ||
* password to use | ||
* @param {function} successCB | ||
* @param {configureHotspotCallback} successCB | ||
* A callback function to be called when connected successful | ||
* @param {Object} errorCB | ||
* A callback function to be called when connection was not successful | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when configuration was not successful | ||
*/ | ||
@@ -237,4 +313,8 @@ configureHotspot: function (ssid, mode, password, successCB, errorCB) { | ||
}, | ||
/** | ||
* A callback function to be called when connected successful | ||
* | ||
* @callback addWifiNetworkCallback | ||
*/ | ||
/** | ||
* add a WiFi network | ||
@@ -249,5 +329,5 @@ * | ||
* @param {function} successCB | ||
* A callback function to be called when connected successful | ||
* @param {Object} errorCB | ||
* A callback function to be called when connection was not successful | ||
* A callback function to be called when adding successful | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when adding was not successful | ||
*/ | ||
@@ -259,4 +339,8 @@ addWifiNetwork: function (ssid, mode, password, successCB, errorCB) { | ||
}, | ||
/** | ||
* A callback function function to be called when removal was successful | ||
* | ||
* @callback removeWifiNetworkCallback | ||
*/ | ||
/** | ||
* Delete a WiFi network | ||
@@ -267,5 +351,5 @@ * | ||
* @param {function} successCB | ||
* A callback function to be called when connected successful | ||
* @param {Object} errorCB | ||
* A callback function to be called when connection was not successful | ||
* A callback function function to be called when removal was successful | ||
* @param {errorCallback} errorCB | ||
* A callback function to be called when removal was not successful | ||
*/ | ||
@@ -278,72 +362,126 @@ removeWifiNetwork: function (ssid, successCB, errorCB) { | ||
/** | ||
* A callback function to be called with the result | ||
* | ||
* @callback isConnectedToInternetCallback | ||
* @param {boolean} connected, true if device is connected to internet, otherwise false | ||
*/ | ||
/** | ||
* Check if connection to internet is active | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when connection is active | ||
* @param {Object} errorCB | ||
* A callback function to be called when not | ||
* @param {isConnectedToInternetCallback} successCB | ||
* A callback function to be called with the result | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
*/ | ||
isConnectedToInternet: function (successCB, errorCB) { | ||
cordova.exec(successCB, function (err) { | ||
errorCB(err); | ||
cordova.exec(function () { | ||
successCB(true); | ||
}, function () { | ||
successCB(false); | ||
}, 'HotSpotPlugin', 'isConnectedToInternet', []); | ||
}, | ||
/** | ||
* A callback function to be called when connection is done via wifi | ||
* | ||
* @callback isConnectedToInternetViaWifiCallback | ||
* @param {boolean} connected, true if device is connected to internet via WiFi, otherwise false | ||
*/ | ||
/** | ||
* Check if connection to internet is active via WiFi | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when connection is done via wifi | ||
* @param {Object} errorCB | ||
* A callback function to be called when not | ||
* @param {isConnectedToInternetViaWifiCallback} successCB | ||
* A callback function to be called with the result | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
*/ | ||
isConnectedToInternetViaWifi: function (successCB, errorCB) { | ||
cordova.exec(successCB, function (err) { | ||
errorCB(err); | ||
cordova.exec(function () { | ||
successCB(true); | ||
}, function () { | ||
successCB(false); | ||
}, 'HotSpotPlugin', 'isConnectedToInternetViaWifi', []); | ||
}, | ||
/** | ||
* A callback function to be called when WiFi is enabled | ||
* | ||
* @callback isWifiOnCallback | ||
* @param {boolean} connected, true if device if WiFi is on, otherwise false | ||
*/ | ||
/** | ||
* Check if WiFi is enabled | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when WiFi is enabled | ||
* @param {Object} errorCB | ||
* A callback function to be called when WiFi is disabled | ||
* @param {isWifiOnCallback} successCB | ||
* A callback function with the result | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
*/ | ||
isWifiOn: function (successCB, errorCB) { | ||
cordova.exec(successCB, function (err) { | ||
errorCB(err); | ||
cordova.exec(function () { | ||
successCB(true); | ||
}, function () { | ||
successCB(false); | ||
}, 'HotSpotPlugin', 'isWifiOn', []); | ||
}, | ||
/** | ||
* A callback function to be called when WiFi is supported | ||
* | ||
* @callback isWifiSupportedCallback | ||
* @param {boolean} wifiSupported, true if WiFi is supported, otherwise false | ||
*/ | ||
/** | ||
* Check if WiFi is supported | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when WiFi is supported | ||
* @param {Object} errorCB | ||
* A callback function to be called when WiFi is not supported | ||
* @param {isWifiSupportedCallback} successCB | ||
* A callback function with the result | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
*/ | ||
isWifiSupported: function (successCB, errorCB) { | ||
cordova.exec(successCB, function (err) { | ||
errorCB(err); | ||
cordova.exec(function () { | ||
successCB(true); | ||
}, function () { | ||
successCB(false); | ||
}, 'HotSpotPlugin', 'isWifiSupported', []); | ||
}, | ||
/** | ||
* A callback function to be called when WiFi is supported | ||
* | ||
* @callback isWifiDirectSupportedCallback | ||
* @param {boolean} wifiSupported, true if WiFi Direct is supported, otherwise false | ||
*/ | ||
/** | ||
* Check if WiFi Direct is supported | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when WiFi Direct is supported | ||
* @param {Object} errorCB | ||
* A callback function to be called when WiFi Direct is not supported | ||
* @param {isWifiDirectSupportedCallback} successCB | ||
* A callback function with the result | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
*/ | ||
isWifiDirectSupported: function (successCB, errorCB) { | ||
cordova.exec(successCB, function (err) { | ||
errorCB(err); | ||
cordova.exec(function () { | ||
successCB(true); | ||
}, function () { | ||
successCB(false); | ||
}, 'HotSpotPlugin', 'isWifiDirectSupported', []); | ||
}, | ||
/** | ||
* A callback function to be called when scan is started | ||
* | ||
* @callback scanWifiCallback | ||
* @param {Array} info - An array of JSON objects with the following information: | ||
* [{ | ||
* SSID, | ||
* BSSID, | ||
* frequency, | ||
* level, | ||
* timestamp, | ||
* capabilities | ||
* }] | ||
*/ | ||
/** | ||
* Scan wifi | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when scan is done | ||
* @param {Object} errorCB | ||
* @param {scanWifiCallback} successCB | ||
* A callback function to be called when scan is started | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -357,7 +495,21 @@ */ | ||
/** | ||
* A callback function to be called when scan is started | ||
* | ||
* @callback scanWifiCallback | ||
* @param {Array} info - An array of JSON objects with the following information: | ||
* [{ | ||
* SSID, | ||
* BSSID, | ||
* frequency, | ||
* level, | ||
* timestamp, | ||
* capabilities | ||
* }] | ||
*/ | ||
/** | ||
* Scan wifi by level | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called when scan is done | ||
* @param {Object} errorCB | ||
* @param {scanWifiByLevelCallback} successCB | ||
* A callback function to be called when scan is started | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -371,2 +523,7 @@ */ | ||
/** | ||
* A callback function to be called when scan is started | ||
* | ||
* @callback startWifiPeriodicallyScanCallback | ||
*/ | ||
/** | ||
* Start a periodically scan wifi | ||
@@ -378,5 +535,5 @@ * | ||
* duration to use | ||
* @param {function} successCB | ||
* @param {startWifiPeriodicallyScanCallback} successCB | ||
* A callback function to be called when scan is started | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -390,7 +547,12 @@ */ | ||
/** | ||
* A callback function to be called when scan is stopped | ||
* | ||
* @callback stopWifiPeriodicallyScanCallback | ||
*/ | ||
/** | ||
* Stop a periodically scan wifi | ||
* | ||
* @param {function} successCB | ||
* @param {stopWifiPeriodicallyScanCallback} successCB | ||
* A callback function to be called when scan is stopped | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -404,7 +566,19 @@ */ | ||
/** | ||
* A callback function to be called when scan is started | ||
* | ||
* @callback getNetConfigCallback | ||
* @param {Object} info - An JSON object with the following information: | ||
* { | ||
* deviceIPAddress, | ||
* deviceMacAddress, | ||
* gatewayIPAddress, | ||
* gatewayMacAddress | ||
* } | ||
*/ | ||
/** | ||
* Get network information, e.g Gateway Ip/Mac Device Mac/Ip etc | ||
* | ||
* @param {function} successCB | ||
* @param {getNetConfigCallback} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -418,7 +592,18 @@ */ | ||
/** | ||
* Callback which provides the connection information. | ||
* | ||
* @callback getConnectionInfoCallback | ||
* @param {Object} info - An JSON object with the following information: | ||
* { | ||
* SSID, | ||
* linkSpeed, | ||
* IPAddress | ||
* } | ||
*/ | ||
/** | ||
* Get current connection information, e.g SSID, linkSpeed,IPAddress etc | ||
* | ||
* @param {function} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* @param {getConnectionInfoCallback} successCB | ||
* A callback function with the connection details. | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -432,2 +617,18 @@ */ | ||
/** | ||
* Callback which provides the ping information. | ||
* | ||
* @callback pingHostCallback | ||
* @param {Object} info - An JSON object with the following information: | ||
* { | ||
* requestTimeout, | ||
* stat: { | ||
* requestTimeout, | ||
* time, | ||
* min, | ||
* max, | ||
* stddev | ||
* } | ||
* } | ||
*/ | ||
/** | ||
* Ping a host | ||
@@ -437,5 +638,5 @@ * | ||
* host IP | ||
* @param {function} successCB | ||
* @param {pingHostCallback} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -477,2 +678,8 @@ */ | ||
/** | ||
* A callback function to be called with all information | ||
* | ||
* @callback getMacAddressOfHostCallback | ||
* @param {String} info - the MAC address | ||
*/ | ||
/** | ||
* Get MAC address of host | ||
@@ -482,5 +689,5 @@ * | ||
* host IP | ||
* @param {function} successCB | ||
* @param {getMacAddressOfHost} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -494,2 +701,8 @@ */ | ||
/** | ||
* A callback function to be called with DNS details | ||
* | ||
* @callback isDnsLiveCallback | ||
* @param {boolean} isDnsLive, true if device is DNS is live, otherwise false | ||
*/ | ||
/** | ||
* dnsLive | ||
@@ -500,4 +713,4 @@ * | ||
* @param {function} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* A callback function to be called with the result | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -517,9 +730,15 @@ */ | ||
/** | ||
* portLive | ||
* A callback function to be called with DNS details | ||
* | ||
* @callback isPortLiveCallback | ||
* @param {boolean} isPortLive, true if device is port is available, otherwise false | ||
*/ | ||
/** | ||
* is port available | ||
* | ||
* @param {string} ip | ||
* host IP | ||
* @param {function} successCB | ||
* @param {isPortLiveCallback} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -537,7 +756,13 @@ */ | ||
/** | ||
* A callback function to be called with Rooted information | ||
* | ||
* @callback isRootedCallback | ||
* @param {boolean} isRooted, true if device is port is available, otherwise false | ||
*/ | ||
/** | ||
* Check Device is Rooted | ||
* | ||
* @param {function} successCB | ||
* @param {isRootedCallback} successCB | ||
* A callback function to be called with all information | ||
* @param {Object} errorCB | ||
* @param {errorCallback} errorCB | ||
* An error callback | ||
@@ -544,0 +769,0 @@ */ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
156
131529
37
9445804
5
3