[Tizen.Network.Connection][TCSACR-190] Add new API to check cellular roaming state...
authorchleun-moon <32117100+chleun-moon@users.noreply.github.com>
Tue, 20 Nov 2018 06:28:07 +0000 (15:28 +0900)
committerjeik01 <35021126+jeik01@users.noreply.github.com>
Tue, 20 Nov 2018 06:28:07 +0000 (15:28 +0900)
* Add CellularProfile.IsRoming property

* Fix build error

* Fix typo

* Replace tab to spaces

src/Tizen.Network.Connection/Tizen.Network.Connection/CellularProfile.cs

index 1b26b90bc9c9ce2cbf99e11bb10412ab7745e34b..91503be50deb2fdfc428cc04cebb4605d2cb7ea2 100755 (executable)
@@ -253,6 +253,26 @@ namespace Tizen.Network.Connection
             }
         }
 
+        /// <summary>
+        /// Checks whether the connection is in roaming state.
+        /// </summary>
+        /// <since_tizen> 6 </since_tizen>
+        /// <value> True if the cellular profile is in roaming state, otherwise false.</value>
+        public bool IsRoaming
+        {
+            get
+            {
+                Log.Debug(Globals.LogTag, "Get IsRoaming");
+                bool value = false;
+                int ret = Interop.ConnectionCellularProfile.IsRoaming(ProfileHandle, out value);
+                if ((ConnectionError)ret != ConnectionError.None)
+                {
+                    Log.Error(Globals.LogTag, "It failed to get isRoaming, " + (ConnectionError)ret);
+                }
+                return value;
+            }
+        }
+
         /// <summary>
         /// The cellular authentication information.
         /// </summary>