Tizen Native API  7.0
Package Information

Packager Manager information API for packaging. It provides functions for getting the package information.

Required Header

#include <package_manager.h>

Overview

The package manager is used to retrieve detailed information of the installed packages on the device. This information includes package name, label, path to the icon image, version, type, and installed storage. To retrieve package information, you should get the package_info_h using package_info_create() or package_manager_get_package_info(). The package_manager_foreach_package_info() is used to retrieve all the package information of installed packages. And then package_manager_package_info_cb() is invoked. When the callback function is called, you can get the information using the following functions.

Functions

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)
 Retrieves all application IDs of each package.
int package_info_destroy (package_info_h package_info)
 Destroys the package information handle and releases all its resources.
int package_info_get_package (package_info_h package_info, char **package)
 Gets the package name.
int package_info_get_main_app_id (package_info_h package_info, char **main_app_id)
 Gets the main application ID of the package.
int package_info_get_label (package_info_h package_info, char **label)
 Gets the label of the package.
int package_info_get_icon (package_info_h package_info, char **path)
 Gets the absolute path to the icon image.
int package_info_get_version (package_info_h package_info, char **version)
 Gets the version of the package.
int package_info_get_type (package_info_h package_info, char **type)
 Gets the type of the package.
int package_info_get_installed_storage (package_info_h package_info, package_info_installed_storage_type_e *storage)
 Gets the installed storage for the given package.
int package_info_get_root_path (package_info_h package_info, char **path)
 Gets the root path of the package.
int package_info_get_tep_name (package_info_h package_info, char **name)
 Gets the name of the TEP (Tizen Expansion Package).
int package_info_get_res_type (package_info_h package_info, char **res_type)
 Gets the resource type of the package.
int package_info_get_res_version (package_info_h package_info, char **res_version)
 Gets the resource version of the package.
int package_info_is_system_package (package_info_h package_info, bool *system)
 Checks whether the package is system package.
int package_info_is_removable_package (package_info_h package_info, bool *removable)
 Checks whether the package is removable.
int package_info_is_preload_package (package_info_h package_info, bool *preload)
 Checks whether the package is preloaded.
int package_info_is_equal (package_info_h lhs, package_info_h rhs, bool *equal)
 Checks whether two package information is equal.
int package_info_is_accessible (package_info_h package_info, bool *accessible)
 Checks whether the package info is accessible for the given package.
int package_info_get_installed_time (package_info_h package_info, int *installed_time)
 Gets the installed time for the given package.
int package_info_clone (package_info_h *clone, package_info_h package_info)
 Clones the package information handle.
int package_info_create (const char *package, package_info_h *package_info)
 Gets the package information for the given package.
int package_info_foreach_cert_info (package_info_h package_info, package_info_cert_info_cb callback, void *user_data)
 Retrieves certification information of the package.
int package_info_foreach_privilege_info (package_info_h package_info, package_info_privilege_info_cb callback, void *user_data)
 Retrieves privilege information of the package.
int package_info_foreach_dependency_info (package_info_h package_info, package_info_dependency_info_cb callback, void *user_data)
 Retrieves dependencies between packages.
int package_info_foreach_dependency_info_depends_on (package_info_h package_info, package_info_dependency_info_cb callback, void *user_data)
 Retrieves which packages depend on the given package.
int package_info_foreach_res_allowed_package (package_info_h package_info, package_info_res_allowed_package_cb callback, void *user_data)
 Retrieves allowed package information of the resource package.
int package_info_foreach_required_privilege (allowed_package_required_privilege_h priv_info, package_info_privilege_info_cb callback, void *user_data)
 Retrieves required privilege information of the allowed package.
int package_info_updateinfo_create (const char *pkgid, package_updateinfo_h *info)
 Gets the package update information for the given package.
int package_info_updateinfo_get_pkgid (package_updateinfo_h info, char **package)
 Gets the package name.
int package_info_updateinfo_get_version (package_updateinfo_h info, char **version)
 Gets the update version of package.
int package_info_updateinfo_get_type (package_updateinfo_h info, package_updateinfo_type_e *type)
 Gets the update type of package.
int package_info_updateinfo_destroy (package_updateinfo_h info)
 Destroys the package update information handle and releases all its resources.
