2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
18 using System.Runtime.InteropServices;
20 internal static partial class Interop
22 internal static partial class SystemInfo
24 internal enum ErrorCode
26 None = Tizen.Internals.Errors.ErrorCode.None,
27 InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,
28 OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,
29 IoError = Tizen.Internals.Errors.ErrorCode.IoError,
30 PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,
31 NotSupported = Tizen.Internals.Errors.ErrorCode.NoSuchDevice,
34 internal enum SystemInfoValueType
42 internal enum SystemInfoType
49 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_type")]
50 internal static extern ErrorCode SystemInfoGetPlatformType(string key, out SystemInfoValueType type);
52 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_type")]
53 internal static extern ErrorCode SystemInfoGetCustomType(string key, out SystemInfoValueType type);
55 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_bool")]
56 internal static extern ErrorCode SystemInfoGetPlatformBool(string key, out bool value);
58 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_int")]
59 internal static extern ErrorCode SystemInfoGetPlatformInt(string key, out int value);
61 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_double")]
62 internal static extern ErrorCode SystemInfoGetPlatformDouble(string key, out double value);
64 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_platform_string")]
65 internal static extern ErrorCode SystemInfoGetPlatformString(string key, out string value);
67 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_bool")]
68 internal static extern ErrorCode SystemInfoGetCustomBool(string key, out bool value);
70 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_int")]
71 internal static extern ErrorCode SystemInfoGetCustomInt(string key, out int value);
73 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_double")]
74 internal static extern ErrorCode SystemInfoGetCustomDouble(string key, out double value);
76 [DllImport(Libraries.SystemInfo, EntryPoint = "system_info_get_custom_string")]
77 internal static extern ErrorCode SystemInfoGetCustomString(string key, out string value);