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 using Tizen.Internals.Errors;
21 using Tizen.Applications;
23 internal static partial class Interop
25 internal static partial class AppCommon
27 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_id")]
28 internal static extern ErrorCode AppGetId(out string appId);
30 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_name")]
31 internal static extern ErrorCode AppGetName(out string name);
33 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_resource_path")]
34 internal static extern string AppGetResourcePath();
36 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_data_path")]
37 internal static extern string AppGetDataPath();
39 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_cache_path")]
40 internal static extern string AppGetCachePath();
42 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_shared_data_path")]
43 internal static extern string AppGetSharedDataPath();
45 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_shared_resource_path")]
46 internal static extern string AppGetSharedResourcePath();
48 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_shared_trusted_path")]
49 internal static extern string AppGetSharedTrustedPath();
51 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_tep_resource_path")]
52 internal static extern string AppGetTepResourcePath();
54 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_external_cache_path")]
55 internal static extern string AppGetExternalCachePath();
57 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_external_data_path")]
58 internal static extern string AppGetExternalDataPath();
60 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_external_shared_data_path")]
61 internal static extern string AppGetExternalSharedDataPath();
63 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_version")]
64 internal static extern ErrorCode AppGetVersion(out string version);
66 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_low_memory_status")]
67 internal static extern ErrorCode AppEventGetLowMemoryStatus(IntPtr handle, out LowMemoryStatus status);
69 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_low_battery_status")]
70 internal static extern ErrorCode AppEventGetLowBatteryStatus(IntPtr handle, out LowBatteryStatus status);
72 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_language")]
73 internal static extern ErrorCode AppEventGetLanguage(IntPtr handle, out string lang);
75 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_region_format")]
76 internal static extern ErrorCode AppEventGetRegionFormat(IntPtr handle, out string region);