Add API reference and exception as per the guidelines
authorchleun.moon <chleun.moon@samsung.com>
Wed, 24 May 2017 06:06:27 +0000 (15:06 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Wed, 24 May 2017 06:06:32 +0000 (15:06 +0900)
Change-Id: Iaa7e7718402b0347c0121218a3fc8da6753c4f36
Signed-off-by: cheoleun <chleun.moon@samsung.com>
packaging/csapi-network-wifi.spec
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiAP.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiAddressInformation.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiConfiguration.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiEap.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiEapConfiguration.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiErrorFactory.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManager.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiManagerImpl.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiNetwork.cs
src/Tizen.Network.WiFi/Tizen.Network.WiFi/WiFiSecurity.cs

index 22ea531..83b1803 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       csapi-network-wifi
 Summary:    Tizen Wi-Fi API for C#
-Version:    1.0.15
+Version:    1.0.16
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index 51b79d3..aa8e9cc 100755 (executable)
@@ -37,6 +37,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The network information of the access point(AP).
         /// </summary>
+        /// <value>WiFiNetwork instance containing network information of AP.</value>
         public WiFiNetwork NetworkInformation
         {
             get
@@ -48,6 +49,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The security information of the access point(AP).
         /// </summary>
+        /// <value>WiFiSecurity instance containing security information of AP.</value>
         public WiFiSecurity SecurityInformation
         {
             get
@@ -67,6 +69,14 @@ namespace Tizen.Network.WiFi
         /// Creates an object for the access point.
         /// </summary>
         /// <param name="essid">The Extended Service Set Identifier of the access point.</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when Essid is passed as null.</exception>
+        /// <exception cref="ArgumentException">Thrown when it is failed due to an invalid parameter.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
         public WiFiAP(string essid)
         {
             Log.Debug(Globals.LogTag, "New WiFiAP. Essid: " + essid);
@@ -79,6 +89,14 @@ namespace Tizen.Network.WiFi
         /// </summary>
         /// <param name="essid">The Extended Service Set Identifier of the access point.</param>
         /// <param name="hidden">The value to set hidden AP</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when Essid is passed as null.</exception>
+        /// <exception cref="ArgumentException">Thrown when it is failed due to an invalid parameter.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when it is failed due to invalid operation.</exception>
         public WiFiAP(string essid, bool hidden)
         {
             createHandle(essid, hidden);
@@ -115,6 +133,11 @@ namespace Tizen.Network.WiFi
         private void createHandle(string id, bool hidden)
         {
             int ret = -1;
+            if (id == null)
+            {
+                throw new ArgumentNullException("Essid is null");
+            }
+
             if (hidden)
             {
                 ret = Interop.WiFi.AP.CreateHiddenAP(WiFiManagerImpl.Instance.GetSafeHandle(), id, out _apHandle);
@@ -128,7 +151,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to create handle, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle());
             }
         }
 
@@ -142,14 +165,25 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// Refreshes the access point information.
         /// </summary>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ObjectDisposedException">Thrown when object instance is disposed or released.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public void Refresh()
         {
             Log.Debug(Globals.LogTag, "Refresh");
+            if (_disposed)
+            {
+                throw new ObjectDisposedException("Invalid AP instance (Object may have been disposed or released)");
+            }
             int ret = Interop.WiFi.AP.Refresh(_apHandle);
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to refresh ap handle, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret, _apHandle);
+                WiFiErrorFactory.ThrowWiFiException(ret, _apHandle, "http://tizen.org/privilege/network.get");
             }
         }
 
@@ -157,9 +191,22 @@ namespace Tizen.Network.WiFi
         /// Connects the access point asynchronously.
         /// </summary>
         /// <returns> A task indicating whether the Connect method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ObjectDisposedException">Thrown when object instance is disposed or released.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public Task ConnectAsync()
         {
             Log.Debug(Globals.LogTag, "ConnectAsync");
+            if (_disposed)
+            {
+                throw new ObjectDisposedException("Invalid AP instance (Object may have been disposed or released)");
+            }
             TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
             IntPtr id;
             lock (_callback_map)
@@ -180,12 +227,14 @@ namespace Tizen.Network.WiFi
                     }
                 };
             }
+
             int ret = Interop.WiFi.Connect(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
             }
+
             return task.Task;
         }
 