int package_info_updateinfo_foreach_info (package_info_updateinfo_cb callback, void *user_data)
 Retrieves update information of all packages and invoke callback for each of it.

Typedefs

typedef struct package_info_s * package_info_h
 The package information handle.
typedef struct
package_updateinfo_s * 
package_updateinfo_h
 The package update information handle.
typedef struct
allowed_package_required_privilege_s * 
allowed_package_required_privilege_h
 The required privilege handle.
typedef bool(* package_info_updateinfo_cb )(package_updateinfo_h info, void *user_data)
 Called for each update information of all packages.
typedef bool(* package_info_app_cb )(package_info_app_component_type_e comp_type, const char *app_id, void *user_data)
 Called to get the application ID once for each installed package.
typedef bool(* package_info_cert_info_cb )(package_info_h handle, package_cert_type_e cert_type, const char *cert_value, void *user_data)
 Called to get the certification information.
typedef bool(* package_info_privilege_info_cb )(const char *privilege_name, void *user_data)
 Called to get the privilege information.
typedef bool(* package_info_dependency_info_cb )(const char *from, const char *to, const char *type, const char *required_version, void *user_data)
 Called when dependency information between packages is retrieved.
typedef bool(* package_info_res_allowed_package_cb )(const char *allowed_package, allowed_package_required_privilege_h privilege_handle, void *user_data)
 Called to get the allowed package information of resource package.

Typedef Documentation

typedef struct allowed_package_required_privilege_s* allowed_package_required_privilege_h

The required privilege handle.

Since :
6.5
See also:
package_info_foreach_required_privilege()
typedef bool(* package_info_app_cb)(package_info_app_component_type_e comp_type, const char *app_id, void *user_data)

Called to get the application ID once for each installed package.

Since :
2.3
Parameters:
[in]comp_typeThe application component type
[in]app_idThe application ID.
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
package_info_foreach_app_from_package() will invoke this callback.
See also:
package_info_foreach_app_from_package()
typedef bool(* package_info_cert_info_cb)(package_info_h handle, package_cert_type_e cert_type, const char *cert_value, void *user_data)

Called to get the certification information.

Since :
2.3
Parameters:
[in]handleThe package info handle
[in]cert_typeThe certificate type
[in]cert_valueThe certificate value of corresponding certificate key
This value is base64 encoded data.
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
package_info_foreach_cert_info() will invoke this callback.
See also:
package_info_foreach_cert_info()
typedef bool(* package_info_dependency_info_cb)(const char *from, const char *to, const char *type, const char *required_version, void *user_data)

Called when dependency information between packages is retrieved.

Since :
5.5
Remarks:
from, to, type and required_version are managed by the platform and will be released after the callback exits.
Parameters:
[in]fromThe ID of package that depends on another
[in]toThe ID of package that is required by another
[in]typeThe type of dependency
[in]required_versionThe required version
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
package_info_foreach_dependency_info() will invoke this callback.
package_info_foreach_dependency_info_depends_on() will invoke this callback.
See also:
package_info_foreach_dependency_info()
package_info_foreach_dependency_info_depends_on()
typedef struct package_info_s* package_info_h

The package information handle.

Since :
2.3
typedef bool(* package_info_privilege_info_cb)(const char *privilege_name, void *user_data)

Called to get the privilege information.

Since :
2.3
Parameters:
[in]privilege_namethe name of the privilege
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
package_info_foreach_privilege_info() will invoke this callback.
See also:
package_info_foreach_privilege_info()
typedef bool(* package_info_res_allowed_package_cb)(const char *allowed_package, allowed_package_required_privilege_h privilege_handle, void *user_data)

Called to get the allowed package information of resource package.

Since :
6.5
Remarks:
allowed_package, privilege_handle are managed by the platform and will be released after the callback exits.
Parameters:
[in]allowed_packageThe ID of allowed package
[in]privilege_handleThe privilege handle required by resource package
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
package_info_foreach_res_allowed_package() will invoke this callback.
See also:
package_info_foreach_res_allowed_package()
typedef bool(* package_info_updateinfo_cb)(package_updateinfo_h info, void *user_data)

Called for each update information of all packages.

