Revert before adding new apis
authorchleun.moon <chleun.moon@samsung.com>
Mon, 15 May 2017 07:56:50 +0000 (16:56 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Mon, 15 May 2017 07:58:19 +0000 (16:58 +0900)
Change-Id: Ie8fe14ee863fccb3fad5b289c708c46e2ac79e90
Signed-off-by: cheoleun <chleun.moon@samsung.com>
packaging/csapi-network-connection.spec
src/Tizen.Network.Connection/Interop/Interop.Connection.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/CellularProfile.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionError.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionInternalManager.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionManager.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfile.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfileManager.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionTypes.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/IAddressInformation.cs

index 2898831..157f778 100755 (executable)
@@ -1,6 +1,6 @@
 Name:       csapi-network-connection
 Summary:    Tizen Connection API for C#
-Version:    1.0.15
+Version:    1.0.16
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index 5563025..097da6b 100755 (executable)
@@ -30,8 +30,6 @@ internal static partial class Interop
         public delegate void ConnectionAddressChangedCallback(IntPtr ipv4, IntPtr ipv6, IntPtr userData);
         [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
         public delegate void ConnectionCallback(ConnectionError result, IntPtr userData);
-        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
-        public delegate bool IPv6AddressCallback(IntPtr ipv6, IntPtr userData);
 
         [DllImport(Libraries.Connection, EntryPoint = "connection_create")]
         public static extern int Create(out IntPtr handle);
@@ -45,9 +43,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_get_ip_address")]
         public static extern int GetIPAddress(IntPtr handle, int family, out IntPtr address);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_foreach_ipv6_address")]
-        public static extern int GetAllIPv6Addresses(IntPtr handle, int type, IPv6AddressCallback callback, IntPtr userData);
-
         [DllImport(Libraries.Connection, EntryPoint = "connection_get_proxy")]
         public static extern int GetProxy(IntPtr handle, int family, out IntPtr address);
 
@@ -69,12 +64,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_get_bt_state")]
         public static extern int GetBtState(IntPtr handle, out int state);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_get_statistics")]
-        public static extern int GetStatistics(IntPtr handle, int connectionType, int statisticsType, out long size);
-
-        [DllImport(Libraries.Connection, EntryPoint = "connection_reset_statistics")]
-        public static extern int ResetStatistics(IntPtr handle, int connectionType, int statisticsType);
-
         [DllImport(Libraries.Connection, EntryPoint = "connection_set_type_changed_cb")]
         public static extern int SetTypeChangedCallback(IntPtr handle, ConnectionTypeChangedCallback callback, IntPtr userData);
 
@@ -168,9 +157,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_state")]
         public static extern int GetState(IntPtr profileHandle, out int type);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_ipv6_state")]
-        public static extern int GetIPv6State(IntPtr profileHandle, out int type);
-
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_ip_config_type")]
         public static extern int GetIPConfigType(IntPtr profileHandle, int family, out int type);
 
@@ -192,15 +178,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_proxy_address")]
         public static extern int GetProxyAddress(IntPtr profileHandle, int family, out IntPtr address);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_prefix_length")]
-        public static extern int GetPrefixLength(IntPtr profileHandle, int family, out int length);
-
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_dns_config_type")]
-        public static extern int GetDnsConfigType(IntPtr profileHandle, int family, out int type);
-
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_refresh")]
-        public static extern int Refresh(IntPtr profileHandle);
-
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_ip_config_type")]
         public static extern int SetIPConfigType(IntPtr profileHandle, int family, int type);
 
@@ -222,12 +199,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_proxy_address")]
         public static extern int SetProxyAddress(IntPtr profileHandle, int family, string address);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_prefix_length")]
-        public static extern int SetPrefixLength(IntPtr profileHandle, int family, int length);
-
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_dns_config_type")]
-        public static extern int SetDnsConfigType(IntPtr profileHandle, int family, int type);
-
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_state_changed_cb")]
         public static extern int SetStateChangeCallback(IntPtr profileHandle, ProfileStateChangedCallback callback, IntPtr userData);
 
@@ -249,12 +220,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_cellular_home_url")]
         public static extern int GetHomeUrl(IntPtr profileHandle, out IntPtr homeUrl);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_cellular_pdn_type")]
-        public static extern int GetPdnType(IntPtr profileHandle, out int pdnType);
-
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_cellular_roam_pdn_type")]
-        public static extern int GetRoamingPdnType(IntPtr profileHandle, out int roamPdnType);
-
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_is_cellular_roaming")]
         public static extern int IsRoaming(IntPtr profileHandle, out bool roaming);
 
@@ -279,11 +244,6 @@ internal static partial class Interop
         [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_cellular_home_url")]
         public static extern int SetHomeUrl(IntPtr profileHandle, string homeUrl);
 
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_cellular_pdn_type")]
-        public static extern int SetPdnType(IntPtr profileHandle, int pdnType);
-
-        [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_cellular_roam_pdn_type")]
-        public static extern int SetRoamingPdnType(IntPtr profileHandle, int roamPdnType);
     }
 
     internal static partial class ConnectionWiFiProfile
index 855f5bf..628cc33 100755 (executable)
@@ -122,78 +122,6 @@ namespace Tizen.Network.Connection
         }
 
         /// <summary>
-        /// The cellular pdn type.
-        /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
-        /// <exception cref="System.ObjectDisposedException">Thrown when operation is performed on a disposed object.</exception>
-        public CellularPdnType PdnType
-        {
-            get
-            {
-                Log.Debug(Globals.LogTag, "Get PdnType");
-                int value;
-                int ret = Interop.ConnectionCellularProfile.GetPdnType(ProfileHandle, out value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to get pdn type, " + (ConnectionError)ret);
-                }
-                return (CellularPdnType)value;
-            }
-
-            set
-            {
-                Log.Debug(Globals.LogTag, "Set PdnType");
-                CheckDisposed();
-                int ret = Interop.ConnectionCellularProfile.SetPdnType(ProfileHandle, (int)value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to set pdn type, " + (ConnectionError)ret);
-                    ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony");
-                    ConnectionErrorFactory.CheckHandleNullException(ret, (ProfileHandle == IntPtr.Zero), "ProfileHandle may have been disposed or released");
-                    ConnectionErrorFactory.ThrowConnectionException(ret);
-                }
-            }
-        }
-
-        /// <summary>
-        /// The cellular roaming pdn type.
-        /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
-        /// <exception cref="System.ObjectDisposedException">Thrown when operation is performed on a disposed object.</exception>
-        public CellularPdnType RoamingPdnType
-        {
-            get
-            {
-                Log.Debug(Globals.LogTag, "Get RoamingPdnType");
-                int value;
-                int ret = Interop.ConnectionCellularProfile.GetRoamingPdnType(ProfileHandle, out value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to get roam pdn type, " + (ConnectionError)ret);
-                }
-                return (CellularPdnType)value;
-            }
-
-            set
-            {
-                Log.Debug(Globals.LogTag, "Set RoamingPdnType");
-                CheckDisposed();
-                int ret = Interop.ConnectionCellularProfile.SetRoamingPdnType(ProfileHandle, (int)value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to set roam pdn type, " + (ConnectionError)ret);
-                    ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony");
-                    ConnectionErrorFactory.CheckHandleNullException(ret, (ProfileHandle == IntPtr.Zero), "ProfileHandle may have been disposed or released");
-                    ConnectionErrorFactory.ThrowConnectionException(ret);
-                }
-            }
-        }
-
-        /// <summary>
         /// Gets cellular Authentification Information.
         /// </summary>
         public CellularAuthInformation CellularAuthInfo
index 9e8d587..be0e5dc 100755 (executable)
@@ -24,34 +24,7 @@ namespace Tizen.Network.Connection
 {
     internal static class ConnectionErrorFactory
     {
-        internal static void CheckFeatureUnsupportedException(int err, string message)
-        {
-            if ((ConnectionError)err == ConnectionError.NotSupported)
-            {
-                ThrowConnectionException(err, message);
-            }
-        }
-
-        internal static void CheckPermissionDeniedException(int err, string message)
-        {
-            if ((ConnectionError)err == ConnectionError.PermissionDenied)
-            {
-                ThrowConnectionException(err, message);
-            }
-        }
-
-        internal static void CheckHandleNullException(int err, bool isHandleInvalid, string message)
-        {
-            if ((ConnectionError)err == ConnectionError.InvalidParameter)
-            {
-                if (isHandleInvalid)
-                {
-                    ThrowConnectionException((int)ConnectionError.InvalidOperation, message);
-                }
-            }
-        }
-
-        internal static void ThrowConnectionException(int errno , string message = "")
+        internal static void ThrowConnectionException(int errno)
         {
             ConnectionError _error = (ConnectionError)errno;
             Log.Debug(Globals.LogTag, "ThrowConnectionException " + _error);
@@ -68,15 +41,15 @@ namespace Tizen.Network.Connection
                 case ConnectionError.InvalidKey:
                     throw new InvalidOperationException("Invalid Key");
                 case ConnectionError.InvalidOperation:
-                    throw new InvalidOperationException("Invalid Operation " + message);
+                    throw new InvalidOperationException("Invalid Operation");
                 case ConnectionError.InvalidParameter:
-                    throw new ArgumentException("Invalid Parameter");
+                    throw new InvalidOperationException("Invalid Parameter");
                 case ConnectionError.NoConnection:
                     throw new InvalidOperationException("No Connection");
                 case ConnectionError.NoReply:
                     throw new InvalidOperationException("No Reply");
                 case ConnectionError.NotSupported:
-                    throw new NotSupportedException("Unsupported feature " + message);
+                    throw new NotSupportedException("Not Supported");
                 case ConnectionError.NowInProgress:
                     throw new InvalidOperationException("Now In Progress");
                 case ConnectionError.OperationAborted:
@@ -84,9 +57,9 @@ namespace Tizen.Network.Connection
                 case ConnectionError.OperationFailed:
                     throw new InvalidOperationException("Operation Failed");
                 case ConnectionError.OutOfMemoryError:
-                    throw new OutOfMemoryException("Out Of Memory Error");
+                    throw new InvalidOperationException("Out Of Memory Error");
                 case ConnectionError.PermissionDenied:
-                    throw new UnauthorizedAccessException("Permission Denied " + message);
+                    throw new InvalidOperationException("Permission Denied");
             }
         }
     }
index 501b6a5..deb59d4 100755 (executable)
@@ -32,6 +32,7 @@ namespace Tizen.Network.Connection
 
         public HandleHolder()
         {
+            Log.Debug(Globals.LogTag, "HandleHolder() ^^");
             Interop.Connection.Create(out Handle);
             Log.Debug(Globals.LogTag, "Handle: " + Handle);
         }
@@ -140,6 +141,7 @@ namespace Tizen.Network.Connection
 
         internal IntPtr GetHandle()
         {
+            Log.Debug(Globals.LogTag, "GetHandle, Thread Id = " + Thread.CurrentThread.ManagedThreadId);
             return s_threadName.Value.GetHandle();
         }
 
@@ -388,9 +390,8 @@ namespace Tizen.Network.Connection
             return Interop.Connection.DestroyProfileIterator(iterator);
         }
 
-        internal System.Net.IPAddress GetIPAddress(AddressFamily family)
+        internal string GetIPAddress(AddressFamily family)
         {
-            Log.Debug(Globals.LogTag, "GetIPAddress " + family);
             IntPtr ip;
             int ret = Interop.Connection.GetIPAddress(GetHandle(), (int)family, out ip);
             if ((ConnectionError)ret != ConnectionError.None)
@@ -400,38 +401,11 @@ namespace Tizen.Network.Connection
             }
             string result = Marshal.PtrToStringAnsi(ip);
             Interop.Libc.Free(ip);
-            return System.Net.IPAddress.Parse(result);
-        }
-
-        internal IEnumerable<System.Net.IPAddress> GetAllIPv6Addresses(ConnectionType type)
-        {
-            Log.Debug(Globals.LogTag, "GetAllIPv6Addresses");
-            List<System.Net.IPAddress> ipList = new List<System.Net.IPAddress>();
-            Interop.Connection.IPv6AddressCallback callback = (IntPtr ipv6Address, IntPtr userData) =>
-            {
-                if (ipv6Address != IntPtr.Zero)
-                {
-                    string ipv6 = Marshal.PtrToStringAnsi(ipv6Address);
-                    ipList.Add(System.Net.IPAddress.Parse(ipv6));
-                    return true;
-                }
-                return false;
-            };
-
-            int ret = Interop.Connection.GetAllIPv6Addresses(GetHandle(), (int)type, callback, IntPtr.Zero);
-            if (ret != (int)ConnectionError.None)
-            {
-                Log.Error(Globals.LogTag, "Failed to get all IPv6 addresses, Error - " + (ConnectionError)ret);
-                ConnectionErrorFactory.ThrowConnectionException(ret);
-            }
-
-            return ipList;
+            return result;
         }
 