@@ -194,9 +243,24 @@ namespace Tizen.Network.WiFi
         /// </summary>
         /// <param name="info">A WpsInfo instance which is of type WpsPbcInfo or WpsPinInfo.</param>
         /// <returns>A task indicating whether the ConnectWps method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.profile</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ObjectDisposedException">Thrown when object instance is disposed or released.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when WpsPinInfo object is constructed with null pin.</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Thrown when WpsPinInfo object is constructed with pin which is an empty string or more than 7 characters.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public Task ConnectWpsAsync(WpsInfo info)
         {
             Log.Debug(Globals.LogTag, "ConnectWpsAsync");
+            if (_disposed)
+            {
+                throw new ObjectDisposedException("Invalid AP instance (Object may have been disposed or released)");
+            }
             TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
             IntPtr id;
             lock (_callback_map)
@@ -218,25 +282,32 @@ namespace Tizen.Network.WiFi
                 };
             }
 
+            int ret = -1;
             if (info.GetType() == typeof(WpsPbcInfo))
             {
-                int ret = Interop.WiFi.ConnectByWpsPbc(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
-                if (ret != (int)WiFiError.None)
-                {
-                    Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
-                }
+                ret = Interop.WiFi.ConnectByWpsPbc(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, _callback_map[id], id);
             }
 
             else if (info.GetType() == typeof(WpsPinInfo))
             {
                 WpsPinInfo pinInfo = (WpsPinInfo)info;
-                int ret = Interop.WiFi.ConnectByWpsPin(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, pinInfo.GetWpsPin(), _callback_map[id], id);
-                if (ret != (int)WiFiError.None)
+                if (pinInfo.GetWpsPin() == null)
                 {
-                    Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    throw new ArgumentNullException("Wps pin should not be null");
                 }
+
+                if (pinInfo.GetWpsPin().Length == 0 || pinInfo.GetWpsPin().Length > 8)
+                {
+                    throw new ArgumentOutOfRangeException("Wps pin should not be empty or more than 7 characters");
+                }
+
+                ret = Interop.WiFi.ConnectByWpsPin(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle, pinInfo.GetWpsPin(), _callback_map[id], id);
+            }
+
+            if (ret != (int)WiFiError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
             }
 
             return task.Task;
@@ -247,6 +318,20 @@ namespace Tizen.Network.WiFi
         /// </summary>
         /// <param name="info">A WpsInfo instance which is of type WpsPbcInfo or WpsPinInfo.</param>
         /// <returns>A task which contains Connected access point information.</returns>
+        /// <remarks>
+        /// If WpsPinInfo is used, its object has to be constructed with a pin which must be 4 or 8 characters long.
+        /// </remarks>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <privilege>http://tizen.org/privilege/network.profile</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when WpsPinInfo object is constructed with null pin.</exception>
+        /// <exception cref="ArgumentOutOfRangeException">Thrown when WpsPinInfo object is constructed with pin which is not of 4 or 8 characters long.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public static Task<WiFiAP> ConnectWpsWithoutSsidAsync(WpsInfo info)
         {
             TaskCompletionSource<WiFiAP> task = new TaskCompletionSource<WiFiAP>();
@@ -271,25 +356,32 @@ namespace Tizen.Network.WiFi
                 };
             }
 
+            int ret = -1;
             if (info.GetType() == typeof(WpsPbcInfo))
             {
-                int ret = Interop.WiFi.ConnectByWpsPbcWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), s_callbackMap[id], id);
-                if (ret != (int)WiFiError.None)
-                {
-                    Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
-                }
+                ret = Interop.WiFi.ConnectByWpsPbcWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), s_callbackMap[id], id);   
             }
 
             else if (info.GetType() == typeof(WpsPinInfo))
             {
                 WpsPinInfo pinInfo = (WpsPinInfo)info;
-                int ret = Interop.WiFi.ConnectByWpsPinWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), pinInfo.GetWpsPin(), s_callbackMap[id], id);
-                if (ret != (int)WiFiError.None)
+                if (pinInfo.GetWpsPin() == null)
                 {
-                    Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    throw new ArgumentNullException("Wps pin should not be null");
                 }
+
+                if (pinInfo.GetWpsPin().Length != 4 && pinInfo.GetWpsPin().Length != 8)
+                {
+                    throw new ArgumentOutOfRangeException("Wps pin should be of 4 or 8 characters long");
+                }
+
+                ret = Interop.WiFi.ConnectByWpsPinWithoutSsid(WiFiManagerImpl.Instance.GetSafeHandle(), pinInfo.GetWpsPin(), s_callbackMap[id], id);
+            }
+
+            if (ret != (int)WiFiError.None)
+            {
+                Log.Error(Globals.LogTag, "Failed to connect wifi, Error - " + (WiFiError)ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle());
             }
 
             return task.Task;