Since :
4.0
Remarks:
info should not be freed and can be used only in the callback.
Parameters:
[in]infoThe package update information handle
[in]user_dataThe user data passed from the foreach function
Returns:
true to continue with the next iteration of the loop, otherwise false to break out of the loop
Precondition:
package_info_updateinfo_foreach_info() will invoke this callback.
See also:
package_info_updateinfo_foreach_info()
typedef struct package_updateinfo_s* package_updateinfo_h

The package update information handle.

Since :
4.0

Enumeration Type Documentation

Enumeration for certification type.

Since :
2.3
Enumerator:
PACKAGE_INFO_AUTHOR_ROOT_CERT 

Author Root Certificate

PACKAGE_INFO_AUTHOR_INTERMEDIATE_CERT 

Author Intermediate Certificate

PACKAGE_INFO_AUTHOR_SIGNER_CERT 

Author Signer Certificate

PACKAGE_INFO_DISTRIBUTOR_ROOT_CERT 

Distributor Root Certificate

PACKAGE_INFO_DISTRIBUTOR_INTERMEDIATE_CERT 

Distributor Intermediate Certificate

PACKAGE_INFO_DISTRIBUTOR_SIGNER_CERT 

Distributor Signer Certificate

PACKAGE_INFO_DISTRIBUTOR2_ROOT_CERT 

Distributor2 Root Certificate

PACKAGE_INFO_DISTRIBUTOR2_INTERMEDIATE_CERT 

Distributor2 Intermediate Certificate

PACKAGE_INFO_DISTRIBUTOR2_SIGNER_CERT 

Distributor2 Signer Certificate

Enumeration for app component type.

Since :
2.3
Enumerator:
PACKAGE_INFO_ALLAPP 

All applications (Deprecated since 5.5, use PACKAGE_INFO_APP_COMPONENT_TYPE_ALL instead)

PACKAGE_INFO_UIAPP 

UI application (Deprecated since 5.5, use PACKAGE_INFO_APP_COMPONENT_TYPE_UI instead)

PACKAGE_INFO_SERVICEAPP 

Service application (Deprecated since 5.5, use PACKAGE_INFO_APP_COMPONENT_TYPE_SERVICE instead)

PACKAGE_INFO_WIDGETAPP 

Widget application (Since 4.0) (Deprecated since 5.5, use PACKAGE_INFO_APP_COMPONENT_TYPE_WIDGET instead)

PACKAGE_INFO_WATCHAPP 

Watch application (Since 4.0) (Deprecated since 5.5, use PACKAGE_INFO_APP_COMPONENT_TYPE_WATCH instead)

PACKAGE_INFO_APP_COMPONENT_TYPE_ALL 

All applications (Since 5.5)

PACKAGE_INFO_APP_COMPONENT_TYPE_UI 

UI application (Since 5.5)

PACKAGE_INFO_APP_COMPONENT_TYPE_SERVICE 

Service application (Since 5.5)

PACKAGE_INFO_APP_COMPONENT_TYPE_WIDGET 

Widget application (Since 5.5)

PACKAGE_INFO_APP_COMPONENT_TYPE_WATCH 

Watch application (Since 5.5)

PACKAGE_INFO_APP_COMPONENT_TYPE_COMPONENT_BASED 

Component-based application (Since 5.5)

Enumeration for storage type.

Since :
2.3
Enumerator:
PACKAGE_INFO_INTERNAL_STORAGE 

Internal storage

PACKAGE_INFO_EXTERNAL_STORAGE 

External storage

PACKAGE_INFO_EXTENDED_STORAGE 

Extended storage (Since 5.0)

Enumeration for package update info type.

Since :
4.0
Enumerator:
PACKAGE_UPDATEINFO_TYPE_NONE 

None type

PACKAGE_UPDATEINFO_TYPE_FORCE 

Force type

PACKAGE_UPDATEINFO_TYPE_OPTIONAL 

Optional type


Function Documentation

int package_info_clone ( package_info_h clone,
package_info_h  package_info 
)

Clones the package information handle.

Since :
2.3
Remarks:
The clone should be released using package_info_destroy().
Parameters:
[out]cloneThe newly created package information handle
[in]package_infoThe package information
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGEThe package is not installed
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
int package_info_create ( const char *  package,
package_info_h package_info 
)

Gets the package information for the given package.

