From 49c4cf8fd3434de4bd7622ec65058dcfe1b4d954 Mon Sep 17 00:00:00 2001 From: Seonah Moon Date: Tue, 18 Feb 2020 17:07:59 +0900 Subject: [PATCH] Add internal API for host verification Change-Id: I6b5cee8104a62628cc5d48fa01b1a03a99e8e53f --- include/download_product.h | 16 ++++++++++++++++ src/download-wrapping.c | 7 +++++++ 2 files changed, 23 insertions(+) diff --git a/include/download_product.h b/include/download_product.h index 4d573b9..49cad13 100644 --- a/include/download_product.h +++ b/include/download_product.h @@ -71,6 +71,22 @@ int download_set_network_bonding(int download_id, bool enable); * @see download_set_network_bonding() */ int download_get_network_bonding(int download_id, bool *enable); + +/** + * @brief Sets the 'enabled' state of the verify host feature. + * + * @privlevel public + * @privilege %http://tizen.org/privilege/download + * @param[in] download_id The download id + * @param[in] enable The enable value + * @return 0 on success, otherwise a negative error value + * @retval #DOWNLOAD_ERROR_NONE Successful + * @retval #DOWNLOAD_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #DOWNLOAD_ERROR_ID_NOT_FOUND No Download ID + * @retval #DOWNLOAD_ERROR_PERMISSION_DENIED Permission denied + */ +int download_set_verify_host(int download_id, bool enable); + /** * @} */ diff --git a/src/download-wrapping.c b/src/download-wrapping.c index 30e618b..4506d90 100755 --- a/src/download-wrapping.c +++ b/src/download-wrapping.c @@ -441,3 +441,10 @@ int download_set_temp_file_path(int download_id, char *path) return DOWNLOAD_ERROR_INVALID_PARAMETER; return dp_interface_set_temp_file_path(download_id, path); } + +int download_set_verify_host(int download_id, bool enable) +{ + TRACE_INFO(""); + CHECK_FEATURE_SUPPORTED(DOWNLOAD_FEATURE); + return dp_interface_set_verify_host(download_id, (int)enable); +} -- 2.34.1