Unify bundle data in client, mgr, and widget
[platform/core/uifw/voice-control.git] / server / vcd_tidl.c
index f64dc51..237488f 100644 (file)
@@ -211,103 +211,107 @@ void __send_msg(bundle* msg, vcd_client_type_e type, int pid)
        }
 }
 
-void __send_signal(bundle* msg)
+void __send_signal(bundle* msg, vcd_client_type_e type)
 {
        SLOG(LOG_INFO, TAG_VCD, "[TIDL] send signal start");
 
-       pthread_mutex_lock(&g_mgr_tidl_info_mutex);
+       if (VCD_CLIENT_TYPE_MANAGER == type) {
+               pthread_mutex_lock(&g_mgr_tidl_info_mutex);
 
-       SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to manager");
-       manager_tidl_info_s* mgr_tidl_info = vcd_client_manager_get_tidl_info();
-       if (NULL == mgr_tidl_info) {
-               SLOG(LOG_ERROR, TAG_VCD, "[TIDL] tidl proxy info not allocated");
-               pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
-               return;
-       }
+               SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to manager");
+               manager_tidl_info_s* mgr_tidl_info = vcd_client_manager_get_tidl_info();
+               if (NULL == mgr_tidl_info) {
+                       SLOG(LOG_ERROR, TAG_VCD, "[TIDL] tidl proxy info not allocated");
+                       pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
+                       return;
+               }
 
-       rpc_port_stub_vcd_mgr_stub_vc_mgr_notify_cb_h handle = mgr_tidl_info->notify_cb;
-       if (NULL == handle) {
-               SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
-               pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
-               return;
-       }
+               rpc_port_stub_vcd_mgr_stub_vc_mgr_notify_cb_h handle = mgr_tidl_info->notify_cb;
+               if (NULL == handle) {
+                       SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
+                       pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
+                       return;
+               }
 
-       if (0 != rpc_port_stub_vcd_mgr_stub_vc_mgr_notify_cb_invoke(handle, msg)) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
+               if (0 != rpc_port_stub_vcd_mgr_stub_vc_mgr_notify_cb_invoke(handle, msg)) {
+                       SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
+                       pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
+                       return;
+               }
                pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
-               return;
-       }
-       pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
-
-       pthread_mutex_lock(&g_client_tidl_info_mutex);
-       // get all pids
-       int* client_list = NULL;
-       int client_count = 0;
-       int ret = -1;
-       ret = vcd_client_get_tidl_list(&client_list, &client_count);
-
-       client_tidl_info_s* client_tidl_info = NULL;
-       int pid = -1;
-
-       if (0 == ret && 0 < client_count) {
-               for (int i = 0 ; i < client_count ; i++) {
-                       pid = client_list[i];
-
-                       client_tidl_info = vcd_client_get_tidl_info(pid);
-                       if (NULL == client_tidl_info) {
-                               SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get tidl info. pid(%d)", pid);
-                               continue;
-                       }
-
-                       if (0 != rpc_port_stub_vcd_stub_vc_notify_cb_invoke(client_tidl_info->notify_cb, pid, msg)) {
-                               SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
-                               continue;
+       } /* signal to MANAGER */
+       else if (VCD_CLIENT_TYPE_NORMAL == type) {
+               pthread_mutex_lock(&g_client_tidl_info_mutex);
+               // get all pids
+               int* client_list = NULL;
+               int client_count = 0;
+               int ret = -1;
+               ret = vcd_client_get_tidl_list(&client_list, &client_count);
+
+               client_tidl_info_s* client_tidl_info = NULL;
+               int pid = -1;
+
+               if (0 == ret && 0 < client_count) {
+                       for (int i = 0 ; i < client_count ; i++) {
+                               pid = client_list[i];
+
+                               client_tidl_info = vcd_client_get_tidl_info(pid);
+                               if (NULL == client_tidl_info) {
+                                       SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get tidl info. pid(%d)", pid);
+                                       continue;
+                               }
+
+                               if (0 != rpc_port_stub_vcd_stub_vc_notify_cb_invoke(client_tidl_info->notify_cb, pid, msg)) {
+                                       SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
+                                       continue;
+                               }
                        }
                }
-       }
-       pthread_mutex_unlock(&g_client_tidl_info_mutex);
+               pthread_mutex_unlock(&g_client_tidl_info_mutex);
+       } /* signal to clients */
+       else if (VCD_CLIENT_TYPE_WIDGET == type) {
+               pthread_mutex_lock(&g_widget_tidl_info_mutex);
+               GSList *iter = NULL;
+               GSList* widget_list = vcd_client_widget_get_tidl_info_list();
 
-       pthread_mutex_lock(&g_widget_tidl_info_mutex);
-       GSList *iter = NULL;
-       GSList* widget_list = vcd_client_widget_get_tidl_info_list();
+               int count = g_slist_length(widget_list);
+               int i;
 
-       int count = g_slist_length(widget_list);
-       int i;
+               widget_tidl_info_s *widget_tidl_info = NULL;
 
-       widget_tidl_info_s *widget_tidl_info = NULL;
+               if (0 < count) {
+                       iter = g_slist_nth(widget_list, 0);
+                       for (i = 0; i < count; i++) {
+                               if (NULL == iter) {
+                                       SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] widget list iterator broken");
+                                       break;
+                               }
 
-       if (0 < count) {
-               iter = g_slist_nth(widget_list, 0);
-               for (i = 0; i < count; i++) {
-                       if (NULL == iter) {
-                               SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] widget list iterator broken");
-                               break;
-                       }
+                               widget_tidl_info = iter->data;
 
-                       widget_tidl_info = iter->data;
+                               if (NULL == widget_tidl_info) {
+                                       SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] widget list data broken");
+                                       break;
+                               }
 
-                       if (NULL == widget_tidl_info) {
-                               SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] widget list data broken");
-                               break;
-                       }
+                               SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to widget");
 
-                       SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to widget");
+                               rpc_port_stub_vcd_widget_stub_vc_widget_notify_cb_h handle = widget_tidl_info->notify_cb;
+                               if (NULL == handle) {
+                                       SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
+                                       break;
+                               }
 
-                       rpc_port_stub_vcd_widget_stub_vc_widget_notify_cb_h handle = widget_tidl_info->notify_cb;
-                       if (NULL == handle) {
-                               SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
-                               break;
-                       }
+                               if (0 != rpc_port_stub_vcd_widget_stub_vc_widget_notify_cb_invoke(handle, msg)) {
+                                       SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
+                                       break;
+                               }
 
-                       if (0 != rpc_port_stub_vcd_widget_stub_vc_widget_notify_cb_invoke(handle, msg)) {
-                               SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
-                               break;
+                               iter = g_slist_next(iter);
                        }
-
-                       iter = g_slist_next(iter);
                }
-       }
-       pthread_mutex_unlock(&g_widget_tidl_info_mutex);
+               pthread_mutex_unlock(&g_widget_tidl_info_mutex);
+       } /* signal to widgets */
 }
 
 
