Tizen Native API  5.5

The package manager is one of the core modules of Tizen application framework, and responsible for getting their information. You can also retrieve information related to the packages that are installed on the device.

Required Header

#include <package_manager.h>

Overview

The Package Manager API provides functions to retrieve information related to the packages and also provides event listening function. You can get the status of package using package_manager_set_event_status() and package_manager_set_event_cb(). If you register package_manager_event_cb(), it is invoked when a package is installed, uninstalled, or updated.

Functions

int package_manager_create (package_manager_h *manager)
 Creates a package manager handle.
int package_manager_destroy (package_manager_h manager)
 Destroys the package manager handle.
int package_manager_set_event_status (package_manager_h manager, int status_type)
 Sets the event status of the package when the package is installed, uninstalled, or updated.
int package_manager_set_event_cb (package_manager_h manager, package_manager_event_cb callback, void *user_data)
 Registers a callback function to be invoked when the package is installed, uninstalled, or updated.
int package_manager_unset_event_cb (package_manager_h manager)
 Unregisters the callback function.
int package_manager_foreach_package_info (package_manager_package_info_cb callback, void *user_data)
 Retrieves all package information of installed packages.
int package_manager_get_package_id_by_app_id (const char *app_id, char **package_id)
 Gets the package ID for the given app ID.
int package_manager_get_package_info (const char *package_id, package_info_h *package_info)
 Gets the package information for the given package.
int package_manager_compare_package_cert_info (const char *lhs_package_id, const char *rhs_package_id, package_manager_compare_result_type_e *compare_result)
 Compares whether two package certifications are matched.
int package_manager_compare_app_cert_info (const char *lhs_app_id, const char *rhs_app_id, package_manager_compare_result_type_e *compare_result)
 Compares whether two app certifications are matched.
int package_manager_is_preload_package_by_app_id (const char *app_id, bool *preload)
 Checks whether the package is preloaded by app_id.
int package_manager_get_permission_type (const char *app_id, package_manager_permission_type_e *permission_type)
 Gets the package permission type by app_id.
int package_manager_clear_cache_dir (const char *package_id)
 Clears the application's internal and external cache directory, asynchronously.
int package_manager_clear_all_cache_dir (void)
 Clears all applications' internal and external cache directory, asynchronously.
int package_manager_clear_data_dir (const char *package_id)
 Clears internal and external data directories used by applications in the given package.
int package_manager_get_package_size_info (const char *package_id, package_manager_size_info_receive_cb callback, void *user_data)
 Gets the package size information, asynchronously.
int package_manager_get_total_package_size_info (package_manager_total_size_info_receive_cb callback, void *user_data)
 Gets the total package size information, asynchronously.
int package_manager_filter_create (package_manager_filter_h *handle)
 Creates the package information filter handle from db.
int package_manager_filter_destroy (package_manager_filter_h handle)
 Destroys the package information filter handle freeing up all the resources.
int package_manager_filter_add_bool (package_manager_filter_h handle, const char *property, const bool value)
 Adds a boolean filter property to the filter handle.
int package_manager_filter_count (package_manager_filter_h handle, int *count)
 Counts the package that satisfy the filter conditions.
int package_manager_filter_foreach_package_info (package_manager_filter_h handle, package_manager_package_info_cb callback, void *user_data)
 Executes the user supplied callback function for each package that satisfy the filter conditions.
int package_manager_drm_generate_license_request (const char *resp_data, char **req_data, char **license_url)
 Generates request for getting License, asynchronously.
int package_manager_drm_register_license (const char *resp_data)
 Registers encrypted license, asynchronously.
int package_manager_drm_decrypt_package (const char *drm_file_path, const char *decrypted_file_path)
 Decrypts contents which is encrypted, asynchronously.
int package_size_info_get_data_size (package_size_info_h handle, long long *data_size)
 Retrieves data size from given handle.
int package_size_info_get_cache_size (package_size_info_h handle, long long *cache_size)
 Retrieves cache size from given handle.
int package_size_info_get_app_size (package_size_info_h handle, long long *app_size)
 Retrieves application size from given handle.
int package_size_info_get_external_data_size (package_size_info_h handle, long long *ext_data_size)
 Retrieves external data size from given handle.
int package_size_info_get_external_cache_size (package_size_info_h handle, long long *ext_cache_size)
 Retrieves external cache size from given handle.