Since :
2.3
Remarks:
You must release package_info using package_info_destroy().
Parameters:
[in]packageThe ID of the package
[out]package_infoThe package information for the given package ID
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGEThe package is not installed
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
int package_info_destroy ( package_info_h  package_info)

Destroys the package information handle and releases all its resources.

Since :
2.3
Parameters:
[in]package_infoThe package information handle
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
See also:
package_manager_foreach_package_info()
package_manager_get_package_info()
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 
)

Retrieves all application IDs of each package.

Since :
2.3
Parameters:
[in]package_infoThe package info handle
[in]comp_typeThe application component type
[in]callbackThe callback function to invoke
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGENo such package
Postcondition:
This function invokes package_info_app_cb() repeatedly for each package.
See also:
package_info_app_cb()
int package_info_foreach_cert_info ( package_info_h  package_info,
package_info_cert_info_cb  callback,
void *  user_data 
)

Retrieves certification information of the package.

Since :
2.3
Parameters:
[in]package_infoThe package information
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_foreach_dependency_info ( package_info_h  package_info,
package_info_dependency_info_cb  callback,
void *  user_data 
)

Retrieves dependencies between packages.

callback is called whenever there is package dependency. The callback includes packages that are only directly required by the given package. For example, if there are packages having the following relationship:

B --> E A --> B --> C D --> C

A --> B means that A depends on B. When package_info_foreach_dependency_info(A) is called, the callback results in two parameters: from is A and to is B.

Since :
5.5
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.
Parameters:
[in]package_infoThe package information
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error

Retrieves which packages depend on the given package.

callback is called whenever there is package dependency. The callback includes packages that are both directly and indirectly depend on the given package. For example, if there are packages having the following relationship:

B --> E A --> B --> C D --> C

A --> B means that A depends on B. When package_info_foreach_dependency_info(C) is called, the callback results in two parameters: from is B and to is C, from is D and to is C, from is A and to is B.

Since :
5.5
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.
Parameters:
[in]package_infoThe package information
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_info_foreach_privilege_info ( package_info_h  package_info,
package_info_privilege_info_cb  callback,
void *  user_data 
)

Retrieves privilege information of the package.

Since :
2.3
Parameters:
[in]package_infoThe package information
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error

Retrieves required privilege information of the allowed package.

The packages want to access in the allowed area of resource package must have all the privileges required by resource package.

Since :
6.5
Parameters:
[in]priv_infoThe privilege information handle
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_info_foreach_res_allowed_package ( package_info_h  package_info,
package_info_res_allowed_package_cb  callback,
void *  user_data 
)

Retrieves allowed package information of the resource package.

Resource packages allow access to allowed data only for allowed packages that have specific privileges. If not, they just allow access to global data

Since :
6.5
Parameters:
[in]package_infoThe package information
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_info_get_icon ( package_info_h  package_info,
char **  path 
)

Gets the absolute path to the icon image.

Since :
2.3
Remarks:
You must release path using free().
Parameters:
[in]package_infoThe package information
[out]pathThe path of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error

Gets the installed storage for the given package.

Since :
2.3
Parameters:
[in]package_infoThe package information
[out]storageThe installed storage
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_info_get_installed_time ( package_info_h  package_info,
int *  installed_time 
)

Gets the installed time for the given package.

If the package was updated, the installed_time represents updated time. So, the meaning of 'installed time' corresponds with 'last modified time'.

Since :
4.0
Parameters:
[in]package_infoThe package information
[out]installed_timeThe integer value of time_t type for installed time
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_IO_ERRORDatabase error occurred
int package_info_get_label ( package_info_h  package_info,
char **  label 
)

Gets the label of the package.

Since :
2.3
Remarks:
You must release label using free().
Parameters:
[in]package_infoThe package information
[out]labelThe label of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_get_main_app_id ( package_info_h  package_info,
char **  main_app_id 
)

Gets the main application ID of the package.

Since :
4.0
Remarks:
You must release main_app_id using free().
Parameters:
[in]package_infoThe package information
[out]main_app_idThe main application ID of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_get_package ( package_info_h  package_info,
char **  package 
)

Gets the package name.

Since :
2.3
Remarks:
You must release package using free().
Parameters:
[in]package_infoThe package information
[out]packageThe package name
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
int package_info_get_res_type ( package_info_h  package_info,
char **  res_type 
)