@@ -299,9 +391,22 @@ namespace Tizen.Network.WiFi
         /// Disconnects the access point asynchronously.
         /// </summary>
         /// <returns> A task indicating whether the Disconnect method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ObjectDisposedException">Thrown when object instance is disposed or released.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public Task DisconnectAsync()
         {
             Log.Debug(Globals.LogTag, "DisconnectAsync");
+            if (_disposed)
+            {
+                throw new ObjectDisposedException("Invalid AP instance (Object may have been disposed or released)");
+            }
             TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
             IntPtr id;
             lock (_callback_map)
@@ -326,7 +431,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to disconnect wifi, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
             }
             return task.Task;
         }
@@ -335,14 +440,27 @@ namespace Tizen.Network.WiFi
         /// Deletes the information of stored access point and disconnects it when it is 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>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.profile</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ObjectDisposedException">Thrown when object instance is disposed or released.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public void ForgetAP()
         {
             Log.Debug(Globals.LogTag, "ForgetAP");
+            if (_disposed)
+            {
+                throw new ObjectDisposedException("Invalid AP instance (Object may have been disposed or released)");
+            }
             int ret = Interop.WiFi.RemoveAP(WiFiManagerImpl.Instance.GetSafeHandle(), _apHandle);
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to forget AP, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, WiFiManagerImpl.Instance.GetSafeHandle().DangerousGetHandle(), _apHandle);
             }
         }
     }
@@ -376,6 +494,9 @@ namespace Tizen.Network.WiFi
         /// A public constructor which instantiates WpsPinInfo class with the given pin.
         /// </summary>
         /// <param name="pin">WPS Pin of the access point.</param>
+        /// <remarks>
+        /// Pin should not be null or empty. It should be of less than 8 characters.
+        /// </remarks>
         public WpsPinInfo(string pin)
         {
             _pin = pin;
index 716a5df..895ded4 100755 (executable)
@@ -54,6 +54,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set first dns address, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
                 }
             }
         }
@@ -81,6 +82,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set second dns address, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
                 }
             }
         }
@@ -108,6 +110,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set gateway address, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
                 }
             }
         }
@@ -135,6 +138,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set subnet mask, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
                 }
             }
         }
@@ -162,6 +166,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set ip address, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
                 }
             }
         }
@@ -184,6 +189,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set ip config type, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _handle.DangerousGetHandle());
                 }
             }
         }
index 1f25515..162cd78 100755 (executable)
@@ -34,6 +34,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The name of access point(AP).
         /// </summary>
+        /// <value>Name assigned to AP in WiFi configuration.</value>
         public string Name
         {
             get
@@ -52,6 +53,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The security type of access point(AP).
         /// </summary>
+        /// <value>Security type of AP in WiFi configuration.</value>
         public WiFiSecurityType SecurityType
         {
             get
@@ -69,6 +71,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The proxy address.
         /// </summary>
+        /// <value>Proxy address of the access point.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this property when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string ProxyAddress
         {
             get
@@ -85,10 +91,15 @@ namespace Tizen.Network.WiFi
             }
             set
             {
+                if (_disposed)
+                {
+                    throw new ObjectDisposedException("Invalid WiFiConfiguration instance (Object may have been disposed or released)");
+                }
                 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);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle);
                 }
             }
         }
@@ -96,6 +107,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// A property check whether the access point(AP) is hidden or not.
         /// </summary>
+        /// <value>Boolean value indicating whether AP is hidden or not.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this property when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public bool IsHidden
         {
             get
@@ -110,10 +125,15 @@ namespace Tizen.Network.WiFi
             }
             set
             {
+                if (_disposed)
+                {
+                    throw new ObjectDisposedException("Invalid WiFiConfiguration instance (Object may have been disposed or released)");
+                }
                 int ret = Interop.WiFi.Config.SetHiddenAPProperty(_configHandle, value);
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set IsHidden, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle);
                 }
             }
         }
@@ -121,6 +141,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The EAP Configuration.
         /// </summary>
+        /// <value>EAP configuration assigned to WiFi.</value>
         public WiFiEapConfiguration EapConfiguration
         {
             get
@@ -142,13 +163,28 @@ namespace Tizen.Network.WiFi
         /// <param name="name">Name of the WiFi.</param>
         /// <param name="passPhrase">Password to access the WiFi.</param>
         /// <param name="type">Security type of the WiFi.</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi 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 method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when it is failed due to 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);
         }
index dcc174c..203884b 100755 (executable)
@@ -33,6 +33,11 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The file path of CA Certificate of EAP.
         /// </summary>
