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__
26 #include <sys/types.h>
28 /* app background category value */
29 #define APP_BG_CATEGORY_USER_DISABLE_FALSE_VAL 0x00000
30 #define APP_BG_CATEGORY_USER_DISABLE_TRUE_VAL 0x00001
31 #define APP_BG_CATEGORY_MEDIA_VAL 0x00002
32 #define APP_BG_CATEGORY_DOWNLOAD_VAL 0x00004
33 #define APP_BG_CATEGORY_BGNETWORK_VAL 0x00008
34 #define APP_BG_CATEGORY_LOCATION_VAL 0x00010
35 #define APP_BG_CATEGORY_SENSOR_VAL 0x00020
36 #define APP_BG_CATEGORY_IOTCOMM_VAL 0x00040
37 #define APP_BG_CATEGORY_SYSTEM_VAL 0x00080
39 #define APP_BG_CATEGORY_USER_DISABLE_FALSE_STR "enable"
40 #define APP_BG_CATEGORY_USER_DISABLE_TRUE_STR "disable"
41 #define APP_BG_CATEGORY_MEDIA_STR "media"
42 #define APP_BG_CATEGORY_DOWNLOAD_STR "download"
43 #define APP_BG_CATEGORY_BGNETWORK_STR "background-network"
44 #define APP_BG_CATEGORY_LOCATION_STR "location"
45 #define APP_BG_CATEGORY_SENSOR_STR "sensor"
46 #define APP_BG_CATEGORY_IOTCOMM_STR "iot-communication"
47 #define APP_BG_CATEGORY_SYSTEM "system"
50 * @brief A type to retrieve uid information from the manifest handle
54 } pkgmgrinfo_uidinfo_t;
57 * @brief A handle to insert certificate information
59 typedef void* pkgmgrinfo_instcertinfo_h;
62 * @brief Certificate Types to be used for setting information
65 PMINFO_SET_AUTHOR_ROOT_CERT = 0, /**< Author Root Certificate*/
66 PMINFO_SET_AUTHOR_INTERMEDIATE_CERT = 1, /**< Author Intermediate Certificate*/
67 PMINFO_SET_AUTHOR_SIGNER_CERT = 2, /**< Author Signer Certificate*/
68 PMINFO_SET_DISTRIBUTOR_ROOT_CERT = 3, /**< Distributor Root Certificate*/
69 PMINFO_SET_DISTRIBUTOR_INTERMEDIATE_CERT = 4, /**< Distributor Intermediate Certificate*/
70 PMINFO_SET_DISTRIBUTOR_SIGNER_CERT = 5, /**< Distributor Signer Certificate*/
71 PMINFO_SET_DISTRIBUTOR2_ROOT_CERT = 6, /**< End Entity Root Certificate*/
72 PMINFO_SET_DISTRIBUTOR2_INTERMEDIATE_CERT = 7, /**< End Entity Intermediate Certificate*/
73 PMINFO_SET_DISTRIBUTOR2_SIGNER_CERT = 8, /**< End Entity Signer Certificate*/
74 }pkgmgrinfo_instcert_type;
77 PMINFO_CERT_COMPARE_MATCH,
78 PMINFO_CERT_COMPARE_MISMATCH,
79 PMINFO_CERT_COMPARE_LHS_NO_CERT,
80 PMINFO_CERT_COMPARE_RHS_NO_CERT,
81 PMINFO_CERT_COMPARE_BOTH_NO_CERT,
82 PMINFO_CERT_COMPARE_ERROR,
83 } pkgmgrinfo_cert_compare_result_type_e;
86 * @brief API return values
89 PMINFO_R_ENOENT = -3, /**< No result */
90 PMINFO_R_EINVAL = -2, /**< Invalid argument */
91 PMINFO_R_ERROR = -1, /**< General error */
92 PMINFO_R_OK = 0 /**< General success */
96 * @brief Value to be used when filtering based on install location
98 #define PMINFO_PKGINFO_INSTALL_LOCATION_AUTO "LOCATION_AUTO"
101 * @brief Value to be used when filtering based on install location
103 #define PMINFO_PKGINFO_INSTALL_LOCATION_INTERNAL "LOCATION_INTERNAL"
106 * @brief Value to be used when filtering based on install location
108 #define PMINFO_PKGINFO_INSTALL_LOCATION_EXTERNAL "LOCATION_EXTERNAL"
111 * @brief Value to be used when filtering based on app-component
113 #define PMINFO_APPINFO_UI_APP "UI_APP"
116 * @brief Value to be used when filtering based on app-component
118 #define PMINFO_APPINFO_SVC_APP "SVC_APP"
121 PMINFO_HWACCELERATION_NOT_USE_GL = 0, /**< Don't use hardware acceleration*/
122 PMINFO_HWACCELERATION_USE_GL = 1, /**< Use hardware acceleration*/
123 PMINFO_HWACCELERATION_USE_SYSTEM_SETTING = 2 /**< Follow system setting for hardware acceleration */
124 }pkgmgrinfo_app_hwacceleration;
127 PMINFO_SCREENREADER_OFF = 0, /**< Don't use screen reader*/
128 PMINFO_SCREENREADER_ON = 1, /**< Use screen reader*/
129 PMINFO_SCREENREADER_USE_SYSTEM_SETTING = 2 /**< Follow system setting for screen reader */
130 }pkgmgrinfo_app_screenreader;
133 PMINFO_RECENTIMAGE_USE_ICON = 0, /**<Use icon for recent image*/
134 PMINFO_RECENTIMAGE_USE_CAPTURE = 1, /**< Use capture for recent image*/
135 PMINFO_RECENTIMAGE_USE_NOTHING = 2 /**< Don't use recent image */
136 }pkgmgrinfo_app_recentimage;
139 * @brief A handle to get package information
141 typedef void* pkgmgrinfo_pkginfo_h;
144 * @brief A handle to get application information
146 typedef void* pkgmgrinfo_appinfo_h;
149 * @brief A handle to get certificate information
151 typedef void* pkgmgrinfo_certinfo_h;
154 * @brief A handle to filter package information
156 typedef void* pkgmgrinfo_pkginfo_filter_h;
159 * @brief A handle to filter application information
161 typedef void* pkgmgrinfo_appinfo_filter_h;
164 * @brief A handle to filter application metadata information
166 typedef void* pkgmgrinfo_appinfo_metadata_filter_h;
169 * @brief A handle to get appcontrol information
171 typedef void* pkgmgrinfo_appcontrol_h;
174 * @brief type definition.
176 typedef void pkgmgrinfo_client;
179 * @fn int (*pkgmgrinfo_pkg_list_cb ) (const pkgmgrinfo_pkginfo_h handle, void *user_data)
181 * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_get_list(), pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
183 * @param[in] handle the pkginfo handle
184 * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_get_list(), pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
186 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
188 * @see pkgmgrinfo_pkginfo_get_list()
189 * @see pkgmgrinfo_pkginfo_filter_foreach_pkginfo()
191 typedef int (*pkgmgrinfo_pkg_list_cb ) (const pkgmgrinfo_pkginfo_h handle,
195 * @fn int (*pkgmgrinfo_app_list_cb ) (const pkgmgrinfo_appinfo_h handle, void *user_data)
197 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_get_list(), pkgmgrinfo_appinfo_filter_foreach_appinfo(), pkgmgrinfo_appinfo_metadata_filter_foreach()
199 * @param[in] handle the appinfo handle
200 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_get_list(), pkgmgrinfo_appinfo_filter_foreach_appinfo(), pkgmgrinfo_appinfo_metadata_filter_foreach()
202 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
204 * @see pkgmgrinfo_appinfo_get_list()
205 * @see pkgmgrinfo_appinfo_filter_foreach_appinfo()
206 * @see pkgmgrinfo_appinfo_metadata_filter_foreach()
208 typedef int (*pkgmgrinfo_app_list_cb ) (const pkgmgrinfo_appinfo_h handle,
212 * @fn int (*pkgmgrinfo_app_category_list_cb ) (const char *category_name, void *user_data)
214 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_category()
216 * @param[in] category_name the name of the category
217 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_category()
219 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
221 * @see pkgmgrinfo_appinfo_foreach_category()
223 typedef int (*pkgmgrinfo_app_category_list_cb ) (const char *category_name,
227 * @fn int (*pkgmgrinfo_app_permission_list_cb ) (const char *permission_type, void *user_data)
229 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_category()
231 * @param[in] permission_name the name of the permission
232 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_category()
234 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
236 * @see pkgmgrinfo_appinfo_foreach_category()
238 typedef int (*pkgmgrinfo_app_permission_list_cb ) (const char *permission_type,
242 * @fn int (*pkgmgrinfo_pkg_privilege_list_cb ) (const char *privilege_name, void *user_data)
244 * @brief Specifies the type of function passed to pkgmgrinfo_pkginfo_foreach_privilege()
246 * @param[in] privilege_name the name of the privilege
247 * @param[in] user_data user data passed to pkgmgrinfo_pkginfo_foreach_privilege()
249 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
251 * @see pkgmgrinfo_pkginfo_foreach_privilege()
253 typedef int (*pkgmgrinfo_pkg_privilege_list_cb ) (const char *privilege_name,
257 * @fn int (*pkgmgrinfo_app_metadata_list_cb ) (const char *metadata_key, const char *metadata_value, void *user_data)
259 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_metadata()
261 * @param[in] metadata_name the name of the metadata
262 * @param[in] metadata_value the value of the metadata
263 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_metadata()
265 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
267 * @see pkgmgrinfo_appinfo_foreach_metadata()
269 typedef int (*pkgmgrinfo_app_metadata_list_cb ) (const char *metadata_key,
270 const char *metadata_value, void *user_data);
273 * @fn int (*pkgmgrinfo_app_control_list_cb ) (pkgmgrinfo_appcontrol_h handle, void *user_data)
275 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_appcontrol()
277 * @param[in] handle the appcontrol handle to be used to get operation, uri and mime info
278 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_appcontrol()
280 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
282 * @see pkgmgrinfo_appinfo_foreach_appcontrol()
284 typedef int (*pkgmgrinfo_app_control_list_cb ) (const char *operation, const char *uri, const char *mime,
288 * @fn int (*pkgmgrinfo_app_background_category_list_cb ) (const char *category_name, void *user_data)
290 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_background_category()
292 * @param[in] category_name retrieved background category name
293 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_background_category
295 * @return 0 if success, negative value(<0) if fail. Callback is not called if return value is negative.\n
297 * @see pkgmgrinfo_appinfo_foreach_background_category()
299 typedef int (*pkgmgrinfo_app_background_category_list_cb ) (const char *category_name, void *user_data);
302 * @fn int (*pkgmgrinfo_app_splash_screen_list_cb) (const char *src,
303 * const char *type, const char *orientation,
304 * const char *indicatordisplay, void *user_data);
305 * @brief Specifies the type of function passed to pkgmgrinfo_appinfo_foreach_splash_screen()
307 * @param[in] src the source of the splashscreen
308 * @param[in] type the type of the splashscreen
309 * @param[in] orientation the orientation of the splashscreen
310 * @param[in] indicatordisplay the indicator-display of the splashscreen
311 * @param[in] operation the app-control operation of the splashscreen
312 * @param[in] user_data user data passed to pkgmgrinfo_appinfo_foreach_splash_screen()
314 * @return 0 if success, negative value(<0) if fail, Callback is not called if return value is negative.\n
316 * @see pkgmgrinfo_appinfo_foreach_splash_screen()
318 typedef int (*pkgmgrinfo_app_splash_screen_list_cb) (const char *src,
319 const char *type, const char *orientation,
320 const char *indicatordisplay, const char *operation,
323 typedef int (*pkgmgrinfo_handler)(uid_t target_uid, int req_id, const char *pkg_type,
324 const char *pkgid, const char *key,
325 const char *val, const void *pmsg, void *data);
329 * @brief Install Location Types
332 PMINFO_INSTALL_LOCATION_AUTO = 0, /**< Auto*/
333 PMINFO_INSTALL_LOCATION_INTERNAL_ONLY, /**< Internal Installation*/
334 PMINFO_INSTALL_LOCATION_PREFER_EXTERNAL, /**< External Installation*/
335 } pkgmgrinfo_install_location;
338 * @brief Application Component Types
341 PMINFO_ALL_APP = 0, /**< All Application*/
342 PMINFO_UI_APP, /**< UI Application*/
343 PMINFO_SVC_APP, /**< Service Application*/
344 PMINFO_WIDGET_APP, /**< Widget Application*/
345 } pkgmgrinfo_app_component;
348 * @brief Application Storage Types
351 PMINFO_INTERNAL_STORAGE = 0, /**< Internal Storage*/
352 PMINFO_EXTERNAL_STORAGE = 1, /**< External Storage*/
353 } pkgmgrinfo_installed_storage;
356 * @brief Certificate Types to be used for getting information
359 PMINFO_AUTHOR_ROOT_CERT = 0, /**< Author Root Certificate*/
360 PMINFO_AUTHOR_INTERMEDIATE_CERT = 1, /**< Author Intermediate Certificate*/
361 PMINFO_AUTHOR_SIGNER_CERT = 2, /**< Author Signer Certificate*/
362 PMINFO_DISTRIBUTOR_ROOT_CERT = 3, /**< Distributor Root Certificate*/
363 PMINFO_DISTRIBUTOR_INTERMEDIATE_CERT = 4, /**< Distributor Intermediate Certificate*/
364 PMINFO_DISTRIBUTOR_SIGNER_CERT = 5, /**< Distributor Signer Certificate*/
365 PMINFO_DISTRIBUTOR2_ROOT_CERT = 6, /**< End Entity Root Certificate*/
366 PMINFO_DISTRIBUTOR2_INTERMEDIATE_CERT = 7, /**< End Entity Intermediate Certificate*/
367 PMINFO_DISTRIBUTOR2_SIGNER_CERT = 8, /**< End Entity Signer Certificate*/
368 } pkgmgrinfo_cert_type;
371 * @brief Install Location Types to be used when setting data in DB
374 INSTALL_INTERNAL = 0, /**< Internal Installation*/
375 INSTALL_EXTERNAL, /**< External Installation*/
379 * @brief permission Types
382 PMINFO_PERMISSION_NORMAL = 0, /**< permission normal*/
383 PMINFO_PERMISSION_SIGNATURE, /**< permission type is signature*/
384 PMINFO_PERMISSION_PRIVILEGE, /**< permission type is privilege*/
385 } pkgmgrinfo_permission_type;
391 } pkgmgrinfo_client_type;