Add GetEnv() by name
authorHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 26 Jul 2017 02:02:58 +0000 (11:02 +0900)
committerHyotaek Shim <hyotaek.shim@samsung.com>
Wed, 26 Jul 2017 02:02:58 +0000 (11:02 +0900)
Change-Id: Ibf32a744b6c26fa323ce361c3b0f462a8eb4c496
Signed-off-by: Hyotaek Shim <hyotaek.shim@samsung.com>
src/Tizen.System.PlatformConfig/Interop/Interop.PlatformConfig.cs
src/Tizen.System.PlatformConfig/Tizen.System/PlatformConfig.cs

index b0b01be..bdcdf7b 100755 (executable)
@@ -28,6 +28,7 @@ internal static partial class Interop
     {
         [DllImport(Libraries.PlatformConfig, EntryPoint = "tzplatform_getenv", CallingConvention = CallingConvention.Cdecl)]
         internal static extern IntPtr _GetEnv(int id);
+
         [DllImport(Libraries.PlatformConfig, EntryPoint = "tzplatform_getid", CallingConvention = CallingConvention.Cdecl)]
         internal static extern int GetId(string name);
 
@@ -38,4 +39,3 @@ internal static partial class Interop
         }
     }
 }
-
index 6c5aaa4..2a69cd4 100755 (executable)
@@ -24,14 +24,19 @@ namespace Tizen.System
     [EditorBrowsable(EditorBrowsableState.Never)]
     public class PlatformConfig
     {
-        public static string GetEnv(int id)
+        public static int GetId(string name)
         {
-            return Interop.PlatformConfig.GetEnv(id);
+            return Interop.PlatformConfig.GetId(name);
         }
 
-        public static int GetId(string name)
+        public static string GetEnv(int id)
         {
-            return Interop.PlatformConfig.GetId(name);
+            return Interop.PlatformConfig.GetEnv(id);
         }
+
+        public static string GetEnv(string name)
+       {
+            return Interop.PlatformConfig.GetEnv(Interop.PlatformConfig.GetId(name));
+       }
     }
 }