Remove AddressFactory
authorchleun.moon <chleun.moon@samsung.com>
Tue, 10 Jan 2017 07:22:19 +0000 (16:22 +0900)
committerchleun.moon <chleun.moon@samsung.com>
Tue, 10 Jan 2017 07:22:30 +0000 (16:22 +0900)
Change-Id: I90c81b649bc0d6b088bc545dba9a1df98f040fea
Signed-off-by: cheoleun <chleun.moon@samsung.com>
packaging/csapi-network-connection.spec
src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfile.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/IAddressInformation.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/RequestCellularProfile.cs
src/Tizen.Network.Connection/Tizen.Network.Connection/RequestWiFiProfile.cs

index bc8365242454bb67c29d5d39fd3eedab2bf72259..9260275ce9494d3d039f6beef392812b2c4f3b24 100644 (file)
@@ -1,6 +1,6 @@
 Name:       csapi-network-connection
 Summary:    Tizen Connection API for C#
-Version:    1.0.3
+Version:    1.0.4
 Release:    1
 Group:      Development/Libraries
 License:    Apache-2.0
index beb6092c13ed298afe3ff2ca202d4c437ccad862..6849fc029a1219283e0f825e1ff42257caa28b24 100644 (file)
@@ -85,8 +85,8 @@ namespace Tizen.Network.Connection
         public ConnectionProfile(IntPtr handle)
         {
             ProfileHandle = handle;
-            Ipv4 = AddressFactory.CreateAddressInformation(handle, AddressFamily.Ipv4, AddressInformationType.Connection);
-            Ipv6 = AddressFactory.CreateAddressInformation(handle, AddressFamily.Ipv6, AddressInformationType.Connection);
+            Ipv4 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv4);
+            Ipv6 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv6);
         }
 
         ~ConnectionProfile()
index 5d3d4a805536aab5347ae005b9e74e7d9c674080..f4096996abf808bbd6f78d972259ffdf6d0aa4a9 100644 (file)
@@ -60,14 +60,6 @@ namespace Tizen.Network.Connection
         IpConfigType IpConfigType { get; set; }
     }
 
-    public static class AddressFactory
-    {
-        public static IAddressInformation CreateAddressInformation(IntPtr handle, AddressFamily family, AddressInformationType infoType)
-        {
-            return new ConnectionAddressInformation(handle, family);
-        }
-    }
-
     internal class ConnectionAddressInformation : IAddressInformation
     {
         private IntPtr _profileHandle;
index ea0c56a9b765d28a2cbc0f722d3d1df910b594ef..5d08604f52954823e839184ad4bb02987d5d68b8 100644 (file)
@@ -46,8 +46,8 @@ namespace Tizen.Network.Connection
             ProfileHandle = ConnectionInternalManager.CreateRequestProfile(ConnectionProfileType.Cellular, keyword);
             Log.Debug(Globals.LogTag, "RequestCellularProfile is created : " + ProfileHandle);
 
-            Ipv4 = AddressFactory.CreateAddressInformation(ProfileHandle, AddressFamily.Ipv4, AddressInformationType.Connection);
-            Ipv6 = AddressFactory.CreateAddressInformation(ProfileHandle, AddressFamily.Ipv6, AddressInformationType.Connection);
+            Ipv4 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv4);
+            Ipv6 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv6);
 
             AuthInfo = new CellularAuthInformation(ProfileHandle);
         }
index 4c350928a54704c3e1bd1c6cb45a9781ae8f6202..965317c872fa8b6c7d8a9d1c8fee724fad894882 100644 (file)
@@ -42,8 +42,8 @@ namespace Tizen.Network.Connection
             Log.Debug(Globals.LogTag, "RequestWiFiProfile : " + keyword);
             ProfileHandle = ConnectionInternalManager.CreateRequestProfile(ConnectionProfileType.WiFi, keyword);
 
-            Ipv4 = AddressFactory.CreateAddressInformation(ProfileHandle, AddressFamily.Ipv4, AddressInformationType.Connection);
-            Ipv6 = AddressFactory.CreateAddressInformation(ProfileHandle, AddressFamily.Ipv6, AddressInformationType.Connection);
+            Ipv4 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv4);
+            Ipv6 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv6);
         }
 
         /// <summary>