Fix descriptions and Add documents for ACR-796 30/95330/6
authorsooyeon.kim <sooyeon.kim@samsung.com>
Thu, 3 Nov 2016 01:49:25 +0000 (10:49 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Tue, 8 Nov 2016 10:36:21 +0000 (19:36 +0900)
Change-Id: I2c5039dc69366223093313ff12333bff0ba91512
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
client/vc.c
common/vc_command.c
common/vc_command.h
doc/uix_vc_doc.h
include/voice_control.h
include/voice_control_command.h
include/voice_control_command_expand.h
include/voice_control_common.h

index 8ea8acc..b87cf54 100644 (file)
@@ -2048,7 +2048,7 @@ int vc_set_invocation_name(const char* name)
        return ret;
 }
 
-int vc_dialog(const char* disp_text, const char* utt_text, bool auto_start)
+int vc_request_dialog(const char* disp_text, const char* utt_text, bool auto_start)
 {
        vc_state_e state;
 
index c37287e..6a0c91d 100755 (executable)
@@ -931,9 +931,6 @@ int vc_cmd_get_unfixed_command(vc_cmd_h vc_command, char** command)
        if (0 != __vc_cmd_get_feature_enabled()) {
                return VC_ERROR_NOT_SUPPORTED;
        }
-       if (0 != __vc_cmd_check_privilege()) {
-               return VC_ERROR_PERMISSION_DENIED;
-       }
 
        if (NULL == vc_command || NULL == command) {
                SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid handle ");
@@ -1108,9 +1105,6 @@ int vc_cmd_set_format(vc_cmd_h vc_command, int format)
        if (0 != __vc_cmd_get_feature_enabled()) {
                return VC_ERROR_NOT_SUPPORTED;
        }
-       if (0 != __vc_cmd_check_privilege()) {
-               return VC_ERROR_PERMISSION_DENIED;
-       }
 
        if (NULL == vc_command) {
                SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
@@ -1132,9 +1126,6 @@ int vc_cmd_get_format(vc_cmd_h vc_command, int* format)
        if (0 != __vc_cmd_get_feature_enabled()) {
                return VC_ERROR_NOT_SUPPORTED;
        }
-       if (0 != __vc_cmd_check_privilege()) {
-               return VC_ERROR_PERMISSION_DENIED;
-       }
 
        if (NULL == vc_command || NULL == format) {
                SLOG(LOG_ERROR, TAG_VCCMD, "[ERROR] Invalid parameter ");
index c010c65..9f0bad5 100644 (file)
@@ -162,22 +162,6 @@ int vc_cmd_set_fixed_command(vc_cmd_h vc_command, const char* fixed);
 int vc_cmd_get_fixed_command(vc_cmd_h vc_command, char** fixed);
 
 /**
-* @brief Gets fixed command
-* @since_tizen 3.0
-*
-* @param[in] vc_command The command handle
-* @param[out] fixed Fixed command
-*
-* @return 0 on success, otherwise a negative error value
-* @retval #VC_CMD_ERROR_NONE Successful
-* @retval #VC_CMD_ERROR_INVALID_PARAMETER Invalid parameter
-* @retval #VC_CMD_ERROR_NOT_SUPPORTED Not supported feature
-*
-* @see vc_cmd_set_unfixed_command()
-*/
-int vc_cmd_get_unfixed_command(vc_cmd_h vc_command, char** command);
-
-/**
 * @brief Sets invocation name.
 * @since_tizen 3.0
 *
index 5cb9861..621b7de 100644 (file)
  * 4-3. Set command and type for command handle <br>
  * 4-4. Add command handle to command list <br>
  * 5. Set command list for recognition <br>
- * 6. If an application wants to finish voice control,<br>
- * 6-1. Destroy command and command list handle <br>
- * 6-2. Deinitialize <br>
+ * 6. Set an invocation name for an application <br>
+ * 7. Get recognition results <br>
+ * 8. Request the dialogue <br>
+ * 9. If an application wants to finish voice control,<br>
+ * 9-1. Destroy command and command list handle <br>
+ * 9-2. Deinitialize <br>
  *
  * An application can obtain command handle from command list, and also get information from handle.
  *
  * <td></td>
  * </tr>
  * <tr>
+ * <td>vc_get_result()</td>
+ * <td>Ready</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>vc_get_system_command_list()</td>
+ * <td>Ready</td>
+ * <td></td>
+ * </tr>
+ * <tr>
  * <td>vc_set_command_list()</td>
  * <td>Ready</td>
  * <td></td>
  * <td></td>
  * </tr>
  * <tr>
+ * <td>vc_set_invocation_name()</td>
+ * <td>Ready</td>
+ * <td></td>
+ * </tr>
+ * <tr>
+ * <td>vc_request_dialog()</td>
+ * <td>Ready</td>
+ * <td></td>
+ * </tr>
+ * <tr>
  * <td>
  * vc_set_result_cb()<br>
  * vc_unset_result_cb()<br>
index 4d9c51a..1adcfb7 100644 (file)
@@ -269,16 +269,16 @@ int vc_get_service_state(vc_service_state_e* state);
 int vc_get_system_command_list(vc_cmd_list_h* vc_sys_cmd_list);
 
 /**
- * @brief Sets invocation name.
+ * @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 set as the application name or some words.
- *     For example, an application "Tizen Sample" has a background command, "Play music", and the invocation name of the application is set as "Tizen Sample".
+ * @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 setting language. For example, if the setting language is "en_US"(English), the invocation name is also "en_US".
- *     If the setting language is "ja_JP"(Japanese) and the invocation name is "en_US", the invocation name will not be recognized.
+ *     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
@@ -298,16 +298,18 @@ int vc_set_invocation_name(const char* name);
 
 /**
  * @brief Requests to start the dialogue.
- * @details Using this function, the developer can transfer texts, for starting the dialogue, to the framework.
- *     There are two types of texts. One is a text for displaying, and the other is that for uttering.
+ * @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 restarts automatically or not, using @a auto_start.
+ *     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, 4 times can be restarted.
+ * @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
index 8a7ee52..17aa455 100644 (file)
@@ -35,6 +35,37 @@ extern "C"
 
 
 /**
+ * @brief Definition for fixed command format
+ * @since_tizen 3.0
+ */
+#define VC_CMD_FORMAT_FIXED    0
+
+/**
+ * @brief Definition for fixed and variable fixed command format
+ * @since_tizen 3.0
+ */
+#define VC_CMD_FORMAT_FIXED_AND_VFIXED 1
+
+/**
+ * @brief Definition for variable fixed and fixed command format
+ * @since_tizen 3.0
+ */
+#define VC_CMD_FORMAT_VFIXED_AND_FIXED 2
+
+/**
+ * @brief Definition for fixed and non-fixed command format
+ * @since_tizen 3.0
+ */
+#define VC_CMD_FORMAT_FIXED_AND_NONFIXED       3
+
+/**
+ * @brief Definition for non-fixed and fixed command format
+ * @since_tizen 3.0
+ */
+#define VC_CMD_FORMAT_NONFIXED_AND_FIXED       4
+
+
+/**
  * @brief The voice command handle.
  * @since_tizen @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif
  */
@@ -168,7 +199,7 @@ int vc_cmd_list_remove(vc_cmd_list_h vc_cmd_list, vc_cmd_h vc_command);
 int vc_cmd_list_foreach_commands(vc_cmd_list_h vc_cmd_list, vc_cmd_list_cb callback, void* user_data);
 
 /**
- * @brief Retrieves all commands on the system command list using callback function.
+ * @brief Retrieves all commands on the system command list using callback function.
  * @since_tizen 3.0
  *
  * @param[in] callback Callback function to invoke
@@ -355,8 +386,8 @@ int vc_cmd_get_command(vc_cmd_h vc_command, char** command);
  * @brief Gets the unfixed command.
  * @since_tizen 3.0
  *
- * @remark After this function is successfully conducted, the @a command must be released with free() if it is not NULL.
- *     If the command in @a vc_command is NULL, @a command will be also NULL.
+ * @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.
  *
  * @param[in] vc_command The command handle
index 2714301..62d83ad 100755 (executable)
@@ -33,7 +33,7 @@ extern "C"
  * @since_tizen 3.0
  */
 typedef enum {
-       VC_CMD_FORMAT_FIXED = 0,                /**< fixed command only */
+       VC_CMD_FORMAT_FIXED = 0,                /**< Fixed command only */
        VC_CMD_FORMAT_FIXED_AND_VFIXED,         /**< Fixed + variable fixed command */
        VC_CMD_FORMAT_VFIXED_AND_FIXED,         /**< Variable fixed + fixed command */
        VC_CMD_FORMAT_FIXED_AND_NONFIXED,       /**< Fixed + non fixed command */
index 28cee37..c81f5df 100644 (file)
@@ -51,9 +51,9 @@ typedef enum {
        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 process to ready (Since 3.0) */
-       VC_ERROR_IN_PROGRESS_TO_RECORDING       = TIZEN_ERROR_VOICE_CONTROL | 0x020,    /**< In process to recording (Since 3.0) */
-       VC_ERROR_IN_PROGRESS_TO_PROCESSING      = TIZEN_ERROR_VOICE_CONTROL | 0x021     /**< In process to processing (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;
 
 /**