From 1c539013be9de0bf6806e986b5903899d3a20ea1 Mon Sep 17 00:00:00 2001 From: Manika Shrivastava Date: Tue, 13 Jun 2023 12:11:25 +0530 Subject: [PATCH] NTP server APIs prototype Change-Id: I6c5f63cda7f1c182acfe4935f4931d79b3ce6f10 Signed-off-by: Manika Shrivastava --- include/connection_extension.h | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/include/connection_extension.h b/include/connection_extension.h index 5a76443..667c969 100755 --- a/include/connection_extension.h +++ b/include/connection_extension.h @@ -694,6 +694,48 @@ int connection_profile_save_ethernet_eap_config(connection_h connection, int connection_clock_is_updated(connection_h connection, bool *updated); /** + * @brief Sets NTP server. + * @since_tizen 8.0 + * @param[in] connection The connection handle + * @param[in] ntp_server requested NTP server IP/URL + * @return 0 on success, otherwise a negative error value + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied + * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported + */ +int connection_set_ntp_server(connection_h connection, const char *ntp_server); + +/** + * @brief Get NTP server url. + * @since_tizen 8.0 + * @remarks You must release @a ntp_server using free(). + * @param[in] connection The connection handle + * @param[out] ntp_server The IP/URL of NTP Server + * @return 0 on success, otherwise a negative error value + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied + * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported + */ +int connection_get_ntp_server(connection_h connection, char **ntp_server); + +/** + * @brief Clear NTP server. + * @since_tizen 8.0 + * @param[in] connection The connection handle + * @return 0 on success, otherwise a negative error value + * @retval #CONNECTION_ERROR_NONE Successful + * @retval #CONNECTION_ERROR_INVALID_OPERATION Invalid operation + * @retval #CONNECTION_ERROR_INVALID_PARAMETER Invalid parameter + * @retval #CONNECTION_ERROR_PERMISSION_DENIED Permission denied + * @retval #CONNECTION_ERROR_NOT_SUPPORTED Not supported + */ +int connection_clear_ntp_server(connection_h connection); + +/** * @} */ -- 2.7.4