int package_size_info_get_external_app_size (package_size_info_h handle, long long *ext_app_size)
 Retrieves external application size from given handle.

Typedefs

typedef struct
package_updateinfo_request_s * 
package_updateinfo_request_h
 The Package manager update info request handle.
typedef struct package_manager_s * package_manager_h
 The Package manager handle.
typedef struct
package_manager_filter_s * 
package_manager_filter_h
 Package manager filter handle.
typedef void(* package_manager_event_cb )(const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data)
 Called when the package is installed, uninstalled, or updated, and the progress of the request to the package manager changes.
typedef bool(* package_manager_package_info_cb )(package_info_h package_info, void *user_data)
 Called to retrieve all packages.
typedef struct package_size_info * package_size_info_h
 The package size information handle.
typedef void(* package_manager_size_info_receive_cb )(const char *package_id, const package_size_info_h size_info, void *user_data)
 Called when the package size information is obtained.
typedef void(* package_manager_total_size_info_receive_cb )(const package_size_info_h size_info, void *user_data)
 Called when the total package size information is obtained.

Defines

#define PACKAGE_MANAGER_PKGINFO_PROP_REMOVABLE   "PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE"
 Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is removable or not based on package info.
#define PACKAGE_MANAGER_PKGINFO_PROP_READONLY   "PMINFO_PKGINFO_PROP_PACKAGE_READONLY"
 Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is readonly or not based on package info.
#define PACKAGE_MANAGER_PKGINFO_PROP_SUPPORT_DISABLE   "PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE"
 Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package supports disable or not based on package info.
#define PACKAGE_MANAGER_PKGINFO_PROP_DISABLE   "PMINFO_PKGINFO_PROP_PACKAGE_DISABLE"
 Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is disabled based on package info.
#define PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD   "PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD"
 Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is preload or not based on package info.

Define Documentation

#define PACKAGE_MANAGER_PKGINFO_PROP_DISABLE   "PMINFO_PKGINFO_PROP_PACKAGE_DISABLE"

Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is disabled based on package info.

Since :
2.3.1
#define PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD   "PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD"

Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is preload or not based on package info.

Since :
2.3.1
#define PACKAGE_MANAGER_PKGINFO_PROP_READONLY   "PMINFO_PKGINFO_PROP_PACKAGE_READONLY"

Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is readonly or not based on package info.

Since :
2.3.1
#define PACKAGE_MANAGER_PKGINFO_PROP_REMOVABLE   "PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE"

Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package is removable or not based on package info.

Since :
2.3.1
#define PACKAGE_MANAGER_PKGINFO_PROP_SUPPORT_DISABLE   "PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE"

Definition for value to be used when filtering based on install location: Boolean property for filtering whether the package supports disable or not based on package info.

Since :
2.3.1

Typedef Documentation

typedef void(* package_manager_event_cb)(const char *type, const char *package, package_manager_event_type_e event_type, package_manager_event_state_e event_state, int progress, package_manager_error_e error, void *user_data)

Called when the package is installed, uninstalled, or updated, and the progress of the request to the package manager changes.

Since :
2.3.1
Parameters:
[in]typeThe type of the package to be installed, uninstalled, or updated
[in]packageThe name of the package to be installed, uninstalled, or updated
[in]event_typeThe type of the request to the package manager
[in]event_stateThe current state of the request to the package manager
[in]progressThe progress for the request that is being processed by the package manager
The range of progress is from 0 to 100
[in]errorThe error code when the package manager failed to process the request
[in]user_dataThe user data passed from package_manager_set_event_cb()
See also:
package_manager_set_event_cb()
package_manager_unset_event_cb()
typedef struct package_manager_filter_s* package_manager_filter_h

Package manager filter handle.

Since :
2.3.1
typedef struct package_manager_s* package_manager_h

The Package manager handle.

Since :
2.3.1
typedef bool(* package_manager_package_info_cb)(package_info_h package_info, void *user_data)

Called to retrieve all packages.

