Name: csapi-network-wifi
Summary: Tizen Wi-Fi API for C#
-Version: 1.0.4
+Version: 1.0.5
Release: 1
Group: Development/Libraries
License: Apache-2.0
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_deactivate")]
internal static extern int Deactivate(IntPtr wifi, VoidCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_is_activated")]
- internal static extern int IsActivated(IntPtr wifi, out bool activated);
+ internal static extern int IsActive(IntPtr wifi, out bool activated);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_get_mac_address")]
internal static extern int GetMacAddress(IntPtr wifi, out string macAddress);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_get_network_interface_name")]
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_scan")]
internal static extern int Scan(IntPtr wifi, VoidCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_scan_specific_ap")]
- internal static extern int ScanSpecificAp(IntPtr wifi, string essid, VoidCallback callback, IntPtr userData);
+ internal static extern int ScanSpecificAP(IntPtr wifi, string essid, VoidCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_get_connected_ap")]
- internal static extern int GetConnectedAp(IntPtr wifi, out IntPtr ap);
+ internal static extern int GetConnectedAP(IntPtr wifi, out IntPtr ap);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_foreach_found_ap")]
- internal static extern int GetForeachFoundAps(IntPtr wifi, HandleCallback callback, IntPtr userData);
+ internal static extern int GetForeachFoundAPs(IntPtr wifi, HandleCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_foreach_found_specific_ap")]
- internal static extern int GetForeachFoundSpecificAps(IntPtr wifi, HandleCallback callback, IntPtr userData);
+ internal static extern int GetForeachFoundSpecificAPs(IntPtr wifi, HandleCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_connect")]
internal static extern int Connect(IntPtr wifi, IntPtr ap, VoidCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_disconnect")]
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_connect_by_wps_pin")]
internal static extern int ConnectByWpsPin(IntPtr wifi, IntPtr ap, string pin, VoidCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_forget_ap")]
- internal static extern int RemoveAp(IntPtr wifi, IntPtr ap);
+ internal static extern int RemoveAP(IntPtr wifi, IntPtr ap);
//Wi-Fi Monitor
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_get_connection_state")]
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_unset_rssi_level_changed_cb")]
internal static extern int UnsetRssiLevelchangedCallback(IntPtr wifi);
- internal static class Ap
+ internal static class AP
{
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_create")]
internal static extern int Create(IntPtr wifi, string essid, out IntPtr ap);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_hidden_create")]
- internal static extern int CreateHiddenAp(IntPtr wifi, string essid, out IntPtr ap);
+ internal static extern int CreateHiddenAP(IntPtr wifi, string essid, out IntPtr ap);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_destroy")]
internal static extern int Destroy(IntPtr ap);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_clone")]
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_get_connection_state")]
internal static extern int GetConnectionState(IntPtr ap, out int connectionState);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_get_ip_config_type")]
- internal static extern int GetIpConfigType(IntPtr ap, int addressFamily, out int ipConfigType);
+ internal static extern int GetIPConfigType(IntPtr ap, int addressFamily, out int ipConfigType);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_set_ip_config_type")]
- internal static extern int SetIpConfigType(IntPtr ap, int addressFamily, int ipConfigType);
+ internal static extern int SetIPConfigType(IntPtr ap, int addressFamily, int ipConfigType);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_get_ip_address")]
- internal static extern int GetIpAddress(IntPtr ap, int addressFamily, out IntPtr ipAddress);
+ internal static extern int GetIPAddress(IntPtr ap, int addressFamily, out IntPtr ipAddress);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_set_ip_address")]
- internal static extern int SetIpAddress(IntPtr ap, int addressFamily, string ipAddress);
+ internal static extern int SetIPAddress(IntPtr ap, int addressFamily, string ipAddress);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_get_subnet_mask")]
internal static extern int GetSubnetMask(IntPtr ap, int addressFamily, out IntPtr subnetMask);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_ap_set_subnet_mask")]
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_config_get_proxy_address")]
internal static extern int GetProxyAddress(IntPtr config, out int addressFamily, out IntPtr proxyAddress);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_config_set_hidden_ap_property")]
- internal static extern int SetHiddenApProperty(IntPtr config, bool isHidden);
+ internal static extern int SetHiddenAPProperty(IntPtr config, bool isHidden);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_config_get_hidden_ap_property")]
- internal static extern int GetHiddenApProperty(IntPtr config, out bool isHidden);
+ internal static extern int GetHiddenAPProperty(IntPtr config, out bool isHidden);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_config_get_eap_anonymous_identity")]
internal static extern int GetEapAnonymousIdentity(IntPtr config, out IntPtr anonymousIdentify);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_config_set_eap_anonymous_identity")]
public class ConnectionStateChangedEventArgs : EventArgs
{
private WiFiConnectionState _state = WiFiConnectionState.Disconnected;
- private WiFiAp _ap;
+ private WiFiAP _ap;
internal ConnectionStateChangedEventArgs(WiFiConnectionState s, IntPtr _apHandle)
{
_state = s;
- _ap = new WiFiAp(_apHandle);
+ _ap = new WiFiAP(_apHandle);
}
/// <summary>
/// The wifi connection state.
/// <summary>
/// The access point
/// </summary>
- public WiFiAp Ap
+ public WiFiAP AP
{
get
{
namespace Tizen.Network.WiFi
{
/// <summary>
- /// A class for manager the network information of the access point(AP). It allows applications to manager netowrk informaiton.
+ /// A class for manager the network information of the access point(AP). It allows applications to manager network informaiton.
/// </summary>
- public class WiFiAp : IDisposable
+ public class WiFiAP : IDisposable
{
private IntPtr _apHandle = IntPtr.Zero;
private WiFiNetwork _network;
private bool disposed = false;
/// <summary>
- /// The network information of the acces point(AP).
+ /// The network information of the access point(AP).
/// </summary>
public WiFiNetwork NetworkInformation
{
}
}
- internal WiFiAp(IntPtr handle)
+ internal WiFiAP(IntPtr handle)
{
- Log.Debug(Globals.LogTag, "New WiFiAp. Handle: " + handle);
+ Log.Debug(Globals.LogTag, "New WiFiAP. Handle: " + handle);
_apHandle = handle;
Initialize();
}
/// Creates a object for the access point.
/// </summary>
/// <param name="essid">The ESSID (Extended Service Set Identifier) can be UTF-8 encoded </param>
- public WiFiAp(string essid)
+ public WiFiAP(string essid)
{
- Log.Debug(Globals.LogTag, "New WiFiAp. Essid: " + essid);
+ Log.Debug(Globals.LogTag, "New WiFiAP. Essid: " + essid);
createHandle(essid, true);
Initialize();
}
/// </summary>
/// <param name="essid">The ESSID (Extended Service Set Identifier) can be UTF-8 encoded </param>
/// <param name="hidden">The value to set hidden AP</param>
- public WiFiAp(string essid, bool hidden)
+ public WiFiAP(string essid, bool hidden)
{
createHandle(essid, hidden);
Initialize();
}
- ~WiFiAp()
+ ~WiFiAP()
{
Dispose(false);
}
{
_network.Dispose();
_security.Dispose();
- Interop.WiFi.Ap.Destroy(_apHandle);
+ Interop.WiFi.AP.Destroy(_apHandle);
_apHandle = IntPtr.Zero;
}
disposed = true;
int ret = -1;
if (hidden)
{
- ret = Interop.WiFi.Ap.Create(WiFiManagerImpl.Instance.GetHandle(), id, out _apHandle);
+ ret = Interop.WiFi.AP.Create(WiFiManagerImpl.Instance.GetHandle(), id, out _apHandle);
}
else
{
- ret = Interop.WiFi.Ap.CreateHiddenAp(WiFiManagerImpl.Instance.GetHandle(), id, out _apHandle);
+ ret = Interop.WiFi.AP.CreateHiddenAP(WiFiManagerImpl.Instance.GetHandle(), id, out _apHandle);
}
if (ret != (int)WiFiError.None)
/// </summary>
public void Refresh()
{
- int ret = Interop.WiFi.Ap.Refresh(_apHandle);
+ int ret = Interop.WiFi.AP.Refresh(_apHandle);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to refresh ap handle, Error - " + (WiFiError)ret);
get
{
IntPtr addrPtr;
- int ret = Interop.WiFi.Ap.GetDnsAddress(_handle, 1, (int)_family, out addrPtr);
+ int ret = Interop.WiFi.AP.GetDnsAddress(_handle, 1, (int)_family, out addrPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get first dns address, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetDnsAddress(_handle, 1, (int)_family, value.ToString());
+ int ret = Interop.WiFi.AP.SetDnsAddress(_handle, 1, (int)_family, value.ToString());
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set first dns address, Error - " + (WiFiError)ret);
get
{
IntPtr addrPtr;
- int ret = Interop.WiFi.Ap.GetDnsAddress(_handle, 2, (int)_family, out addrPtr);
+ int ret = Interop.WiFi.AP.GetDnsAddress(_handle, 2, (int)_family, out addrPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get second dns address, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetDnsAddress(_handle, 2, (int)_family, value.ToString());
+ int ret = Interop.WiFi.AP.SetDnsAddress(_handle, 2, (int)_family, value.ToString());
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set second dns address, Error - " + (WiFiError)ret);
get
{
IntPtr addrPtr;
- int ret = Interop.WiFi.Ap.GetGatewayAddress(_handle, (int)_family, out addrPtr);
+ int ret = Interop.WiFi.AP.GetGatewayAddress(_handle, (int)_family, out addrPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get gateway address, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetGatewayAddress(_handle, (int)_family, value.ToString());
+ int ret = Interop.WiFi.AP.SetGatewayAddress(_handle, (int)_family, value.ToString());
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set gateway address, Error - " + (WiFiError)ret);
get
{
IntPtr addrPtr;
- int ret = Interop.WiFi.Ap.GetSubnetMask(_handle, (int)_family, out addrPtr);
+ int ret = Interop.WiFi.AP.GetSubnetMask(_handle, (int)_family, out addrPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get subnet mask, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetSubnetMask(_handle, (int)_family, value.ToString());
+ int ret = Interop.WiFi.AP.SetSubnetMask(_handle, (int)_family, value.ToString());
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set subnet mask, Error - " + (WiFiError)ret);
}
}
}
- public System.Net.IPAddress Ip
+ public System.Net.IPAddress IP
{
get
{
IntPtr addrPtr;
- int ret = Interop.WiFi.Ap.GetIpAddress(_handle, (int)_family, out addrPtr);
+ int ret = Interop.WiFi.AP.GetIPAddress(_handle, (int)_family, out addrPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get ip address, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetIpAddress(_handle, (int)_family, value.ToString());
+ int ret = Interop.WiFi.AP.SetIPAddress(_handle, (int)_family, value.ToString());
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set ip address, Error - " + (WiFiError)ret);
}
}
}
- public IpConfigType IpConfigType
+ public IPConfigType IPConfigType
{
get
{
int type;
- int ret = Interop.WiFi.Ap.GetIpConfigType(_handle, (int)_family, out type);
+ int ret = Interop.WiFi.AP.GetIPConfigType(_handle, (int)_family, out type);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get ip config type, Error - " + (WiFiError)ret);
}
- return (IpConfigType)type;
+ return (IPConfigType)type;
}
set
{
- int ret = Interop.WiFi.Ap.SetIpConfigType(_handle, (int)_family, (int)value);
+ int ret = Interop.WiFi.AP.SetIPConfigType(_handle, (int)_family, (int)value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set ip config type, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Config.SetProxyAddress(_configHandle, (int)AddressFamily.Ipv4, value);
+ int ret = Interop.WiFi.Config.SetProxyAddress(_configHandle, (int)AddressFamily.IPv4, value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set proxy address, Error - " + (WiFiError)ret);
get
{
bool hidden;
- int ret = Interop.WiFi.Config.GetHiddenApProperty(_configHandle, out hidden);
+ int ret = Interop.WiFi.Config.GetHiddenAPProperty(_configHandle, out hidden);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get isHidden, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Config.SetHiddenApProperty(_configHandle, value);
+ int ret = Interop.WiFi.Config.SetHiddenAPProperty(_configHandle, value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set IsHidden, Error - " + (WiFiError)ret);
get
{
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetEapCaCertFile(_apHandle, out strPtr);
+ int ret = Interop.WiFi.AP.GetEapCaCertFile(_apHandle, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get caCertFile, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetEapCaCertFile(_apHandle, value);
+ int ret = Interop.WiFi.AP.SetEapCaCertFile(_apHandle, value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set caCertFile, Error - " + (WiFiError)ret);
get
{
int type;
- int ret = Interop.WiFi.Ap.GetEapType(_apHandle, out type);
+ int ret = Interop.WiFi.AP.GetEapType(_apHandle, out type);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get eap type, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetEapType(_apHandle, (int)value);
+ int ret = Interop.WiFi.AP.SetEapType(_apHandle, (int)value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set eap type, Error - " + (WiFiError)ret);
get
{
int type;
- int ret = Interop.WiFi.Ap.GetEapAuthType(_apHandle, out type);
+ int ret = Interop.WiFi.AP.GetEapAuthType(_apHandle, out type);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get auth type, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetEapAuthType(_apHandle, (int)value);
+ int ret = Interop.WiFi.AP.SetEapAuthType(_apHandle, (int)value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set eap auth type, Error - " + (WiFiError)ret);
public string GetPrivateKeyFile()
{
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetEapPrivateKeyFile(_apHandle, out strPtr);
+ int ret = Interop.WiFi.AP.GetEapPrivateKeyFile(_apHandle, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get private key file, Error - " + (WiFiError)ret);
/// <param name="password">The password.</param>
public void SetPrivateKeyInfo(string privateKeyFile, string password)
{
- int ret = Interop.WiFi.Ap.SetEapPrivateKeyInfo(_apHandle, privateKeyFile, password);
+ int ret = Interop.WiFi.AP.SetEapPrivateKeyInfo(_apHandle, privateKeyFile, password);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set private key info, Error - " + (WiFiError)ret);
public string GetClientCertFile()
{
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetEapClientCertFile(_apHandle, out strPtr);
+ int ret = Interop.WiFi.AP.GetEapClientCertFile(_apHandle, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get client cert file, Error - " + (WiFiError)ret);
/// <param name="clientCertFile">The file path of Client Certificate.</param>
public void SetClientCertFile(string clientCertFile)
{
- int ret = Interop.WiFi.Ap.SetEapClientCertFile(_apHandle, clientCertFile);
+ int ret = Interop.WiFi.AP.SetEapClientCertFile(_apHandle, clientCertFile);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set client cert file, Error - " + (WiFiError)ret);
{
IntPtr strptr;
bool passwordSet;
- int ret = Interop.WiFi.Ap.GetEapPassphrase(_apHandle, out strptr, out passwordSet);
+ int ret = Interop.WiFi.AP.GetEapPassphrase(_apHandle, out strptr, out passwordSet);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get user name in eap passphrase, Error - " + (WiFiError)ret);
{
IntPtr strptr;
bool passwordSet;
- int ret = Interop.WiFi.Ap.GetEapPassphrase(_apHandle, out strptr, out passwordSet);
+ int ret = Interop.WiFi.AP.GetEapPassphrase(_apHandle, out strptr, out passwordSet);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get IsPasswordSet in passphrase, Error - " + (WiFiError)ret);
/// <param name="password">The password</param>
public void SetEapPassphrase(string userName, string password)
{
- int ret = Interop.WiFi.Ap.SetEapPassphrase(_apHandle, userName, password);
+ int ret = Interop.WiFi.AP.SetEapPassphrase(_apHandle, userName, password);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set passphrase, Error - " + (WiFiError)ret);
/// <summary>
/// A property to Check whether Wi-Fi is activated.
/// </summary>
- static public bool IsActivated
+ static public bool IsActive
{
get
{
- return WiFiManagerImpl.Instance.IsActivated;
+ return WiFiManagerImpl.Instance.IsActive;
}
}
/// <summary>
/// Gets the result of the scan asynchronously.
/// </summary>
- /// <returns> A task contains the lisf for WiFiApInformation objects.</returns>
- static public IEnumerable<WiFiAp> GetFoundAps()
+ /// <returns> A task contains the lisf for WiFiAPInformation objects.</returns>
+ static public IEnumerable<WiFiAP> GetFoundAPs()
{
- return WiFiManagerImpl.Instance.GetFoundAps();
+ return WiFiManagerImpl.Instance.GetFoundAPs();
}
/// <summary>
/// Gets the result of specific ap scan asynchronously.
/// </summary>
- /// <returns> A task contains the WiFiApInformation object.</returns>
- static public IEnumerable<WiFiAp> GetFoundSpecificAps()
+ /// <returns> A task contains the WiFiAPInformation object.</returns>
+ static public IEnumerable<WiFiAP> GetFoundSpecificAPs()
{
- return WiFiManagerImpl.Instance.GetFoundSpecificAps();
+ return WiFiManagerImpl.Instance.GetFoundSpecificAPs();
}
/// <summary>
/// Gets the list of wifi configuration.
/// Gets the handle of the connected access point.
/// </summary>
/// <returns> The connected wifi access point(AP) information.</returns>
- static public WiFiAp GetConnectedAp()
+ static public WiFiAP GetConnectedAP()
{
- return WiFiManagerImpl.Instance.GetConnectedAp();
+ return WiFiManagerImpl.Instance.GetConnectedAP();
}
/// <summary>
/// Deletes the information of stored access point and disconnects it when it connected.<br>
/// If an AP is connected, then connection information will be stored. This information is used when a connection to that AP is established automatically.
/// </summary>
/// <param name="ap">The access point to be removed</param>
- static public void RemoveAP(WiFiAp ap)
+ static public void RemoveAP(WiFiAP ap)
{
- WiFiManagerImpl.Instance.RemoveAp(ap);
+ WiFiManagerImpl.Instance.RemoveAP(ap);
}
/// <summary>
/// Activates Wi-Fi asynchronously.
/// <summary>
/// Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected.
/// </summary>
- /// <returns> A task indicates whether the ActivateWithPickerTeated method is done or not.</returns>
- static public Task ActivateWithPickerTeatedAsync()
+ /// <returns> A task indicates whether the ActivateWithPickerTested method is done or not.</returns>
+ static public Task ActivateWithPickerTestedAsync()
{
return WiFiManagerImpl.Instance.ActivateWithWiFiPickerTestedAsync();
}
/// <summary>
/// Starts specific ap scan, asynchronously.
/// </summary>
- /// <returns> A task contains WiFiApInformation object.</returns>
+ /// <returns> A task contains WiFiAPInformation object.</returns>
/// <param name="essid">The essid of hidden ap</param>
- static public Task ScanSpecificApAsync(string essid)
+ static public Task ScanSpecificAPAsync(string essid)
{
- return WiFiManagerImpl.Instance.ScanSpecificApAsync(essid);
+ return WiFiManagerImpl.Instance.ScanSpecificAPAsync(essid);
}
/// <summary>
/// Connects the access point asynchronously.
/// </summary>
/// <param name="ap">The access point</param>
/// <returns> A task indicates whether the Connect method is done or not.</returns>
- static public Task ConnectAsync(WiFiAp ap)
+ static public Task ConnectAsync(WiFiAP ap)
{
return WiFiManagerImpl.Instance.ConnectAsync(ap);
}
/// </summary>
/// <returns> A task indicates whether the ConnectByWpsPbs method is done or not.</returns>
/// <param name="ap">The access point(AP)</param>
- static public Task ConnectByWpsPbcAsync(WiFiAp ap)
+ static public Task ConnectByWpsPbcAsync(WiFiAP ap)
{
return WiFiManagerImpl.Instance.ConnectByWpsPbcAsync(ap);
}
/// <returns> A task indicates whether the ConnectByWpsPin method is done or not.</returns>
/// <param name="ap">The access point(AP)</param>
/// <param name="pin">The WPS PIN is a non-NULL string with length greater than 0 and less than or equal to 8.</param>
- static public Task ConnectByWpsPinAsync(WiFiAp ap, string pin)
+ static public Task ConnectByWpsPinAsync(WiFiAP ap, string pin)
{
Log.Debug(Globals.LogTag, "ConnectByWpsPinAsync");
return WiFiManagerImpl.Instance.ConnectByWpsPinAsync(ap, pin);
/// Disconnects the access point asynchronously.
/// </summary>
/// <returns> A task indicates whether the Disconnect method is done or not.</returns>
- static public Task DisconnectAsync(WiFiAp ap)
+ static public Task DisconnectAsync(WiFiAP ap)
{
return WiFiManagerImpl.Instance.DisconnectAsync(ap);
}
return (WiFiConnectionState)state;
}
}
- internal bool IsActivated
+ internal bool IsActive
{
get
{
bool active;
- int ret = Interop.WiFi.IsActivated(GetHandle(), out active);
+ int ret = Interop.WiFi.IsActive(GetHandle(), out active);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get isActive, Error - " + (WiFiError)ret);
}
}
- internal IEnumerable<WiFiAp> GetFoundAps()
+ internal IEnumerable<WiFiAP> GetFoundAPs()
{
- List<WiFiAp> apList = new List<WiFiAp>();
+ List<WiFiAP> apList = new List<WiFiAP>();
Interop.WiFi.HandleCallback callback = (IntPtr apHandle, IntPtr userData) =>
{
if (apHandle != IntPtr.Zero)
{
IntPtr clonedHandle;
- Interop.WiFi.Ap.Clone(out clonedHandle, apHandle);
- WiFiAp apItem = new WiFiAp(clonedHandle);
+ Interop.WiFi.AP.Clone(out clonedHandle, apHandle);
+ WiFiAP apItem = new WiFiAP(clonedHandle);
apList.Add(apItem);
return true;
}
return false;
};
- int ret = Interop.WiFi.GetForeachFoundAps(GetHandle(), callback, IntPtr.Zero);
+ int ret = Interop.WiFi.GetForeachFoundAPs(GetHandle(), callback, IntPtr.Zero);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get all APs, Error - " + (WiFiError)ret);
return apList;
}
- internal IEnumerable<WiFiAp> GetFoundSpecificAps()
+ internal IEnumerable<WiFiAP> GetFoundSpecificAPs()
{
- List<WiFiAp> apList = new List<WiFiAp>();
+ List<WiFiAP> apList = new List<WiFiAP>();
Interop.WiFi.HandleCallback callback = (IntPtr apHandle, IntPtr userData) =>
{
if (apHandle != IntPtr.Zero)
{
IntPtr clonedHandle;
- Interop.WiFi.Ap.Clone(out clonedHandle, apHandle);
- WiFiAp apItem = new WiFiAp(clonedHandle);
+ Interop.WiFi.AP.Clone(out clonedHandle, apHandle);
+ WiFiAP apItem = new WiFiAP(clonedHandle);
apList.Add(apItem);
return true;
}
};
- int ret = Interop.WiFi.GetForeachFoundSpecificAps(GetHandle(), callback, IntPtr.Zero);
+ int ret = Interop.WiFi.GetForeachFoundSpecificAPs(GetHandle(), callback, IntPtr.Zero);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get specific APs, Error - " + (WiFiError)ret);
}
}
- internal WiFiAp GetConnectedAp()
+ internal WiFiAP GetConnectedAP()
{
IntPtr apHandle;
- int ret = Interop.WiFi.GetConnectedAp(GetHandle(), out apHandle);
+ int ret = Interop.WiFi.GetConnectedAP(GetHandle(), out apHandle);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to connect with AP, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret);
}
- WiFiAp ap = new WiFiAp(apHandle);
+ WiFiAP ap = new WiFiAP(apHandle);
return ap;
}
- internal void RemoveAp(WiFiAp ap)
+ internal void RemoveAP(WiFiAP ap)
{
IntPtr apHandle = ap.GetHandle();
- int ret = Interop.WiFi.RemoveAp(GetHandle(), apHandle);
+ int ret = Interop.WiFi.RemoveAP(GetHandle(), apHandle);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to remove with AP, Error - " + (WiFiError)ret);
return task.Task;
}
- internal Task ScanSpecificApAsync(string essid)
+ internal Task ScanSpecificAPAsync(string essid)
{
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
}
};
}
- int ret = Interop.WiFi.ScanSpecificAp(GetHandle(), essid, _callback_map[id], id);
+ int ret = Interop.WiFi.ScanSpecificAP(GetHandle(), essid, _callback_map[id], id);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to scan with specific AP, Error - " + (WiFiError)ret);
return task.Task;
}
- internal Task ConnectAsync(WiFiAp ap)
+ internal Task ConnectAsync(WiFiAP ap)
{
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
return task.Task;
}
- internal Task DisconnectAsync(WiFiAp ap)
+ internal Task DisconnectAsync(WiFiAP ap)
{
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
return task.Task;
}
- internal Task ConnectByWpsPbcAsync(WiFiAp ap)
+ internal Task ConnectByWpsPbcAsync(WiFiAP ap)
{
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
return task.Task;
}
- internal Task ConnectByWpsPinAsync(WiFiAp ap, string pin)
+ internal Task ConnectByWpsPinAsync(WiFiAP ap, string pin)
{
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
if (string.IsNullOrEmpty(_essid))
{
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetEssid(_apHandle, out strPtr);
+ int ret = Interop.WiFi.AP.GetEssid(_apHandle, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get essid, Error - " + (WiFiError)ret);
get
{
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetBssid(_apHandle, out strPtr);
+ int ret = Interop.WiFi.AP.GetBssid(_apHandle, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get bssid, Error - " + (WiFiError)ret);
}
}
/// <summary>
- /// The address informaiton for Ipv4.
+ /// The address informaiton for IPv4.
/// </summary>
- public IAddressInformation Ipv4Setting
+ public IAddressInformation IPv4Setting
{
get
{
}
}
/// <summary>
- /// The address ainformation for Ipv6.
+ /// The address ainformation for IPv6.
/// </summary>
- public IAddressInformation Ipv6Setting
+ public IAddressInformation IPv6Setting
{
get
{
get
{
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetProxyAddress(_apHandle, (int)AddressFamily.Ipv4, out strPtr);
+ int ret = Interop.WiFi.AP.GetProxyAddress(_apHandle, (int)AddressFamily.IPv4, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get proxy address, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetProxyAddress(_apHandle, (int)AddressFamily.Ipv4, value);
+ int ret = Interop.WiFi.AP.SetProxyAddress(_apHandle, (int)AddressFamily.IPv4, value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set proxy address, Error - " + (WiFiError)ret);
}
}
/// <summary>
- /// The proxy type(Ipv6).
+ /// The proxy type(IPv6).
/// </summary>
public WiFiProxyType ProxyType
{
get
{
int type;
- int ret = Interop.WiFi.Ap.GetProxyType(_apHandle, out type);
+ int ret = Interop.WiFi.AP.GetProxyType(_apHandle, out type);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get proxy type, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetProxyType(_apHandle, (int)value);
+ int ret = Interop.WiFi.AP.SetProxyType(_apHandle, (int)value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set proxy type, Error - " + (WiFiError)ret);
get
{
int freq;
- int ret = Interop.WiFi.Ap.GetFrequency(_apHandle, out freq);
+ int ret = Interop.WiFi.AP.GetFrequency(_apHandle, out freq);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get frequency, Error - " + (WiFiError)ret);
get
{
int rssi;
- int ret = Interop.WiFi.Ap.GetRssi(_apHandle, out rssi);
+ int ret = Interop.WiFi.AP.GetRssi(_apHandle, out rssi);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get rssi, Error - " + (WiFiError)ret);
get
{
int maxSpeed;
- int ret = Interop.WiFi.Ap.GetMaxSpeed(_apHandle, out maxSpeed);
+ int ret = Interop.WiFi.AP.GetMaxSpeed(_apHandle, out maxSpeed);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get max speed, Error - " + (WiFiError)ret);
get
{
bool isFavorite;
- int ret = Interop.WiFi.Ap.IsFavorite(_apHandle, out isFavorite);
+ int ret = Interop.WiFi.AP.IsFavorite(_apHandle, out isFavorite);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get favorite, Error - " + (WiFiError)ret);
{
bool isPasspoint;
Log.Debug(Globals.LogTag, "Handle: " + _apHandle);
- int ret = Interop.WiFi.Ap.IsPasspoint(_apHandle, out isPasspoint);
+ int ret = Interop.WiFi.AP.IsPasspoint(_apHandle, out isPasspoint);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get isPassport, Error - " + (WiFiError)ret);
get
{
int state;
- int ret = Interop.WiFi.Ap.GetConnectionState(_apHandle, out state);
+ int ret = Interop.WiFi.AP.GetConnectionState(_apHandle, out state);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get connection state, Error - " + (WiFiError)ret);
internal WiFiNetwork(IntPtr apHandle)
{
_apHandle = apHandle;
- _ipv4 = new WiFiAddressInformation(apHandle, AddressFamily.Ipv4);
- _ipv6 = new WiFiAddressInformation(apHandle, AddressFamily.Ipv6);
+ _ipv4 = new WiFiAddressInformation(apHandle, AddressFamily.IPv4);
+ _ipv6 = new WiFiAddressInformation(apHandle, AddressFamily.IPv6);
IntPtr strPtr;
- int ret = Interop.WiFi.Ap.GetEssid(_apHandle, out strPtr);
+ int ret = Interop.WiFi.AP.GetEssid(_apHandle, out strPtr);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get essid, Error - " + (WiFiError)ret);
get
{
int type;
- int ret = Interop.WiFi.Ap.GetSecurityType(_apHandle, out type);
+ int ret = Interop.WiFi.AP.GetSecurityType(_apHandle, out type);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get security type, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetSecurityType(_apHandle, (int)value);
+ int ret = Interop.WiFi.AP.SetSecurityType(_apHandle, (int)value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set security type, Error - " + (WiFiError)ret);
get
{
int type;
- int ret = Interop.WiFi.Ap.GetEncryptionType(_apHandle, out type);
+ int ret = Interop.WiFi.AP.GetEncryptionType(_apHandle, out type);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get encryption type, Error - " + (WiFiError)ret);
}
set
{
- int ret = Interop.WiFi.Ap.SetEncryptionType(_apHandle, (int)value);
+ int ret = Interop.WiFi.AP.SetEncryptionType(_apHandle, (int)value);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set encryption type, Error - " + (WiFiError)ret);
get
{
bool required;
- int ret = Interop.WiFi.Ap.IsPassphraseRequired(_apHandle, out required);
+ int ret = Interop.WiFi.AP.IsPassphraseRequired(_apHandle, out required);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get isPassportRequired, Error - " + (WiFiError)ret);
get
{
bool supported;
- int ret = Interop.WiFi.Ap.IsWpsSupported(_apHandle, out supported);
+ int ret = Interop.WiFi.AP.IsWpsSupported(_apHandle, out supported);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to get isWapSupported, Error - " + (WiFiError)ret);
/// </summary>
public void SetPassphrase(string passphrase)
{
- int ret = Interop.WiFi.Ap.SetPassphrase(_apHandle, passphrase);
+ int ret = Interop.WiFi.AP.SetPassphrase(_apHandle, passphrase);
if (ret != (int)WiFiError.None)
{
Log.Error(Globals.LogTag, "Failed to set passphrase, Error - " + (WiFiError)ret);