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
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()
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;
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);
}
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>