/// </summary>
public void Refresh()
{
+ Log.Debug(Globals.LogTag, "Refresh");
int ret = Interop.WiFi.AP.Refresh(_apHandle);
if (ret != (int)WiFiError.None)
{
/// <returns> A task indicating whether the Connect method is done or not.</returns>
public Task ConnectAsync()
{
+ Log.Debug(Globals.LogTag, "ConnectAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
/// <returns> A task indicating whether the ConnectByWpsPbs method is done or not.</returns>
public Task ConnectByWpsPbcAsync()
{
+ Log.Debug(Globals.LogTag, "ConnectByWpsPbcAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
/// <param name="pin">The WPS PIN is a non-null string with length greater than 0 and less than or equal to 8.</param>
public Task ConnectByWpsPinAsync(string pin)
{
+ Log.Debug(Globals.LogTag, "ConnectByWpsPinAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
/// <returns> A task indicating whether the Disconnect method is done or not.</returns>
public Task DisconnectAsync()
{
+ Log.Debug(Globals.LogTag, "DisconnectAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
/// </summary>
public void RemoveAP()
{
+ Log.Debug(Globals.LogTag, "RemoveAP");
int ret = Interop.WiFi.RemoveAP(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle);
if (ret != (int)WiFiError.None)
{
internal HandleHolder()
{
- Log.Debug(Globals.LogTag, "HandleHolder() Constructor");
_handle = WiFiManagerImpl.Instance.Initialize();
Log.Debug(Globals.LogTag, "Handle: " + _handle);
}
{
get
{
- Log.Debug(Globals.LogTag, "Instance getter");
if (_instance == null)
{
Log.Debug(Globals.LogTag, "Instance is null");
internal Interop.WiFi.SafeWiFiManagerHandle GetSafeHandle()
{
- Log.Debug(Globals.LogTag, "GetHandle, Thread Id = " + Thread.CurrentThread.ManagedThreadId);
return s_threadName.Value.GetSafeHandle();
}
internal Interop.WiFi.SafeWiFiManagerHandle Initialize()
{
- Interop.WiFi.SafeWiFiManagerHandle handle = new Interop.WiFi.SafeWiFiManagerHandle();
+ Interop.WiFi.SafeWiFiManagerHandle handle;
int ret = Interop.WiFi.Initialize(out handle);
if (ret != (int)WiFiError.None)
{
internal IEnumerable<WiFiAP> GetFoundAPs()
{
+ Log.Debug(Globals.LogTag, "GetFoundAPs");
List<WiFiAP> apList = new List<WiFiAP>();
Interop.WiFi.HandleCallback callback = (IntPtr apHandle, IntPtr userData) =>
{
internal IEnumerable<WiFiAP> GetFoundSpecificAPs()
{
+ Log.Debug(Globals.LogTag, "GetFoundSpecificAPs");
List<WiFiAP> apList = new List<WiFiAP>();
Interop.WiFi.HandleCallback callback = (IntPtr apHandle, IntPtr userData) =>
{
internal IEnumerable<WiFiConfiguration> GetWiFiConfigurations()
{
+ Log.Debug(Globals.LogTag, "GetWiFiConfigurations");
List<WiFiConfiguration> configList = new List<WiFiConfiguration>();
Interop.WiFi.HandleCallback callback = (IntPtr configHandle, IntPtr userData) =>
{
internal void SaveWiFiNetworkConfiguration(WiFiConfiguration config)
{
+ Log.Debug(Globals.LogTag, "SaveWiFiNetworkConfiguration");
IntPtr configHandle = config.GetHandle();
int ret = Interop.WiFi.Config.SaveConfiguration(GetSafeHandle(), configHandle);
if (ret != (int)WiFiError.None)
internal WiFiAP GetConnectedAP()
{
+ Log.Debug(Globals.LogTag, "GetConnectedAP");
IntPtr apHandle;
-
int ret = Interop.WiFi.GetConnectedAP(GetSafeHandle(), out apHandle);
if (ret != (int)WiFiError.None)
{
internal Task ActivateAsync()
{
+ Log.Debug(Globals.LogTag, "ActivateAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
internal Task ActivateWithWiFiPickerTestedAsync()
{
+ Log.Debug(Globals.LogTag, "ActivateWithWiFiPickerTestedAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
internal Task DeactivateAsync()
{
+ Log.Debug(Globals.LogTag, "DeactivateAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
internal Task ScanAsync()
{
+ Log.Debug(Globals.LogTag, "ScanAsync");
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)
internal Task ScanSpecificAPAsync(string essid)
{
+ Log.Debug(Globals.LogTag, "ScanSpecificAPAsync " + essid);
TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
IntPtr id;
lock (_callback_map)