/// <summary> /// Creates a WiFiConfiguration object with the given name, passphrase, and securetype. /// </summary> /// <since_tizen> 3 </since_tizen> /// <param name="name">Name of the Wi-Fi.</param> /// <param name="passPhrase">Password to access the Wi-Fi.</param> /// <param name="type">Security type of the Wi-Fi.</param> /// <feature>http://tizen.org/feature/network.wifi</feature> /// <privilege>http://tizen.org/privilege/network.get</privilege> /// <exception cref="NotSupportedException">Thrown when the Wi-Fi is not supported.</exception> /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception> /// <exception cref="ArgumentNullException">Thrown when the object is constructed with name as null.</exception> /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception> /// <exception cref="ArgumentException">Thrown when the method failed due to an invalid parameter.</exception> /// <exception cref="InvalidOperationException">Thrown when the method failed due to an invalid operation.</exception> public WiFiConfiguration(string name, string passPhrase, WiFiSecurityType type) { if (name == null) { throw new ArgumentNullException("Name of the WiFi is null"); } int ret = Interop.WiFi.Config.Create(WiFiManagerImpl.Instance.GetSafeHandle(), name, passPhrase, (int)type, out _configHandle); if (ret != (int)WiFiError.None) { Log.Error(Globals.LogTag, "Failed to create config handle, Error - " + (WiFiError)ret); WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle()); } Interop.WiFi.SafeWiFiConfigHandle configHandle = new Interop.WiFi.SafeWiFiConfigHandle(_configHandle); _eapConfig = new WiFiEapConfiguration(configHandle); }
internal WiFiEapConfiguration(Interop.WiFi.SafeWiFiConfigHandle handle) { _configHandle = handle; }
internal WiFiConfiguration(IntPtr handle) { _configHandle = handle; Interop.WiFi.SafeWiFiConfigHandle configHandle = new Interop.WiFi.SafeWiFiConfigHandle(handle); _eapConfig = new WiFiEapConfiguration(configHandle); }