2 * Copyright (c) 2011 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 #ifndef __TIZEN_APPFW_PACKAGE_INFO_H
19 #define __TIZEN_APPFW_PACKAGE_INFO_H
28 * @file package_info.h
32 * @addtogroup CAPI_PACKAGE_INFO_MODULE
38 * @brief The package information handle.
41 typedef struct package_info_s *package_info_h;
44 * @brief The package update information handle.
47 typedef struct package_updateinfo_s *package_updateinfo_h;
50 * @brief Enumeration for storage type.
54 PACKAGE_INFO_INTERNAL_STORAGE = 0, /**< Internal storage */
55 PACKAGE_INFO_EXTERNAL_STORAGE = 1, /**< External storage */
56 PACKAGE_INFO_EXTENDED_STORAGE = 2, /**< Extended storage (Since 5.0) */
57 } package_info_installed_storage_type_e;
61 * @brief Enumeration for app component type.
65 PACKAGE_INFO_ALLAPP = 0, /**< All application */
66 PACKAGE_INFO_UIAPP = 1, /**< UI application */
67 PACKAGE_INFO_SERVICEAPP = 2, /**< Service application */
68 PACKAGE_INFO_WIDGETAPP = 3, /**< Widget application (Since 4.0) */
69 PACKAGE_INFO_WATCHAPP = 4, /**< Watch application (Since 4.0) */
70 } package_info_app_component_type_e;
74 * @brief Enumeration for certification type.
78 PACKAGE_INFO_AUTHOR_ROOT_CERT = 0, /**< Author Root Certificate*/
79 PACKAGE_INFO_AUTHOR_INTERMEDIATE_CERT = 1, /**< Author Intermediate Certificate*/
80 PACKAGE_INFO_AUTHOR_SIGNER_CERT = 2, /**< Author Signer Certificate*/
81 PACKAGE_INFO_DISTRIBUTOR_ROOT_CERT = 3, /**< Distributor Root Certificate*/
82 PACKAGE_INFO_DISTRIBUTOR_INTERMEDIATE_CERT = 4, /**< Distributor Intermediate Certificate*/
83 PACKAGE_INFO_DISTRIBUTOR_SIGNER_CERT = 5, /**< Distributor Signer Certificate*/
84 PACKAGE_INFO_DISTRIBUTOR2_ROOT_CERT = 6, /**< Distributor2 Root Certificate*/
85 PACKAGE_INFO_DISTRIBUTOR2_INTERMEDIATE_CERT = 7, /**< Distributor2 Intermediate Certificate*/
86 PACKAGE_INFO_DISTRIBUTOR2_SIGNER_CERT = 8, /**< Distributor2 Signer Certificate*/
87 } package_cert_type_e;
90 * @brief Enumeration for package update info type.
94 PACKAGE_UPDATEINFO_TYPE_NONE = 0, /**< None type */
95 PACKAGE_UPDATEINFO_TYPE_FORCE, /**< Force type */
96 PACKAGE_UPDATEINFO_TYPE_OPTIONAL /**< Optional type */
97 } package_updateinfo_type_e;
100 * @brief Called for each update information of all packages.
102 * @remarks @a info should not be freed and can be used only in the callback.
103 * @param[in] info The package update information handle
104 * @param[in] user_data The user data passed from the foreach function
105 * @return @c true to continue with the next iteration of the loop,
106 * otherwise @c false to break out of the loop
107 * @pre package_info_updateinfo_foreach_updateinfo() will invoke this callback.
108 * @see package_info_updateinfo_foreach_updateinfo()
110 typedef bool (*package_info_updateinfo_cb) (package_updateinfo_h info, void *user_data);
113 * @brief Called to get the application ID once for each installed package.
115 * @param[in] comp_type The application component type
116 * @param[in] app_id The application ID.
117 * @param[in] user_data The user data passed from the foreach function
118 * @return @c true to continue with the next iteration of the loop,
119 * otherwise @c false to break out of the loop
120 * @pre package_info_foreach_app_from_package() will invoke this callback.
121 * @see package_info_foreach_app_from_package()
123 typedef bool (*package_info_app_cb) (package_info_app_component_type_e comp_type, const char *app_id, void *user_data);
127 * @brief Called to get the certification information.
129 * @param[in] handle The package info handle
130 * @param[in] cert_type The certificate type
131 * @param[in] cert_value The certificate value of corresponding certificate key \n
132 * This value is base64 encoded data.
133 * @param[in] user_data The user data passed from the foreach function
134 * @return @c true to continue with the next iteration of the loop,
135 * otherwise @c false to break out of the loop
136 * @pre package_info_foreach_cert_info() will invoke this callback.
137 * @see package_info_foreach_cert_info()
139 typedef bool (*package_info_cert_info_cb) (package_info_h handle, package_cert_type_e cert_type, const char *cert_value, void *user_data);
143 * @brief Called to get the privilege information.
145 * @param[in] privilege_name the name of the privilege
146 * @param[in] user_data The user data passed from the foreach function
147 * @return @c true to continue with the next iteration of the loop,
148 * otherwise @c false to break out of the loop
149 * @pre package_info_foreach_privilege_info() will invoke this callback.
150 * @see package_info_foreach_privilege_info()
152 typedef bool (*package_info_privilege_info_cb) (const char *privilege_name, void *user_data);
156 * @brief Called to provide dependency information.
158 * @remarks @a from, @a to, @a type and @a required_version are managed by the platform and will be released after the callback exits.
159 * @param[in] from The ID of package which depends other package
160 * @param[in] to The ID of package which depended by other package
161 * @param[in] type The type of dependency
162 * @param[in] required_version The required version
163 * @param[in] user_data The user data passed from the foreach function
164 * @return @c true to continue with the next iteration of the loop,
165 * otherwise @c false to break out of the loop
166 * @pre package_info_foreach_dependency_info() will invoke this callback.
167 * @pre package_info_foreach_dependency_info_depends_on() will invoke this callback.
168 * @see package_info_foreach_dependency_info()
169 * @see package_info_foreach_dependency_info_depends_on()
171 typedef bool (*package_info_dependency_info_cb) (const char *from, const char *to, const char *type, const char *required_version, void *user_data);
175 * @brief Retrieves all application IDs of each package.
177 * @param[in] package_info The package info handle
178 * @param[in] comp_type The application component type
179 * @param[in] callback The callback function to invoke
180 * @param[in] user_data The user data to be passed to the callback function
181 * @return @c 0 on success,
182 * otherwise a negative error value
183 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
184 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
185 * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package
186 * @post This function invokes package_info_app_cb() repeatedly for each package.
187 * @see package_info_app_cb()
189 int package_info_foreach_app_from_package(package_info_h package_info, package_info_app_component_type_e comp_type, package_info_app_cb callback, void *user_data);
193 * @brief Destroys the package information handle and releases all its resources.
195 * @param[in] package_info The package information handle
196 * @return @c 0 on success,
197 * otherwise a negative error value
198 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
199 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
200 * @see package_manager_foreach_package_info()
201 * @see package_manager_get_package_info()
203 int package_info_destroy(package_info_h package_info);
207 * @brief Gets the package name.
209 * @remarks You must release @a package using free().
210 * @param[in] package_info The package information
211 * @param[out] package The package name
212 * @return @c 0 on success,
213 * otherwise a negative error value
214 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
215 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
216 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
218 int package_info_get_package(package_info_h package_info, char **package);
222 * @brief Gets the main application ID of the package.
224 * @remarks You must release @a main_app_id using free().
225 * @param[in] package_info The package information
226 * @param[out] main_app_id The main application ID of the package
227 * @return @c 0 on success,
228 * otherwise a negative error value
229 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
230 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
231 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
232 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
234 int package_info_get_main_app_id(package_info_h package_info, char **main_app_id);
238 * @brief Gets the label of the package.
240 * @remarks You must release @a label using free().
241 * @param[in] package_info The package information
242 * @param[out] label The label of the package
243 * @return @c 0 on success,
244 * otherwise a negative error value
245 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
246 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
247 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
248 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
250 int package_info_get_label(package_info_h package_info, char **label);
254 * @brief Gets the absolute path to the icon image.
256 * @remarks You must release @a path using free().
257 * @param[in] package_info The package information
258 * @param[out] path The path of the package
259 * @return @c 0 on success,
260 * otherwise a negative error value
261 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
262 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
263 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
264 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
266 int package_info_get_icon(package_info_h package_info, char **path);
270 * @brief Gets the version of the package.
272 * @remarks You must release @a version using free().
273 * @param[in] package_info The package information
274 * @param[out] version The version of the package
275 * @return @c 0 on success,
276 * otherwise a negative error value
277 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
278 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
279 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
280 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
282 int package_info_get_version(package_info_h package_info, char **version);
286 * @brief Gets the type of the package.
288 * @remarks You must release @a type using free().
289 * @param[in] package_info The package information
290 * @param[out] type The type of the package
291 * @return @c 0 on success,
292 * otherwise a negative error value
293 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
294 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
295 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
296 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
298 int package_info_get_type(package_info_h package_info, char **type);
302 * @brief Gets the installed storage for the given package.
304 * @param[in] package_info The package information
305 * @param[out] storage The installed storage
306 * @return @c 0 on success,
307 * otherwise a negative error value
308 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
309 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
311 int package_info_get_installed_storage(package_info_h package_info, package_info_installed_storage_type_e *storage);
315 * @brief Gets the root path of the package.
317 * @remarks You must release @a path using free().
318 * @param[in] package_info The package information
319 * @param[out] path The root path of the package
320 * @return @c 0 on success,
321 * otherwise a negative error value
322 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
323 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
324 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
325 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
327 int package_info_get_root_path(package_info_h package_info, char **path);
332 * @brief Gets the name of the TEP (Tizen Expansion Package).
333 * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
334 * @privlevel platform
335 * @privilege %http://tizen.org/privilege/packagemanager.admin
336 * @remarks Name must be released using free().
337 * @param[in] package_info The package information
338 * @param[out] name The name of the tep
339 * @return 0 on success,
340 * otherwise a negative error value
341 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
342 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
343 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
344 * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error
345 * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
347 int package_info_get_tep_name(package_info_h package_info, char **name);
351 * @brief Checks whether the package is system package.
353 * @param[in] package_info The package information
354 * @param[out] system @c true if the package is system package,
355 * otherwise @c false if the package is not system package
356 * @return @c 0 on success,
357 * otherwise a negative error value
358 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
359 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
360 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
361 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
363 int package_info_is_system_package(package_info_h package_info, bool *system);
367 * @brief Checks whether the package is removable.
369 * @param[in] package_info The package information
370 * @param[out] removable The removable info of the package
371 * @return @c 0 on success,
372 * otherwise a negative error value
373 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
374 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
375 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
376 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR IO error
378 int package_info_is_removable_package(package_info_h package_info, bool *removable);
382 * @brief Checks whether the package is preloaded.
384 * @param[in] package_info The package information
385 * @param[out] preload The preload info of the package
386 * @return @c 0 on success,
387 * otherwise a negative error value
388 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
389 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
390 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
391 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
393 int package_info_is_preload_package(package_info_h package_info, bool *preload);
397 * @brief Checks whether two package information is equal.
399 * @param[in] lhs The first package information to be compared
400 * @param[in] rhs The second package information to be compared
401 * @param[out] equal @c true if the package information are equal,
402 * otherwise @c false if package information are not equal
403 * @return @c 0 on success,
404 * otherwise a negative error value
405 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
406 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
407 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
408 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred
410 int package_info_is_equal(package_info_h lhs, package_info_h rhs, bool *equal);
414 * @brief Checks whether the package info is accessible for the given package.
416 * @param[in] package_info The package information
417 * @param[out] accessible @c true if the package info is accessible,
418 * otherwise @c false if the package info is not accessible
419 * @return @c 0 on success,
420 * otherwise a negative error value
421 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
422 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
424 int package_info_is_accessible(package_info_h package_info, bool *accessible);
427 * @brief Gets the installed time for the given package.
428 * @details If the package was updated, the @a installed_time represents updated time.
429 * So, the meaning of 'installed time' corresponds with 'last modified time'.
431 * @param[in] package_info The package information
432 * @param[out] installed_time The integer value of time_t type for installed time
433 * @return @c 0 on success,
434 * otherwise a negative error value
435 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
436 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
437 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred
439 int package_info_get_installed_time(package_info_h package_info, int *installed_time);
442 * @brief Clones the package information handle.
444 * @param[out] clone The newly created package information handle
445 * @param[in] package_info The package information
446 * @return @c 0 on success,
447 * otherwise a negative error value
448 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
449 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
450 * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed
451 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
453 int package_info_clone(package_info_h *clone, package_info_h package_info);
456 * @brief Gets the package information for the given package.
458 * @remarks You must release @a package_info using package_info_destroy().
459 * @param[in] package The ID of the package
460 * @param[out] package_info The package information for the given package ID
461 * @return @c 0 on success,
462 * otherwise a negative error value
463 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
464 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
465 * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed
466 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
468 int package_info_create(const char *package, package_info_h *package_info);
472 * @brief Retrieves certification information of the package.
474 * @param[in] package_info The package information
475 * @param[in] callback The iteration callback function
476 * @param[in] user_data The user data to be passed to the callback function
477 * @return @c 0 on success,
478 * otherwise a negative error value
479 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
480 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
481 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
482 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
484 int package_info_foreach_cert_info(package_info_h package_info, package_info_cert_info_cb callback, void *user_data);
488 * @brief Retrieves privilege information of the package.
490 * @param[in] package_info The package information
491 * @param[in] callback The iteration callback function
492 * @param[in] user_data The user data to be passed to the callback function
493 * @return @c 0 on success,
494 * otherwise a negative error value
495 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
496 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
497 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
498 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
500 int package_info_foreach_privilege_info(package_info_h package_info, package_info_privilege_info_cb callback, void *user_data);
503 * @brief Retrieves dependency information of the package.
504 * @details The results include packages that are only directly required by a given package.
505 * For example, if we have:
511 * where A --> B means that A depends on B, and package_info_foreach_dependency_info(A) is called,
512 * the results will be: {from A to B}.
514 * @remarks The function provides the results synchronously. If there are no dependencies, this function will return PACKAGE_MANAGER_ERROR_NONE immediately and the callback will not be invoked.
515 * @param[in] package_info The package information
516 * @param[in] callback The iteration callback function
517 * @param[in] user_data The user data to be passed to the callback function
518 * @return @c 0 on success,
519 * otherwise a negative error value
520 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
521 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
522 * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error
524 int package_info_foreach_dependency_info(package_info_h package_info, package_info_dependency_info_cb callback, void *user_data);
527 * @brief Retrieves information about which packages depend on a given package.
528 * @details The results include packages that both directly and indirectly depend on a given package.
529 * For example, if we have:
535 * where A --> B means that A depends on B, and package_info_foreach_dependency_info_depends_on(C) is called,
536 * the results will be: {from B to C}, {from D to C}, {from A to B}.
538 * @remarks The function provides the results synchronously. If there are no dependencies, this function will return PACKAGE_MANAGER_ERROR_NONE immediately and the callback will not be invoked.
539 * @param[in] package_info The package information
540 * @param[in] callback The iteration callback function
541 * @param[in] user_data The user data to be passed to the callback function
542 * @return @c 0 on success,
543 * otherwise a negative error value
544 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
545 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
546 * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error
548 int package_info_foreach_dependency_info_depends_on(package_info_h package_info, package_info_dependency_info_cb callback, void *user_data);
551 * @brief Gets the package update information for the given package.
553 * @remarks You must release @a info using package_info_updateinfo_destroy().
554 * @param[in] pkgid The ID of the package
555 * @param[out] info The package update information for the given package ID
556 * @return @c 0 on success,
557 * otherwise a negative error value
558 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
559 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
560 * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE The package is not installed
561 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
562 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Database error occurred
563 * @see package_info_updateinfo_destroy()
565 int package_info_updateinfo_create(const char *pkgid, package_updateinfo_h *info);
568 * @brief Gets the package name.
570 * @remarks You must release @a package using free().
571 * @param[in] info The package update information
572 * @param[out] package The package name
573 * @return @c 0 on success,
574 * otherwise a negative error value
575 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
576 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
577 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
578 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occurred
580 int package_info_updateinfo_get_pkgid(package_updateinfo_h info, char **package);
583 * @brief Gets the update version of package.
585 * @remarks You must release @a version using free().
586 * @param[in] info The package update information
587 * @param[out] version The package update version
588 * @return @c 0 on success,
589 * otherwise a negative error value
590 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
591 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
592 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
593 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occurred
595 int package_info_updateinfo_get_version(package_updateinfo_h info, char **version);
598 * @brief Gets the update type of package.
600 * @param[in] info The package update information
601 * @param[out] type The package update type
602 * @return @c 0 on success,
603 * otherwise a negative error value
604 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
605 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
606 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error occurred
608 int package_info_updateinfo_get_type(package_updateinfo_h info,
609 package_updateinfo_type_e *type);
612 * @brief Destroys the package update information handle and releases all its resources.
614 * @param[in] info The package update information handle
615 * @return @c 0 on success,
616 * otherwise a negative error value
617 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
618 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
619 * @see package_info_updateinfo_create()
621 int package_info_updateinfo_destroy(package_updateinfo_h info);
624 * @brief Retrieves update information of all packages and invoke callback for each of it.
626 * @param[in] callback The iteration callback function
627 * @param[in] user_data The user data to be passed to the callback function
628 * @return @c 0 on success,
629 * otherwise a negative error value
630 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
631 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
632 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
634 int package_info_updateinfo_foreach_info(package_info_updateinfo_cb callback, void *user_data);
645 #endif /* __TIZEN_APPFW_PACKAGE_INFO_H */