Add APIs for multi package install
[platform/core/api/package-manager.git] / include / package_manager_extension.h
index d003b08..00eb521 100644 (file)
@@ -79,6 +79,65 @@ int package_manager_request_mount_install_with_cb(package_manager_request_h requ
                                                int *id);
 
 /**
+ * @platform
+ * @brief Installs the packages located at the given paths as the runtime mountable package, asynchronously.
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in]  request The request handle
+ * @param[in]  paths   The array of absolute paths to the package to be installed
+ * @param[in]  n_paths The number of paths in array
+ * @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_PERMISSION_DENIED Permission denied
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE   No such package
+ * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR          I/O error
+ * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR      Severe system error
+ * @see package_manager_request_uninstall_packages()
+ */
+int package_manager_request_mount_install_packages(package_manager_request_h request,
+                                               const char **paths,
+                                               int n_paths,
+                                               int *id);
+
+/**
+ * @platform
+ * @brief Installs the packages located at the given paths as the runtime mountable package, asynchronously.
+ * @details The progress of the request is asynchronously received by the callback function.
+ *          The @a callback is the individual callback only called for the current API call.
+ *          The @a callback is the only callback called, even if another callback was set for this request
+ *          with package_manager_request_set_event_cb().
+ * @since_tizen 6.0
+ * @privlevel platform
+ * @privilege %http://tizen.org/privilege/packagemanager.admin
+ * @param[in]  request   The request handle
+ * @param[in]  paths     The array of absolute paths to the package to be installed
+ * @param[in]  n_paths   The number of paths in array
+ * @param[in]  callback  The callback function to be invoked
+ * @param[in]  user_data The user data to be passed to the callback function
+ * @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_PERMISSION_DENIED Permission denied
+ * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE   No such package
+ * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY     Out of memory
+ * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR          I/O error
+ * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR      Severe system error
+ */
+int package_manager_request_mount_install_packages_with_cb(package_manager_request_h request,
+                                               const char **paths,
+                                               int n_paths,
+                                               package_manager_request_event_cb callback,
+                                               void *user_data,
+                                               int *id);
+
+/**
 * @}
 */