[NUI] Fix Svace issue (#949)
[platform/core/csapi/tizenfx.git] / src / Tizen.NUI / src / internal / EnvironmentVariable.cs
1 /*
2  * Copyright (c) 2018 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17
18 using System.ComponentModel;
19
20 namespace Tizen.NUI
21 {
22     /// <summary>
23     /// EnvironmentVariable
24     /// </summary>
25     [EditorBrowsable(EditorBrowsableState.Never)]
26     static public class EnvironmentVariable
27     {
28         [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetEnvironmentVariable")]
29         private static extern string EnvironmentVariable_GetEnvironmentVariable(string jarg1);
30         
31         [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_SetEnvironmentVariable")]
32         private static extern bool EnvironmentVariable_SetEnvironmentVariable(string jarg1, string jarg2);
33
34         /// <summary>
35         /// Get value of the specified environment variable.
36         /// </summary>
37         /// <param name="variable">The name of the environment variable.</param>
38         /// <returns>The value of the specified environment variable.</returns>
39         [EditorBrowsable(EditorBrowsableState.Never)]
40         static public string GetEnvironmentVariable(string variable)
41         {
42             return EnvironmentVariable_GetEnvironmentVariable(variable);
43         }
44
45         /// <summary>
46         /// Set value of the specified environment variable.
47         /// </summary>
48         /// <param name="variable">The name of the environment variable.</param>
49         /// <param name="value">String to set as a value.</param>
50         /// <returns>True on success, false on error.</returns>
51         [EditorBrowsable(EditorBrowsableState.Never)]
52         static public bool SetEnvironmentVariable(string variable, string value)
53         {
54             return EnvironmentVariable_SetEnvironmentVariable(variable, value);
55         }
56     }
57 }