Since :
2.3.1
Parameters:
[in]package_infoThe package information
[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
See also:
package_manager_foreach_package_info()
typedef void(* package_manager_size_info_receive_cb)(const char *package_id, const package_size_info_h size_info, void *user_data)

Called when the package size information is obtained.

Since :
3.0
Parameters:
[in]package_idThe package ID
[in]size_infoThe pointer to the structure including the package size information
[in]user_dataThe user data to be passed to the callback function
typedef void(* package_manager_total_size_info_receive_cb)(const package_size_info_h size_info, void *user_data)

Called when the total package size information is obtained.

Warning:
This is not for use by third-party applications.
Since :
2.3.1
Parameters:
[in]size_infoThe pointer to the structure including the package size information
[in]user_dataThe user data to be passed to the callback function
typedef struct package_size_info* package_size_info_h

The package size information handle.

Since :
3.0
typedef struct package_updateinfo_request_s* package_updateinfo_request_h

The Package manager update info request handle.

Since :
4.0

Enumeration Type Documentation

Enumeration for certification compare type.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_COMPARE_MATCH 

Matching certification

PACKAGE_MANAGER_COMPARE_MISMATCH 

Mismatching certification

PACKAGE_MANAGER_COMPARE_LHS_NO_CERT 

First package has no certification

PACKAGE_MANAGER_COMPARE_RHS_NO_CERT 

Second package has no certification

PACKAGE_MANAGER_COMPARE_BOTH_NO_CERT 

Both have no certification

Enumeration for error code.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_ERROR_NONE 

Successful

PACKAGE_MANAGER_ERROR_INVALID_PARAMETER 

Invalid parameter

PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY 

Out of memory

PACKAGE_MANAGER_ERROR_IO_ERROR 

Internal I/O error

PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE 

No such package

PACKAGE_MANAGER_ERROR_SYSTEM_ERROR 

Severe system error

PACKAGE_MANAGER_ERROR_PERMISSION_DENIED 

Permission denied

Enumeration for event state.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_EVENT_STATE_STARTED 

Started event state

PACKAGE_MANAGER_EVENT_STATE_PROCESSING 

Processing event state

PACKAGE_MANAGER_EVENT_STATE_COMPLETED 

Completed event state

PACKAGE_MANAGER_EVENT_STATE_FAILED 

Failed event state

Enumeration for event type.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_EVENT_TYPE_INSTALL 

Install event type

PACKAGE_MANAGER_EVENT_TYPE_UNINSTALL 

Uninstall event type

PACKAGE_MANAGER_EVENT_TYPE_UPDATE 

Update event type

PACKAGE_MANAGER_EVENT_TYPE_MOVE 

Move event type (Since 3.0)

PACKAGE_MANAGER_EVENT_TYPE_CLEAR 

Clear event type (Since 3.0)

Enumeration for move type.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_REQUEST_MOVE_TO_INTERNAL 

Internal type

PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTERNAL 

External type

PACKAGE_MANAGER_REQUEST_MOVE_TO_EXTENDED 

Extended type (Since 5.0)

Enumeration for permission type.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_PERMISSION_NORMAL 

Normal permission

PACKAGE_MANAGER_PERMISSION_SIGNATURE 

Signature permission

PACKAGE_MANAGER_PERMISSION_PRIVILEGE 

Privilege permission

Enumeration for status type.

Since :
2.3.1
Enumerator:
PACKAGE_MANAGER_STATUS_TYPE_ALL 

All status

PACKAGE_MANAGER_STATUS_TYPE_INSTALL 

Install package status

PACKAGE_MANAGER_STATUS_TYPE_UNINSTALL 

Uninstall package status

PACKAGE_MANAGER_STATUS_TYPE_UPGRADE 

Upgrade package status

PACKAGE_MANAGER_STATUS_TYPE_MOVE 

Move package status

PACKAGE_MANAGER_STATUS_TYPE_CLEAR_DATA 

Clear data status

PACKAGE_MANAGER_STATUS_TYPE_INSTALL_PROGRESS 

Install progress status

PACKAGE_MANAGER_STATUS_TYPE_GET_SIZE 

Get size status


Function Documentation

Clears all applications' internal and external cache directory, asynchronously.

Warning:
This is not for use by third-party applications.

All files stored in the cache directory of each application are removed.

Since :
2.3.1
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGENo such package
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_manager_clear_cache_dir ( const char *  package_id)

Clears the application's internal and external cache directory, asynchronously.

All files stored in the cache directory of the application specified with the package ID are removed.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.clearcache
Parameters:
[in]package_idThe package ID
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_NO_SUCH_PACKAGENo such package
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_manager_clear_data_dir ( const char *  package_id)

Clears internal and external data directories used by applications in the given package.

Warning:
This is not for use by third-party applications.

All files stored in data directories used by applications in the package specified with the package_id are removed.

Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]package_idThe package ID
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_NO_SUCH_PACKAGENo such package
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_manager_compare_app_cert_info ( const char *  lhs_app_id,
const char *  rhs_app_id,
package_manager_compare_result_type_e compare_result 
)

