Add internal API for host verification 27/225227/1 accepted/tizen_6.0_unified_hotfix tizen_6.0_hotfix accepted/tizen/6.0/unified/20201030.122618 accepted/tizen/6.0/unified/hotfix/20201103.004921 accepted/tizen/6.0/unified/hotfix/20201103.052323 accepted/tizen/unified/20200416.080129 submit/tizen/20200414.071731 submit/tizen_6.0/20201029.205102 submit/tizen_6.0_hotfix/20201102.192502 submit/tizen_6.0_hotfix/20201103.114802 tizen_6.0.m2_release
authorSeonah Moon <seonah1.moon@samsung.com>
Tue, 18 Feb 2020 08:07:59 +0000 (17:07 +0900)
committerSeonah Moon <seonah1.moon@samsung.com>
Tue, 18 Feb 2020 08:08:03 +0000 (17:08 +0900)
Change-Id: I6b5cee8104a62628cc5d48fa01b1a03a99e8e53f

include/download_product.h
src/download-wrapping.c

index 4d573b9..49cad13 100644 (file)
@@ -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);
+
 /**
  * @}
  */
index 30e618b..4506d90 100755 (executable)
@@ -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);
+}