From: chleun.moon Date: Tue, 14 Feb 2017 05:37:46 +0000 (+0900) Subject: Apply two-letter acronyms (Ip --> IP) X-Git-Tag: submit/trunk/20170823.075128~116^2~16 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=72a5549c42c2105017c68cd2570727fa66690da6;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git Apply two-letter acronyms (Ip --> IP) https://msdn.microsoft.com/en-us/library/ms229043(v=vs.110).aspx Change-Id: I8058cfd4f6a6f7112a49ae4e662abe25e1c504b2 Signed-off-by: cheoleun --- diff --git a/packaging/csapi-network-connection.spec b/packaging/csapi-network-connection.spec index 7ce0f5c..1862fd5 100644 --- a/packaging/csapi-network-connection.spec +++ b/packaging/csapi-network-connection.spec @@ -1,6 +1,6 @@ Name: csapi-network-connection Summary: Tizen Connection API for C# -Version: 1.0.7 +Version: 1.0.8 Release: 1 Group: Development/Libraries License: Apache-2.0 diff --git a/src/Tizen.Network.Connection/Interop/Interop.Connection.cs b/src/Tizen.Network.Connection/Interop/Interop.Connection.cs index 713d30c..097da6b 100755 --- a/src/Tizen.Network.Connection/Interop/Interop.Connection.cs +++ b/src/Tizen.Network.Connection/Interop/Interop.Connection.cs @@ -41,7 +41,7 @@ internal static partial class Interop public static extern int GetType(IntPtr handle, out int type); [DllImport(Libraries.Connection, EntryPoint = "connection_get_ip_address")] - public static extern int GetIpAddress(IntPtr handle, int family, out IntPtr address); + public static extern int GetIPAddress(IntPtr handle, int family, out IntPtr address); [DllImport(Libraries.Connection, EntryPoint = "connection_get_proxy")] public static extern int GetProxy(IntPtr handle, int family, out IntPtr address); @@ -68,7 +68,7 @@ internal static partial class Interop public static extern int SetTypeChangedCallback(IntPtr handle, ConnectionTypeChangedCallback callback, IntPtr userData); [DllImport(Libraries.Connection, EntryPoint = "connection_set_ip_address_changed_cb")] - public static extern int SetIpAddressChangedCallback(IntPtr handle, ConnectionAddressChangedCallback callback, IntPtr userData); + public static extern int SetIPAddressChangedCallback(IntPtr handle, ConnectionAddressChangedCallback callback, IntPtr userData); [DllImport(Libraries.Connection, EntryPoint = "connection_set_ethernet_cable_state_chaged_cb")] public static extern int SetEthernetCableStateChagedCallback(IntPtr handle, EthernetCableStateChangedCallback callback, IntPtr userData); @@ -80,7 +80,7 @@ internal static partial class Interop public static extern int UnsetTypeChangedCallback(IntPtr handle); [DllImport(Libraries.Connection, EntryPoint = "connection_unset_ip_address_changed_cb")] - public static extern int UnsetIpAddressChangedCallback(IntPtr handle); + public static extern int UnsetIPAddressChangedCallback(IntPtr handle); [DllImport(Libraries.Connection, EntryPoint = "connection_unset_ethernet_cable_state_chaged_cb")] public static extern int UnsetEthernetCableStateChagedCallback(IntPtr handle); @@ -158,13 +158,13 @@ internal static partial class Interop public static extern int GetState(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); + public static extern int GetIPConfigType(IntPtr profileHandle, int family, out int type); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_proxy_type")] public static extern int GetProxyType(IntPtr profileHandle, out int type); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_ip_address")] - public static extern int GetIpAddress(IntPtr profileHandle, int family, out IntPtr address); + public static extern int GetIPAddress(IntPtr profileHandle, int family, out IntPtr address); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_get_subnet_mask")] public static extern int GetSubnetMask(IntPtr profileHandle, int family, out IntPtr address); @@ -179,13 +179,13 @@ internal static partial class Interop public static extern int GetProxyAddress(IntPtr profileHandle, int family, out IntPtr address); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_ip_config_type")] - public static extern int SetIpConfigType(IntPtr profileHandle, int family, int type); + public static extern int SetIPConfigType(IntPtr profileHandle, int family, int type); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_proxy_type")] public static extern int SetProxyType(IntPtr profileHandle, int type); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_ip_address")] - public static extern int SetIpAddress(IntPtr profileHandle, int family, string address); + public static extern int SetIPAddress(IntPtr profileHandle, int family, string address); [DllImport(Libraries.Connection, EntryPoint = "connection_profile_set_subnet_mask")] public static extern int SetSubnetMask(IntPtr profileHandle, int family, string address); diff --git a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionInternalManager.cs b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionInternalManager.cs index ba622b0..cfeba03 100755 --- a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionInternalManager.cs +++ b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionInternalManager.cs @@ -242,13 +242,13 @@ namespace Tizen.Network.Connection } } - internal event EventHandler IpAddressChanged + internal event EventHandler IPAddressChanged { add { if (_IPAddressChanged == null) { - IpAddressChangedStart(); + IPAddressChangedStart(); } _IPAddressChanged += value; } @@ -258,19 +258,19 @@ namespace Tizen.Network.Connection _IPAddressChanged -= value; if (_IPAddressChanged == null) { - IpAddressChangedStop(); + IPAddressChangedStop(); } } } - private void IpAddressChangedStart() + private void IPAddressChangedStart() { - _connectionAddressChangedCallback = (IntPtr Ipv4, IntPtr Ipv6, IntPtr UserData) => + _connectionAddressChangedCallback = (IntPtr IPv4, IntPtr IPv6, IntPtr UserData) => { if (_IPAddressChanged != null) { - string ipv4 = Marshal.PtrToStringAnsi(Ipv4); - string ipv6 = Marshal.PtrToStringAnsi(Ipv6); + string ipv4 = Marshal.PtrToStringAnsi(IPv4); + string ipv6 = Marshal.PtrToStringAnsi(IPv6); if ((string.IsNullOrEmpty(ipv4) == false) || (string.IsNullOrEmpty(ipv6) == false)) { @@ -279,16 +279,16 @@ namespace Tizen.Network.Connection } }; - int ret = Interop.Connection.SetIpAddressChangedCallback(GetHandle(), _connectionAddressChangedCallback, IntPtr.Zero); + int ret = Interop.Connection.SetIPAddressChangedCallback(GetHandle(), _connectionAddressChangedCallback, IntPtr.Zero); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to register callback for changing IP address, " + (ConnectionError)ret); } } - private void IpAddressChangedStop() + private void IPAddressChangedStop() { - int ret = Interop.Connection.UnsetIpAddressChangedCallback(GetHandle()); + int ret = Interop.Connection.UnsetIPAddressChangedCallback(GetHandle()); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to unregister callback for changing IP address, " + (ConnectionError)ret); @@ -320,12 +320,12 @@ namespace Tizen.Network.Connection private void ProxyAddressChangedStart() { - _proxyAddressChangedCallback = (IntPtr Ipv4, IntPtr Ipv6, IntPtr UserData) => + _proxyAddressChangedCallback = (IntPtr IPv4, IntPtr IPv6, IntPtr UserData) => { if (_ProxyAddressChanged != null) { - string ipv4 = Marshal.PtrToStringAnsi(Ipv4); - string ipv6 = Marshal.PtrToStringAnsi(Ipv6); + string ipv4 = Marshal.PtrToStringAnsi(IPv4); + string ipv6 = Marshal.PtrToStringAnsi(IPv6); if ((string.IsNullOrEmpty(ipv4) == false) || (string.IsNullOrEmpty(ipv6) == false)) { @@ -358,7 +358,7 @@ namespace Tizen.Network.Connection } if (_IPAddressChanged != null) { - IpAddressChangedStop(); + IPAddressChangedStop(); } if (_EthernetCableStateChanged != null) { @@ -390,10 +390,10 @@ namespace Tizen.Network.Connection return Interop.Connection.DestroyProfileIterator(iterator); } - internal string GetIpAddress(AddressFamily family) + internal string GetIPAddress(AddressFamily family) { IntPtr ip; - int ret = Interop.Connection.GetIpAddress(GetHandle(), (int)family, out ip); + int ret = Interop.Connection.GetIPAddress(GetHandle(), (int)family, out ip); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to get IP address, " + (ConnectionError)ret); diff --git a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionManager.cs b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionManager.cs index 0bb2ce8..55bce8f 100755 --- a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionManager.cs +++ b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionManager.cs @@ -68,16 +68,16 @@ namespace Tizen.Network.Connection /// /// Event that is called when the IP address is changed. /// - public static event EventHandler IpAddressChanged + public static event EventHandler IPAddressChanged { add { - ConnectionInternalManager.Instance.IpAddressChanged += value; + ConnectionInternalManager.Instance.IPAddressChanged += value; } remove { - ConnectionInternalManager.Instance.IpAddressChanged -= value; + ConnectionInternalManager.Instance.IPAddressChanged -= value; } } @@ -103,9 +103,9 @@ namespace Tizen.Network.Connection /// The address family /// IP address of the connection. /// Thrown when method failed due to invalid operation - public static string GetIpAddress(AddressFamily family) + public static string GetIPAddress(AddressFamily family) { - return ConnectionInternalManager.Instance.GetIpAddress(family); + return ConnectionInternalManager.Instance.GetIPAddress(family); } /// @@ -343,34 +343,34 @@ namespace Tizen.Network.Connection /// public class AddressEventArgs : EventArgs { - private string Ipv4 = ""; - private string Ipv6 = ""; + private string IPv4 = ""; + private string IPv6 = ""; internal AddressEventArgs(string ipv4, string ipv6) { - Ipv4 = ipv4; - Ipv6 = ipv6; + IPv4 = ipv4; + IPv6 = ipv6; } /// /// The IPV4 address. /// - public string Ipv4Address + public string IPv4Address { get { - return Ipv4; + return IPv4; } } /// /// The IPV6 address. /// - public string Ipv6Address + public string IPv6Address { get { - return Ipv6; + return IPv6; } } } diff --git a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfile.cs b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfile.cs index 3f474d2..7e70bc9 100755 --- a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfile.cs +++ b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionProfile.cs @@ -28,8 +28,8 @@ namespace Tizen.Network.Connection public class ConnectionProfile : IDisposable { internal IntPtr ProfileHandle = IntPtr.Zero; - private IAddressInformation Ipv4; - private IAddressInformation Ipv6; + private IAddressInformation IPv4; + private IAddressInformation IPv6; private bool disposed = false; private EventHandler _ProfileStateChanged = null; @@ -92,8 +92,8 @@ namespace Tizen.Network.Connection internal ConnectionProfile(IntPtr handle) { ProfileHandle = handle; - Ipv4 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv4); - Ipv6 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.Ipv6); + IPv4 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.IPv4); + IPv6 = new ConnectionAddressInformation(ProfileHandle, AddressFamily.IPv6); } ~ConnectionProfile() @@ -262,7 +262,7 @@ namespace Tizen.Network.Connection get { IntPtr Value; - int ret = Interop.ConnectionProfile.GetProxyAddress(ProfileHandle, (int)AddressFamily.Ipv4, out Value); + int ret = Interop.ConnectionProfile.GetProxyAddress(ProfileHandle, (int)AddressFamily.IPv4, out Value); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to get proxy address, " + (ConnectionError)ret); @@ -274,7 +274,7 @@ namespace Tizen.Network.Connection } set { - int ret = Interop.ConnectionProfile.SetProxyAddress(ProfileHandle, (int)AddressFamily.Ipv4, value.ToString()); + int ret = Interop.ConnectionProfile.SetProxyAddress(ProfileHandle, (int)AddressFamily.IPv4, value.ToString()); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to set proxy address, " + (ConnectionError)ret); @@ -284,25 +284,25 @@ namespace Tizen.Network.Connection } /// - /// The subnet mask address(Ipv4). + /// The subnet mask address(IPv4). /// - public IAddressInformation Ipv4Settings + public IAddressInformation IPv4Settings { get { - return Ipv4; + return IPv4; } } /// - /// The subnet mask address(Ipv4). + /// The subnet mask address(IPv4). /// - public IAddressInformation Ipv6Settings + public IAddressInformation IPv6Settings { get { - return Ipv6; + return IPv6; } } } diff --git a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionTypes.cs b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionTypes.cs index 4b6ac3d..9d17ae6 100644 --- a/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionTypes.cs +++ b/src/Tizen.Network.Connection/Tizen.Network.Connection/ConnectionTypes.cs @@ -41,8 +41,8 @@ namespace Tizen.Network.Connection /// public enum AddressFamily { - Ipv4 = 0, - Ipv6 = 1 + IPv4 = 0, + IPv6 = 1 } /// @@ -112,7 +112,7 @@ namespace Tizen.Network.Connection /// /// Enumeration for IP configuration type. /// - public enum IpConfigType + public enum IPConfigType { None = 0, /**< Not defined */ Static = 1, /**< Manual IP configuration */ diff --git a/src/Tizen.Network.Connection/Tizen.Network.Connection/IAddressInformation.cs b/src/Tizen.Network.Connection/Tizen.Network.Connection/IAddressInformation.cs index 51b9590..6842500 100755 --- a/src/Tizen.Network.Connection/Tizen.Network.Connection/IAddressInformation.cs +++ b/src/Tizen.Network.Connection/Tizen.Network.Connection/IAddressInformation.cs @@ -52,12 +52,12 @@ namespace Tizen.Network.Connection /// /// The IP address. /// - System.Net.IPAddress Ip { get; set; } + System.Net.IPAddress IP { get; set; } /// /// The type of IP config. /// - IpConfigType IpConfigType { get; set; } + IPConfigType IPConfigType { get; set; } } internal class ConnectionAddressInformation : IAddressInformation @@ -208,12 +208,12 @@ namespace Tizen.Network.Connection } - public System.Net.IPAddress Ip + public System.Net.IPAddress IP { get { IntPtr Value; - int ret = Interop.ConnectionProfile.GetIpAddress(_profileHandle, (int)_family, out Value); + int ret = Interop.ConnectionProfile.GetIPAddress(_profileHandle, (int)_family, out Value); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to get ip, " + (ConnectionError)ret); @@ -227,7 +227,7 @@ namespace Tizen.Network.Connection } set { - int ret = Interop.ConnectionProfile.SetIpAddress(_profileHandle, (int)_family, value.ToString()); + int ret = Interop.ConnectionProfile.SetIPAddress(_profileHandle, (int)_family, value.ToString()); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to set ip, " + (ConnectionError)ret); @@ -236,22 +236,22 @@ namespace Tizen.Network.Connection } } - public IpConfigType IpConfigType + public IPConfigType IPConfigType { get { int Value; - int ret = Interop.ConnectionProfile.GetIpConfigType(_profileHandle, (int)_family, out Value); + int ret = Interop.ConnectionProfile.GetIPConfigType(_profileHandle, (int)_family, out Value); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to get ip config type, " + (ConnectionError)ret); ConnectionErrorFactory.ThrowConnectionException(ret); } - return (IpConfigType)Value; + return (IPConfigType)Value; } set { - int ret = Interop.ConnectionProfile.SetIpConfigType(_profileHandle, (int)_family, (int)value); + int ret = Interop.ConnectionProfile.SetIPConfigType(_profileHandle, (int)_family, (int)value); if ((ConnectionError)ret != ConnectionError.None) { Log.Error(Globals.LogTag, "It failed to set ip config type, " + (ConnectionError)ret);