Compares whether two app certifications are matched.

Since :
2.3.1
Parameters:
[in]lhs_app_idThe first app ID to compare
[in]rhs_app_idThe second app ID to compare
[out]compare_result0 if the certification information are matched, otherwise the compared result
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_manager_compare_package_cert_info ( const char *  lhs_package_id,
const char *  rhs_package_id,
package_manager_compare_result_type_e compare_result 
)

Compares whether two package certifications are matched.

Since :
2.3.1
Parameters:
[in]lhs_package_idThe first package ID to compare
[in]rhs_package_idThe second package ID to compare
[out]compare_result0 if the certification information are matched, otherwise the compared result
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

Creates a package manager handle.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Remarks:
You must release manager using package_manager_destroy().
Parameters:
[out]managerThe package manager handle that is newly created on success
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_IO_ERRORInternal I/O error
See also:
package_manager_destroy()

Destroys the package manager handle.

Since :
2.3.1
Parameters:
[in]managerThe package manager 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_create()
int package_manager_drm_decrypt_package ( const char *  drm_file_path,
const char *  decrypted_file_path 
)

Decrypts contents which is encrypted, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]drm_file_pathDRM file path
[in]decrypted_file_pathDecrypted file path
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_IO_ERRORInternal I/O error
int package_manager_drm_generate_license_request ( const char *  resp_data,
char **  req_data,
char **  license_url 
)

Generates request for getting License, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Remarks:
You must release req_data and license_url by yourself.
Parameters:
[in]resp_dataThe response data string of the purchase request
[out]req_dataLicense request data
[out]license_urlLicense acquisition url data
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_IO_ERRORInternal I/O error
Postcondition:
package_manager_drm_register_license()
int package_manager_drm_register_license ( const char *  resp_data)

Registers encrypted license, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
3.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]resp_dataThe response data string of the rights request
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_IO_ERRORInternal I/O error
Precondition:
package_manager_drm_generate_license_request()
int package_manager_filter_add_bool ( package_manager_filter_h  handle,
const char *  property,
const bool  value 
)

Adds a boolean filter property to the filter handle.

Since :
2.3.1
Parameters:
[in]handlePointer to the package info filter handle
[in]propertyboolean property name
[in]valuevalue corresponding to the property
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
Precondition:
package_manager_filter_create()
Postcondition:
package_manager_filter_destroy()
See also:
package_manager_filter_count()
package_manager_filter_foreach_package_info()
int package_manager_filter_count ( package_manager_filter_h  handle,
int *  count 
)

Counts the package that satisfy the filter conditions.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]handlePointer to the package info filter handle
[out]countPointer to store the count value
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
Precondition:
package_manager_filter_create()
Postcondition:
package_manager_filter_destroy()
See also:
package_manager_filter_foreach_package_info()

Creates the package information filter handle from db.

The filtered result will be based on AND operation of all added filter properties.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Remarks:
The handle should be released using package_manager_filter_destroy().
Parameters:
[out]handlePointer to the package info filter handle
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
Postcondition:
package_manager_filter_destroy()
See also:
package_manager_filter_add_bool()
package_manager_filter_foreach_package_info()

Destroys the package information filter handle freeing up all the resources.

Since :
2.3.1
Parameters:
[in]handlePointer to the package info filter handle
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
Precondition:
package_manager_filter_create()
See also:
package_manager_filter_count()
package_manager_filter_foreach_package_info()

Executes the user supplied callback function for each package that satisfy the filter conditions.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]handlePointer to the package info filter handle
[in]callbackcallback function
[in]user_datauser 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
Precondition:
package_manager_filter_create()
Postcondition:
package_manager_filter_destroy()
This function invokes package_manager_package_info_cb() repeatedly for each package information.
See also:
package_manager_package_info_cb()
package_manager_filter_count()

