2 * Copyright (c) 2017 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef __TIZEN_APPFW_PACKAGE_MANAGER_EXTENSION_H
18 #define __TIZEN_APPFW_PACKAGE_MANAGER_EXTENSION_H
20 #include "package_manager.h"
27 * @file package_manager_extension.h
31 * @addtogroup CAPI_PACKAGE_MANAGER_MODULE
37 * @brief Installs the package located at the given path as the runtime mountable package, asynchronously.
40 * @privilege %http://tizen.org/privilege/packagemanager.admin
41 * @param[in] request The request handle
42 * @param[in] path The absolute path to the package to be installed
43 * @param[out] id The ID of the request to the package manager
44 * @return @c 0 on success,
45 * otherwise a negative error value
46 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
47 * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
48 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
49 * @see package_manager_request_uninstall()
51 int package_manager_request_mount_install(package_manager_request_h request, const char *path, int *id);
56 * @brief Installs the package located at the given path as the runtime mountable package, asynchronously.
57 * @details The progress of the request is asynchronously received by the callback function.
58 * The @a callback is the individual callback only called for the current API call.
59 * The @a callback is the only callback called, even if another callback was set for this request
60 * with package_manager_request_set_event_cb().
63 * @privilege %http://tizen.org/privilege/packagemanager.admin
64 * @param[in] request The request handle
65 * @param[in] path The absolute path to the package to be installed
66 * @param[in] callback The callback function to be invoked
67 * @param[in] user_data The user data to be passed to the callback function
68 * @param[out] id The ID of the request to the package manager
69 * @return @c 0 on success,
70 * otherwise a negative error value
71 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
72 * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
73 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
75 int package_manager_request_mount_install_with_cb(package_manager_request_h request,
77 package_manager_request_event_cb callback,
83 * @brief Installs the packages located at the given paths as the runtime mountable package, asynchronously.
86 * @privilege %http://tizen.org/privilege/packagemanager.admin
87 * @param[in] request The request handle
88 * @param[in] paths The array of absolute paths to the packages to be installed
89 * @param[in] paths_count The number of paths in array
90 * @param[out] id The ID of the request to the package manager
91 * @return @c 0 on success,
92 * otherwise a negative error value
93 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
94 * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
95 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
96 * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package
97 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
98 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
99 * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error
101 int package_manager_request_mount_install_packages(package_manager_request_h request,
108 * @brief Installs the packages located at the given paths as the runtime mountable package, asynchronously.
109 * @details The progress of the request is asynchronously received by the callback function.
110 * The @a callback is the individual callback only called for the current API call.
111 * The @a callback is the only callback called, even if another callback was set for this request
112 * with package_manager_request_set_event_cb().
114 * @privlevel platform
115 * @privilege %http://tizen.org/privilege/packagemanager.admin
116 * @param[in] request The request handle
117 * @param[in] paths The array of absolute paths to the packages to be installed
118 * @param[in] paths_count The number of paths in array
119 * @param[in] callback The callback function to be invoked
120 * @param[in] user_data The user data to be passed to the callback function
121 * @param[out] id The ID of the request to the package manager
122 * @return @c 0 on success,
123 * otherwise a negative error value
124 * @retval #PACKAGE_MANAGER_ERROR_NONE Successful
125 * @retval #PACKAGE_MANAGER_ERROR_PERMISSION_DENIED Permission denied
126 * @retval #PACKAGE_MANAGER_ERROR_INVALID_PARAMETER Invalid parameter
127 * @retval #PACKAGE_MANAGER_ERROR_NO_SUCH_PACKAGE No such package
128 * @retval #PACKAGE_MANAGER_ERROR_OUT_OF_MEMORY Out of memory
129 * @retval #PACKAGE_MANAGER_ERROR_IO_ERROR I/O error
130 * @retval #PACKAGE_MANAGER_ERROR_SYSTEM_ERROR Severe system error
132 int package_manager_request_mount_install_packages_with_cb(package_manager_request_h request,
135 package_manager_request_event_cb callback,
147 #endif /* __TIZEN_APPFW_PACKAGE_MANAGER_EXTENSION_H */