internal static extern int ConnectByWpsPinWithoutSsid(SafeWiFiManagerHandle wifi, string pin, VoidCallback callback, IntPtr userData);
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_forget_ap")]
internal static extern int RemoveAP(SafeWiFiManagerHandle wifi, IntPtr ap);
+ [DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_update_ap")]
+ internal static extern int UpdateAP(SafeWiFiManagerHandle wifi, IntPtr ap);
//Wi-Fi Monitor
[DllImport(Libraries.WiFi, EntryPoint = "wifi_manager_get_connection_state")]
using System;
using System.Threading.Tasks;
using System.Collections.Generic;
+using System.ComponentModel;
namespace Tizen.Network.WiFi
{
WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
}
}
- }
+ }
/// <summary>
/// An abstract class which is used to represent the WPS information of the access point.
Log.Error(Globals.LogTag, "Failed to set first dns address, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "Failed to set second dns address, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "Failed to set gateway address, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "Failed to set subnet mask, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "Failed to set ip address, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "Failed to set ip config type, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "It failed to set prefix length, " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
Log.Error(Globals.LogTag, "It failed to set DNS config type, " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_handle);
}
}
}
return task.Task;
}
+
+ internal void UpdateAP(Interop.WiFi.SafeWiFiAPHandle apHandle)
+ {
+ int ret = Interop.WiFi.UpdateAP(GetSafeHandle(), apHandle.DangerousGetHandle());
+ if (ret != (int)WiFiError.None)
+ {
+ Log.Error(Globals.LogTag, "Failed to update AP, Error - " + (WiFiError)ret);
+ WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle(), apHandle.DangerousGetHandle());
+ }
+ }
}
}
Log.Error(Globals.LogTag, "Failed to set proxy address, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_apHandle);
}
}
Log.Error(Globals.LogTag, "Failed to set proxy type, Error - " + (WiFiError)ret);
WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
}
+ WiFiManagerImpl.Instance.UpdateAP(_apHandle);
}
}