Retrieves all package information of installed packages.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]callbackThe callback function to be invoked
[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_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
This function invokes package_manager_package_info_cb() repeatedly for each package information.
See also:
package_manager_package_info_cb()
int package_manager_get_package_id_by_app_id ( const char *  app_id,
char **  package_id 
)

Gets the package ID for the given app ID.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Remarks:
The package_id should be released using free().
Parameters:
[in]app_idThe ID of the application
[out]package_idThe ID of the package
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
int package_manager_get_package_info ( const char *  package_id,
package_info_h package_info 
)

Gets the package information for the given package.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Remarks:
You must release package_info using package_info_destroy().
Parameters:
[in]package_idThe 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_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORDatabase error occurred
int package_manager_get_package_size_info ( const char *  package_id,
package_manager_size_info_receive_cb  callback,
void *  user_data 
)

Gets the package size information, asynchronously.

The package size info is asynchronously obtained by the callback function.

Since :
3.0
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]package_idThe package ID
[in]callbackThe asynchronous callback function to get the package size information
[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_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGENo such package
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_manager_get_permission_type ( const char *  app_id,
package_manager_permission_type_e permission_type 
)

Gets the package permission type by app_id.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]app_idThe ID of the application
[out]permission_typeThe package permission type
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_IO_ERRORI/O error

Gets the total package size information, asynchronously.

The total package size info is asynchronously obtained by the callback function.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]callbackThe asynchronous callback function to get the total package size information
[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_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGENo such package
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_manager_is_preload_package_by_app_id ( const char *  app_id,
bool *  preload 
)

Checks whether the package is preloaded by app_id.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]app_idThe ID of the application
[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_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORI/O error
int package_manager_set_event_cb ( package_manager_h  manager,
package_manager_event_cb  callback,
void *  user_data 
)

Registers a callback function to be invoked when the package is installed, uninstalled, or updated.

Since :
2.3.1
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]managerThe package manager handle
[in]callbackThe callback function to be registered
[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_PERMISSION_DENIEDPermission denied
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
Postcondition:
package_manager_event_cb() will be invoked.
See also:
package_manager_set_event_status()
package_manager_event_cb()
package_manager_unset_event_cb()
int package_manager_set_event_status ( package_manager_h  manager,
int  status_type 
)

Sets the event status of the package when the package is installed, uninstalled, or updated.

You can combine multiple status using OR operation which you want to listen.

Since :
2.3.1
Parameters:
[in]managerThe package manager handle
[in]status_typeThe status 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_IO_ERRORInternal I/O error
See also:
package_manager_status_type_e
package_manager_set_event_cb()

Unregisters the callback function.

Since :
2.3.1
Parameters:
[in]managerThe package manager 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_event_cb()
package_manager_set_event_cb()
int package_size_info_get_app_size ( package_size_info_h  handle,
long long *  app_size 
)

Retrieves application size from given handle.

Since :
3.0
Parameters:
[in]handlePackage size info handle
[out]app_sizeApp size will be returned
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_size_info_get_cache_size ( package_size_info_h  handle,
long long *  cache_size 
)

Retrieves cache size from given handle.

Since :
3.0
Parameters:
[in]handlePackage size info handle
[out]cache_sizeCache size will be returned
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_size_info_get_data_size ( package_size_info_h  handle,
long long *  data_size 
)

Retrieves data size from given handle.

Since :
3.0
Parameters:
[in]handlePackage size info handle
[out]data_sizeData size will be returned
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_size_info_get_external_app_size ( package_size_info_h  handle,
long long *  ext_app_size 
)

Retrieves external application size from given handle.

Since :
3.0
Parameters:
[in]handlePackage size info handle
[out]ext_app_sizeExternal app size will be returned
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_size_info_get_external_cache_size ( package_size_info_h  handle,
long long *  ext_cache_size 
)

Retrieves external cache size from given handle.

Since :
3.0
Parameters:
[in]handlePackage size info handle
[out]ext_cache_sizeExternal cache size will be returned
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_size_info_get_external_data_size ( package_size_info_h  handle,
long long *  ext_data_size 
)

Retrieves external data size from given handle.

Since :
3.0
Parameters:
[in]handlePackage size info handle
[out]ext_data_sizeExternal data size will be returned
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter