Class WiFiAP
Definition
- Assembly:
- Tizen.Network.WiFi.dll
A class for managing the network information of the access point (AP).
C#Copypublic class WiFiAP : IDisposable
- Inheritance
-
objectWiFiAP
- Implements
-
System.IDisposable
Constructors
Declaration
C#Copypublic WiFiAP(string essid, bool hidden)
Parameters
Type | Name | Description |
---|---|---|
string | essid | The Extended Service Set Identifier of the access point. |
bool | hidden | The value to set a hidden AP. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ArgumentNullException | Thrown when the ESSID is passed as null. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
Declaration
C#Copypublic WiFiAP(string essid)
Parameters
Type | Name | Description |
---|---|---|
string | essid | The Extended Service Set Identifier of the access point. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ArgumentNullException | Thrown when the ESSID is passed as null. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
Properties
Declaration
C#Copypublic WiFiNetwork NetworkInformation { get; }
Property Value
Type | Description |
---|---|
WiFiNetwork | The WiFiNetwork instance containing the network information of the AP. |
Declaration
C#Copypublic WiFiSecurity SecurityInformation { get; }
Property Value
Type | Description |
---|---|
WiFiSecurity | The WiFiSecurity instance containing security information of the AP. |
Methods
Declaration
C#Copypublic static void CancelWps()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
Declaration
C#Copypublic 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. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
InvalidKeyException | Thrown when the key is wrong. |
Declaration
C#Copypublic 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. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.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. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.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. |
ConnectWpsWithoutSsidAsync(WpsInfo)
Connects the access point with WPS without SSID asynchronously.
Declaration
C#Copypublic 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<TResult><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. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.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. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.ArgumentException | Thrown when the method failed due to an invalid parameter. |
System.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. |
Declaration
C#Copypublic 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. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
Declaration
C#Copypublic void Dispose()
Declaration
C#Copyprotected ~WiFiAP()
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#Copypublic void ForgetAP()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
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#Copypublic 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. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
Declaration
C#Copypublic void Refresh()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |
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#Copypublic void Update()
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | Thrown when the Wi-Fi is not supported. |
System.UnauthorizedAccessException | Thrown when permission is denied. |
System.ObjectDisposedException | Thrown when the object instance is disposed or released. |
System.OutOfMemoryException | Thrown when the system is out of memory. |
System.InvalidOperationException | Thrown when the method failed due to an invalid operation. |