-
         internal string GetProxy(AddressFamily family)
         {
-            Log.Debug(Globals.LogTag, "GetProxy " + family);
             IntPtr ip;
             int ret = Interop.Connection.GetProxy(GetHandle(), (int)family, out ip);
             if ((ConnectionError)ret != ConnectionError.None)
@@ -446,51 +420,24 @@ namespace Tizen.Network.Connection
 
         internal string GetMacAddress(ConnectionType type)
         {
-            Log.Debug(Globals.LogTag, "GetMacAddress " + type);
-            IntPtr mac;
-            int ret = Interop.Connection.GetMacAddress(GetHandle(), (int)type, out mac);
+            IntPtr ip;
+            int ret = Interop.Connection.GetMacAddress(GetHandle(), (int)type, out ip);
             if ((ConnectionError)ret != ConnectionError.None)
             {
                 Log.Error(Globals.LogTag, "It failed to get mac address, " + (ConnectionError)ret);
                 ConnectionErrorFactory.ThrowConnectionException(ret);
             }
-            string result = Marshal.PtrToStringAnsi(mac);
-            Interop.Libc.Free(mac);
+            string result = Marshal.PtrToStringAnsi(ip);
+            Interop.Libc.Free(ip);
             return result;
         }
 
-        internal long GetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
-        {
-            Log.Debug(Globals.LogTag, "GetStatistics " + connectionType + ", " + statisticsType);
-            long size;
-            int ret = Interop.Connection.GetStatistics(GetHandle(), (int)connectionType,
-                    (int)statisticsType, out size);
-            if ((ConnectionError)ret != ConnectionError.None)
-            {
-                Log.Error(Globals.LogTag, "It failed to get statistics, " + (ConnectionError)ret);
-                ConnectionErrorFactory.ThrowConnectionException(ret);
-            }
-            return size;
-        }
-
-        internal void ResetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
-        {
-            Log.Debug(Globals.LogTag, "ResetStatistics " + connectionType + ", " + statisticsType);
-            int ret = Interop.Connection.ResetStatistics(GetHandle(), (int)connectionType,
-                    (int)statisticsType);
-            if ((ConnectionError)ret != ConnectionError.None)
-            {
-                Log.Error(Globals.LogTag, "It failed to reset statistics, " + (ConnectionError)ret);
-                ConnectionErrorFactory.ThrowConnectionException(ret);
-            }
-        }
-
         internal ConnectionType ConnectionType
         {
             get
             {
-                Log.Debug(Globals.LogTag, "get ConnectionType");
                 int type = 0;
+                Log.Debug(Globals.LogTag, "Handle: " + GetHandle());
                 int ret = Interop.Connection.GetType(GetHandle(), out type);
                 if ((ConnectionError)ret != ConnectionError.None)
                 {
@@ -505,8 +452,8 @@ namespace Tizen.Network.Connection
         {
             get
             {
-                Log.Debug(Globals.LogTag, "get CellularState");
                 int type = 0;
+                Log.Debug(Globals.LogTag, "CellularState Handle: " + GetHandle());
                 int ret = Interop.Connection.GetCellularState(GetHandle(), out type);
                 if ((ConnectionError)ret != ConnectionError.None)
                 {
@@ -521,7 +468,6 @@ namespace Tizen.Network.Connection
         {
             get
             {
-                Log.Debug(Globals.LogTag, "get WiFiState");
                 int type = 0;
                 int ret = Interop.Connection.GetWiFiState(GetHandle(), out type);
                 if ((ConnectionError)ret != ConnectionError.None)
@@ -537,7 +483,6 @@ namespace Tizen.Network.Connection
         {
             get
             {
-                Log.Debug(Globals.LogTag, "get BluetoothState");
                 int type = 0;
                 int ret = Interop.Connection.GetBtState(GetHandle(), out type);
                 if ((ConnectionError)ret != ConnectionError.None)
@@ -553,7 +498,6 @@ namespace Tizen.Network.Connection
         {
             get
             {
-                Log.Debug(Globals.LogTag, "get ConnectionType");
                 int type = 0;
                 int ret = Interop.Connection.GetEthernetState(GetHandle(), out type);
                 if ((ConnectionError)ret != ConnectionError.None)
@@ -569,7 +513,6 @@ namespace Tizen.Network.Connection
         {
             get
             {
-                Log.Debug(Globals.LogTag, "get EthernetCableState");
                 int type = 0;
                 int ret = Interop.Connection.GetEthernetCableState(GetHandle(), out type);
                 if ((ConnectionError)ret != ConnectionError.None)
@@ -583,7 +526,7 @@ namespace Tizen.Network.Connection
 
         internal IntPtr CreateCellularProfile(ConnectionProfileType type, string keyword)
         {
-            Log.Debug(Globals.LogTag, "CreateCellularProfile, " + type + ", " + keyword);
+            Log.Error(Globals.LogTag, "CreateCellularProfile, " + type + ", " + keyword);
             IntPtr connectionHandle = GetHandle();
             if (connectionHandle == IntPtr.Zero)
             {
@@ -604,7 +547,6 @@ namespace Tizen.Network.Connection
 
         internal void AddCellularProfile(CellularProfile profile)
         {
-            Log.Debug(Globals.LogTag, "AddCellularProfile");
             if (profile.Type == ConnectionProfileType.Cellular)
             {
                 int ret = Interop.Connection.AddProfile(GetHandle(), profile.ProfileHandle);
@@ -623,7 +565,6 @@ namespace Tizen.Network.Connection
 
         internal void RemoveProfile(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "RemoveProfile");
             int ret = Interop.Connection.RemoveProfile(GetHandle(), profile.ProfileHandle);
             if ((ConnectionError)ret != ConnectionError.None)
             {
@@ -634,7 +575,6 @@ namespace Tizen.Network.Connection
 
         internal void UpdateProfile(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "UpdateProfile");
             int ret = Interop.Connection.UpdateProfile(GetHandle(), profile.ProfileHandle);
             if ((ConnectionError)ret != ConnectionError.None)
             {
@@ -645,7 +585,6 @@ namespace Tizen.Network.Connection
 
         internal ConnectionProfile GetCurrentProfile()
         {
-            Log.Debug(Globals.LogTag, "GetCurrentProfile");
             IntPtr ProfileHandle;
             int ret = Interop.Connection.GetCurrentProfile(GetHandle(), out ProfileHandle);
             if ((ConnectionError)ret != ConnectionError.None)
@@ -659,7 +598,6 @@ namespace Tizen.Network.Connection
 
         internal ConnectionProfile GetDefaultCellularProfile(CellularServiceType type)
         {
-            Log.Debug(Globals.LogTag, "GetDefaultCellularProfile");
             IntPtr ProfileHandle;
             int ret = Interop.Connection.GetDefaultCellularServiceProfile(GetHandle(), (int)type, out ProfileHandle);
             if ((ConnectionError)ret != ConnectionError.None)
@@ -674,7 +612,6 @@ namespace Tizen.Network.Connection
 
         internal Task SetDefaultCellularProfile(CellularServiceType type, ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "SetDefaultCellularProfile");
             TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
             Interop.Connection.ConnectionCallback Callback = (ConnectionError Result, IntPtr Data) =>
             {
@@ -700,8 +637,8 @@ namespace Tizen.Network.Connection
 
         internal Task<IEnumerable<ConnectionProfile>> GetProfileListAsync(ProfileListType type)
         {
-            Log.Debug(Globals.LogTag, "GetProfileListAsync");
             var task = new TaskCompletionSource<IEnumerable<ConnectionProfile>>();
+
             List<ConnectionProfile> Result = new List<ConnectionProfile>();
             IntPtr iterator;
             int ret = Interop.Connection.GetProfileIterator(GetHandle(), (int)type, out iterator);
@@ -742,11 +679,9 @@ namespace Tizen.Network.Connection
 
         internal Task OpenProfileAsync(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "OpenProfileAsync " + profile.Name);
             TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
             Interop.Connection.ConnectionCallback Callback = (ConnectionError Result, IntPtr Data) =>
             {
-                Log.Debug(Globals.LogTag, "Connected " + profile.Name);
                 if (Result != ConnectionError.None)
                 {
                     Log.Error(Globals.LogTag, "Error occurs during connecting profile, " + Result);
@@ -768,7 +703,6 @@ namespace Tizen.Network.Connection
 
         internal Task CloseProfileAsync(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "CloseProfileAsync " + profile.Name);
             TaskCompletionSource<bool> task = new TaskCompletionSource<bool>();
             Interop.Connection.ConnectionCallback Callback = (ConnectionError Result, IntPtr Data) =>
             {
@@ -791,4 +725,4 @@ namespace Tizen.Network.Connection
             return task.Task;
         }
     }
-}
+}
\ No newline at end of file
index 256f352..4b1c65b 100755 (executable)
@@ -141,50 +141,19 @@ namespace Tizen.Network.Connection
         /// Gets the IP address of the current connection.
         /// </summary>
         /// <param name="family">The address family</param>
-        /// <returns>IP address of the connection (global address in case of IPv6).</returns>
-        /// <privilege>http://tizen.org/privilege/network.get</privilege>
-        /// <feature>http://tizen.org/feature/network.telephony</feature>
-        /// <feature>http://tizen.org/feature/network.wifi</feature>
-        /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
-        /// <feature>http://tizen.org/feature/network.ethernet</feature>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.UnauthorizedAccessException">Thrown when permission is denied.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when connection instance is invalid or when method failed due to invalid operation.</exception>
-        public static System.Net.IPAddress GetIPAddress(AddressFamily family)
+        /// <returns>IP address of the connection.</returns>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
+        public static string GetIPAddress(AddressFamily family)
         {
             return ConnectionInternalManager.Instance.GetIPAddress(family);
         }
 
         /// <summary>
-        /// Gets the all IPv6 addresses of the current connection.
-        /// </summary>
-        /// <param name="type">The type of current network connection</param>
-        /// <returns>A list of IPv6 addresses of the connection.</returns>
-        /// <privilege>http://tizen.org/privilege/network.get</privilege>
-        /// <feature>http://tizen.org/feature/network.telephony</feature>
-        /// <feature>http://tizen.org/feature/network.wifi</feature>
-        /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
-        /// <feature>http://tizen.org/feature/network.ethernet</feature>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.UnauthorizedAccessException">Thrown when permission is denied.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when connection instance is invalid or when method failed due to invalid operation.</exception>
-        public static IEnumerable<System.Net.IPAddress> GetAllIPv6Addresses(ConnectionType type)
-        {
-            return ConnectionInternalManager.Instance.GetAllIPv6Addresses(type);
-        }
-
-        /// <summary>
         /// Gets the proxy address of the current connection.
         /// </summary>
         /// <param name="family">The address family</param>
         /// <returns>Proxy address of the connection.</returns>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when connection instance is invalid or when method failed due to invalid operation.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static string GetProxy(AddressFamily family)
         {
             return ConnectionInternalManager.Instance.GetProxy(family);
@@ -195,58 +164,13 @@ namespace Tizen.Network.Connection
         /// </summary>
         /// <param name="type">The type of current network connection</param>
         /// <returns>MAC address of the Wi-Fi or ethernet.</returns>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when connection instance is invalid or when method failed due to invalid operation.</exception>
+        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static string GetMacAddress(ConnectionType type)
         {
             return ConnectionInternalManager.Instance.GetMacAddress(type);
         }
 
         /// <summary>
-        /// Gets the statistics information.
-        /// </summary>
-        /// <param name="connectionType">The type of connection (only WiFi and Cellular are supported)</param>
-        /// <param name="statisticsType">The type of statistics</param>
-        /// <returns>The statistics information associated with statisticsType</returns>
-        /// <privilege>http://tizen.org/privilege/network.get</privilege>
-        /// <feature>http://tizen.org/feature/network.telephony</feature>
-        /// <feature>http://tizen.org/feature/network.wifi</feature>
-        /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
-        /// <feature>http://tizen.org/feature/network.ethernet</feature>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.UnauthorizedAccessException">Thrown when permission is denied.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when connection instance is invalid or when method failed due to invalid operation.</exception>
-        public static long GetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
-        {
-            return ConnectionInternalManager.Instance.GetStatistics(connectionType, statisticsType);
-        }
-
-        /// <summary>
-        /// Resets the statistics information.
-        /// </summary>
-        /// <param name="connectionType">The type of connection (only WiFi and Cellular are supported)</param>
-        /// <param name="statisticsType">The type of statistics</param>
-        /// <privilege>http://tizen.org/privilege/network.get</privilege>
-        /// <privilege>http://tizen.org/privilege/network.set</privilege>
-        /// <feature>http://tizen.org/feature/network.telephony</feature>
-        /// <feature>http://tizen.org/feature/network.wifi</feature>
-        /// <feature>http://tizen.org/feature/network.tethering.bluetooth</feature>
-        /// <feature>http://tizen.org/feature/network.ethernet</feature>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.UnauthorizedAccessException">Thrown when permission is denied.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.OutOfMemoryException">Thrown when memory is not enough to continue execution.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when connection instance is invalid or when method failed due to invalid operation.</exception>
-        public static void ResetStatistics(ConnectionType connectionType, StatisticsType statisticsType)
-        {
-            ConnectionInternalManager.Instance.ResetStatistics(connectionType, statisticsType);
-        }
-
-        /// <summary>
         /// Type and state of the current profile for data connection
         /// </summary>
         public static ConnectionItem CurrentConnection
@@ -268,11 +192,6 @@ namespace Tizen.Network.Connection
         /// <param name="type">The type of profile. Cellular profile type is supported.</param>
         /// <param name="keyword">The keyword included in profile name.</param>
         /// <returns>CellularProfile object</returns>
-        /// <exception cref="System.NotSupportedException">Thrown when feature is not supported.</exception>
-        /// <exception cref="System.UnauthorizedAccessException">Thrown when permission is denied.</exception>
-        /// <exception cref="System.ArgumentException">Thrown when value is invalid parameter.</exception>
-        /// <exception cref="System.ArgumentNullException">Thrown when keyword value is null.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown when method failed due to invalid operation.</exception>
         public static CellularProfile CreateCellularProfile(ConnectionProfileType type, string keyword)
         {
             IntPtr profileHandle = IntPtr.Zero;
index 4512996..7e70bc9 100755 (executable)
@@ -47,7 +47,6 @@ namespace Tizen.Network.Connection
         {
             add
             {
-                Log.Debug(Globals.LogTag, "ProfileStateChanged add");
                 if (_ProfileStateChanged == null)
                 {
                     ProfileStateChangedStart();
@@ -56,7 +55,6 @@ namespace Tizen.Network.Connection
             }
             remove
             {
-                Log.Debug(Globals.LogTag, "ProfileStateChanged remove");
                 _ProfileStateChanged -= value;
                 if (_ProfileStateChanged == null)
                 {
@@ -75,7 +73,6 @@ namespace Tizen.Network.Connection
                 }
             };
 
-            Log.Debug(Globals.LogTag, "ProfileStateChangedStart");
             int ret = Interop.ConnectionProfile.SetStateChangeCallback(ProfileHandle, _profileChangedCallback, IntPtr.Zero);
             if ((ConnectionError)ret != ConnectionError.None)
             {
@@ -85,7 +82,6 @@ namespace Tizen.Network.Connection
 
         private void ProfileStateChangedStop()
         {
-            Log.Debug(Globals.LogTag, "ProfileStateChangedStop");
             int ret = Interop.ConnectionProfile.UnsetStateChangeCallback(ProfileHandle);
             if ((ConnectionError)ret != ConnectionError.None)
             {
@@ -137,15 +133,6 @@ namespace Tizen.Network.Connection
         private void Destroy()
         {
             Interop.ConnectionProfile.Destroy(ProfileHandle);
-            ProfileHandle = IntPtr.Zero;
-        }
-
-        internal void CheckDisposed()
-        {
-            if (disposed)
-            {
-                throw new ObjectDisposedException(GetType().FullName);
-            }
         }
 
         /// <summary>
@@ -224,42 +211,20 @@ namespace Tizen.Network.Connection
         }
 
         /// <summary>
-        /// Refreshes the profile information.
+        /// The profile state.
         /// </summary>
-        /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
-        public void Refresh()
+        public ProfileState State
         {
-            int ret = Interop.ConnectionProfile.Refresh(ProfileHandle);
-            if ((ConnectionError)ret != ConnectionError.None)
+            get
             {
-                Log.Error(Globals.LogTag, "It failed to get network interface name, " + (ConnectionError)ret);
-                ConnectionErrorFactory.ThrowConnectionException(ret);
-            }
-        }
-
-        /// <summary>
-        /// Get the network state.
-        /// </summary>
-        /// <param name="family">The address family</param>
-        /// <returns>The network state.</returns>
-        public ProfileState GetState(AddressFamily family)
-        {
                 int Value;
-                int ret = (int)ConnectionError.None;
-                if (family == AddressFamily.IPv4)
-                {
-                    ret = Interop.ConnectionProfile.GetState(ProfileHandle, out Value);
-                }
-                else
-                {
-                    ret = Interop.ConnectionProfile.GetIPv6State(ProfileHandle, out Value);
-                }
-
+                int ret = Interop.ConnectionProfile.GetState(ProfileHandle, out Value);
                 if ((ConnectionError)ret != ConnectionError.None)
                 {
                     Log.Error(Globals.LogTag, "It failed to get profile state, " + (ConnectionError)ret);
                 }
                 return (ProfileState)Value;
+            }
         }
 
         /// <summary>
@@ -319,7 +284,7 @@ namespace Tizen.Network.Connection
         }
 
         /// <summary>
-        /// The address information (IPv4)
+        /// The subnet mask address(IPv4).
         /// </summary>
         public IAddressInformation IPv4Settings
         {
@@ -331,7 +296,7 @@ namespace Tizen.Network.Connection
         }
 
         /// <summary>
-        /// The address information (IPv6)
+        /// The subnet mask address(IPv4).
         /// </summary>
         public IAddressInformation IPv6Settings
         {
index baa7d06..cbd2933 100755 (executable)
@@ -36,7 +36,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static void AddCellularProfile(CellularProfile profile)
         {
-            Log.Debug(Globals.LogTag, "AddCellularProfile");
             ConnectionInternalManager.Instance.AddCellularProfile(profile);
         }
 
@@ -48,7 +47,6 @@ namespace Tizen.Network.Connection
         /// <returns>List of connection profile objects.</returns>
         public static Task<IEnumerable<ConnectionProfile>> GetProfileListAsync(ProfileListType type)
         {
-            Log.Debug(Globals.LogTag, "GetProfileListAsync");
             return ConnectionInternalManager.Instance.GetProfileListAsync(type);
         }
 
@@ -62,7 +60,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static Task ConnectProfileAsync(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "ConnectProfile");
             return ConnectionInternalManager.Instance.OpenProfileAsync(profile);
         }
 
@@ -75,7 +72,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static Task DisconnectProfileAsync(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "DisconnectProfileAsync");
             return ConnectionInternalManager.Instance.CloseProfileAsync(profile);
         }
 
@@ -103,7 +99,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static void UpdateProfile(ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "UpdateProfile");
             ConnectionInternalManager.Instance.UpdateProfile(profile);
         }
 
@@ -115,7 +110,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static ConnectionProfile GetCurrentProfile()
         {
-            Log.Debug(Globals.LogTag, "GetCurrentProfile");
             return ConnectionInternalManager.Instance.GetCurrentProfile();
         }
 
@@ -128,7 +122,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static ConnectionProfile GetDefaultCellularProfile(CellularServiceType type)
         {
-            Log.Debug(Globals.LogTag, "GetDefaultCurrentProfile");
             return ConnectionInternalManager.Instance.GetDefaultCellularProfile(type);
         }
 
@@ -143,7 +136,6 @@ namespace Tizen.Network.Connection
         /// <exception cref="InvalidOperationException">Thrown when method failed due to invalid operation</exception>
         public static Task SetDefaultCellularProfile(CellularServiceType type, ConnectionProfile profile)
         {
-            Log.Debug(Globals.LogTag, "SetDefaultCellularProfile");
             return ConnectionInternalManager.Instance.SetDefaultCellularProfile(type, profile);
         }
     }
index 075967d..817128c 100755 (executable)
@@ -41,8 +41,8 @@ namespace Tizen.Network.Connection
     /// </summary>
     public enum AddressFamily
     {
-        IPv4 = 0,   /**< IPv4 Address */
-        IPv6 = 1    /**< IPv6 Address */
+        IPv4 = 0,
+        IPv6 = 1
     }
 
     /// <summary>
@@ -78,17 +78,6 @@ namespace Tizen.Network.Connection
     }
 
     /// <summary>
-    /// Enumeration for statistics type.
-    /// </summary>
-    public enum StatisticsType
-    {
-        LastReceivedData = 0,  /**< Last received data */
-        LastSentData = 1,  /**< Last sent data */
-        TotalReceivedData = 2,  /**< Total received data */
-        TotalSentData = 3,  /**< Total sent data */
-    }
-
-    /// <summary>
     /// Enumeration for network connection type.
     /// </summary>
     public enum ConnectionProfileType
@@ -146,27 +135,6 @@ namespace Tizen.Network.Connection
         Application = 6,  /**< Specific application */
     }
 
-    /// <summary>
-    /// Enumeration for cellular pdn type.
-    /// </summary>
-    public enum CellularPdnType
-    {
-        Unknown = 0,  /**< Unknown */
-        IPv4 = 1,  /**< IPv4 */
-        IPv6 = 2,  /**< IPv6 */
-        IPv4_IPv6 = 3,  /**< Both IPv4 and IPv6 */
-    }
-
-    /// <summary>
-    /// Enumeration for DNS configuration type.
-    /// </summary>
-    public enum DnsConfigType
-    {
-        None = 0,  /**< Not defined */
-        Static = 1,  /**< Manual DNS configuration */
-        Dynamic = 2,  /**< Config DNS using DHCP client */
-    }
-
     static internal class ConnectionErrorValue
     {
         internal const int Base = -0x01C10000;
index 2407419..b9f76aa 100755 (executable)
@@ -32,66 +32,32 @@ namespace Tizen.Network.Connection
         /// <summary>
         /// The DNS address.
         /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
         System.Net.IPAddress Dns1 { get; set; }
 
         /// <summary>
         /// The DNS address.
         /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
         System.Net.IPAddress Dns2 { get; set; }
 
         /// <summary>
         /// The gateway address.
         /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
         System.Net.IPAddress Gateway { get; set; }
 
         /// <summary>
         /// The subnet mask address.
         /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
         System.Net.IPAddress SubnetMask { get; set; }
 
         /// <summary>
         /// The IP address.
         /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
         System.Net.IPAddress IP { get; set; }
 
         /// <summary>
         /// The type of IP config.
         /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
         IPConfigType IPConfigType { get; set; }
-
-        /// <summary>
-        /// The prefix length.
-        /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
-        int PrefixLength { get; set; }
-
-        /// <summary>
-        /// The DNS config type.
-        /// </summary>
-        /// <exception cref="System.NotSupportedException">Thrown during set when feature is not supported.</exception>
-        /// <exception cref="System.ArgumentException">Thrown during set when value is invalid parameter.</exception>
-        /// <exception cref="System.InvalidOperationException">Thrown during set when profile instance is invalid or when method failed due to invalid operation.</exception>
-        DnsConfigType DnsConfigType { get; set; }
     }
 
     internal class ConnectionAddressInformation : IAddressInformation
@@ -114,6 +80,7 @@ namespace Tizen.Network.Connection
                 if ((ConnectionError)ret != ConnectionError.None)
                 {
                     Log.Error(Globals.LogTag, "It failed to get dns1 address, " + (ConnectionError)ret);
+                    ConnectionErrorFactory.ThrowConnectionException(ret);
                 }
                 string result = Marshal.PtrToStringAnsi(Value);
                 Interop.Libc.Free(Value);
@@ -121,7 +88,6 @@ namespace Tizen.Network.Connection
                     return System.Net.IPAddress.Parse("0.0.0.0");
                 return System.Net.IPAddress.Parse(result);
             }
-
             set
             {
                 int ret = Interop.ConnectionProfile.SetDnsAddress(_profileHandle, (int)_family, value.ToString());
@@ -269,57 +235,5 @@ namespace Tizen.Network.Connection
                 }
             }
         }
-
-        public int PrefixLength
-        {
-            get
-            {
-                int Value;
-                int ret = Interop.ConnectionProfile.GetPrefixLength(_profileHandle, (int)_family, out Value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to get prefix length, " + (ConnectionError)ret);
-                }
-                return Value;
-            }
-
-            set
-            {
-                int ret = Interop.ConnectionProfile.SetPrefixLength(_profileHandle, (int)_family, value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to set prefix length, " + (ConnectionError)ret);
-                    ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony " + "http://tizen.org/feature/network.wifi " + "http://tizen.org/feature/network.tethering.bluetooth " + "http://tizen.org/feature/network.ethernet");
-                    ConnectionErrorFactory.CheckHandleNullException(ret, (_profileHandle == IntPtr.Zero), "ProfileHandle may have been disposed or released");
-                    ConnectionErrorFactory.ThrowConnectionException(ret);
-                }
-            }
-        }
-
-        public DnsConfigType DnsConfigType
-        {
-            get
-            {
-                int Value;
-                int ret = Interop.ConnectionProfile.GetDnsConfigType(_profileHandle, (int)_family, out Value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to get DNS config type, " + (ConnectionError)ret);
-                }
-                return (DnsConfigType)Value;
-            }
-
-            set
-            {
-                int ret = Interop.ConnectionProfile.SetDnsConfigType(_profileHandle, (int)_family, (int)value);
-                if ((ConnectionError)ret != ConnectionError.None)
-                {
-                    Log.Error(Globals.LogTag, "It failed to set DNS config type, " + (ConnectionError)ret);
-                    ConnectionErrorFactory.CheckFeatureUnsupportedException(ret, "http://tizen.org/feature/network.telephony " + "http://tizen.org/feature/network.wifi " + "http://tizen.org/feature/network.tethering.bluetooth " + "http://tizen.org/feature/network.ethernet");
-                    ConnectionErrorFactory.CheckHandleNullException(ret, (_profileHandle == IntPtr.Zero), "ProfileHandle may have been disposed or released");
-                    ConnectionErrorFactory.ThrowConnectionException(ret);
-                }
-            }
-        }
     }
 }