From dc7e5fe498f7a92acdd3d085d75b53814edb9996 Mon Sep 17 00:00:00 2001 From: Suyeon Hwang Date: Wed, 15 Feb 2017 16:40:50 +0900 Subject: [PATCH] Update header and doc files written in English Change-Id: I35ff11ee224d999d6395b5891bf88b0e272efffc Signed-off-by: Suyeon Hwang (cherry picked from commit f752ead99bcf2736ff9ef5468df9e45c6b4fd7f5) --- doc/uix_vc_doc.h | 21 +-- include/voice_control.h | 242 ++++++++++++++------------------ include/voice_control_command.h | 191 ++++++++++++------------- include/voice_control_common.h | 108 +++++++------- 4 files changed, 248 insertions(+), 314 deletions(-) diff --git a/doc/uix_vc_doc.h b/doc/uix_vc_doc.h index 621b7de..040b006 100644 --- a/doc/uix_vc_doc.h +++ b/doc/uix_vc_doc.h @@ -18,18 +18,17 @@ #ifndef __TIZEN_UIX_VOICE_CONTROL_DOC_H__ #define __TIZEN_UIX_VOICE_CONTROL_DOC_H__ + /** - * @defgroup CAPI_UIX_VOICE_CONTROL_MODULE Voice control * @ingroup CAPI_UIX_FRAMEWORK + * @defgroup CAPI_UIX_VOICE_CONTROL_MODULE Voice control * @brief The @ref CAPI_UIX_VOICE_CONTROL_MODULE API provides functions for registering command and getting notification when registered command is recognized. - * * @section CAPI_UIX_VOICE_CONTROL_MODULE_HEADER Required Header - * \#include
+ * \#include
* * @section CAPI_UIX_VOICE_CONTROL_MODULE_OVERVIEW Overview * A main function of Voice Control API register command and gets notification for recognition result. * Applications can add their own commands and be provided result when their command is recognized by user voice input. - * * To use of Voice Control, use the following steps:
* 1. Initialize
* 2. Register callback functions for notifications
@@ -46,10 +45,7 @@ * 9. If an application wants to finish voice control,
* 9-1. Destroy command and command list handle
* 9-2. Deinitialize
- * * An application can obtain command handle from command list, and also get information from handle. - * - * * The Voice Control API also notifies you (by callback mechanism) when the states of client and service are changed, * command is recognized, current language is changed or error occurred. * An application should register callback functions: vc_state_changed_cb(), vc_service_state_changed_cb(), vc_result_cb(), @@ -60,10 +56,10 @@ * * @image html capi_uix_voice_control_state_diagram.png " " * The following diagram shows the states of Voice Control service. + * * @image html capi_uix_voice_control_service_state_diagram.png "" * * @section CAPI_UIX_VOICE_CONTROL_MODULE_STATE_TRANSITIONS State Transitions - * * * * @@ -95,14 +91,12 @@ * * * - *
FUNCTIONInitializedSYNC
* * @section CAPI_UIX_VOICE_CONTROL_MODULE_STATE_DEPENDENT_FUNCTION_CALLS State Dependent Function Calls * The following table shows state-dependent function calls. * It is forbidden to call functions listed below in wrong states. * Violation of this rule may result in an unpredictable behavior. - * * * * @@ -198,15 +192,14 @@ * * @section CAPI_UIX_VOICE_CONTROL_MODULE_FEATURES Related Features * This API is related with the following features:
- * - http://tizen.org/feature/microphone
- * - http://tizen.org/feature/speech.control
- * + * - http://tizen.org/feature/microphone
+ * - http://tizen.org/feature/speech.control
* It is recommended to design feature related codes in your application for reliability.
* You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.
* To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.
* More details on featuring your application can be found from Feature Element. - * */ + #endif /* __TIZEN_UIX_VOICE_CONTROL_DOC_H__ */ diff --git a/include/voice_control.h b/include/voice_control.h index 1adcfb7..d8ccd26 100644 --- a/include/voice_control.h +++ b/include/voice_control.h @@ -18,54 +18,64 @@ #ifndef __VOICE_CONTROL_H__ #define __VOICE_CONTROL_H__ + #include #include + /** * @addtogroup CAPI_UIX_VOICE_CONTROL_MODULE * @{ */ + #ifdef __cplusplus extern "C" { #endif + /** * @file voice_control.h * @brief This file contains the voice control client API and related callback definitions and enums. */ + /** * @file voice_control_command.h * @brief This file contains the command list and command API and related handle definitions and enums. */ + /** * @file voice_control_common.h * @brief This file contains the callback function definitions and enums. */ + /** - * @brief Definitions for foreground command type. + * @brief Definition for foreground command type. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ #define VC_COMMAND_TYPE_FOREGROUND 1 + /** - * @brief Definitions for background command type. + * @brief Definition for background command type. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ #define VC_COMMAND_TYPE_BACKGROUND 2 + /** - * @brief Definitions for ended dialog. + * @brief Definition for ended dialog. * @since_tizen 3.0 */ #define VC_DIALOG_END 0 + /** - * @brief Definitions for continued dialog. + * @brief Definition for continued dialog. * @since_tizen 3.0 */ #define VC_DIALOG_CONTINUE 1 @@ -76,116 +86,108 @@ extern "C" * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks If the function succeeds, @a vc must be released with vc_deinitialize(). - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_OUT_OF_MEMORY Out of memory * @retval #VC_ERROR_OPERATION_FAILED Operation failure * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @post If this function is called, the state will be #VC_STATE_INITIALIZED. - * * @see vc_deinitialize() */ int vc_initialize(void); + /** * @brief Deinitializes voice control. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_OPERATION_FAILED Operation failure * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_deinitialize() */ int vc_deinitialize(void); + /** * @brief Connects the voice control service. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_OPERATION_FAILED Operation failure * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. * @post If this function is called, the state will be #VC_STATE_READY. - * * @see vc_unprepare() */ int vc_prepare(void); + /** * @brief Disconnects the voice control service. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_READY. * @post If this function is called, the state will be #VC_STATE_INITIALIZED. - * * @see vc_prepare() */ int vc_unprepare(void); + /** * @brief Retrieves all supported languages using callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to invoke * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_OPERATION_FAILED Operation failure * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. - * @post This function invokes vc_supported_language_cb() repeatedly for getting languages. - * + * @post This function invokes vc_supported_language_cb() repeatedly for getting languages. * @see vc_supported_language_cb() * @see vc_get_current_language() */ int vc_foreach_supported_languages(vc_supported_language_cb callback, void* user_data); + /** * @brief Gets current language. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remark If the function succeeds, @a language must be released with free() by you when you no longer need it. - * - * @param[out] language A language is specified as an ISO 3166 alpha-2 two letter country-code \n - * followed by ISO 639-1 for the two-letter language code. \n - * For example, "ko_KR" for Korean, "en_US" for American English. - * - * @return 0 on success, otherwise a negative error value + * @param[out] language A language is specified as an ISO 3166 alpha-2 two letter country-code + * followed by ISO 639-1 for the two-letter language code. + * For example, "ko_KR" for Korean, "en_US" for American English + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_OUT_OF_MEMORY Out of memory @@ -193,48 +195,43 @@ int vc_foreach_supported_languages(vc_supported_language_cb callback, void* user * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED or #VC_STATE_READY. - * * @see vc_foreach_supported_languages() */ int vc_get_current_language(char** language); + /** * @brief Gets current state of voice control client. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[out] state The current state - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_state_changed_cb() * @see vc_set_state_changed_cb() */ int vc_get_state(vc_state_e* state); + /** * @brief Gets current state of voice control service. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[out] state The current state - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * - * @pre The state should be #VC_STATE_READY. - * + * @pre The state should be #VC_STATE_READY. * @see vc_request_start() * @see vc_request_stop() * @see vc_request_cancel() @@ -243,356 +240,325 @@ int vc_get_state(vc_state_e* state); */ int vc_get_service_state(vc_service_state_e* state); + /** * @brief Gets the system command list. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks In the system command list, there are system commands predefined by product manufacturers. Those commands have the highest priority. - * Therefore, the user can not set any commands same with the system commands. \n - * The @a vc_sys_cmd_list must be released using free() when it is no longer required. - * + * Therefore, the user can not set any commands same with the system commands. + * The @a vc_sys_cmd_list must be released using free() when it is no longer required. * @param[out] vc_sys_cmd_list System command list handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The service state should be #VC_SERVICE_STATE_READY. - * * @see vc_unset_command_list() */ int vc_get_system_command_list(vc_cmd_list_h* vc_sys_cmd_list); + /** * @brief Sets the invocation name. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks Invocation name is used to activate background commands. The invocation name can be the same as the application name or any other phrase. - * For example, an application "Tizen Sample" has a background command, "Play music", and the invocation name of the application is set to "Tizen Sample". - * In order to activate the background command, users can say "Tizen Sample, Play music". - * The invocation name is dependent on the current language. For example, if the current language is "en_US"(English), the invocation name is also "en_US". - * If the current language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized. - * This function should be called before vc_set_command_list(). - * + * For example, an application "Tizen Sample" has a background command, "Play music", and the invocation name of the application is set to "Tizen Sample". + * In order to activate the background command, users can say "Tizen Sample, Play music". + * The invocation name is dependent on the current language. For example, if the current language is "en_US"(English), the invocation name is also "en_US". + * If the current language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized. + * This function should be called before vc_set_command_list(). * @param[in] name Invocation name that an application wants to be invoked by - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_READY. - * * @see vc_set_command_list() */ int vc_set_invocation_name(const char* name); + /** * @brief Requests to start the dialogue. * @details Using this function, the developer can request starting the dialogue to the framework. - * When the developer requests the dialogue, two types of texts, @a disp_text and @a utt_text, can be sent by this function. - * @a disp_text is a text for displaying, and @a utt_text is that for uttering. - * For example, if @a disp_text is "October 10th" and @a utt_text is "Today is October 10th.", "October 10th" will be displayed on the screen and "Today is October 10th." will be spoken. - * Also, the developer can set whether the dialogue starts automatically or not, using @a auto_start. - * If the developer sets @a auto_start as @c true, the framework will start to record next speech and continue the dialogue. - * + * When the developer requests the dialogue, two types of texts, @a disp_text and @a utt_text, can be sent by this function. + * @a disp_text is a text for displaying, and @a utt_text is that for uttering. + * For example, if @a disp_text is "October 10th" and @a utt_text is "Today is October 10th.", "October 10th" will be displayed on the screen and "Today is October 10th." will be spoken. + * Also, the developer can set whether the dialogue starts automatically or not, using @a auto_start. + * If the developer sets @a auto_start as @c true, the framework will start to record next speech and continue the dialogue. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @remarks If @a auto_start is @c true, the recognition will start again. In this case, it can be restarted up to 4 times. - * * @param[in] disp_text Text to be displayed on the screen * @param[in] utt_text Text to be spoken * @param[in] auto_start A variable for setting whether the dialog session will be restarted automatically or not - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The service state should be #VC_SERVICE_STATE_READY. */ int vc_request_dialog(const char* disp_text, const char* utt_text, bool auto_start); + /** * @brief Sets command list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. \n - * The matched commands of command list should be set and they should include type and command text at least. - * + * @remarks The command type is valid for #VC_COMMAND_TYPE_FOREGROUND or #VC_COMMAND_TYPE_BACKGROUND. + * The matched commands of command list should be set and they should include type and command text at least. * @param[in] vc_cmd_list Command list handle * @param[in] type Command type - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_READY. - * * @see vc_unset_command_list() */ int vc_set_command_list(vc_cmd_list_h vc_cmd_list, int type); + /** * @brief Unsets command list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] type Command type - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_READY. - * * @see vc_set_command_list() */ int vc_unset_command_list(int type); + /** * @brief Gets the recognition result. * @since_tizen 3.0 * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to get recognition result * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_READY. - * * @see vc_result_cb() */ int vc_get_result(vc_result_cb callback, void* user_data); + /** * @brief Registers a callback function for getting recognition result. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_result_cb() * @see vc_unset_result_cb() */ int vc_set_result_cb(vc_result_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_set_result_cb() */ int vc_unset_result_cb(void); + /** * @brief Registers a callback function to be called when state is changed. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_service_state_changed_cb() * @see vc_unset_service_state_changed_cb() */ int vc_set_service_state_changed_cb(vc_service_state_changed_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_set_service_state_changed_cb() */ int vc_unset_service_state_changed_cb(void); + /** * @brief Registers a callback function to be called when state is changed. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_state_changed_cb() * @see vc_unset_state_changed_cb() */ int vc_set_state_changed_cb(vc_state_changed_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_set_state_changed_cb() */ int vc_unset_state_changed_cb(void); + /** * @brief Registers a callback function to be called when current language is changed. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_current_language_changed_cb() * @see vc_unset_current_language_changed_cb() */ int vc_set_current_language_changed_cb(vc_current_language_changed_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_set_current_language_changed_cb() */ int vc_unset_current_language_changed_cb(void); + /** * @brief Registers a callback function to be called when an error occurred. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * * @param[in] callback Callback function to register * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_error_cb() * @see vc_unset_error_cb() */ int vc_set_error_cb(vc_error_cb callback, void* user_data); + /** * @brief Unregisters the callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif * @privlevel public * @privilege %http://tizen.org/privilege/recorder - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_STATE Invalid state * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @pre The state should be #VC_STATE_INITIALIZED. - * * @see vc_set_error_cb() */ int vc_unset_error_cb(void); diff --git a/include/voice_control_command.h b/include/voice_control_command.h index f4e5ff7..da7045e 100644 --- a/include/voice_control_command.h +++ b/include/voice_control_command.h @@ -18,16 +18,18 @@ #ifndef __VOICE_CONTROL_COMMAND_H__ #define __VOICE_CONTROL_COMMAND_H__ + #include + /** * @defgroup CAPI_UIX_VOICE_CONTROL_COMMAND_MODULE Voice control command * @ingroup CAPI_UIX_VOICE_CONTROL_MODULE - * * @brief The @ref CAPI_UIX_VOICE_CONTROL_COMMAND_MODULE API provides functions for creating/destroying command list and add/remove/retrieve commands of list. * @{ */ + #ifdef __cplusplus extern "C" { @@ -35,31 +37,35 @@ extern "C" /** - * @brief Definition for fixed command format + * @brief Definition for fixed command format. * @since_tizen 3.0 */ #define VC_COMMAND_FORMAT_FIXED 0 + /** - * @brief Definition for fixed and variable fixed command format + * @brief Definition for fixed and variable fixed command format. * @since_tizen 3.0 */ #define VC_COMMAND_FORMAT_FIXED_AND_VFIXED 1 + /** - * @brief Definition for variable fixed and fixed command format + * @brief Definition for variable fixed and fixed command format. * @since_tizen 3.0 */ #define VC_COMMAND_FORMAT_VFIXED_AND_FIXED 2 + /** - * @brief Definition for fixed and non-fixed command format + * @brief Definition for fixed and non-fixed command format. * @since_tizen 3.0 */ #define VC_COMMAND_FORMAT_FIXED_AND_NONFIXED 3 + /** - * @brief Definition for non-fixed and fixed command format + * @brief Definition for non-fixed and fixed command format. * @since_tizen 3.0 */ #define VC_COMMAND_FORMAT_NONFIXED_AND_FIXED 4 @@ -71,22 +77,22 @@ extern "C" */ typedef struct vc_cmd_s* vc_cmd_h; + /** * @brief The voice command list handle. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef struct vc_cmd_list_s* vc_cmd_list_h; + /** * @brief Called to retrieve The commands in list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_command The command handle * @param[in] user_data The user data passed from the foreach function - * - * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop. + * @return @c true to continue with the next iteration of the loop, + * @c false to break out of the loop * @pre vc_cmd_list_foreach_commands() will invoke this callback. - * * @see vc_cmd_list_foreach_commands() */ typedef bool (*vc_cmd_list_cb)(vc_cmd_h vc_command, void* user_data); @@ -95,48 +101,44 @@ typedef bool (*vc_cmd_list_cb)(vc_cmd_h vc_command, void* user_data); /** * @brief Creates a handle for command list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @remarks If the function succeeds, @a The list handle must be released with vc_cmd_list_destroy(). - * * @param[out] vc_cmd_list The command list handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_OUT_OF_MEMORY Out of memory * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_destroy() */ int vc_cmd_list_create(vc_cmd_list_h* vc_cmd_list); + /** * @brief Destroys the handle for command list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle * @param[in] free_command The command free option @c true = release each commands in list, - * @c false = remove command from list - * - * @return 0 on success, otherwise a negative error value + * @c false = remove command from list + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_create() */ int vc_cmd_list_destroy(vc_cmd_list_h vc_cmd_list, bool free_command); + /** * @brief Gets command count of list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle * @param[out] count The count - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied @@ -144,144 +146,135 @@ int vc_cmd_list_destroy(vc_cmd_list_h vc_cmd_list, bool free_command); */ int vc_cmd_list_get_count(vc_cmd_list_h vc_cmd_list, int* count); + /** * @brief Adds command to command list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle * @param[in] vc_command The command handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_remove() */ int vc_cmd_list_add(vc_cmd_list_h vc_cmd_list, vc_cmd_h vc_command); + /** * @brief Removes command from command list. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle * @param[in] vc_command The command handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_add() */ int vc_cmd_list_remove(vc_cmd_list_h vc_cmd_list, vc_cmd_h vc_command); + /** * @brief Retrieves all commands of command list using callback function. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle * @param[in] callback Callback function to invoke * @param[in] user_data The user data to be passed to the callback function - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * - * @post This function invokes vc_cmd_list_cb() repeatedly for getting commands. - * + * @post This function invokes vc_cmd_list_cb() repeatedly for getting commands. * @see vc_cmd_list_cb() */ int vc_cmd_list_foreach_commands(vc_cmd_list_h vc_cmd_list, vc_cmd_list_cb callback, void* user_data); + /** * @brief Moves index to first command. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_EMPTY List empty * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_last() */ int vc_cmd_list_first(vc_cmd_list_h vc_cmd_list); + /** * @brief Moves index to last command. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_EMPTY List empty * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_first() */ int vc_cmd_list_last(vc_cmd_list_h vc_cmd_list); + /** * @brief Moves index to next command. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_EMPTY List empty * @retval #VC_ERROR_ITERATION_END List reached end * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_prev() */ int vc_cmd_list_next(vc_cmd_list_h vc_cmd_list); + /** * @brief Moves index to previous command. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_EMPTY List empty * @retval #VC_ERROR_ITERATION_END List reached end * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_next() */ int vc_cmd_list_prev(vc_cmd_list_h vc_cmd_list); + /** * @brief Get current command from command list by index. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_cmd_list The command list handle * @param[out] vc_command The command handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_EMPTY List empty * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_list_first() * @see vc_cmd_list_last() * @see vc_cmd_list_prev() @@ -289,92 +282,85 @@ int vc_cmd_list_prev(vc_cmd_list_h vc_cmd_list); */ int vc_cmd_list_get_current(vc_cmd_list_h vc_cmd_list, vc_cmd_h* vc_command); + /** * @brief Creates a handle for command. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @remarks If the function succeeds, @a The command handle must be released - * with vc_cmd_destroy() or vc_cmd_list_destroy(). - * You should set command and type if command is valid. - * The command format is set to #VC_COMMAND_FORMAT_FIXED by default and can be changed with vc_cmd_set_format(). - * + * with vc_cmd_destroy() or vc_cmd_list_destroy(). + * You should set command and type if command is valid. + * The command format is set to #VC_COMMAND_FORMAT_FIXED by default and can be changed with vc_cmd_set_format(). * @param[out] vc_command The command handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_OUT_OF_MEMORY Out of memory * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_destroy() */ int vc_cmd_create(vc_cmd_h* vc_command); + /** * @brief Destroys the handle. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_command The command handle - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_create() */ int vc_cmd_destroy(vc_cmd_h vc_command); + /** * @brief Sets command or action. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_command The command handle * @param[in] command The command or action text - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_get_command() */ int vc_cmd_set_command(vc_cmd_h vc_command, const char* command); + /** * @brief Gets command. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @remark If the function succeeds, @a command must be released with free() by you if they are not NULL. - * * @param[in] vc_command The command handle * @param[out] command The command text - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_set_command() */ int vc_cmd_get_command(vc_cmd_h vc_command, char** command); + /** * @brief Gets the unfixed command. * @since_tizen 3.0 - * * @remark If the function succeeds, the @a command must be released with free() if it is not NULL. - * If the command of the given @a vc_command is NULL (@a vc_command is NOT NULL), @a command will be also NULL. - * This function should be used for commands which have non-fixed format. - * + * If the command of the given @a vc_command is NULL (@a vc_command is NOT NULL), @a command will be also NULL. + * This function should be used for commands which have non-fixed format. * @param[in] vc_command The command handle * @param[out] command The unfixed command text - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied @@ -382,77 +368,70 @@ int vc_cmd_get_command(vc_cmd_h vc_command, char** command); */ int vc_cmd_get_unfixed_command(vc_cmd_h vc_command, char** command); + /** * @brief Sets command type. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @remark If you do not set the command type, the default value is -1. - * You should set type if command is valid - * + * @remark If you do not set the command type, the default value is @c -1. + * You should set type if command is valid * @param[in] vc_command The command handle * @param[in] type The command type - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_get_type() */ int vc_cmd_set_type(vc_cmd_h vc_command, int type); + /** * @brief Gets command type. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] vc_command The command handle * @param[out] type The command type - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported - * * @see vc_cmd_set_type() */ int vc_cmd_get_type(vc_cmd_h vc_command, int* type); + /** * @brief Sets the command format. * @since_tizen 3.0 - * * @remark The default format is #VC_COMMAND_FORMAT_FIXED. - * * @param[in] vc_command The command handle * @param[in] format The command format - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported feature - * * @see vc_cmd_get_format() */ int vc_cmd_set_format(vc_cmd_h vc_command, int format); + /** * @brief Gets the command format. * @since_tizen 3.0 - * * @remark The default format is #VC_COMMAND_FORMAT_FIXED. - * * @param[in] vc_command The command handle * @param[out] format The command format - * - * @return 0 on success, otherwise a negative error value + * @return @c 0 on success, + * otherwise a negative error value * @retval #VC_ERROR_NONE Successful * @retval #VC_ERROR_INVALID_PARAMETER Invalid parameter * @retval #VC_ERROR_PERMISSION_DENIED Permission denied * @retval #VC_ERROR_NOT_SUPPORTED Not supported feature - * * @see vc_cmd_set_format() */ int vc_cmd_get_format(vc_cmd_h vc_command, int* format); @@ -462,8 +441,10 @@ int vc_cmd_get_format(vc_cmd_h vc_command, int* format); } #endif + /** * @}@} */ + #endif /* __VOICE_CONTROL_COMMAND_H__ */ diff --git a/include/voice_control_common.h b/include/voice_control_common.h index c938da2..a23ccbe 100644 --- a/include/voice_control_common.h +++ b/include/voice_control_common.h @@ -20,158 +20,151 @@ #include + /** * @addtogroup CAPI_UIX_VOICE_CONTROL_MODULE * @{ */ + #ifdef __cplusplus extern "C" { #endif + /** - * @brief Enumerations of error codes. + * @brief Enumeration for error codes. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { - VC_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ - VC_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ - VC_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ - VC_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ - VC_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< No answer from service */ - VC_ERROR_RECORDER_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Busy recorder */ - VC_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ - VC_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< VC NOT supported */ - VC_ERROR_INVALID_STATE = TIZEN_ERROR_VOICE_CONTROL | 0x011, /**< Invalid state */ - VC_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_VOICE_CONTROL | 0x012, /**< Invalid language */ - VC_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_VOICE_CONTROL | 0x013, /**< No available engine */ - VC_ERROR_OPERATION_FAILED = TIZEN_ERROR_VOICE_CONTROL | 0x014, /**< Operation failed */ - VC_ERROR_OPERATION_REJECTED = TIZEN_ERROR_VOICE_CONTROL | 0x015, /**< Operation rejected */ - VC_ERROR_ITERATION_END = TIZEN_ERROR_VOICE_CONTROL | 0x016, /**< List reached end */ - VC_ERROR_EMPTY = TIZEN_ERROR_VOICE_CONTROL | 0x017, /**< List empty */ - VC_ERROR_SERVICE_RESET = TIZEN_ERROR_VOICE_CONTROL | 0x018, /**< Service daemon reset (Since 3.0) */ - VC_ERROR_IN_PROGRESS_TO_READY = TIZEN_ERROR_VOICE_CONTROL | 0x019, /**< In progress to ready (Since 3.0) */ - VC_ERROR_IN_PROGRESS_TO_RECORDING = TIZEN_ERROR_VOICE_CONTROL | 0x020, /**< In progress to recording (Since 3.0) */ - VC_ERROR_IN_PROGRESS_TO_PROCESSING = TIZEN_ERROR_VOICE_CONTROL | 0x021 /**< In progress to processing (Since 3.0) */ + VC_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */ + VC_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of Memory */ + VC_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< I/O error */ + VC_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */ + VC_ERROR_TIMED_OUT = TIZEN_ERROR_TIMED_OUT, /**< No answer from service */ + VC_ERROR_RECORDER_BUSY = TIZEN_ERROR_RESOURCE_BUSY, /**< Busy recorder */ + VC_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */ + VC_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< VC NOT supported */ + VC_ERROR_INVALID_STATE = TIZEN_ERROR_VOICE_CONTROL | 0x011, /**< Invalid state */ + VC_ERROR_INVALID_LANGUAGE = TIZEN_ERROR_VOICE_CONTROL | 0x012, /**< Invalid language */ + VC_ERROR_ENGINE_NOT_FOUND = TIZEN_ERROR_VOICE_CONTROL | 0x013, /**< No available engine */ + VC_ERROR_OPERATION_FAILED = TIZEN_ERROR_VOICE_CONTROL | 0x014, /**< Operation failed */ + VC_ERROR_OPERATION_REJECTED = TIZEN_ERROR_VOICE_CONTROL | 0x015, /**< Operation rejected */ + VC_ERROR_ITERATION_END = TIZEN_ERROR_VOICE_CONTROL | 0x016, /**< List reached end */ + VC_ERROR_EMPTY = TIZEN_ERROR_VOICE_CONTROL | 0x017, /**< List empty */ + VC_ERROR_SERVICE_RESET = TIZEN_ERROR_VOICE_CONTROL | 0x018, /**< Service daemon reset (Since 3.0) */ + VC_ERROR_IN_PROGRESS_TO_READY = TIZEN_ERROR_VOICE_CONTROL | 0x019, /**< In progress to ready (Since 3.0) */ + VC_ERROR_IN_PROGRESS_TO_RECORDING = TIZEN_ERROR_VOICE_CONTROL | 0x020, /**< In progress to recording (Since 3.0) */ + VC_ERROR_IN_PROGRESS_TO_PROCESSING = TIZEN_ERROR_VOICE_CONTROL | 0x021 /**< In progress to processing (Since 3.0) */ } vc_error_e; + /** - * @brief Enumerations of result event. + * @brief Enumeration for result event. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { - VC_RESULT_EVENT_RESULT_SUCCESS = 0, /**< Normal result */ - VC_RESULT_EVENT_REJECTED = 1 /**< Rejected result */ + VC_RESULT_EVENT_RESULT_SUCCESS = 0, /**< Normal result */ + VC_RESULT_EVENT_REJECTED = 1 /**< Rejected result */ } vc_result_event_e; + /** - * @brief Enumerations of service state. + * @brief Enumeration for service state. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { - VC_SERVICE_STATE_NONE = 0, /**< 'None' state */ - VC_SERVICE_STATE_READY = 1, /**< 'Ready' state */ - VC_SERVICE_STATE_RECORDING = 2, /**< 'Recording' state */ + VC_SERVICE_STATE_NONE = 0, /**< 'None' state */ + VC_SERVICE_STATE_READY = 1, /**< 'Ready' state */ + VC_SERVICE_STATE_RECORDING = 2, /**< 'Recording' state */ VC_SERVICE_STATE_PROCESSING = 3 /**< 'Processing' state */ } vc_service_state_e; + /** - * @brief Enumerations of client state. + * @brief Enumeration for client state. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif */ typedef enum { - VC_STATE_NONE = 0, /**< 'None' state */ - VC_STATE_INITIALIZED = 1, /**< 'Initialized' state */ - VC_STATE_READY = 2 /**< 'Ready' state */ + VC_STATE_NONE = 0, /**< 'None' state */ + VC_STATE_INITIALIZED = 1, /**< 'Initialized' state */ + VC_STATE_READY = 2 /**< 'Ready' state */ } vc_state_e; /** * @brief Called when client gets the recognition result. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @remarks If the duplicated commands are recognized, the event(e.g. #VC_RESULT_EVENT_REJECTED) of command may be rejected \n - * for selecting command as priority. If you set similar or same commands or the recognized results are multi-results, - * vc_cmd_list has the multi commands. - * + * @remarks If the duplicated commands are recognized, the event(e.g. #VC_RESULT_EVENT_REJECTED) of command may be rejected + * for selecting command as priority. If you set similar or same commands or the recognized results are multi-results, + * vc_cmd_list has the multi commands. * @param[in] event The result event (e.g. #VC_RESULT_EVENT_RESULT_SUCCESS, #VC_RESULT_EVENT_REJECTED) * @param[in] vc_cmd_list The recognized command list * @param[in] result The spoken text * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers callback function. - * * @see vc_set_result_cb() */ typedef void (*vc_result_cb)(vc_result_event_e event, vc_cmd_list_h vc_cmd_list, const char* result, void *user_data); + /** * @brief Called when default language is changed. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] previous Previous language * @param[in] current Current language * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers this callback to detect changing mode. - * * @see vc_set_current_language_changed_cb() */ typedef void (*vc_current_language_changed_cb)(const char* previous, const char* current, void* user_data); + /** * @brief Called to retrieve supported language. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * - * @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code \n - * followed by ISO 639-1 for the two-letter language code. \n - * For example, "ko_KR" for Korean, "en_US" for American English. + * @param[in] language A language is specified as an ISO 3166 alpha-2 two letter country-code + * followed by ISO 639-1 for the two-letter language code. + * For example, "ko_KR" for Korean, "en_US" for American English * @param[in] user_data The user data passed from the foreach function - * - * @return @c true to continue with the next iteration of the loop, \n @c false to break out of the loop. - * + * @return @c true to continue with the next iteration of the loop, + * @c false to break out of the loop * @pre The function will invoke this callback. */ typedef bool (*vc_supported_language_cb)(const char* language, void* user_data); + /** * @brief Called when the state of voice control client is changed. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] previous A previous state * @param[in] current A current state * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers this callback to detect changing state. - * * @see vc_set_state_changed_cb() */ typedef void (*vc_state_changed_cb)(vc_state_e previous, vc_state_e current, void* user_data); + /** * @brief Called when the state of voice control service is changed. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] previous A previous state * @param[in] current A current state * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers this callback to detect changing service state. - * * @see vc_set_service_state_changed_cb() */ typedef void (*vc_service_state_changed_cb)(vc_service_state_e previous, vc_service_state_e current, void* user_data); + /** * @brief Called when error occurred. * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif - * * @param[in] reason The error type (e.g. #VC_ERROR_OUT_OF_MEMORY, #VC_ERROR_TIMED_OUT) * @param[in] user_data The user data passed from the callback registration function - * * @pre An application registers this callback to detect error. - * * @see vc_set_error_cb() */ typedef void (*vc_error_cb)(vc_error_e reason, void *user_data); @@ -181,6 +174,7 @@ typedef void (*vc_error_cb)(vc_error_e reason, void *user_data); } #endif + /** * @}@} */ -- 2.34.1
FUNCTION