@@ -2047,11 +2051,11 @@ int vcdc_send_hello(int pid, vcd_client_type_e type)
                bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_HELLO);
                bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
        } else if (VCD_CLIENT_TYPE_MANAGER == type) {
-               bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_HELLO);
-               bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_pid);
+               bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_HELLO);
+               bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
        } else if (VCD_CLIENT_TYPE_WIDGET == type) {
-               bundle_add_str(msg, VC_WIDGET_BUNDLE_METHOD, VCD_WIDGET_METHOD_HELLO);
-               bundle_add_str(msg, VC_WIDGET_BUNDLE_MESSAGE, tmp_pid);
+               bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_WIDGET_METHOD_HELLO);
+               bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
        } else {
                SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Client type is NOT valid");
                bundle_free(msg);
@@ -2130,8 +2134,8 @@ int vcdc_send_set_volume(int manager_pid, float volume)
        bundle* msg = bundle_create();
 
        snprintf(tmp_volume, 20, "%.6f", volume);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_SET_VOLUME);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_volume);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_SET_VOLUME);
+       bundle_add_str(msg, VC_BUNDLE_VOLUME, tmp_volume);
 
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
@@ -2159,9 +2163,9 @@ int vcdc_send_show_tooltip(int pid, bool show)
        snprintf(tmp_pid, 10, "%d", pid);
        snprintf(tmp_show, 10, "%d", (int)show);
 
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_METHOD, VCD_WIDGET_METHOD_SHOW_TOOLTIP);
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_MESSAGE, tmp_pid);
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_SHOW, tmp_show);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_WIDGET_METHOD_SHOW_TOOLTIP);
+       bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
+       bundle_add_str(msg, VC_BUNDLE_SHOW, tmp_show);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2232,9 +2236,9 @@ int vcdc_send_pre_result_to_manager(int manager_pid, int event, const char* pre_
        bundle* msg = bundle_create();
        snprintf(tmp_event, 10, "%d", event);
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_PRE_RESULT);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_EVENT, tmp_event);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_PRE_RESULT, pre_result);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_PRE_RESULT);
+       bundle_add_str(msg, VC_BUNDLE_EVENT, tmp_event);
+       bundle_add_str(msg, VC_BUNDLE_PRE_RESULT, pre_result);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2252,10 +2256,10 @@ int vcdc_send_specific_engine_result_to_manager(int manager_pid, const char* eng
 
        gchar *gEncodedResult = g_base64_encode((const guchar*)result, strlen(result));
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_SPECIFIC_ENGINE_RESULT);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_ENGINE_APP_ID, engine_app_id);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_EVENT, event);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_RESULT, gEncodedResult);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_SPECIFIC_ENGINE_RESULT);
+       bundle_add_str(msg, VC_BUNDLE_ENGINE_APP_ID, engine_app_id);
+       bundle_add_str(msg, VC_BUNDLE_EVENT, event);
+       bundle_add_str(msg, VC_BUNDLE_RESULT, gEncodedResult);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2277,8 +2281,8 @@ int vcdc_send_result_to_manager(int manager_pid, int result_type)
        bundle* msg = bundle_create();
        snprintf(tmp_result, 10, "%d", result_type);
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_ALL_RESULT);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_result);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_ALL_RESULT);
+       bundle_add_str(msg, VC_BUNDLE_RESULT, tmp_result);
 
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
@@ -2295,7 +2299,7 @@ int vcdc_send_speech_detected(int manager_pid)
 
        bundle* msg = bundle_create();
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_SPEECH_DETECTED);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_SPEECH_DETECTED);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2314,17 +2318,19 @@ int vcdc_send_service_state(vcd_state_e state)
        bundle* msg = bundle_create();
        snprintf(tmp_state, 10, "%d", (int)state);
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_SET_SERVICE_STATE);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_state);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_SET_SERVICE_STATE);
+       bundle_add_str(msg, VC_BUNDLE_SERVICE_STATE, tmp_state);
+       __send_signal(msg, VCD_CLIENT_TYPE_MANAGER);
 
        bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_SET_SERVICE_STATE);
        bundle_add_str(msg, VC_BUNDLE_SERVICE_STATE, tmp_state);