+        /// <value>CA certification file of EAP.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentNullException">Thrown while setting this value when file value is null.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string CaCertificationFile
         {
             get
@@ -42,18 +47,21 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get caCertFile, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                     return "";
                 }
                 return Marshal.PtrToStringAnsi(strPtr);
             }
             set
             {
+                if (value == null)
+                {
+                    throw new ArgumentNullException("File value is null");
+                }
                 int ret = Interop.WiFi.AP.SetEapCaCertFile(_apHandle, value);
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set caCertFile, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -61,6 +69,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The EAP type of wifi.
         /// </summary>
+        /// <value>Type of EAP.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiEapType EapType
         {
             get
@@ -70,7 +82,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get eap type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                 }
                 return (WiFiEapType)type;
             }
@@ -80,7 +91,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set eap type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -88,6 +99,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The type of EAP phase2 authentication of Wi-Fi.
         /// </summary>
+        /// <value>Authentication type of WiFi.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiAuthenticationType AuthenticationType
         {
             get
@@ -97,7 +112,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get auth type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                 }
                 return (WiFiAuthenticationType)type;
             }
@@ -107,7 +121,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set eap auth type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -121,6 +135,11 @@ namespace Tizen.Network.WiFi
         /// Gets the private key file of EAP.
         /// </summary>
         /// <returns>The file path of private key.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory. </exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public string GetPrivateKeyFile()
         {
             IntPtr strPtr;
@@ -138,8 +157,17 @@ namespace Tizen.Network.WiFi
         /// </summary>
         /// <param name="privateKeyFile">The file path of private key.</param>
         /// <param name="password">The password.</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when file path of private key is null.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public void SetPrivateKeyFile(string privateKeyFile, string password)
         {
+            if (privateKeyFile == null)
+            {
+                throw new ArgumentNullException("File path of private key is null");
+            }
             int ret = Interop.WiFi.AP.SetEapPrivateKeyFile(_apHandle, privateKeyFile, password);
             if (ret != (int)WiFiError.None)
             {
@@ -152,6 +180,11 @@ namespace Tizen.Network.WiFi
         /// Gets the Client Certificate of EAP.
         /// </summary>
         /// <returns>The file path of Client Certificate.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory. </exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public string GetClientCertFile()
         {
             IntPtr strPtr;
@@ -168,8 +201,17 @@ namespace Tizen.Network.WiFi
         /// Sets the CA Certificate of EAP.
         /// </summary>
         /// <param name="clientCertFile">The file path of Client Certificate.</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when file path of Client Certificate is null.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public void SetClientCertFile(string clientCertFile)
         {
+            if (clientCertFile == null)
+            {
+                throw new ArgumentNullException("File path of Client certificate is null");
+            }
             int ret = Interop.WiFi.AP.SetEapClientCertFile(_apHandle, clientCertFile);
             if (ret != (int)WiFiError.None)
             {
@@ -182,6 +224,11 @@ namespace Tizen.Network.WiFi
         /// Gets the username of EAP passphrase.
         /// </summary>
         /// <returns>The user name</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory. </exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public string GetUserName()
         {
             IntPtr strptr;
@@ -199,6 +246,11 @@ namespace Tizen.Network.WiFi
         /// Returns whether the password is set or not.
         /// </summary>
         /// <returns>True if password is set, false if password is not set.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when the system is out of memory. </exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public bool IsPasswordSet()
         {
             IntPtr strptr;
@@ -216,8 +268,17 @@ namespace Tizen.Network.WiFi
         /// Sets the user name of EAP.
         /// </summary>
         /// <param name="userName">The user name</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when the user name is passed as null. </exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public void SetUserName(string userName)
         {
+            if (userName == null)
+            {
+                throw new ArgumentNullException("User name is null");
+            }
             int ret = Interop.WiFi.AP.SetEapPassphrase(_apHandle, userName, null);
             if (ret != (int)WiFiError.None)
             {
@@ -230,8 +291,17 @@ namespace Tizen.Network.WiFi
         /// Sets the password of EAP.
         /// </summary>
         /// <param name="password">The password</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when the password is passed as null. </exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         public void SetPassword(string password)
         {
+            if (password == null)
+            {
+                throw new ArgumentNullException("Password is null");
+            }
             int ret = Interop.WiFi.AP.SetEapPassphrase(_apHandle, null, password);
             if (ret != (int)WiFiError.None)
             {
index 5d301d8..ad63382 100755 (executable)
@@ -29,6 +29,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The file path of CA Certificate of EAP.
         /// </summary>
+        /// <value>CA certification file of EAP.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string CaCertificationFile
         {
             get
@@ -38,7 +42,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get caCertFile Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle.DangerousGetHandle());
+                    return "";
                 }
                 return Marshal.PtrToStringAnsi(strPtr);
             }
@@ -56,6 +60,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The EAP type of wifi.
         /// </summary>
+        /// <value>Type of EAP.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiEapType EapType
         {
             get
@@ -65,7 +73,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to eap type Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle.DangerousGetHandle());
                 }
                 return (WiFiEapType)type;
             }
@@ -83,6 +90,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The type of EAP phase2 authentication of Wi-Fi.
         /// </summary>
+        /// <value>Authentication type of WiFi.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiAuthenticationType AuthenticationType
         {
             get
@@ -92,7 +103,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get auth type Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle.DangerousGetHandle());
                 }
                 return (WiFiAuthenticationType)type;
             }
@@ -110,6 +120,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The anonymous identity of access point(AP).
         /// </summary>
+        /// <value>Represents the anonymous identity of the access point.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string AnonymousIdentify
         {
             get
@@ -119,7 +133,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get anonymous identify Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle.DangerousGetHandle());
                     return "";
                 }
                 return Marshal.PtrToStringAnsi(strPtr);
@@ -138,6 +151,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The identity of access point(AP).
         /// </summary>
+        /// <value>Represents the identity of the access point.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string Identity
         {
             get
@@ -147,7 +164,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get identify Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle.DangerousGetHandle());
                     return "";
                 }
                 return Marshal.PtrToStringAnsi(strPtr);
@@ -166,6 +182,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The subject match of access point(AP).
         /// </summary>
+        /// <value>Represents the subject match of AP.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this value when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string SubjectMatch
         {
             get
@@ -175,7 +195,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get subject match Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret, _configHandle.DangerousGetHandle());
                     return "";
                 }
                 return Marshal.PtrToStringAnsi(strPtr);
@@ -200,6 +219,10 @@ namespace Tizen.Network.WiFi
         /// Gets access point client cert file from configuration.
         /// </summary>
         /// <returns>The certification authority(CA) certificates file of access point.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation.</exception>
         public string GetClientCertFile()
         {
             IntPtr strPtr;
@@ -217,6 +240,10 @@ namespace Tizen.Network.WiFi
         /// </summary>
         /// <param name="privateKey">The private key file.</param>
         /// <param name="clientCert">The certification authority(CA) certificates file of access point.</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation.</exception>
         public void SetClientCertFile(string privateKey, string clientCert)
         {
             int ret = Interop.WiFi.Config.SetEapClientCertFile(_configHandle, privateKey, clientCert);
index 93e9f57..1b43a1d 100755 (executable)
@@ -41,44 +41,60 @@ namespace Tizen.Network.WiFi
 
     internal static class WiFiErrorFactory
     {
-        static internal void ThrowWiFiException(int e)
+        static internal void ThrowWiFiException(int e, IntPtr handle)
         {
-            ThrowExcption(e, false);
+            ThrowExcption(e, (handle == IntPtr.Zero), false, "");
         }
 
-        static internal void ThrowWiFiException(int e, IntPtr handle)
+        static internal void ThrowWiFiException(int e, IntPtr handle1, IntPtr handle2)
+        {
+            ThrowExcption(e, (handle1 == IntPtr.Zero), (handle2 == IntPtr.Zero), "");
+        }
+
+        static internal void ThrowWiFiException(int e, string message)
+        {
+            ThrowExcption(e, false, false, message);
+        }
+
+        static internal void ThrowWiFiException(int e, IntPtr handle, string message)
+        {
+            ThrowExcption(e, (handle == IntPtr.Zero), false, message);
+        }
+
+        static internal void ThrowWiFiException(int e, IntPtr handle1, IntPtr handle2, string message)
         {
-            ThrowExcption(e, (handle == IntPtr.Zero));
+            ThrowExcption(e, (handle1 == IntPtr.Zero), (handle2 == IntPtr.Zero), message);
         }
 
-        static private void ThrowExcption(int e, bool isHandleNull)
+        static private void ThrowExcption(int e, bool isHandle1Null, bool isHandle2Null, string message)
         {
             WiFiError err = (WiFiError)e;
             if (err == WiFiError.NotSupportedError)
             {
-                throw new NotSupportedException("Not Supported");
+                throw new NotSupportedException("Unsupported feature http://tizen.org/feature/network.wifi");
             }
 
-            if (isHandleNull)
+            if (err == WiFiError.PermissionDeniedError)
             {
-                if (err == WiFiError.InvalidParameterError || err == WiFiError.InvalidKeyError)
-                {
-                    throw new ArgumentException(err.ToString());
-                }
-                else
-                {
-                    throw new InvalidOperationException("Invalid instance (object may have been disposed or released)");
-                }
+                throw new UnauthorizedAccessException("Permission denied " + message);
             }
 
-            if (err == WiFiError.InvalidParameterError || err == WiFiError.InvalidKeyError)
+            if (err == WiFiError.OutOfMemoryError)
             {
-                throw new ArgumentException(err.ToString());
+                throw new OutOfMemoryException("Out of memory");
             }
-            else
+
+            if (err == WiFiError.InvalidParameterError || err == WiFiError.InvalidKeyError)
             {
-                throw new InvalidOperationException(err.ToString());
+                if (isHandle1Null || isHandle2Null)
+                {
+                    throw new InvalidOperationException("Invalid instance (object may have been disposed or released)");
+                }
+
+                throw new ArgumentException("Invalid parameter");
             }
+
+            throw new InvalidOperationException(err.ToString());
         }
     }
 }
index 5767956..9df0503 100755 (executable)
@@ -29,6 +29,8 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The local MAC address.
         /// </summary>
+        /// <value>Represents the mac address of the WiFi.</value>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
         static public string MacAddress
         {
             get
@@ -40,6 +42,8 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The name of the network interface.
         /// </summary>
+        /// <value>Interface name of WiFi.</value>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
         static public string InterfaceName
         {
             get
@@ -51,6 +55,8 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The network connection state.
         /// </summary>
+        /// <value>Represents the connection state of WiFi.</value>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
         static public WiFiConnectionState ConnectionState
         {
             get
@@ -62,6 +68,8 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// A property to Check whether Wi-Fi is activated.
         /// </summary>
+        /// <value>Boolean value to check whether WiFi is activated or not.</value>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
         static public bool IsActive
         {
             get
@@ -135,6 +143,12 @@ namespace Tizen.Network.WiFi
         /// Gets the result of the scan.
         /// </summary>
         /// <returns> A list of WiFiAP objects.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public IEnumerable<WiFiAP> GetFoundAPs()
         {
             return WiFiManagerImpl.Instance.GetFoundAPs();
@@ -144,6 +158,12 @@ namespace Tizen.Network.WiFi
         /// Gets the result of specific AP scan.
         /// </summary>
         /// <returns> A list contains the WiFiAP objects.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public IEnumerable<WiFiAP> GetFoundSpecificAPs()
         {
             return WiFiManagerImpl.Instance.GetFoundSpecificAPs();
@@ -153,6 +173,13 @@ namespace Tizen.Network.WiFi
         /// Gets the list of wifi configurations.
         /// </summary>
         /// <returns>A list contains the WiFiConfiguration objects.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.profile</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public IEnumerable<WiFiConfiguration> GetWiFiConfigurations()
         {
             return WiFiManagerImpl.Instance.GetWiFiConfigurations();
@@ -162,6 +189,13 @@ namespace Tizen.Network.WiFi
         /// Saves Wi-Fi configuration of access point.
         /// </summary>
         /// <param name="configuration">The configuration to be stored</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.profile</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when WiFiConfiguration is passed as null.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public void SaveWiFiConfiguration(WiFiConfiguration configuration)
         {
             WiFiManagerImpl.Instance.SaveWiFiNetworkConfiguration(configuration);
@@ -171,6 +205,13 @@ namespace Tizen.Network.WiFi
         /// Gets the object of the connected WiFiAP.
         /// </summary>
         /// <returns> The connected wifi access point(AP) information.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="OutOfMemoryException">Thrown when system is out of memory.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public WiFiAP GetConnectedAP()
         {
             return WiFiManagerImpl.Instance.GetConnectedAP();
@@ -180,6 +221,13 @@ namespace Tizen.Network.WiFi
         /// Activates Wi-Fi asynchronously.
         /// </summary>
         /// <returns> A task indicating whether the Activate method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public Task ActivateAsync()
         {
             return WiFiManagerImpl.Instance.ActivateAsync();
@@ -189,6 +237,13 @@ namespace Tizen.Network.WiFi
         /// Activates Wi-Fi asynchronously and displays Wi-Fi picker (popup) when Wi-Fi is not automatically connected.
         /// </summary>
         /// <returns> A task indicating whether the ActivateWithPicker method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public Task ActivateWithPickerAsync()
         {
             return WiFiManagerImpl.Instance.ActivateWithWiFiPickerTestedAsync();
@@ -198,6 +253,13 @@ namespace Tizen.Network.WiFi
         /// Deactivates Wi-Fi asynchronously.
         /// </summary>
         /// <returns> A task indicating whether the Deactivate method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public Task DeactivateAsync()
         {
             return WiFiManagerImpl.Instance.DeactivateAsync();
@@ -207,6 +269,13 @@ namespace Tizen.Network.WiFi
         /// Starts scan asynchronously.
         /// </summary>
         /// <returns> A task indicating whether the Scan method is done or not.</returns>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public Task ScanAsync()
         {
             return WiFiManagerImpl.Instance.ScanAsync();
@@ -217,6 +286,13 @@ namespace Tizen.Network.WiFi
         /// </summary>
         /// <returns> A task indicating whether the ScanSpecificAP method is done or not.</returns>
         /// <param name="essid">The essid of hidden ap</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <privilege>http://tizen.org/privilege/network.set</privilege>
+        /// <privilege>http://tizen.org/privilege/network.get</privilege>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="UnauthorizedAccessException">Thrown when permission is denied.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when the method failed due to invalid operation.</exception>
         static public Task ScanSpecificAPAsync(string essid)
         {
             return WiFiManagerImpl.Instance.ScanSpecificAPAsync(essid);
index 2472463..05fb87c 100755 (executable)
@@ -153,7 +153,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to initialize wifi, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, "http://tizen.org/privilege/network.get");
             }
             return handle;
         }
@@ -179,7 +179,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to get all APs, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle(), "http://tizen.org/privilege/network.get");
             }
 
             return apList;
@@ -207,7 +207,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to get specific APs, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle(), "http://tizen.org/privilege/network.get");
             }
 
             return apList;
@@ -234,7 +234,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to get configurations, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle(), "http://tizen.org/privilege/network.profile");
             }
 
             return configList;
@@ -243,12 +243,17 @@ namespace Tizen.Network.WiFi
         internal void SaveWiFiNetworkConfiguration(WiFiConfiguration config)
         {
             Log.Debug(Globals.LogTag, "SaveWiFiNetworkConfiguration");
+            if (config == null)
+            {
+                throw new ArgumentNullException("WiFi configuration is null");
+            }
+
             IntPtr configHandle = config.GetHandle();
             int ret = Interop.WiFi.Config.SaveConfiguration(GetSafeHandle(), configHandle);
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to save configuration, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle(), "http://tizen.org/privilege/network.profile");
             }
         }
 
@@ -260,7 +265,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to connect with AP, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle(), "http://tizen.org/privilege/network.get");
             }
             WiFiAP ap = new WiFiAP(apHandle);
             return ap;
@@ -293,7 +298,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to activate wifi, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
             }
             return task.Task;
         }
@@ -325,7 +330,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to activate wifi, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
             }
             return task.Task;
         }
@@ -357,7 +362,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to deactivate wifi, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
             }
             return task.Task;
         }
