Tizen Native API  6.0
Package Manager Request

Package Manager Request API. It is responsible for installing, uninstalling, moving packages, and storing their information.

Required Header

#include <package_manager.h>

Overview

The Package Manager API provides functions to install and uninstall the package, and also provides event listening function. The package_manager_request_install() method is used to asynchronously install a package. Similarly, the package_manager_request_uninstall() and package_manager_request_move() methods are used to asynchronously uninstall a package. The callback function is called when the progress of the request changes. Use package_manager_request_event_cb() to listen to package installation related events.

Functions

int package_manager_request_create (package_manager_request_h *request)
 Creates a request handle to the package manager.
int package_manager_request_destroy (package_manager_request_h request)
 Destroys the request handle to the package manager.
int package_manager_request_set_event_cb (package_manager_request_h request, package_manager_request_event_cb callback, void *user_data)
 Registers a callback function to be invoked when the progress of the request changes.
int package_manager_request_unset_event_cb (package_manager_request_h request)
 Unregisters the callback function.
int package_manager_request_set_type (package_manager_request_h request, const char *type)
 Sets the type of the package to install, uninstall, or update.
int package_manager_request_set_mode (package_manager_request_h request, package_manager_request_mode_e mode)
 Sets the mode of the request.
int package_manager_request_set_tep (package_manager_request_h request, const char *tep_path)
 Sets the path of TEP file to the request. The TEP file that is set will be installed when the package is installed.
int package_manager_request_install (package_manager_request_h request, const char *path, int *id)
 Installs the package located at the given path, asynchronously.
int package_manager_request_install_with_cb (package_manager_request_h request, const char *path, package_manager_request_event_cb callback, void *user_data, int *id)
 Installs the package located at the given path, asynchronously.
int package_manager_request_install_packages (package_manager_request_h request, const char **paths, int paths_count, int *id)
 Installs the packages located at the given paths, asynchronously.
int package_manager_request_install_packages_with_cb (package_manager_request_h request, const char **paths, int paths_count, package_manager_request_event_cb callback, void *user_data, int *id)
 Installs the packages located at the given paths, asynchronously.
int package_manager_request_uninstall (package_manager_request_h request, const char *name, int *id)
 Uninstalls the package with the given name, asynchronously.
int package_manager_request_uninstall_with_cb (package_manager_request_h request, const char *name, package_manager_request_event_cb callback, void *user_data, int *id)
 Uninstalls the package with the given name, asynchronously.
int package_manager_request_move (package_manager_request_h request, const char *name, package_manager_move_type_e move_type)
 Moves the package from SD card to the internal memory and vice versa, asynchronously.
int package_manager_request_move_with_cb (package_manager_request_h request, const char *name, package_manager_move_type_e move_type, package_manager_request_event_cb callback, void *user_data, int *id)
 Moves the package from SD card to the internal memory and vice versa, asynchronously.
int package_manager_updateinfo_request_create (package_updateinfo_request_h *pkg_updateinfo_req)
 Creates a package update info request.
int package_manager_updateinfo_set_pkgid (package_updateinfo_request_h pkg_updateinfo_req, const char *pkgid)
 Sets the package ID to the package update info request.
int package_manager_updateinfo_set_version (package_updateinfo_request_h pkg_updateinfo_req, const char *version)
 Sets the package version to the package update info request.
int package_manager_updateinfo_set_type (package_updateinfo_request_h pkg_updateinfo_req, package_updateinfo_type_e type)
 Sets the package update type to the package update info request.
int package_manager_updateinfo_request_register (package_updateinfo_request_h pkg_updateinfo_req)
 Requests to register package update info in platform.
int package_manager_updateinfo_request_destroy (package_updateinfo_request_h pkg_updateinfo_req)
 Destroys the package update info request.
int package_manager_updateinfo_request_unregister (package_updateinfo_request_h pkg_updateinfo_req, const char *pkgid)
 Requests to unregister update info in platform for given package id.
int package_manager_updateinfo_request_unregister_all (package_updateinfo_request_h pkg_updateinfo_req)
 Request to unregister update info of all packages in platform.
int package_manager_request_add_res_copy_path (package_manager_request_h request, const char *src_path, const char *dest_path)
 Adds resource source and destination path into handle.
int package_manager_request_res_copy_with_cb (package_manager_request_h request, package_manager_request_res_event_cb callback, void *user_data, int *id)
 Copies resources into target directory, asynchronously.
int package_manager_request_add_res_create_dir_path (package_manager_request_h request, const char *dir_path)
 Add directory path to be created at privileged shared directory into handle.
int package_manager_request_res_create_dir_with_cb (package_manager_request_h request, package_manager_request_res_event_cb callback, void *user_data, int *id)
 Create directories into directory for sharing resources via privileged application, asynchronously.
int package_manager_request_add_res_remove_path (package_manager_request_h request, const char *res_path)
 Adds file or directory path to be removed located at privileged shared directory into handle.
int package_manager_request_res_remove_with_cb (package_manager_request_h request, package_manager_request_res_event_cb callback, void *user_data, int *id)
 Removes resources from for sharing resources via privileged application, asynchronously.
int package_manager_res_event_info_get_error_code (package_manager_res_event_info_h handle, package_manager_error_e *error)
 Gets the error code from given resource event handle.
int package_manager_res_event_info_foreach_path (package_manager_res_event_info_h handle, package_manager_res_event_path_cb callback, void *user_data)
 Retrieves all package information of installed packages.
int package_manager_get_priv_shared_res_path (const char *package_id, char **path)
 Gets the privileged shared resource path for the given package ID.

Typedefs

typedef struct
package_manager_request_s * 
package_manager_request_h
 The Package manager request handle.
typedef void(* package_manager_request_event_cb )(int id, 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 progress of the request to the package manager changes.
typedef void(* package_manager_request_res_event_cb )(int req_id, const char *pkgid, package_manager_event_type_e event_type, package_manager_event_state_e event_state, package_manager_res_event_info_h handle, void *user_data)
 Called when the progress of the request to the package resource share changes.
typedef bool(* package_manager_res_event_path_cb )(const char *path, package_manager_res_event_path_state_e state, void *user_data)
 Called to retrieve all path state about resource event.

Typedef Documentation

typedef void(* package_manager_request_event_cb)(int id, 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 progress of the request to the package manager changes.

Warning:
This is not for use by third-party applications.
Since :
2.3
Parameters:
[in]idThe ID of the request to the package manager
[in]typeThe type of the package to install, uninstall or update
[in]packageThe name of the package to install, uninstall or update
[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_request_set_event_cb()
See also:
package_manager_request_set_event_cb()
package_manager_request_unset_event_cb()
typedef struct package_manager_request_s* package_manager_request_h

The Package manager request handle.

Warning:
This is not for use by third-party applications.
Since :
2.3
typedef void(* package_manager_request_res_event_cb)(int req_id, const char *pkgid, package_manager_event_type_e event_type, package_manager_event_state_e event_state, package_manager_res_event_info_h handle, void *user_data)

Called when the progress of the request to the package resource share changes.

Warning:
This is not for use by third-party applications.
Since :
6.5
Remarks:
The pkgid should not be released. The pkgid can be used only in the callback.
The handle should not be released. The handle can be used only in the callback.
Parameters:
[in]req_idThe ID of the request to the package manager
[in]pkgidThe package ID of resource owner
[in]event_typeThe type of resource event
[in]event_stateThe state of resource event
[in]handleThe handle which contains additional information of event
[in]user_dataThe user data passed from package_manager_request_res_copy_with_cb(), package_manager_request_res_create_dir_with_cb(), package_manager_request_res_remove_with_cb()
See also:
package_manager_request_res_copy_with_cb()
package_manager_request_res_create_dir_with_cb()
package_manager_request_res_remove_with_cb()
typedef bool(* package_manager_res_event_path_cb)(const char *path, package_manager_res_event_path_state_e state, void *user_data)

Called to retrieve all path state about resource event.

Since :
6.5
Remarks:
The path should not be released. The path can be used only in the callback.
Parameters:
[in]pathThe path handled by a resource event
[in]stateThe state of the path
[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_res_event_info_foreach_path()

Enumeration Type Documentation

Enumeration for request mode.

Warning:
This is not for use by third-party applications.
Since :
2.3
Enumerator:
PACKAGE_MANAGER_REQUEST_MODE_DEFAULT 
Warning:
This is not for use by third-party applications. Default request mode
PACKAGE_MANAGER_REQUEST_MODE_QUIET 
Warning:
This is not for use by third-party applications. Quiet request mode

Function Documentation

int package_manager_get_priv_shared_res_path ( const char *  package_id,
char **  path 
)

Gets the privileged shared resource path for the given package ID.

Warning:
This is not for use by third-party applications.
Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Remarks:
You must release path using free().
Parameters:
[in]package_idThe ID of the package
[out]pathThe path of privileged shared resource path 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_request_add_res_copy_path ( package_manager_request_h  request,
const char *  src_path,
const char *  dest_path 
)

Adds resource source and destination path into handle.

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

Adds resource source path and destination path to be copied into handle

Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe package manager request handle
[in]src_pathThe relative path of resource file or directory to be copied
[in]dest_pathThe relative path of destination
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_SYSTEM_ERRORSevere system error
See also:
package_manager_request_res_copy_with_cb()
int package_manager_request_add_res_create_dir_path ( package_manager_request_h  request,
const char *  dir_path 
)

Add directory path to be created at privileged shared directory into handle.

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

Added directory path will be created into directory existed for sharing resources via privileged applications

Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe package manager request handle
[in]dir_pathThe relative path of directories to be created under shared resource 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_SYSTEM_ERRORSevere system error
See also:
package_manager_request_res_create_dir_with_cb()
int package_manager_request_add_res_remove_path ( package_manager_request_h  request,
const char *  res_path 
)

Adds file or directory path to be removed located at privileged shared directory into handle.

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

Added path will be removed from directory existed for sharing resources via privileged applications

Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe package manager request handle
[in]res_pathThe relative path of resources to be removed from privileged shared resource directory
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_SYSTEM_ERRORSevere system error
See also:
package_manager_request_res_remove_with_cb()

Creates a request handle to the package manager.

Warning:
This is not for use by third-party applications.
Since :
2.3
Remarks:
You must release request using package_manager_request_destroy().
Parameters:
[out]requestThe request 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_INVALID_PARAMETERInvalid parameter
PACKAGE_MANAGER_ERROR_OUT_OF_MEMORYOut of memory
PACKAGE_MANAGER_ERROR_IO_ERRORInternal I/O error
See also:
package_manager_request_destroy()

Destroys the request handle to the package manager.

Warning:
This is not for use by third-party applications.
Since :
2.3
Parameters:
[in]requestThe request handle to the package manager
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_request_create()
int package_manager_request_install ( package_manager_request_h  request,
const char *  path,
int *  id 
)

Installs the package located at the given path, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
2.3
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]pathThe absolute path to the package to be installed
[out]idThe ID of the request to the package manager
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
See also:
package_manager_request_uninstall()
int package_manager_request_install_packages ( package_manager_request_h  request,
const char **  paths,
int  paths_count,
int *  id 
)

Installs the packages located at the given paths, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
6.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]pathsThe array of absolute paths to the packages to be installed
[in]paths_countThe number of paths in array
[out]idThe ID of the request to the package manager
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_request_install_packages_with_cb ( package_manager_request_h  request,
const char **  paths,
int  paths_count,
package_manager_request_event_cb  callback,
void *  user_data,
int *  id 
)

Installs the packages located at the given paths, asynchronously.

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

The progress of the request is asynchronously received by the callback function. The callback is the individual callback only called for the current API call. The callback is the only callback called, even if another callback was set for this request with package_manager_request_set_event_cb().

Since :
6.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]pathsThe array of absolute paths to the packages to be installed
[in]paths_countThe number of paths in array
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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_request_install_with_cb ( package_manager_request_h  request,
const char *  path,
package_manager_request_event_cb  callback,
void *  user_data,
int *  id 
)

Installs the package located at the given path, asynchronously.

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

The progress of the request is asynchronously received by the callback function. The callback is the individual callback only called for the current API call. The callback is the only callback called, even if another callback was set for this request with package_manager_request_set_event_cb().

Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]pathThe absolute path to the package to be installed
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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
int package_manager_request_move ( package_manager_request_h  request,
const char *  name,
package_manager_move_type_e  move_type 
)

Moves the package from SD card to the internal memory and vice versa, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
2.3
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]nameThe name of the package to be moved
[in]move_typeThe move type [package_manager_move_type_e], [external to internal/internal to external]
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
int package_manager_request_move_with_cb ( package_manager_request_h  request,
const char *  name,
package_manager_move_type_e  move_type,
package_manager_request_event_cb  callback,
void *  user_data,
int *  id 
)

Moves the package from SD card to the internal memory and vice versa, asynchronously.

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

The progress of the request is asynchronously received by the callback function. The callback is the individual callback only called for the current API call. The callback is the only callback called, even if another callback was set for this request with package_manager_request_set_event_cb().

Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]nameThe name of the package to be moved
[in]move_typeThe move type [package_manager_move_type_e], [external to internal/internal to external]
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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
int package_manager_request_res_copy_with_cb ( package_manager_request_h  request,
package_manager_request_res_event_cb  callback,
void *  user_data,
int *  id 
)

Copies resources into target directory, asynchronously.

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

Copies resources into directory, which could be access via privileged applications only.

Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe package manager request handle
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
See also:
package_manager_request_add_res_copy_path()

Create directories into directory for sharing resources via privileged application, asynchronously.

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

Create directories into certain directory which could be access via privileged applications only.

Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe package manager request handle
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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
See also:
package_manager_request_add_res_create_dir_path()

Removes resources from for sharing resources via privileged application, asynchronously.

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

Removes resources added at handle from certain directory which could be access via privileged applications only.

Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe package manager request handle
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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
See also:
package_manager_request_add_res_remove_path()

Registers a callback function to be invoked when the progress of the request changes.

Warning:
This is not for use by third-party applications.
Since :
2.3
Privilege Level:
public
Privilege:
http://tizen.org/privilege/packagemanager.info
Parameters:
[in]requestThe request 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_request_event_cb() will be invoked.
See also:
package_manager_request_event_cb()
package_manager_request_unset_event_cb()

Sets the mode of the request.

Warning:
This is not for use by third-party applications.
Since :
2.3
Parameters:
[in]requestThe request handle
[in]modeThe mode of the request
Returns:
0 on success, otherwise a negative error value
Return values:
PACKAGE_MANAGER_ERROR_NONESuccessful
PACKAGE_MANAGER_ERROR_INVALID_PARAMETERInvalid parameter
int package_manager_request_set_tep ( package_manager_request_h  request,
const char *  tep_path 
)

Sets the path of TEP file to the request. The TEP file that is set will be installed when the package is installed.

Warning:
This is not for use by third-party applications.
Since :
2.4
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]tep_pathThe TEP path to set. If this is NULL on update, installed TEP will be removed.
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_SYSTEM_ERRORSevere system error
int package_manager_request_set_type ( package_manager_request_h  request,
const char *  type 
)

Sets the type of the package to install, uninstall, or update.

Warning:
This is not for use by third-party applications.
Since :
2.3
Parameters:
[in]requestThe request handle
[in]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
int package_manager_request_uninstall ( package_manager_request_h  request,
const char *  name,
int *  id 
)

Uninstalls the package with the given name, asynchronously.

Warning:
This is not for use by third-party applications.
Since :
2.3
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]nameThe name of the package to be uninstalled
[out]idThe ID of the request to the package manager
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
int package_manager_request_uninstall_with_cb ( package_manager_request_h  request,
const char *  name,
package_manager_request_event_cb  callback,
void *  user_data,
int *  id 
)

Uninstalls the package with the given name, asynchronously.

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

The progress of the request is asynchronously received by the callback function. The callback is the individual callback only called for the current API call. The callback is the only callback called, even if another callback was set for this request with package_manager_request_set_event_cb().

Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]requestThe request handle
[in]nameThe name of the package to be uninstalled
[in]callbackThe callback function to be invoked
[in]user_dataThe user data to be passed to the callback function
[out]idThe ID of the request to the package manager
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

Unregisters the callback function.

Warning:
This is not for use by third-party applications.
Since :
2.3
Parameters:
[in]requestThe request 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_request_event_cb()
package_manager_request_set_event_cb()

Retrieves all package information of installed packages.

Warning:
This is not for use by third-party applications.
Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]handleResource event info handle
[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_res_event_path_cb() repeatedly for each path state handled by resource event.
See also:
package_manager_res_event_path_cb()

Gets the error code from given resource event handle.

Warning:
This is not for use by third-party applications.
Since :
6.5
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Parameters:
[in]handleResource event info handle
[out]errorError will be returned
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

Creates a package update info request.

Warning:
This is not for use by third-party applications.
Since :
4.0
Privilege Level:
platform
Privilege:
http://tizen.org/privilege/packagemanager.admin
Remarks:
You must release pkg_updateinfo_req using package_manager_updateinfo_request_destroy().
Parameters:
[out]pkg_updateinfo_reqThe package update info request 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
See also:
package_manager_updateinfo_request_destroy()

Destroys the package update info request.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request 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_updateinfo_request_create()

Requests to register package update info in platform.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request 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
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
See also:
package_manager_updateinfo_request_create()
package_manager_updateinfo_request_destroy()
int package_manager_updateinfo_request_unregister ( package_updateinfo_request_h  pkg_updateinfo_req,
const char *  pkgid 
)

Requests to unregister update info in platform for given package id.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request handle
[in]pkgidThe package id to request unregister update info
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

Request to unregister update info of all packages in platform.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request 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
PACKAGE_MANAGER_ERROR_SYSTEM_ERRORSevere system error
int package_manager_updateinfo_set_pkgid ( package_updateinfo_request_h  pkg_updateinfo_req,
const char *  pkgid 
)

Sets the package ID to the package update info request.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request handle
[in]pkgidThe 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_OUT_OF_MEMORYOut of memory
See also:
package_manager_updateinfo_request_create()

Sets the package update type to the package update info request.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request handle
[in]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
See also:
package_manager_updateinfo_request_create()
package_updateinfo_type_e
int package_manager_updateinfo_set_version ( package_updateinfo_request_h  pkg_updateinfo_req,
const char *  version 
)

Sets the package version to the package update info request.

Since :
4.0
Parameters:
[in]pkg_updateinfo_reqThe update info request handle
[in]versionThe package 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
See also:
package_manager_updateinfo_request_create()