+       __send_signal(msg, VCD_CLIENT_TYPE_NORMAL);
 
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_METHOD, VCD_WIDGET_METHOD_SET_SERVICE_STATE);
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_MESSAGE, tmp_state);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_WIDGET_METHOD_SET_SERVICE_STATE);
+       bundle_add_str(msg, VC_BUNDLE_SERVICE_STATE, tmp_state);
+       __send_signal(msg, VCD_CLIENT_TYPE_WIDGET);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND SIGNAL");
-       __send_signal(msg);
        bundle_free(msg);
 
        return VCD_ERROR_NONE;
@@ -2354,11 +2360,11 @@ int vcdc_send_dialog(int manager_pid, int pid, const char* disp_text, const char
                tmp_utt_text = strdup(utt_text);
        }
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_DIALOG);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_pid);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_DISP_TEXT, tmp_disp_text);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_UTT_TEXT, tmp_utt_text);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_CONTINUOUS, tmp_continuous);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_DIALOG);
+       bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
+       bundle_add_str(msg, VC_BUNDLE_DISP_TEXT, tmp_disp_text);
+       bundle_add_str(msg, VC_BUNDLE_UTT_TEXT, tmp_utt_text);
+       bundle_add_str(msg, VC_BUNDLE_CONTINUOUS, tmp_continuous);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2389,10 +2395,10 @@ int vcdc_tidl_send_error_to_manager(int manager_pid, int reason, char *err_msg)
        snprintf(tmp_reason, 10, "%d", reason);
        snprintf(tmp_daemon_pid, 10, "%d", getpid());
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_ERROR);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_REASON, tmp_reason);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_DAEMON_PID, tmp_daemon_pid);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_ERROR_MESSAGE, temp_msg);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_ERROR);
+       bundle_add_str(msg, VC_BUNDLE_REASON, tmp_reason);
+       bundle_add_str(msg, VC_BUNDLE_DAEMON_PID, tmp_daemon_pid);
+       bundle_add_str(msg, VC_BUNDLE_ERR_MSG, temp_msg);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2428,15 +2434,15 @@ int vcdc_tidl_send_error(int reason, char *err_msg)
        snprintf(tmp_reason, 10, "%d", reason);
        snprintf(tmp_daemon_pid, 10, "%d", getpid());
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_ERROR);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_REASON, tmp_reason);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_DAEMON_PID, tmp_daemon_pid);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_ERROR_MESSAGE, temp_msg);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_ERROR);
+       bundle_add_str(msg, VC_BUNDLE_REASON, tmp_reason);
+       bundle_add_str(msg, VC_BUNDLE_DAEMON_PID, tmp_daemon_pid);
+       bundle_add_str(msg, VC_BUNDLE_ERR_MSG, temp_msg);
 
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_METHOD, VCD_MANAGER_METHOD_ERROR);
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_REASON, tmp_reason);
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_DAEMON_PID, tmp_daemon_pid);
-       bundle_add_str(msg, VC_WIDGET_BUNDLE_ERROR_MESSAGE, temp_msg);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_WIDGET_METHOD_ERROR);
+       bundle_add_str(msg, VC_BUNDLE_REASON, tmp_reason);
+       bundle_add_str(msg, VC_BUNDLE_DAEMON_PID, tmp_daemon_pid);
+       bundle_add_str(msg, VC_BUNDLE_ERR_MSG, temp_msg);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND SIGNAL");
 
@@ -2459,10 +2465,10 @@ int vcdc_send_request_set_private_data(int pid, const char* key, const char* dat
        bundle* msg = bundle_create();
        snprintf(tmp_pid, 10, "%d", pid);
 
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_SET_PRIVATE_DATA);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_pid);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_KEY, key);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_PRIVATE_DATA, data);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_SET_PRIVATE_DATA);
+       bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
+       bundle_add_str(msg, VC_BUNDLE_KEY, key);
+       bundle_add_str(msg, VC_BUNDLE_PRIVATE_DATA, data);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2484,10 +2490,10 @@ int vcdc_send_feedback_audio_format_to_manager(int manager_pid, int rate, vc_aud
        snprintf(tmp_rate, 10, "%d", rate);
        snprintf(tmp_channel, 10, "%d", (int)channel);
        snprintf(tmp_audio_type, 10, "%d", (int)audio_type);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_FEEDBACK_AUDIO_FORMAT);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_AUDIO_RATE, tmp_rate);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_AUDIO_CHANNEL, tmp_channel);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_AUDIO_TYPE, tmp_audio_type);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_FEEDBACK_AUDIO_FORMAT);
+       bundle_add_str(msg, VC_BUNDLE_AUDIO_RATE, tmp_rate);
+       bundle_add_str(msg, VC_BUNDLE_AUDIO_CHANNEL, tmp_channel);
+       bundle_add_str(msg, VC_BUNDLE_AUDIO_TYPE, tmp_audio_type);
 
        SLOG(LOG_DEBUG, TAG_VCD, ">>>> VCD SEND MESSAGE");
 
@@ -2509,10 +2515,10 @@ int vcdc_send_feedback_streaming_to_manager(int manager_pid, int pid, int utt_id
        snprintf(tmp_pid, 10, "%d", pid);
        snprintf(tmp_utt_id, 10, "%d", utt_id);
        snprintf(tmp_event, 10, "%d", (int)event);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_FEEDBACK_STREAMING);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_MESSAGE, tmp_pid);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_UTTID, tmp_utt_id);
-       bundle_add_str(msg, VC_MANAGER_BUNDLE_EVENT, tmp_event);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_FEEDBACK_STREAMING);
+       bundle_add_str(msg, VC_BUNDLE_PID, tmp_pid);
+       bundle_add_str(msg, VC_BUNDLE_UTT_ID, tmp_utt_id);
+       bundle_add_str(msg, VC_BUNDLE_EVENT, tmp_event);
 
        rpc_port_stub_vcd_mgr_stub_array_char_h streaming_data = NULL;
        rpc_port_stub_vcd_mgr_stub_array_char_create(&streaming_data);