/**
* @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
/**
* @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()
/**
* @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
/**
* @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
/**
* @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
/**
* @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
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
* 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;
* }
* 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;
* }
/**
* @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
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
* 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;
* }
* 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;
* }