From e2d1136c87c4f35826d10191b389cdccfc07e3a5 Mon Sep 17 00:00:00 2001 From: Eunyoung Lee Date: Fri, 10 May 2019 16:19:27 +0900 Subject: [PATCH] [sample] updated header --- inc/iot-device-manage.h | 60 +++++++++++++++++++++++++------------------------ 1 file changed, 31 insertions(+), 29 deletions(-) diff --git a/inc/iot-device-manage.h b/inc/iot-device-manage.h index 0e11b4b..6982276 100644 --- a/inc/iot-device-manage.h +++ b/inc/iot-device-manage.h @@ -25,29 +25,31 @@ extern "C" { /** * @brief Creates a idm_command handle. - * @remarks This is not for use by third-party applications. - * This is not thread safe. - * @post The idm_command must be released using idm_command_free(). + * @since_tizen 5.0 + * @remarks This is not thread safe. + * The idm_command must be released using idm_command_free(). * @param[out] command The idm_command handle to be newly created on success * @return 0 on success, otherwise a negative error value + * @see idm_command_free() */ int idm_command_new(idm_command_h *command); /** * @brief Destroys the idm_command handle and releases all its resources. - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @return 0 on success, otherwise a negative error value + * @see idm_command_new() */ int idm_command_free(idm_command_h command); /** * @brief Runs the pre-set command. - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * This works asynchronously. - * @pre To use this API, the command must be perset by using idm_command_set_power_cmd(), idm_command_set_diagnosis_cmd(), idm_command_set_info_cmd(). + * To use this API, the command must be perset by using idm_command_set_power_cmd(), idm_command_set_diagnosis_cmd(), idm_command_set_info_cmd(). * @param[in] command The idm_command handle * @param[in] result_cb The callback function to get result * @param[in] user_data The user data to be passed to the callback function @@ -61,9 +63,9 @@ int idm_command_run(idm_command_h command, idm_result_cb result_cb, void *user_d /** * @brief Stops the command. - * @remarks This is not for use by third-party applications. - * This is not thread safe. - * if the command is not running, This returns -1(fail). + * @since_tizen 5.0 + * @remarks This is not thread safe. + * If the command is not running, it returns a negative error value. * @param[in] command The idm_command handle * @return 0 on success, otherwise a negative error value * @see idm_command_run() @@ -72,8 +74,8 @@ int idm_command_stop(idm_command_h command); /** * @brief Gets state of the command. - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[out] state The current state of the command * @return 0 on success, otherwise a negative error value @@ -83,8 +85,8 @@ int idm_command_get_state(idm_command_h command, idm_cmd_status_e *state); /** * @brief Sets ID of the command. - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[in] id The ID of the command * @return 0 on success, otherwise a negative error value @@ -93,8 +95,8 @@ int idm_command_set_id(idm_command_h command, unsigned long id); /** * @brief Gets ID of the command. - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[out] id The ID of the command * @return 0 on success, otherwise a negative error value @@ -103,8 +105,8 @@ int idm_command_get_id(idm_command_h command, unsigned long *id); /** * @brief Gets type of the command - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[out] type The type of the command * @return 0 on success, otherwise a negative error value @@ -113,10 +115,12 @@ int idm_command_get_id(idm_command_h command, unsigned long *id); int idm_command_get_type(idm_command_h command, idm_cmd_type_e *type); /** + * @platfrom * @brief Sets the command regarding power + * @since_tizen 5.0 + * @privlevel platform * @privilege http://tizen.org/privilege/reboot - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[in] cmd The command regarding power * @param[in] reason The reason for setting @cmd @@ -151,7 +155,6 @@ int idm_command_get_type(idm_command_h command, idm_cmd_type_e *type); * ret = idm_command_set_power_cmd(command, IDM_CMD_POWER_REBOOT, NULL); * if (ret != 0) { * _E("failed to idm_command_set_power_cmd"); - * idm_command_stop(ad->command); * idm_command_free(command); * return; * } @@ -159,7 +162,6 @@ int idm_command_get_type(idm_command_h command, idm_cmd_type_e *type); * ret = idm_command_run(command, __reboot_result_callback, ad); * if (ret != 0) { * _E("failed to idm_command_run"); - * idm_command_stop(ad->command); * idm_command_free(command); * return; * } @@ -170,8 +172,8 @@ int idm_command_set_power_cmd(idm_command_h command, idm_cmd_power_e cmd, const /** * @brief Sets the command regarding diagnosis - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @since_tizen 5.0 + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[in] cmd The command regarding diagnosis * @param[in] detail The details for setting @cmd @@ -181,10 +183,12 @@ int idm_command_set_power_cmd(idm_command_h command, idm_cmd_power_e cmd, const int idm_command_set_diagnosis_cmd(idm_command_h command, idm_cmd_diagnosis_e cmd, const char* detail); /** + * @platfrom * @brief Sets the command for getting information + * @since_tizen 5.0 + * @privlevel platform * @privilege http://tizen.org/privilege/systemmonitor - * @remarks This is not for use by third-party applications. - * This is not thread safe. + * @remarks This is not thread safe. * @param[in] command The idm_command handle * @param[in] cmd The command for getting information * @param[in] detail The details for setting @cmd @@ -223,7 +227,6 @@ int idm_command_set_diagnosis_cmd(idm_command_h command, idm_cmd_diagnosis_e cmd * ret = idm_command_set_info_cmd(command, IDM_CMD_INFO_GET_TASKINFO, request); * if (ret != 0) { * _E("failed to idm_command_set_info_cmd"); - * idm_command_stop(ad->command); * idm_command_free(command); * return; * } @@ -231,7 +234,6 @@ int idm_command_set_diagnosis_cmd(idm_command_h command, idm_cmd_diagnosis_e cmd * ret = idm_command_run(command, __result_cb, NULL); * if (ret != 0) { * _E("failed to idm_command_run"); - * idm_command_stop(ad->command); * idm_command_free(command); * return; * } -- 2.7.4