import"NetworkManagerPlugin.idl";
This is a class which implements global NetworkManager object.
void NetworkManager.addEventListener |
( |
[in] String |
event_name, |
|
|
[in] EventListener |
listener |
|
) |
| |
Adds DOM2 event listener for specified event.
Possible values are: event_name: "ipSettingsUpdatedEvent", listener: function that has arguments similar to the ipSettingsUpdatedEvent interface properties. event_name: "internetConnectionEvent", listener: function that has arguments similar to the internetConnectionEvent interface properties.
- Parameters
-
event_name | Name of the event. |
listener | javascript function that has arguments like the properties listed in the listener's interface. |
Boolean NetworkManager.checkInternetConnection |
( |
| ) |
|
This function checks internet connection.
- Returns
- If the connection is established, function will return True. If the connection is not established, function will return false
This function returns connected wifi network
- Returns
- Return wifi network
enumerations NetworkManager.getNetworkInterfaceType |
( |
[in] String |
mac_address | ) |
|
This function returns network interface type according to given mac id.
- Parameters
-
mac_address | Mac address of network interface. |
- Returns
- If type is wired ,returns WiredNetwork.If type is wireless return WirelessNetwork.
This function returns wifi scan results.
- Returns
- Return wifi network array
Boolean NetworkManager.joinWifiNetwork |
( |
[in] Integer |
id, |
|
|
[in] String |
password |
|
) |
| |
This function connects selected wifi network. The connection request returns false if wrong id or invalid password is given. In order to understand the connection is successful, ipSettingsUpdatedEvent with the valid IP address should be come afterwards.
- Parameters
-
id | ID of the wifi network. |
password | Password. |
- Returns
- If the connection is established, function will return True. If the connection is not established, function will return false
Boolean NetworkManager.joinWiredNetwork |
( |
| ) |
|
This function is used for connecting to wired network.
- Returns
- If there is a wired connection returns true, otherwise returns false.
void NetworkManager.removeEventListener |
( |
[in] String |
event_name, |
|
|
[in] EventListener |
listener |
|
) |
| |
Removes single DOM2 event listener for specified event
Possible values are: event_name: "ipSettingsUpdatedEvent", listener: function that has arguments similar to the ipSettingsUpdatedEvent interface properties. event_name: "internetConnectionEvent", listener: function that has arguments similar to the internetConnectionEvent interface properties.
- Parameters
-
event_name | Name of the event |
listener | named javascript function that has arguments like the properties listed in the listener's interface. |
void NetworkManager.removeEventListener |
( |
[in] String |
event_name | ) |
|
Boolean NetworkManager.startWifiNetworkScan |
( |
| ) |
|
This function enables wifi and starts scan. When the scan is completed scanCompletedEvent will be fired. Then Available Wi-Fi networks can be reached by calling getWifiScanResults function.
- Returns
- Returns true if wireless network scan is started succesfully. Otherwise function returns false.
const Integer NetworkManager.IPStateDisabled = 2 |
const Integer NetworkManager.IPStateDynamic = 0 |
const Integer NetworkManager.IPStateStatic = 1 |
const Integer NetworkManager.IPStateUnknown = -1 |
const Integer NetworkManager.Offline = 0 |
const Integer NetworkManager.Online = 1 |
const Integer NetworkManager.WiredNetwork = 0 |
const Integer NetworkManager.WirelessNetwork = 1 |
The documentation for this interface was generated from the following file: