*/
/**
- * @brief Value to be used when filtering based on install location
+ * @brief 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_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
- /** Boolean property for filtering whether the package is removable or not based on package info*/
#define PACKAGE_MANAGER_PKGINFO_PROP_REMOVABLE "PMINFO_PKGINFO_PROP_PACKAGE_REMOVABLE"
- /** Boolean property for filtering whether the package is readonly or not based on package info*/
+
+/**
+ * @brief 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_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ */
#define PACKAGE_MANAGER_PKGINFO_PROP_READONLY "PMINFO_PKGINFO_PROP_PACKAGE_READONLY"
- /** Boolean property for filtering whether the package supports disable or not based on package info*/
+
+/**
+ * @brief 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_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ */
#define PACKAGE_MANAGER_PKGINFO_PROP_SUPPORT_DISABLE "PMINFO_PKGINFO_PROP_PACKAGE_SUPPORT_DISABLE"
- /** Boolean property for filtering whether the package is disabled based on package info*/
+
+/**
+ * @brief Value to be used when filtering based on install location: Boolean property for filtering whether the package is disabled based on package info
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ */
#define PACKAGE_MANAGER_PKGINFO_PROP_DISABLE "PMINFO_PKGINFO_PROP_PACKAGE_DISABLE"
- /** Boolean property for filtering whether the package is preload or not based on package info*/
+
+/**
+ * @brief 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_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ */
#define PACKAGE_MANAGER_PKGINFO_PROP_PRELOAD "PMINFO_PKGINFO_PROP_PACKAGE_PRELOAD"
/**
} package_manager_event_state_e;
/**
- * @platform
- * @brief Enumeration for request mode.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- */
-typedef enum {
- PACKAGE_MANAGER_REQUEST_MODE_DEFAULT = 0, /**< @platform Default request mode */
- PACKAGE_MANAGER_REQUEST_MODE_QUIET, /**< @platform Quiet request mode */
-
- /* These enum will be deprecated. Use above enum instead. */
- PACAKGE_MANAGER_REQUEST_MODE_DEFAULT = 0,
- PACAKGE_MANAGER_REQUEST_MODE_QUIET,
-} package_manager_request_mode_e;
-
-/**
* @brief Enumeration for move type.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*/
typedef struct package_manager_filter_s *package_manager_filter_h;
/**
- * @platform
- * @brief The Package manager request handle.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- */
-typedef struct package_manager_request_s *package_manager_request_h;
-
-/**
- * @platform
- * @brief Called when the progress of the request to the package manager changes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @param[in] id The ID of the request to the package manager
- * @param[in] type The type of the package to install, uninstall or update
- * @param[in] package The name of the package to install, uninstall or update
- * @param[in] event_type The type of the request to the package manager
- * @param[in] event_state The current state of the request to the package manager
- * @param[in] progress The progress for the request that is being processed by the package manager \n
- * The range of progress is from @c 0 to @c 100.
- * @param[in] error The error code when the package manager failed to process the request
- * @param[in] user_data The user data passed from package_manager_request_set_event_cb()
- *
- * @see package_manager_request_set_event_cb()
- * @see package_manager_request_unset_event_cb()
- */
-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);
-
-/**
- * @platform
- * @brief Creates a request handle to the package manager.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @remarks You must release @a request using package_manager_request_destroy().
- *
- * @param[out] request The request handle that is newly created on success
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
- * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error
- *
- * @see package_manager_request_destroy()
- */
-int package_manager_request_create(package_manager_request_h *request);
-
-/**
- * @platform
- * @brief Destroys the request handle to the package manager.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @param[in] request The request handle to the package manager
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see package_manager_request_create()
- */
-int package_manager_request_destroy(package_manager_request_h request);
-
-/**
- * @platform
- * @brief Registers a callback function to be invoked when the progress of the request changes.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel public
- * @privilege %http://tizen.org/privilege/packagemanager.info
- * @param[in] request The request handle
- * @param[in] callback The callback function to be registered
- * @param[in] user_data The user data to be passed to the callback function
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
- * @post package_manager_request_event_cb() will be invoked.
- *
- * @see package_manager_request_event_cb()
- * @see package_manager_request_unset_event_cb()
- */
-int package_manager_request_set_event_cb(package_manager_request_h request,
- package_manager_request_event_cb callback, void *user_data);
-
-/**
- * @platform
- * @brief Unregisters the callback function.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @param[in] request The request handle
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- *
- * @see package_manager_request_event_cb()
- * @see package_manager_request_set_event_cb()
- */
-int package_manager_request_unset_event_cb(package_manager_request_h request);
-
-/**
- * @platform
- * @brief Sets the type of the package to install, uninstall or update.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @param[in] request The request handle
- * @param[in] type The type of the package
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int package_manager_request_set_type(package_manager_request_h request,
- const char *type);
-
-/**
- * @platform
- * @brief Sets the mode of the request.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- *
- * @param[in] request The request handle
- * @param[in] mode The mode of the request
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- */
-int package_manager_request_set_mode(package_manager_request_h request,
- package_manager_request_mode_e mode);
-
-/**
- * @platform
- * @brief Installs the package located at the given path.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/packagemanager.admin
- * @param[in] request The request handle
- * @param[in] path The absolute path to the package to be installed
- * @param[out] id The ID of the request to the package manager
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
- * @see package_manager_request_uninstall()
- */
-int package_manager_request_install(package_manager_request_h request,
- const char *path, int *id);
-
-/**
- * @platform
- * @brief Uninstalls the package with the given name.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/packagemanager.admin
- * @param[in] request The request handle
- * @param[in] name The name of the package to be uninstalled
- * @param[out] id The ID of the request to the package manager
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
- */
-int package_manager_request_uninstall(package_manager_request_h request,
- const char *name, int *id);
-
-/**
- * @platform
- * @brief Moves the package from SD card to the internal memory and vice versa.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- * @privlevel platform
- * @privilege %http://tizen.org/privilege/packagemanager.admin
- * @param[in] request The request handle
- * @param[in] name The name of the package to be moved
- * @param[in] move_type The move type [enum package_manager_move_type_e], [external to internal/internal to external]
- *
- * @return @c 0 on success,
- * otherwise a negative error value
- *
- * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
- * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
- */
-int package_manager_request_move(package_manager_request_h request,
- const char *name, package_manager_move_type_e move_type);
-
-
-/**
* @brief Called when the package is installed, uninstalled or updated, and the progress of the request to the package manager changes.
* @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
*
int package_manager_clear_all_cache_dir(void);
/**
- * @platform
- * @brief The structure type for the package size information.
- * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
- */
-typedef struct package_size_info
-{
- long long data_size; /**< The size of files in the application's internal data directory */
- long long cache_size; /**< The size of files in the application's internal cache directory */
- long long app_size; /**< The size of files in the application's internal bin, lib, and
- res directories */
- long long external_data_size; /**< The size of files in the application's external data directory */
- long long external_cache_size; /**< The size of files in the application's external cache directory */
- long long external_app_size; /**< The size of files in the application's res directory */
-} package_size_info_t;
-
-/**
* @brief The handle for the package size information.
* @since_tizen 2.4
*/
-typedef package_size_info_t *package_size_info_h;
+typedef struct package_size_info_t *package_size_info_h;
/**
* @brief Called when the package size information is obtained.
* @param[in] size_info The pointer to the structure including the package size information
* @param[in] user_data The user data to be passed to the callback function
*/
-typedef void (*package_manager_total_size_info_receive_cb)(const package_size_info_t *size_info, void *user_data);
+typedef void (*package_manager_total_size_info_receive_cb)(const package_size_info_h size_info, void *user_data);
/**
* @brief Gets the package size information.
*/
int package_size_info_get_external_app_size(package_size_info_h handle, long long *ext_app_size);
+/**
+* @}
+*/
+
+/**
+ * @addtogroup CAPI_PACKAGE_REQUEST_MODULE
+ * @{
+ */
+
+/**
+ * @platform
+ * @brief Enumeration for request mode.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ */
+typedef enum {
+ PACKAGE_MANAGER_REQUEST_MODE_DEFAULT = 0, /**< @platform Default request mode */
+ PACKAGE_MANAGER_REQUEST_MODE_QUIET, /**< @platform Quiet request mode */
+
+ /* These enum will be deprecated. Use above enum instead. */
+ PACAKGE_MANAGER_REQUEST_MODE_DEFAULT = 0,
+ PACAKGE_MANAGER_REQUEST_MODE_QUIET,
+} package_manager_request_mode_e;
+
+/**
+ * @platform
+ * @brief The Package manager request handle.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ */
+typedef struct package_manager_request_s *package_manager_request_h;
+
+/**
+ * @platform
+ * @brief Called when the progress of the request to the package manager changes.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @param[in] id The ID of the request to the package manager
+ * @param[in] type The type of the package to install, uninstall or update
+ * @param[in] package The name of the package to install, uninstall or update
+ * @param[in] event_type The type of the request to the package manager
+ * @param[in] event_state The current state of the request to the package manager
+ * @param[in] progress The progress for the request that is being processed by the package manager \n
+ * The range of progress is from @c 0 to @c 100.
+ * @param[in] error The error code when the package manager failed to process the request
+ * @param[in] user_data The user data passed from package_manager_request_set_event_cb()
+ *
+ * @see package_manager_request_set_event_cb()
+ * @see package_manager_request_unset_event_cb()
+ */
+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);
+
+/**
+ * @platform
+ * @brief Creates a request handle to the package manager.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @remarks You must release @a request using package_manager_request_destroy().
+ *
+ * @param[out] request The request handle that is newly created on success
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR Internal I/O error
+ *
+ * @see package_manager_request_destroy()
+ */
+int package_manager_request_create(package_manager_request_h *request);
+
+/**
+ * @platform
+ * @brief Destroys the request handle to the package manager.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @param[in] request The request handle to the package manager
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @see package_manager_request_create()
+ */
+int package_manager_request_destroy(package_manager_request_h request);
+
+/**
+ * @platform
+ * @brief Registers a callback function to be invoked when the progress of the request changes.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @privlevel public
+ * @privilege %http://tizen.org/privilege/packagemanager.info
+ * @param[in] request The request handle
+ * @param[in] callback The callback function to be registered
+ * @param[in] user_data The user data to be passed to the callback function
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ * @post package_manager_request_event_cb() will be invoked.
+ *
+ * @see package_manager_request_event_cb()
+ * @see package_manager_request_unset_event_cb()
+ */
+int package_manager_request_set_event_cb(package_manager_request_h request,
+ package_manager_request_event_cb callback, void *user_data);
+
+/**
+ * @platform
+ * @brief Unregisters the callback function.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @param[in] request The request handle
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ *
+ * @see package_manager_request_event_cb()
+ * @see package_manager_request_set_event_cb()
+ */
+int package_manager_request_unset_event_cb(package_manager_request_h request);
+
+/**
+ * @platform
+ * @brief Sets the type of the package to install, uninstall or update.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @param[in] request The request handle
+ * @param[in] type The type of the package
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int package_manager_request_set_type(package_manager_request_h request,
+ const char *type);
+
+/**
+ * @platform
+ * @brief Sets the mode of the request.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ *
+ * @param[in] request The request handle
+ * @param[in] mode The mode of the request
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ */
+int package_manager_request_set_mode(package_manager_request_h request,
+ package_manager_request_mode_e mode);
+
+/**
+ * @platform
+ * @brief Sets the path of TEP file to the request. The TEP file that is set will be installed when the package is installed.
+ * @since_tizen 2.4
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in] request The request handle
+ * @param[in] tep_path The tep path to set. If this is NULL on update, installed tep will be removed.
+ * @return 0 on success, otherwise a negative error value
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error
+ */
+int package_manager_request_set_tep(package_manager_request_h request,
+ const char *tep_path);
+
+/**
+ * @platform
+ * @brief Installs the package located at the given path.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in] request The request handle
+ * @param[in] path The absolute path to the package to be installed
+ * @param[out] id The ID of the request to the package manager
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ * @see package_manager_request_uninstall()
+ */
+int package_manager_request_install(package_manager_request_h request,
+ const char *path, int *id);
+
+/**
+ * @platform
+ * @brief Uninstalls the package with the given name.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in] request The request handle
+ * @param[in] name The name of the package to be uninstalled
+ * @param[out] id The ID of the request to the package manager
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ */
+int package_manager_request_uninstall(package_manager_request_h request,
+ const char *name, int *id);
+
+/**
+ * @platform
+ * @brief Moves the package from SD card to the internal memory and vice versa.
+ * @since_tizen @if MOBILE 2.3 @elseif WEARABLE 2.3.1 @endif
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in] request The request handle
+ * @param[in] name The name of the package to be moved
+ * @param[in] move_type The move type [enum package_manager_move_type_e], [external to internal/internal to external]
+ *
+ * @return @c 0 on success,
+ * otherwise a negative error value
+ *
+ * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
+ */
+int package_manager_request_move(package_manager_request_h request,
+ const char *name, package_manager_move_type_e move_type);
/**
* @}