@@ -389,7 +394,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to scan all AP, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
             }
             return task.Task;
         }
@@ -421,7 +426,7 @@ namespace Tizen.Network.WiFi
             if (ret != (int)WiFiError.None)
             {
                 Log.Error(Globals.LogTag, "Failed to scan with specific AP, Error - " + (WiFiError)ret);
-                WiFiErrorFactory.ThrowWiFiException(ret);
+                WiFiErrorFactory.ThrowWiFiException(ret, GetSafeHandle().DangerousGetHandle());
             }
             return task.Task;
         }
index 49319bc..896c497 100755 (executable)
@@ -35,6 +35,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The Extended Service Set Identifier(ESSID).
         /// </summary>
+        /// <value>Essid of the WiFi.</value>
         public string Essid
         {
             get
@@ -60,6 +61,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The Basic Service Set Identifier(BSSID).
         /// </summary>
+        /// <value>Bssid of the WiFi.</value>
         public string Bssid
         {
             get
@@ -78,6 +80,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The address informaiton for IPv4.
         /// </summary>
+        /// <value>IP address information for IPv4 type.</value>
         public IAddressInformation IPv4Setting
         {
             get
@@ -89,6 +92,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The address ainformation for IPv6.
         /// </summary>
+        /// <value>IP address information for IPv6 type.</value>
         public IAddressInformation IPv6Setting
         {
             get
@@ -100,6 +104,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The proxy address.
         /// </summary>
+        /// <value>Represents proxy address of WiFi.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this property when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public string ProxyAddress
         {
             get
@@ -119,6 +127,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set proxy address, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -126,6 +135,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The proxy type(IPv6).
         /// </summary>
+        /// <value>Represents proxy type of WiFi.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this property when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiProxyType ProxyType
         {
             get
@@ -144,6 +157,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set proxy type, Error - " + (WiFiError)ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -151,6 +165,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The frequency band(MHz).
         /// </summary>
+        /// <value>Represents the frequency band value.</value>
         public int Frequency
         {
             get
@@ -168,6 +183,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The Received signal strength indication(RSSI).
         /// </summary>
+        /// <value>Represents Rssi level of WiFi.</value>
         public WiFiRssiLevel Rssi
         {
             get
@@ -185,6 +201,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The max speed (Mbps).
         /// </summary>
+        /// <value>Represents max speed value.</value>
         public int MaxSpeed
         {
             get
@@ -202,6 +219,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// A property to check whether the access point is favorite or not.
         /// </summary>
+        /// <value>Boolean value to check if the access point is favorite or not.</value>
         public bool IsFavorite
         {
             get
@@ -219,6 +237,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// A property to check whether the access point is passpoint or not.
         /// </summary>
+        /// <value>Boolean value to check if the access point is passpoint or not.</value>
         public bool IsPasspoint
         {
             get
@@ -237,6 +256,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The connection state.
         /// </summary>
+        /// <value>Represents the connection state of WiFi.</value>
         public WiFiConnectionState ConnectionState
         {
             get
index 47646dd..ae0d4dd 100755 (executable)
@@ -30,6 +30,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The type of Wi-Fi security.
         /// </summary>
+        /// <value>Represents the security type of WiFi.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this property when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiSecurityType SecurityType
         {
             get
@@ -39,7 +43,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get security type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                 }
                 return (WiFiSecurityType)type;
             }
@@ -49,7 +52,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set security type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -57,6 +60,10 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The type of Wi-Fi encryption
         /// </summary>
+        /// <value>Represents the encryption type of WiFi.</value>
+        /// <exception cref="NotSupportedException">Thrown while setting this property when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentException">Thrown while setting this property due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown while setting this value due to invalid operation.</exception>
         public WiFiEncryptionType EncryptionType
         {
             get
@@ -66,7 +73,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get encryption type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                 }
                 return (WiFiEncryptionType)type;
             }
@@ -76,7 +82,7 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to set encryption type, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
+                    WiFiErrorFactory.ThrowWiFiException(ret, _apHandle.DangerousGetHandle());
                 }
             }
         }
@@ -84,6 +90,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// The EAP information
         /// </summary>
+        /// <value>Eap information of WiFi.</value>
         public WiFiEap EapInformation
         {
             get
@@ -95,6 +102,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// A property to check whether the passphrase is required or not.
         /// </summary>
+        /// <value>Boolean value to check if passphrase is required or not.</value>
         public bool IsPassphraseRequired
         {
             get
@@ -104,7 +112,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get isPassportRequired, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                 }
                 return required;
             }
@@ -113,6 +120,7 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// A property to check whether the Wi-Fi Protected Setup(WPS) is supported or not.
         /// </summary>
+        /// <value>Boolean value to check if wps is supported or not.</value>
         public bool IsWpsSupported
         {
             get
@@ -122,7 +130,6 @@ namespace Tizen.Network.WiFi
                 if (ret != (int)WiFiError.None)
                 {
                     Log.Error(Globals.LogTag, "Failed to get isWapSupported, Error - " + (WiFiError)ret);
-                    WiFiErrorFactory.ThrowWiFiException(ret);
                 }
                 return supported;
             }
@@ -137,8 +144,18 @@ namespace Tizen.Network.WiFi
         /// <summary>
         /// Sets the passphrase.
         /// </summary>
+        /// <param name="passphrase">The passphrase of the access point.</param>
+        /// <feature>http://tizen.org/feature/network.wifi</feature>
+        /// <exception cref="NotSupportedException">Thrown when WiFi is not supported.</exception>
+        /// <exception cref="ArgumentNullException">Thrown when passphrase is passed as null.</exception>
+        /// <exception cref="ArgumentException">Thrown when method is failed due to an invalid parameter.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation.</exception>
         public void SetPassphrase(string passphrase)
         {
+            if (passphrase == null)
+            {
+                throw new ArgumentNullException("Passphrase is null");
+            }
             int ret = Interop.WiFi.AP.SetPassphrase(_apHandle, passphrase);
             if (ret != (int)WiFiError.None)
             {