Class WiFiAP

Definition

Namespace:
Tizen.Network.WiFi
Assembly:
Tizen.Network.WiFi.dll
API Level:
3

A class for managing the network information of the access point (AP).

C#
Copy
public class WiFiAP : IDisposable
Inheritance
System.Object
WiFiAP
Implements
System.IDisposable

Constructors

View Source

WiFiAP(String)

Creates an object for the access point.

Declaration
C#
Copy
public WiFiAP(string essid)
Parameters
Type Name Description
System.String essid

The Extended Service Set Identifier of the access point.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ArgumentNullException

Thrown when the ESSID is passed as null.

System.ArgumentException

Thrown when the method failed due to an invalid parameter.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

WiFiAP(String, Boolean)

Creates an object for the hidden access point.

Declaration
C#
Copy
public WiFiAP(string essid, bool hidden)
Parameters
Type Name Description
System.String essid

The Extended Service Set Identifier of the access point.

System.Boolean hidden

The value to set a hidden AP.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ArgumentNullException

Thrown when the ESSID is passed as null.

System.ArgumentException

Thrown when the method failed due to an invalid parameter.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi

Properties

View Source

NetworkInformation

The network information of the access point (AP).

Declaration
C#
Copy
public WiFiNetwork NetworkInformation { get; }
Property Value
Type Description
WiFiNetwork

The WiFiNetwork instance containing the network information of the AP.

API Level: 3
View Source

SecurityInformation

The security information of the access point (AP).

Declaration
C#
Copy
public WiFiSecurity SecurityInformation { get; }
Property Value
Type Description
WiFiSecurity

The WiFiSecurity instance containing security information of the AP.

API Level: 3

Methods

View Source

CancelWps()

Stops ongoing WPS provisioning

Declaration
C#
Copy
public static void CancelWps()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 5
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

ConnectAsync()

Connects the access point asynchronously.

Declaration
C#
Copy
public Task ConnectAsync()
Returns
Type Description
System.Threading.Tasks.Task

A task indicating whether the connect method is done or not.

Remarks

This method must be called from MainThread.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

NowInProgressException

Thrown when the Wi-Fi connection is now in progress.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

InvalidKeyException

Thrown when the key is wrong.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

ConnectWpsAsync(WpsInfo)

Connects the access point with the WPS asynchronously.

Declaration
C#
Copy
public Task ConnectWpsAsync(WpsInfo info)
Parameters
Type Name Description
WpsInfo info

A WpsInfo instance which is type of WpsPbcInfo or WpsPinInfo.

Returns
Type Description
System.Threading.Tasks.Task

A task indicating whether the ConnectWps method is done or not.

Remarks

This method must be called from MainThread.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

ArgumentNullException

Thrown when the WpsPinInfo object is constructed with a null pin.

System.ArgumentOutOfRangeException

Thrown when the WpsPinInfo object is constructed with a pin which is an empty string or more than 7 characters.

OutOfMemoryException

Thrown when the system is out of memory.

System.ArgumentException

Thrown when the method failed due to an invalid parameter.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

NowInProgressException

Thrown when the Wi-Fi connection is now in progress.

System.TimeoutException

Thrown when the timeout of WPS connection is expired.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profilehttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

ConnectWpsWithoutSsidAsync(WpsInfo)

Connects the access point with WPS without SSID asynchronously.

Declaration
C#
Copy
public static Task<WiFiAP> ConnectWpsWithoutSsidAsync(WpsInfo info)
Parameters
Type Name Description
WpsInfo info

A WpsInfo instance which is of type WpsPbcInfo or WpsPinInfo.

Returns
Type Description
System.Threading.Tasks.Task<WiFiAP>

A task which contains Connected access point information.

Remarks

If WpsPinInfo is used, its object has to be constructed with a pin which must be 4 or 8 characters long. \n This method must be called from MainThread.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ArgumentNullException

Thrown when the WpsPinInfo object is constructed with a null pin.

System.ArgumentOutOfRangeException

Thrown when the WpsPinInfo object is constructed with a pin which is not of 4 or 8 characters long.

OutOfMemoryException

Thrown when the system is out of memory.

System.ArgumentException

Thrown when the method failed due to an invalid parameter.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

NowInProgressException

Thrown when the Wi-Fi connection is now in progress.

System.TimeoutException

Thrown when the timeout of WPS connection is expired.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.gethttp://tizen.org/privilege/network.profile
Feature: http://tizen.org/feature/network.wifi
View Source

DisconnectAsync()

Disconnects the access point asynchronously.

Declaration
C#
Copy
public Task DisconnectAsync()
Returns
Type Description
System.Threading.Tasks.Task

A task indicating whether the disconnect method is done or not.

Remarks

This method must be called from MainThread.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.sethttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

Dispose()

A method to destroy the managed WiFiAP objects.

Declaration
C#
Copy
public void Dispose()
API Level: 3
View Source

Finalize()

Destroy the WiFiAP object

Declaration
C#
Copy
protected void Finalize()
View Source

ForgetAP()

Deletes the information of a stored access point and disconnects it when the AP is connected. If an AP is connected, then the connection information will be stored. This information is used when a connection to that AP is established automatically.

Declaration
C#
Copy
public void ForgetAP()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profilehttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

ForgetAPAsync()

Deletes the information of a stored access point and disconnects it when the AP is connected asyncronously. If an AP is connected, then the connection information will be stored. This information is used when a connection to that AP is established automatically.

Declaration
C#
Copy
public Task ForgetAPAsync()
Returns
Type Description
System.Threading.Tasks.Task

A task indicating whether the disconnect method is done or not.

Remarks

This method must be called from MainThread.

Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 5
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profilehttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

Refresh()

Refreshes the access point information.

Declaration
C#
Copy
public void Refresh()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 3
Privilege Level: public
Privilege: http://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi
View Source

Update()

Update the information of a stored access point. When a AP information is changed, the change will not be applied until this method is called.

Declaration
C#
Copy
public void Update()
Exceptions
Type Condition
System.NotSupportedException

Thrown when the Wi-Fi is not supported.

UnauthorizedAccessException

Thrown when permission is denied.

ObjectDisposedException

Thrown when the object instance is disposed or released.

OutOfMemoryException

Thrown when the system is out of memory.

InvalidOperationException

Thrown when the method failed due to an invalid operation.

API Level: 5
Privilege Level: public
Privilege: http://tizen.org/privilege/network.profilehttp://tizen.org/privilege/network.get
Feature: http://tizen.org/feature/network.wifi

Implements

System.IDisposable