* @param[in] non_fixed_result Non-fixed command result text
* @param[in] nlu_result NLU result text
* @param[in] msg Engine message (e.g. #VC_RESULT_MESSAGE_NONE, #VC_RESULT_MESSAGE_ERROR_TOO_LOUD)
+* @param[out] user_info A user info (e.g. If ASR result is consumed, the value is 0x01. If not, the value is 0x00.)
* @param[in] user_data The user data passed from set callback function
*
* @pre The vce_main() function should be invoked before this function is called.
*
* @see vce_stop_cb()
*/
-int vce_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, void *user_data);
+int vce_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, int* user_info, void *user_data);
/**
* @brief Sends the ASR result to the engine service user.
return NULL;
}
-int vcd_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, void *user_data)
+int vcd_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, int* user_info, void *user_data)
{
int ret = 0;
if (true == enable) {
SLOG(LOG_DEBUG, TAG_VCD, "[Server] Send ASR result to Widget client");
bool is_consumed = false;
+ if (NULL != user_info) {
+ *user_info = 0x00;
+ }
if (0 != vcdc_send_asr_result(pid, event, all_result, VC_COMMAND_TYPE_WIDGET, &is_consumed)) {
SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send asr result");
} else {
SLOG(LOG_DEBUG, TAG_VCD, "[Server] ASR result is consumed(%d)", is_consumed);
if (true == is_consumed) {
+ if (NULL != user_info) {
+ *user_info = 0x01;
+ SLOG(LOG_DEBUG, TAG_VCD, "[Server] Send whether ASR result is consumed or not (%d)", *user_info);
+ }
vcdc_send_show_tooltip(pid, false);
if (-1 != vcd_client_manager_get_pid()) {
/* Manager client is available */
/*
* For engine service
*/
-int vcd_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, void *user_data);
+int vcd_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, int* user_info, void *user_data);
int vcd_send_asr_result(vce_asr_result_event_e event, const char* asr_result, void *user_data);
return 0;
}
-int vce_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, void *user_data)
+int vce_send_result(vce_result_event_e event, int* result_id, int count, const char* all_result, const char* non_fixed_result, const char* nlu_result, const char* msg, int* user_info, void *user_data)
{
int ret = VCE_ERROR_NONE;
SLOG(LOG_ERROR, TAG_VCD, "[INFO] Input parameter is NULL. (no result)");
}
- ret = vcd_send_result(event, result_id, count, all_result, non_fixed_result, nlu_result, msg, user_data);
+ ret = vcd_send_result(event, result_id, count, all_result, non_fixed_result, nlu_result, msg, user_info, user_data);
if (0 != ret) {
SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to send result");
} else {