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 internal enum ResourceCategory : int
35 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_id")]
36 internal static extern ErrorCode AppGetId(out string appId);
38 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_name")]
39 internal static extern ErrorCode AppGetName(out string name);
41 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_resource_path")]
42 internal static extern string AppGetResourcePath();
44 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_data_path")]
45 internal static extern string AppGetDataPath();
47 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_cache_path")]
48 internal static extern string AppGetCachePath();
50 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_shared_data_path")]
51 internal static extern string AppGetSharedDataPath();
53 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_shared_resource_path")]
54 internal static extern string AppGetSharedResourcePath();
56 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_shared_trusted_path")]
57 internal static extern string AppGetSharedTrustedPath();
59 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_tep_resource_path")]
60 internal static extern string AppGetTepResourcePath();
62 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_external_cache_path")]
63 internal static extern string AppGetExternalCachePath();
65 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_external_data_path")]
66 internal static extern string AppGetExternalDataPath();
68 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_external_shared_data_path")]
69 internal static extern string AppGetExternalSharedDataPath();
71 [DllImport(Libraries.AppCommon, EntryPoint = "app_get_version")]
72 internal static extern ErrorCode AppGetVersion(out string version);
74 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_low_memory_status")]
75 internal static extern ErrorCode AppEventGetLowMemoryStatus(IntPtr handle, out LowMemoryStatus status);
77 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_low_battery_status")]
78 internal static extern ErrorCode AppEventGetLowBatteryStatus(IntPtr handle, out LowBatteryStatus status);
80 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_language")]
81 internal static extern ErrorCode AppEventGetLanguage(IntPtr handle, out string lang);
83 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_region_format")]
84 internal static extern ErrorCode AppEventGetRegionFormat(IntPtr handle, out string region);
86 [DllImport(Libraries.AppCommon, EntryPoint = "app_resource_manager_get")]
87 internal static extern ErrorCode AppResourceManagerGet(ResourceCategory category, string id, out string path);
89 [DllImport(Libraries.Application, EntryPoint = "app_resource_manager_get")]
90 internal static extern ErrorCode LegacyAppResourceManagerGet(ResourceCategory category, string id, out string path);
92 [DllImport(Libraries.AppCommon, EntryPoint = "app_event_get_device_orientation")]
93 internal static extern ErrorCode AppEventGetDeviceOrientation(IntPtr handle, out DeviceOrientation orientation);