4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jayoun Lee <airjany@samsung.com>, Sewook Park <sewook7.park@samsung.com>,
7 * Jaeho Lee <jaeho81.lee@samsung.com>, Shobhit Srivastava <shobhit.s@samsung.com>
9 * Licensed under the Apache License, Version 2.0 (the "License");
10 * you may not use this file except in compliance with the License.
11 * You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing, software
16 * distributed under the License is distributed on an "AS IS" BASIS,
17 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 * See the License for the specific language governing permissions and
19 * limitations under the License.
23 #ifndef __PKGMGRINFO_TYPE_H__
24 #define __PKGMGRINFO_TYPE_H__
30 /** Integer property for mode*/
31 #define PMINFO_SUPPORT_MODE_ULTRA_POWER_SAVING 0x00000001
32 #define PMINFO_SUPPORT_MODE_COOL_DOWN 0x00000002
33 #define PMINFO_SUPPORT_MODE_SCREEN_READER 0x00000004
34 #define PMINFO_SUPPORT_MODE_ACTIVATION_STUB 0x00000008
36 #define PMINFO_SUPPORT_FEATURE_MULTI_WINDOW 0x00000001
37 #define PMINFO_SUPPORT_FEATURE_OOM_TERMINATION 0x00000002
38 #define PMINFO_SUPPORT_FEATURE_LARGE_MEMORY 0x00000004
39 #define PMINFO_SUPPORT_FEATURE_HIGH_PRIORITY 0x00000008
41 #define PMINFO_SUPPORT_CATEGORY_LOCK_APP 0x00000001
42 #define PMINFO_SUPPORT_CATEGORY_HOME_APP 0x00000002
43 #define PMINFO_SUPPORT_CATEGORY_IME_APP 0x00000004
45 /*app background category value */
46 #define APP_BG_CATEGORY_USER_DISABLE_FALSE_VAL 0x00000
47 #define APP_BG_CATEGORY_USER_DISABLE_TRUE_VAL 0x00001
48 #define APP_BG_CATEGORY_MEDIA_VAL 0x00002
49 #define APP_BG_CATEGORY_DOWNLOAD_VAL 0x00004
50 #define APP_BG_CATEGORY_BGNETWORK_VAL 0x00008
51 #define APP_BG_CATEGORY_LOCATION_VAL 0x00010
52 #define APP_BG_CATEGORY_SENSOR_VAL 0x00020
53 #define APP_BG_CATEGORY_IOTCOMM_VAL 0x00040
54 #define APP_BG_CATEGORY_SYSTEM_VAL 0x00080
56 #define APP_BG_CATEGORY_USER_DISABLE_FALSE_STR "enable"
57 #define APP_BG_CATEGORY_USER_DISABLE_TRUE_STR "disable"
58 #define APP_BG_CATEGORY_MEDIA_STR "media"
59 #define APP_BG_CATEGORY_DOWNLOAD_STR "download"
60 #define APP_BG_CATEGORY_BGNETWORK_STR "background-network"
61 #define APP_BG_CATEGORY_LOCATION_STR "location"
62 #define APP_BG_CATEGORY_SENSOR_STR "sensor"
63 #define APP_BG_CATEGORY_IOTCOMM_STR "iot-communication"
64 #define APP_BG_CATEGORY_SYSTEM "system"
68 * @brief A handle to insert certificate information
70 typedef void* pkgmgrinfo_instcertinfo_h;
73 * @brief A handle to get package information
75 typedef void* pkgmgrinfo_pkginfo_h;
78 * @brief A handle to get application information
80 typedef void* pkgmgrinfo_appinfo_h;
83 * @brief A handle to get certificate information
85 typedef void* pkgmgrinfo_certinfo_h;
88 * @brief A handle to insert package information
90 typedef void* pkgmgrinfo_pkgdbinfo_h;
93 * @brief A handle to filter package information
95 typedef void* pkgmgrinfo_pkginfo_filter_h;
98 * @brief A handle to filter application information
100 typedef void* pkgmgrinfo_appinfo_filter_h;
103 * @brief A handle to filter application metadata information
105 typedef void* pkgmgrinfo_appinfo_metadata_filter_h;
108 * @brief A handle to get appcontrol information
110 typedef void* pkgmgrinfo_appcontrol_h;
112 typedef void pkgmgrinfo_client;
115 * @brief Certificate Types to be used for setting information
118 PMINFO_SET_AUTHOR_ROOT_CERT = 0, /**< Author Root Certificate*/
119 PMINFO_SET_AUTHOR_INTERMEDIATE_CERT = 1, /**< Author Intermediate Certificate*/
120 PMINFO_SET_AUTHOR_SIGNER_CERT = 2, /**< Author Signer Certificate*/
121 PMINFO_SET_DISTRIBUTOR_ROOT_CERT = 3, /**< Distributor Root Certificate*/
122 PMINFO_SET_DISTRIBUTOR_INTERMEDIATE_CERT = 4, /**< Distributor Intermediate Certificate*/
123 PMINFO_SET_DISTRIBUTOR_SIGNER_CERT = 5, /**< Distributor Signer Certificate*/
124 PMINFO_SET_DISTRIBUTOR2_ROOT_CERT = 6, /**< End Entity Root Certificate*/
125 PMINFO_SET_DISTRIBUTOR2_INTERMEDIATE_CERT = 7, /**< End Entity Intermediate Certificate*/
126 PMINFO_SET_DISTRIBUTOR2_SIGNER_CERT = 8, /**< End Entity Signer Certificate*/
127 }pkgmgrinfo_instcert_type;
130 PMINFO_CERT_COMPARE_MATCH,
131 PMINFO_CERT_COMPARE_MISMATCH,
132 PMINFO_CERT_COMPARE_LHS_NO_CERT,
133 PMINFO_CERT_COMPARE_RHS_NO_CERT,
134 PMINFO_CERT_COMPARE_BOTH_NO_CERT,
135 PMINFO_CERT_COMPARE_ERROR,
136 } pkgmgrinfo_cert_compare_result_type_e;
139 * @brief API return values
142 PMINFO_R_EINVAL = -2, /**< Invalid argument */
143 PMINFO_R_ERROR = -1, /**< General error */
144 PMINFO_R_OK = 0 /**< General success */
148 PMINFO_HWACCELERATION_OFF = 0, /**< Don't use hardware acceleration*/
149 PMINFO_HWACCELERATION_ON = 1, /**< Use hardware acceleration*/
150 PMINFO_HWACCELERATION_DEFAULT = 2 /**< Follow system setting for hardware acceleration */
151 }pkgmgrinfo_app_hwacceleration;
154 PMINFO_SCREENREADER_OFF = 0, /**< Don't use screen reader*/
155 PMINFO_SCREENREADER_ON = 1, /**< Use screen reader*/
156 PMINFO_SCREENREADER_USE_SYSTEM_SETTING = 2 /**< Follow system setting for screen reader */
157 }pkgmgrinfo_app_screenreader;
160 PMINFO_RECENTIMAGE_USE_ICON = 0, /**<Use icon for recent image*/
161 PMINFO_RECENTIMAGE_USE_CAPTURE = 1, /**< Use capture for recent image*/
162 PMINFO_RECENTIMAGE_USE_NOTHING = 2 /**< Don't use recent image */
163 }pkgmgrinfo_app_recentimage;
166 * @brief Install Location Types
169 PMINFO_INSTALL_LOCATION_AUTO = 0, /**< Auto*/
170 PMINFO_INSTALL_LOCATION_INTERNAL_ONLY, /**< Internal Installation*/
171 PMINFO_INSTALL_LOCATION_PREFER_EXTERNAL, /**< External Installation*/
172 }pkgmgrinfo_install_location;
175 * @brief Application Component Types
178 PMINFO_ALL_APP = 0, /**< All Application*/
179 PMINFO_UI_APP, /**< UI Application*/
180 PMINFO_SVC_APP, /**< Service Application*/
181 }pkgmgrinfo_app_component;
184 * @brief Application Storage Types
187 PMINFO_INTERNAL_STORAGE = 0, /**< Internal Storage*/
188 PMINFO_EXTERNAL_STORAGE = 1, /**< External Storage*/
189 }pkgmgrinfo_installed_storage;
192 * @brief Certificate Types to be used for getting information
195 PMINFO_AUTHOR_ROOT_CERT = 0, /**< Author Root Certificate*/
196 PMINFO_AUTHOR_INTERMEDIATE_CERT = 1, /**< Author Intermediate Certificate*/
197 PMINFO_AUTHOR_SIGNER_CERT = 2, /**< Author Signer Certificate*/
198 PMINFO_DISTRIBUTOR_ROOT_CERT = 3, /**< Distributor Root Certificate*/
199 PMINFO_DISTRIBUTOR_INTERMEDIATE_CERT = 4, /**< Distributor Intermediate Certificate*/
200 PMINFO_DISTRIBUTOR_SIGNER_CERT = 5, /**< Distributor Signer Certificate*/
201 PMINFO_DISTRIBUTOR2_ROOT_CERT = 6, /**< End Entity Root Certificate*/
202 PMINFO_DISTRIBUTOR2_INTERMEDIATE_CERT = 7, /**< End Entity Intermediate Certificate*/
203 PMINFO_DISTRIBUTOR2_SIGNER_CERT = 8, /**< End Entity Signer Certificate*/
204 }pkgmgrinfo_cert_type;
207 * @brief Install Location Types to be used when setting data in DB
210 INSTALL_INTERNAL = 0, /**< Internal Installation*/
211 INSTALL_EXTERNAL, /**< External Installation*/
215 * @brief permission Types
218 PMINFO_PERMISSION_NORMAL = 0, /**< permission normal*/
219 PMINFO_PERMISSION_SIGNATURE, /**< permission type is signature*/
220 PMINFO_PERMISSION_PRIVILEGE, /**< permission type is privilege*/
221 }pkgmgrinfo_permission_type;
228 }pkgmgrinfo_client_type;
231 * @fn int (*pkgmgrinfo_pkg_list_cb ) (const pkgmgrinfo_pkginfo_h handle, void *user_data)
233 * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_get_list(), pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
235 * @param[in] handle the pkginfo handle
236 * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_get_list(), pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
238 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
240 * @see pkgmgrinfo_pkginfo_get_list()
241 * @see pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
243 typedef int (*pkgmgrinfo_pkg_list_cb ) (const pkgmgrinfo_pkginfo_h handle, void *user_data);
246 * @fn int (*pkgmgrinfo_app_list_cb ) (const pkgmgrinfo_appinfo_h handle, void *user_data)
248 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_get_list(), pkgmgrinfo_appinfo_filter_foreach_appinfo(), pkgmgrinfo_appinfo_metadata_filter_foreach()
250 * @param[in] handle the appinfo handle
251 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_get_list(), pkgmgrinfo_appinfo_filter_foreach_appinfo(), pkgmgrinfo_appinfo_metadata_filter_foreach()
253 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
255 * @see pkgmgrinfo_appinfo_get_list()
256 * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
257 * @see pkgmgrinfo_appinfo_metadata_filter_foreach()
259 typedef int (*pkgmgrinfo_app_list_cb ) (const pkgmgrinfo_appinfo_h handle, void *user_data);
262 * @fn int (*pkgmgrinfo_app_category_list_cb ) (const char *category_name, void *user_data)
264 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_category()
266 * @param[in] category_name the name of the category
267 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_category()
269 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
271 * @see pkgmgrinfo_appinfo_foreach_category()
273 typedef int (*pkgmgrinfo_app_category_list_cb ) (const char *category_name, void *user_data);
276 * @fn int (*pkgmgrinfo_app_permission_list_cb ) (const char *permission_type, void *user_data)
278 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_category()
280 * @param[in] permission_name the name of the permission
281 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_category()
283 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
285 * @see pkgmgrinfo_appinfo_foreach_category()
287 typedef int (*pkgmgrinfo_app_permission_list_cb ) (const char *permission_type, void *user_data);
290 * @fn int (*pkgmgrinfo_pkg_privilege_list_cb ) (const char *privilege_name, void *user_data)
292 * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_foreach_privilege()
294 * @param[in] privilege_name the name of the privilege
295 * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_foreach_privilege()
297 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
299 * @see pkgmgrinfo_pkginfo_foreach_privilege()
301 typedef int (*pkgmgrinfo_pkg_privilege_list_cb ) (const char *privilege_name, void *user_data);
304 * @fn int (*pkgmgrinfo_app_metadata_list_cb ) (const char *metadata_key, const char *metadata_value, void *user_data)
306 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_metadata()
308 * @param[in] metadata_name the name of the metadata
309 * @param[in] metadata_value the value of the metadata
310 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_metadata()
312 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
314 * @see pkgmgrinfo_appinfo_foreach_metadata()
316 typedef int (*pkgmgrinfo_app_metadata_list_cb ) (const char *metadata_key, const char *metadata_value, void *user_data);
319 * @fn int (*pkgmgrinfo_app_control_list_cb ) const char *operation, const char *uri, const char *mime, void *user_data)
321 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_appcontrol()
323 * @param[in] operation, retrieved operation
324 * @param[in] uri, retrieved uri
325 * @param[in] mime, retrieved mime
326 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_appcontrol()
328 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
330 * @see pkgmgrinfo_appinfo_foreach_appcontrol()
332 typedef int (*pkgmgrinfo_app_control_list_cb ) (const char *operation, const char *uri, const char *mime, void *user_data);
335 * @fn int (*pkgmgrinfo_app_background_category_list_cb ) (const char *category_name, void *user_data)
337 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_background_category()
339 * @param[in] category_name retrieved background category name
340 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_background_category
342 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
344 * @see pkgmgrinfo_appinfo_foreach_background_category()
346 typedef int (*pkgmgrinfo_app_background_category_list_cb ) (const char *category_name, void *user_data);
349 * @brief type definition.
351 typedef int (*pkgmgrinfo_handler)(int req_id, const char *pkg_type,
352 const char *pkgid, const char *key,
353 const char *val, const void *pmsg, void *data);
355 typedef int (*pkgmgrinfo_handler_zone)(int req_id, const char *pkg_type,
356 const char *pkgid, const char *key,
357 const char *val, const void *pmsg, void *data, const char *zone);
361 #endif /* __PKGPMGRINFO_TYPE_H__ */