Gets the resource type of the package.

Since :
6.5
Remarks:
You must release res_type using free().
Parameters:
[in]package_infoThe package information
[out]res_typeThe resource type of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_get_res_version ( package_info_h  package_info,
char **  res_version 
)

Gets the resource version of the package.

Since :
6.5
Remarks:
You must release res_version using free().
Parameters:
[in]package_infoThe package information
[out]res_versionThe resource version of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_get_root_path ( package_info_h  package_info,
char **  path 
)

Gets the root path of the package.

Since :
2.3
Remarks:
You must release path using free().
Parameters:
[in]package_infoThe package information
[out]pathThe root path of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_get_tep_name ( package_info_h  package_info,
char **  name 
)

Gets the name of the TEP (Tizen Expansion Package).

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Remarks:
Name must be released using free().
Parameters:
[in]package_infoThe package information
[out]nameThe name of the tep
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_info_get_type ( package_info_h  package_info,
char **  type 
)

Gets the type of the package.

Since :
2.3
Remarks:
You must release type using free().
Parameters:
[in]package_infoThe package information
[out]typeThe type of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_get_version ( package_info_h  package_info,
char **  version 
)

Gets the version of the package.

Since :
2.3
Remarks:
You must release version using free().
Parameters:
[in]package_infoThe package information
[out]versionThe version of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_is_accessible ( package_info_h  package_info,
bool *  accessible 
)

Checks whether the package info is accessible for the given package.

Since :
2.3
Parameters:
[in]package_infoThe package information
[out]accessibletrue if the package info is accessible, otherwise false if the package info is not accessible
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_info_is_equal ( package_info_h  lhs,
package_info_h  rhs,
bool *  equal 
)

Checks whether two package information is equal.

Since :
2.3
Parameters:
[in]lhsThe first package information to be compared
[in]rhsThe second package information to be compared
[out]equaltrue if the package information are equal, otherwise false if package information are not equal
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORDatabase error occurred
int package_info_is_preload_package ( package_info_h  package_info,
bool *  preload 
)

Checks whether the package is preloaded.

Since :
2.3
Parameters:
[in]package_infoThe package information
[out]preloadThe preload info of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_is_removable_package ( package_info_h  package_info,
bool *  removable 
)

Checks whether the package is removable.

Since :
2.3
Parameters:
[in]package_infoThe package information
[out]removableThe removable info of the package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORIO error
int package_info_is_system_package ( package_info_h  package_info,
bool *  system 
)

Checks whether the package is system package.

Since :
2.3
Parameters:
[in]package_infoThe package information
[out]systemtrue if the package is system package, otherwise false if the package is not system package
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_updateinfo_create ( const char *  pkgid,
package_updateinfo_h info 
)

Gets the package update information for the given package.

Since :
4.0
Remarks:
You must release info using package_info_updateinfo_destroy().
Parameters:
[in]pkgidThe ID of the package
[out]infoThe package update information for the given package ID
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGEThe package is not installed
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORDatabase error occurred
See also:
package_info_updateinfo_destroy()

Destroys the package update information handle and releases all its resources.

Since :
4.0
Parameters:
[in]infoThe package update information handle
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
See also:
package_info_updateinfo_create()
int package_info_updateinfo_foreach_info ( package_info_updateinfo_cb  callback,
void *  user_data 
)

Retrieves update information of all packages and invoke callback for each of it.

Since :
4.0
Parameters:
[in]callbackThe iteration callback function
[in]user_dataThe user data to be passed to the callback function
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_info_updateinfo_get_pkgid ( package_updateinfo_h  info,
char **  package 
)

Gets the package name.

Since :
4.0
Remarks:
You must release package using free().
Parameters:
[in]infoThe package update information
[out]packageThe package name
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORInternal I/O error occurred

Gets the update type of package.

Since :
4.0
Parameters:
[in]infoThe package update information
[out]typeThe package update type
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_IO_ERRORInternal I/O error occurred
int package_info_updateinfo_get_version ( package_updateinfo_h  info,
char **  version 
)

Gets the update version of package.

Since :
4.0
Remarks:
You must release version using free().
Parameters:
[in]infoThe package update information
[out]versionThe package update version
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORInternal I/O error occurred