Rename functions and Implement some TODOs 60/278960/1
authorsooyeon <sooyeon.kim@samsung.com>
Wed, 22 Jun 2022 09:32:41 +0000 (18:32 +0900)
committersooyeon <sooyeon.kim@samsung.com>
Fri, 29 Jul 2022 01:25:58 +0000 (10:25 +0900)
Change-Id: Ic517b7bd84168c53d06dd5b752bee91d418e94a2
Signed-off-by: sooyeon <sooyeon.kim@samsung.com>
server/vcd_client_data.c
server/vcd_client_data.h
server/vcd_dbus.c
server/vcd_dbus.h
server/vcd_main.h
server/vcd_tidl.c
server/vcd_tidl.h

index 4a05082..25b8882 100644 (file)
@@ -32,7 +32,7 @@ static GSList* g_widget_list = NULL;
 static manager_info_s g_manager;
 
 /* Client IPC info list */
-static GSList* g_client_ipc_info_list = NULL;
+static GSList* g_client_tidl_info_list = NULL;
 
 /* Manager IPC info */
 static manager_tidl_info_s* g_mgr_tidl_info = NULL;
@@ -1229,16 +1229,16 @@ int vcd_client_delete(int pid)
        return 0;
 }
 
-GSList* __get_client_ipc_info_item(const int pid)
+GSList* __get_client_tidl_info_item(const int pid)
 {
        GSList *iter = NULL;
-       client_ipc_info_s *data = NULL;
+       client_tidl_info_s *data = NULL;
 
-       int count = g_slist_length(g_client_ipc_info_list);
+       int count = g_slist_length(g_client_tidl_info_list);
        int i;
 
        if (0 < count) {
-               iter = g_slist_nth(g_client_ipc_info_list, 0);
+               iter = g_slist_nth(g_client_tidl_info_list, 0);
                for (i = 0; i < count; i++) {
                        if (NULL == iter)
                                break;
@@ -1256,16 +1256,16 @@ GSList* __get_client_ipc_info_item(const int pid)
        return NULL;
 }
 
-client_ipc_info_s* __get_client_ipc_info_element(int pid)
+client_tidl_info_s* __get_client_tidl_info_element(int pid)
 {
        GSList *iter = NULL;
-       client_ipc_info_s *data = NULL;
+       client_tidl_info_s *data = NULL;
 
-       int count = g_slist_length(g_client_ipc_info_list);
+       int count = g_slist_length(g_client_tidl_info_list);
        int i;
 
        if (0 < count) {
-               iter = g_slist_nth(g_client_ipc_info_list, 0);
+               iter = g_slist_nth(g_client_tidl_info_list, 0);
                for (i = 0; i < count; i++) {
                        if (NULL == iter)
                                break;
@@ -1284,19 +1284,19 @@ client_ipc_info_s* __get_client_ipc_info_element(int pid)
        return NULL;
 }
 
-int vcd_client_add_ipc_info(int pid)
+int vcd_client_add_tidl_info(int pid)
 {
        /*Check pid is duplicated*/
-       client_ipc_info_s* info = NULL;
-       info = __get_client_ipc_info_element(pid);
+       client_tidl_info_s* info = NULL;
+       info = __get_client_tidl_info_element(pid);
 
        if (NULL != info) {
-               SLOG(LOG_WARN, TAG_VCD, "[Client Data] Client ipc info pid is already registered");
+               SLOG(LOG_WARN, TAG_VCD, "[Client Data] Client tidl info pid is already registered");
                return VCD_ERROR_NONE;
        }
 
-       SLOG(LOG_INFO, TAG_VCD, "[Client Data] There is no ipc info of pid(%d). Create new one.", pid);
-       info = (client_ipc_info_s*)calloc(1, sizeof(client_ipc_info_s));
+       SLOG(LOG_INFO, TAG_VCD, "[Client Data] There is no tidl info of pid(%d). Create new one.", pid);
+       info = (client_tidl_info_s*)calloc(1, sizeof(client_tidl_info_s));
        if (NULL == info) {
                SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Fail to allocate memory");
                return VCD_ERROR_OUT_OF_MEMORY;
@@ -1308,29 +1308,29 @@ int vcd_client_add_ipc_info(int pid)
        info->feedback_cb = NULL;
        info->feedback_cb_user_data = NULL;
 
-       g_client_ipc_info_list = g_slist_append(g_client_ipc_info_list, info);
-       if (NULL == g_client_ipc_info_list) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] Fail to add new client ipc info");
+       g_client_tidl_info_list = g_slist_append(g_client_tidl_info_list, info);
+       if (NULL == g_client_tidl_info_list) {
+               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] Fail to add new client tidl info");
 
                free(info);
                info = NULL;
 
                return -1;
        } else {
-               SLOG(LOG_INFO, TAG_VCD, "[Client Data SUCCESS] Add new client ipc info. pid(%d)", pid);
+               SLOG(LOG_INFO, TAG_VCD, "[Client Data SUCCESS] Add new client tidl info. pid(%d)", pid);
        }
 
        return VCD_ERROR_NONE;
 }
 
-int vcd_client_set_ipc_notify_cb(int pid, rpc_port_stub_vcd_stub_vc_notify_cb_h callback, void* user_data)
+int vcd_client_set_tidl_notify_cb(int pid, rpc_port_stub_vcd_stub_vc_notify_cb_h callback, void* user_data)
 {
        /*Check pid*/
-       client_ipc_info_s* info = NULL;
-       info = __get_client_ipc_info_element(pid);
+       client_tidl_info_s* info = NULL;
+       info = __get_client_tidl_info_element(pid);
 
        if (NULL == info) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no ipc info in the list. pid(%d)", pid);
+               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no tidl info in the list. pid(%d)", pid);
                return VCD_ERROR_INVALID_PARAMETER;
        }
 
@@ -1346,14 +1346,14 @@ int vcd_client_set_ipc_notify_cb(int pid, rpc_port_stub_vcd_stub_vc_notify_cb_h
        return VCD_ERROR_NONE;
 }
 
-int vcd_client_unset_ipc_notify_cb(int pid)
+int vcd_client_unset_tidl_notify_cb(int pid)
 {
        /*Check pid*/
-       client_ipc_info_s* info = NULL;
-       info = __get_client_ipc_info_element(pid);
+       client_tidl_info_s* info = NULL;
+       info = __get_client_tidl_info_element(pid);
 
        if (NULL == info) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no ipc info in the list. pid(%d)", pid);
+               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no tidl info in the list. pid(%d)", pid);
                return VCD_ERROR_INVALID_PARAMETER;
        }
 
@@ -1370,14 +1370,14 @@ int vcd_client_unset_ipc_notify_cb(int pid)
        return VCD_ERROR_NONE;
 }
 
-int vcd_client_set_ipc_feedback_cb(int pid, rpc_port_stub_vcd_stub_vc_feedback_cb_h callback, void* user_data)
+int vcd_client_set_tidl_feedback_cb(int pid, rpc_port_stub_vcd_stub_vc_feedback_cb_h callback, void* user_data)
 {
        /*Check pid*/
-       client_ipc_info_s* info = NULL;
-       info = __get_client_ipc_info_element(pid);
+       client_tidl_info_s* info = NULL;
+       info = __get_client_tidl_info_element(pid);
 
        if (NULL == info) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no ipc info in the list. pid(%d)", pid);
+               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no tidl info in the list. pid(%d)", pid);
                return VCD_ERROR_INVALID_PARAMETER;
        }
 
@@ -1393,14 +1393,14 @@ int vcd_client_set_ipc_feedback_cb(int pid, rpc_port_stub_vcd_stub_vc_feedback_c
        return VCD_ERROR_NONE;
 }
 
-int vcd_client_unset_ipc_feedback_cb(int pid)
+int vcd_client_unset_tidl_feedback_cb(int pid)
 {
        /*Check pid*/
-       client_ipc_info_s* info = NULL;
-       info = __get_client_ipc_info_element(pid);
+       client_tidl_info_s* info = NULL;
+       info = __get_client_tidl_info_element(pid);
 
        if (NULL == info) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no ipc info in the list. pid(%d)", pid);
+               SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] There is no tidl info in the list. pid(%d)", pid);
                return VCD_ERROR_INVALID_PARAMETER;
        }
 
@@ -1417,41 +1417,41 @@ int vcd_client_unset_ipc_feedback_cb(int pid)
        return VCD_ERROR_NONE;
 }
 
-int vcd_client_delete_ipc_info(int pid)
+int vcd_client_delete_tidl_info(int pid)
 {
        GSList *tmp = NULL;
-       client_ipc_info_s* client_ipc_info = NULL;
+       client_tidl_info_s* client_tidl_info = NULL;
 
        /*Get handle*/
-       tmp = __get_client_ipc_info_item(pid);
+       tmp = __get_client_tidl_info_item(pid);
        if (NULL == tmp) {
                SLOG(LOG_ERROR, TAG_VCD, "[Client Data ERROR] pid(%d) is NOT valid", pid);
                return VCD_ERROR_INVALID_PARAMETER;
        }
 
        /*Free client structure*/
-       client_ipc_info = tmp->data;
-       if (NULL != client_ipc_info) {
-               free(client_ipc_info);
+       client_tidl_info = tmp->data;
+       if (NULL != client_tidl_info) {
+               free(client_tidl_info);
        }
 
        /*Remove handle from list*/
-       g_client_ipc_info_list = g_slist_remove_link(g_client_ipc_info_list, tmp);
+       g_client_tidl_info_list = g_slist_remove_link(g_client_tidl_info_list, tmp);
 
        return 0;
 }
 
-client_ipc_info_s* vcd_client_get_ipc_info(int pid)
+client_tidl_info_s* vcd_client_get_tidl_info(int pid)
 {
-       return __get_client_ipc_info_element(pid);
+       return __get_client_tidl_info_element(pid);
 }
 
-int vcd_client_get_ipc_list(int** pids, int* pid_count)
+int vcd_client_get_tidl_list(int** pids, int* pid_count)
 {
        if (NULL == pids || NULL == pid_count)
                return -1;
 
-       int count = g_slist_length(g_client_ipc_info_list);
+       int count = g_slist_length(g_client_tidl_info_list);
 
        if (0 == count)
                return -1;
@@ -1464,10 +1464,10 @@ int vcd_client_get_ipc_list(int** pids, int* pid_count)
        }
 
        GSList *iter = NULL;
-       client_ipc_info_s *data = NULL;
+       client_tidl_info_s *data = NULL;
        int i = 0;
 
-       iter = g_slist_nth(g_client_ipc_info_list, 0);
+       iter = g_slist_nth(g_client_tidl_info_list, 0);
 
        while (NULL != iter) {
                data = iter->data;
index 2071bd1..3b2f55c 100644 (file)
@@ -76,7 +76,7 @@ typedef struct {
        void*   notify_cb_user_data;
        rpc_port_stub_vcd_stub_vc_feedback_cb_h feedback_cb;
        void*   feedback_cb_user_data;
-} client_ipc_info_s;
+} client_tidl_info_s;
 
 typedef struct {
        int pid;
@@ -190,21 +190,21 @@ int vcd_client_add(int pid);
 
 int vcd_client_delete(int pid);
 
-int vcd_client_add_ipc_info(int pid);
+int vcd_client_add_tidl_info(int pid);
 
-int vcd_client_set_ipc_notify_cb(int pid, rpc_port_stub_vcd_stub_vc_notify_cb_h callback, void* user_data);
+int vcd_client_set_tidl_notify_cb(int pid, rpc_port_stub_vcd_stub_vc_notify_cb_h callback, void* user_data);
 
-int vcd_client_unset_ipc_notify_cb(int pid);
+int vcd_client_unset_tidl_notify_cb(int pid);
 
-int vcd_client_set_ipc_feedback_cb(int pid, rpc_port_stub_vcd_stub_vc_feedback_cb_h callback, void* user_data);
+int vcd_client_set_tidl_feedback_cb(int pid, rpc_port_stub_vcd_stub_vc_feedback_cb_h callback, void* user_data);
 
-int vcd_client_unset_ipc_feedback_cb(int pid);
+int vcd_client_unset_tidl_feedback_cb(int pid);
 
-int vcd_client_delete_ipc_info(int pid);
+int vcd_client_delete_tidl_info(int pid);
 
-client_ipc_info_s* vcd_client_get_ipc_info(int pid);
+client_tidl_info_s* vcd_client_get_tidl_info(int pid);
 
-int vcd_client_get_ipc_list(int** pids, int* pid_count);
+int vcd_client_get_tidl_list(int** pids, int* pid_count);
 
 bool vcd_client_is_available(int pid);
 
index d16ce39..a00d8bc 100755 (executable)
@@ -90,14 +90,14 @@ int vcd_dbus_reconnect()
        return 0;
 }
 
-static int __dbus_check()
-{
-       if (NULL == g_conn_sender || NULL == g_conn_listener) {
-               SLOG(LOG_ERROR, TAG_VCD, "[ERROR] NULL connection");
-               return vcd_dbus_reconnect();
-       }
-       return 0;
-}
+// static int __dbus_check()
+// {
+//     if (NULL == g_conn_sender || NULL == g_conn_listener) {
+//             SLOG(LOG_ERROR, TAG_VCD, "[ERROR] NULL connection");
+//             return vcd_dbus_reconnect();
+//     }
+//     return 0;
+// }
 
 int vcd_check_dbus_connection()
 {
@@ -108,125 +108,7 @@ int vcd_check_dbus_connection()
        return 0;
 }
 
-// int vcdc_send_hello(int pid, vcd_client_type_e type)
-// {
-//     if (0 != __dbus_check()) {
-//             return VCD_ERROR_OPERATION_FAILED;
-//     }
-
-//     DBusMessage* msg = NULL;
-
-//     if (VCD_CLIENT_TYPE_NORMAL == type) {
-//             msg = __get_message(pid, VCD_METHOD_HELLO, VCD_CLIENT_TYPE_NORMAL);
-//     } else if (VCD_CLIENT_TYPE_WIDGET == type) {
-//             msg = __get_message(pid, VCD_WIDGET_METHOD_HELLO, VCD_CLIENT_TYPE_WIDGET);
-//     } else if (VCD_CLIENT_TYPE_MANAGER == type) {
-//             msg = __get_message(pid, VCD_MANAGER_METHOD_HELLO, VCD_CLIENT_TYPE_MANAGER);
-//     } else {
-//             SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Client type is NOT valid");
-//             return -1;
-//     }
-
-//     if (NULL == msg) {
-//             SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail to create message");
-//             return VCD_ERROR_OUT_OF_MEMORY;
-//     }
-
-//     dbus_message_append_args(msg, DBUS_TYPE_INT32, &pid, DBUS_TYPE_INVALID);
-
-//     DBusError err;
-//     dbus_error_init(&err);
-
-//     DBusMessage* result_msg;
-//     int result = -1;
-
-//     result_msg = dbus_connection_send_with_reply_and_block(g_conn_sender, msg, g_waiting_time, &err);
-//     dbus_message_unref(msg);
-
-//     if (dbus_error_is_set(&err)) {
-//             SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] %s", err.message);
-//             if (NULL != err.name) {
-//                     if (!strcmp(err.name, DBUS_ERROR_SERVICE_UNKNOWN)) {
-//                             SLOG(LOG_ERROR, TAG_VCD, "[ERROR] Unknown service. Client is not available");
-//                             dbus_error_free(&err);
-//                             return 0;
-//                     }
-//             }
-//             dbus_error_free(&err);
-//     }
-
-//     if (NULL != result_msg) {
-//             dbus_message_get_args(result_msg, &err, DBUS_TYPE_INT32, &result, DBUS_TYPE_INVALID);
-
-//             if (dbus_error_is_set(&err)) {
-//                     SLOG(LOG_ERROR, TAG_VCD, "[Dbus] Get arguments error (%s)", err.message);
-//                     dbus_error_free(&err);
-//                     result = VCD_ERROR_OPERATION_FAILED;
-//             }
-
-//             dbus_message_unref(result_msg);
-//     } else {
-//             SLOG(LOG_WARN, TAG_VCD, "[Dbus] Result message is NULL. Client is not available");
-//     }
-
-//     return result;
-// }
-
 /*
-int vcdc_send_result(int pid, int manager_pid, int cmd_type)
-{
-       if (0 != __dbus_check()) {
-               return VCD_ERROR_OPERATION_FAILED;
-       }
-
-       DBusMessage* msg = NULL;
-
-       SLOG(LOG_INFO, TAG_VCD, "[Dbus] Result command type(%d)", cmd_type);
-
-       switch (cmd_type) {
-       case VC_COMMAND_TYPE_FOREGROUND:
-       case VC_COMMAND_TYPE_BACKGROUND:
-               if (pid == manager_pid) {
-                       // msg = __get_message(pid, VCD_MANAGER_METHOD_RESULT, VCD_CLIENT_TYPE_MANAGER);
-                       vcdc_tidl_send_result(pid, manager_pid, VCD_CLIENT_TYPE_MANAGER);
-                       return 0;
-               } else {
-                       msg = __get_message(pid, VCD_METHOD_RESULT, VCD_CLIENT_TYPE_NORMAL);
-               }
-               break;
-       case VC_COMMAND_TYPE_WIDGET:
-               // msg = __get_message(pid, VCD_WIDGET_METHOD_RESULT, VCD_CLIENT_TYPE_WIDGET);
-               // break;
-               vcdc_tidl_send_result(pid, manager_pid, VCD_CLIENT_TYPE_WIDGET);
-               return 0;
-       case VC_COMMAND_TYPE_SYSTEM:
-       case VC_COMMAND_TYPE_SYSTEM_BACKGROUND:
-       case VC_COMMAND_TYPE_EXCLUSIVE:
-
-       default:
-               SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Command type is NOT valid(%d)", cmd_type);
-               return -1;
-       }
-
-       if (NULL == msg) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Message is NULL");
-               return VCD_ERROR_OUT_OF_MEMORY;
-       }
-
-       dbus_message_set_no_reply(msg, TRUE);
-
-       if (1 != dbus_connection_send(g_conn_sender, msg, NULL)) {
-               SLOG(LOG_ERROR, TAG_VCD, "[Dbus ERROR] Fail to Send");
-               return VCD_ERROR_OPERATION_FAILED;
-       } else {
-               SLOG(LOG_INFO, TAG_VCD, "[Dbus] SUCCESS Send");
-               dbus_connection_flush(g_conn_sender);
-       }
-
-       dbus_message_unref(msg);
-
-       return 0;
-}
 int vcdc_send_manager_pid(int manager_pid)
 {
        DBusError err;
@@ -259,7 +141,6 @@ int vcdc_send_manager_pid(int manager_pid)
 
        return 0;
 }
-*/
 
 int vcdc_send_error_signal(int reason, char *err_msg)
 {
@@ -354,7 +235,7 @@ int vcdc_send_error_signal(int reason, char *err_msg)
 
        return 0;
 }
-/*
+
 int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg)
 {
        if (NULL == err_msg) {
index e1abbe3..c4c4ad9 100644 (file)
@@ -30,11 +30,7 @@ int vcd_dbus_close_connection();
 
 int vcd_check_dbus_connection();
 
-// int vcdc_send_hello(int pid, vcd_client_type_e type);
-
-//int vcdc_send_result(int pid, int manager_pid, int cmd_type);
-
-int vcdc_send_error_signal(int reason, char *err_msg);
+// int vcdc_send_error_signal(int reason, char *err_msg);      // No call in anywhere..
 
 //int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg);
 
index 7636495..70bcd18 100644 (file)
@@ -98,12 +98,6 @@ struct vce_cmd_s {
        int index;
 };
 
-// TODO: move vcd_client_type_e to vcd_tidl.h after migrate from dbus to tidl done
-typedef enum {
-       VCD_CLIENT_TYPE_NORMAL,
-       VCD_CLIENT_TYPE_WIDGET,
-       VCD_CLIENT_TYPE_MANAGER
-} vcd_client_type_e;
 
 #ifdef __cplusplus
 }
index 8d6f305..d45260d 100644 (file)
@@ -35,7 +35,9 @@ static rpc_port_stub_vcd_widget_stub_vc_widget_callback_s g_widget_callback;
 
 static pthread_mutex_t g_widget_tidl_info_mutex = PTHREAD_MUTEX_INITIALIZER;
 
-static rpc_port_stub_vcd_stub_vc_callback_s g_vc_callback;
+static rpc_port_stub_vcd_stub_vc_callback_s g_client_callback;
+
+static pthread_mutex_t g_client_tidl_info_mutex = PTHREAD_MUTEX_INITIALIZER;
 
 static int g_volume_count = 0;
 
@@ -47,6 +49,8 @@ int vcd_widget_tidl_open_connection();
 int vcd_widget_tidl_close_connection();
 
 
+
+
 /* for common request */
 static void __request_tidl_connect(vcd_client_type_e type, int pid)
 {
@@ -147,31 +151,30 @@ void __send_msg(bundle* msg, vcd_client_type_e type, int pid)
                        return;
                }
                pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
-       // TODO: uncomment after client done
-       // } else if (VCD_CLIENT_TYPE_NORMAL == type) {
-       //      pthread_mutex_lock(&g_client_tidl_info_mutex);
-
-       //      SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to client");
-       //      client_tidl_info_s* client_tidl_info = vcd_client_client_get_tidl_info(pid);
-       //      if (NULL == client_tidl_info) {
-       //              SLOG(LOG_ERROR, TAG_VCD, "[TIDL] tidl proxy info not allocated");
-       //              pthread_mutex_unlock(&g_client_tidl_info_mutex);
-       //              return;
-       //      }
-
-       //      rpc_port_stub_vc_client_notify_cb_h handle = client_tidl_info->notify_cb;
-       //      if (NULL == handle) {
-       //              SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
-       //              pthread_mutex_unlock(&g_client_tidl_info_mutex);
-       //              return;
-       //      }
-
-       //      if (0 != rpc_port_stub_vc_client_notify_cb_invoke(handle, msg)) {
-       //              SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
-       //              pthread_mutex_unlock(&g_client_tidl_info_mutex);
-       //              return;
-       //      }
-       //      pthread_mutex_unlock(&g_client_tidl_info_mutex);
+    } else if (VCD_CLIENT_TYPE_NORMAL == type) {
+       pthread_mutex_lock(&g_client_tidl_info_mutex);
+
+       SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to client");
+       client_tidl_info_s* client_tidl_info = vcd_client_get_tidl_info(pid);
+       if (NULL == client_tidl_info) {
+               SLOG(LOG_ERROR, TAG_VCD, "[TIDL] tidl proxy info not allocated");
+               pthread_mutex_unlock(&g_client_tidl_info_mutex);
+               return;
+       }
+
+       rpc_port_stub_vcd_stub_vc_notify_cb_h handle = client_tidl_info->notify_cb;
+       if (NULL == handle) {
+               SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
+               pthread_mutex_unlock(&g_client_tidl_info_mutex);
+               return;
+       }
+
+       if (0 != rpc_port_stub_vcd_stub_vc_notify_cb_invoke(handle, pid, msg)) {
+               SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
+               pthread_mutex_unlock(&g_client_tidl_info_mutex);
+               return;
+       }
+       pthread_mutex_unlock(&g_client_tidl_info_mutex);
        } else if (VCD_CLIENT_TYPE_WIDGET == type) {
                pthread_mutex_lock(&g_widget_tidl_info_mutex);
 
@@ -230,51 +233,36 @@ void __send_signal(bundle* msg)
        }
        pthread_mutex_unlock(&g_mgr_tidl_info_mutex);
 
-       GSList *iter = NULL;
-
-       // TODO: uncomment after client done
-       // pthread_mutex_lock(&g_client_tidl_info_mutex);
-       // GSList* client_list = vcd_client_client_get_tidl_info_list();
-
-       // int count = g_slist_length(g_client_ipc_info_list);
-       // int i;
-
-       // client_tidl_info_s *client_tidl_info = NULL;
-
-       // if (0 < count) {
-       //      iter = g_slist_nth(client_list, 0);
-       //      for (i = 0; i < count; i++) {
-       //              if (NULL == iter) {
-       //                      SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] client list iterator broken");
-       //                      break;
-       //              }
-
-       //              client_tidl_info = iter->data;
-
-       //              if (NULL == client_tidl_info) {
-       //                      SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] client list data broken");
-       //                      break;
-       //              }
+       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);
 
-       //              SLOG(LOG_INFO, TAG_VCD, "[TIDL] message to client");
+    client_tidl_info_s* client_tidl_info;
+    int pid = -1;
 
-       //              rpc_port_stub_vc_client_notify_cb_h handle = client_tidl_info->notify_cb;
-       //              if (NULL == handle) {
-       //                      SLOG(LOG_ERROR, TAG_VCD, "[TIDL] notify callback handle is null");
-       //                      break;
-       //              }
+       if (0 == ret && 0 < client_count) {
+        for (int i = 0 ; i < client_count ; i++) {
+            pid = client_list[i];
 
-       //              if (0 != rpc_port_stub_vc_client_notify_cb_invoke(handle, msg)) {
-       //                      SLOG(LOG_ERROR, TAG_VCD, "[Server ERROR] Fail to send msg");
-       //                      break;
-       //              }
+            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;
+            }
 
-       //              iter = g_slist_next(iter);
-       //      }
-       // }
-       // pthread_mutex_unlock(&g_client_tidl_info_mutex);
+            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_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);
@@ -350,13 +338,13 @@ static void __vc_register_notify_cb_cb(rpc_port_stub_vcd_stub_vc_context_h conte
     }
 
     int ret = -1;
-    ret = vcd_client_add_ipc_info(pid);
+    ret = vcd_client_add_tidl_info(pid);
     if (0 != ret) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add ipc info.");
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
         return ;
     }
 
-    ret = vcd_client_set_ipc_notify_cb(pid, callback, user_data);
+    ret = vcd_client_set_tidl_notify_cb(pid, callback, user_data);
     if (0 != ret) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set notify callback.");
     } else {
@@ -374,13 +362,13 @@ static int __vc_register_notify_cb_sync_cb(rpc_port_stub_vcd_stub_vc_context_h c
     }
 
     int ret = -1;
-    ret = vcd_client_add_ipc_info(pid);
+    ret = vcd_client_add_tidl_info(pid);
     if (0 != ret) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add ipc info.");
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
         return ret;
     }
     
-    ret = vcd_client_set_ipc_notify_cb(pid, callback, user_data);
+    ret = vcd_client_set_tidl_notify_cb(pid, callback, user_data);
     if (0 != ret) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set notify callback.");
     } else {
@@ -400,13 +388,13 @@ static void __vc_register_feedback_cb_cb(rpc_port_stub_vcd_stub_vc_context_h con
     }
 
     int ret = -1;
-    ret = vcd_client_add_ipc_info(pid);
+    ret = vcd_client_add_tidl_info(pid);
     if (0 != ret) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add ipc info.");
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
         return ;
     }
 
-    ret = vcd_client_set_ipc_feedback_cb(pid, callback, user_data);
+    ret = vcd_client_set_tidl_feedback_cb(pid, callback, user_data);
     if (0 != ret) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set feedback callback.");
     } else {
@@ -424,13 +412,13 @@ static int __vc_register_feedback_cb_sync_cb(rpc_port_stub_vcd_stub_vc_context_h
     }
 
     int ret = -1;
-    ret = vcd_client_add_ipc_info(pid);
+    ret = vcd_client_add_tidl_info(pid);
     if (0 != ret) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add ipc info.");
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to add tidl info.");
         return ret;
     }
     
-    ret = vcd_client_set_ipc_feedback_cb(pid, callback, user_data);
+    ret = vcd_client_set_tidl_feedback_cb(pid, callback, user_data);
     if (0 != ret) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to set feedback callback.");
     } else {
@@ -710,31 +698,31 @@ int vcd_client_tidl_open_connection()
 {
     SLOG(LOG_INFO, TAG_VCD, "[TIDL] vcd_client_tidl_open_connection");
 
-    g_vc_callback.create = __vc_create_cb;
-    g_vc_callback.terminate = __vc_terminate_cb;
-    g_vc_callback.register_notify_cb = __vc_register_notify_cb_cb;
-    g_vc_callback.register_notify_cb_sync = __vc_register_notify_cb_sync_cb;
-    g_vc_callback.register_feedback_cb = __vc_register_feedback_cb_cb;
-    g_vc_callback.register_feedback_cb_sync = __vc_register_feedback_cb_sync_cb;
-    g_vc_callback.initialize = __vc_initialize_cb;
-    g_vc_callback.finalize = __vc_finalize_cb;
-    g_vc_callback.set_command = __vc_set_command_cb;
-    g_vc_callback.unset_command = __vc_unset_command_cb;
-    g_vc_callback.set_foreground = __vc_set_foreground_cb;
-    g_vc_callback.set_server_dialog = __vc_set_server_dialog_cb;
-    g_vc_callback.request_dialog = __vc_request_dialog_cb;
-    g_vc_callback.is_system_command_valid = __vc_is_system_command_valid_cb;
-    g_vc_callback.auth_enable = __vc_auth_enable_cb;
-    g_vc_callback.auth_disable = __vc_auth_disable_cb;
-    g_vc_callback.auth_start = __vc_auth_start_cb;
-    g_vc_callback.auth_stop = __vc_auth_stop_cb;
-    g_vc_callback.auth_cancel = __vc_auth_cancel_cb;
-    g_vc_callback.request_tts = __vc_request_tts_cb;
-    g_vc_callback.cancel_tts = __vc_cancel_tts_cb;
-    g_vc_callback.get_tts_audio_format = __vc_get_tts_audio_format_cb;
+    g_client_callback.create = __vc_create_cb;
+    g_client_callback.terminate = __vc_terminate_cb;
+    g_client_callback.register_notify_cb = __vc_register_notify_cb_cb;
+    g_client_callback.register_notify_cb_sync = __vc_register_notify_cb_sync_cb;
+    g_client_callback.register_feedback_cb = __vc_register_feedback_cb_cb;
+    g_client_callback.register_feedback_cb_sync = __vc_register_feedback_cb_sync_cb;
+    g_client_callback.initialize = __vc_initialize_cb;
+    g_client_callback.finalize = __vc_finalize_cb;
+    g_client_callback.set_command = __vc_set_command_cb;
+    g_client_callback.unset_command = __vc_unset_command_cb;
+    g_client_callback.set_foreground = __vc_set_foreground_cb;
+    g_client_callback.set_server_dialog = __vc_set_server_dialog_cb;
+    g_client_callback.request_dialog = __vc_request_dialog_cb;
+    g_client_callback.is_system_command_valid = __vc_is_system_command_valid_cb;
+    g_client_callback.auth_enable = __vc_auth_enable_cb;
+    g_client_callback.auth_disable = __vc_auth_disable_cb;
+    g_client_callback.auth_start = __vc_auth_start_cb;
+    g_client_callback.auth_stop = __vc_auth_stop_cb;
+    g_client_callback.auth_cancel = __vc_auth_cancel_cb;
+    g_client_callback.request_tts = __vc_request_tts_cb;
+    g_client_callback.cancel_tts = __vc_cancel_tts_cb;
+    g_client_callback.get_tts_audio_format = __vc_get_tts_audio_format_cb;
 
     int ret = -1;
-    ret = rpc_port_stub_vcd_stub_vc_register(&g_vc_callback, NULL);
+    ret = rpc_port_stub_vcd_stub_vc_register(&g_client_callback, NULL);
     if (VCD_ERROR_NONE != ret) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to register TIDL callbacks. ret(%d)", ret);
         return VCD_ERROR_OPERATION_FAILED;
@@ -751,54 +739,6 @@ int vcd_client_tidl_close_connection()
     return VCD_ERROR_NONE;
 }
 
-int vcdc_send_result(int pid, int manager_pid, int cmd_type)
-{
-    client_ipc_info_s* info = vcd_client_get_ipc_info(pid);
-    if (NULL == info) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get ipc info. pid(%d)", pid);
-        return VCD_ERROR_INVALID_PARAMETER;
-    }
-
-    bundle* bundle_data = bundle_create();
-    if (NULL == bundle_data) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to create bundle data");
-        return VCD_ERROR_OUT_OF_MEMORY;
-    }
-
-       SLOG(LOG_INFO, TAG_VCD, "[TIDL] Result command type(%d)", cmd_type);
-
-    char pid_char[10] = {0};
-    snprintf(pid_char, 10, "%d", pid);
-    bundle_add_str(bundle_data, VC_BUNDLE_PID, pid_char);
-
-       switch (cmd_type) {
-       case VC_COMMAND_TYPE_FOREGROUND:
-       case VC_COMMAND_TYPE_BACKGROUND:
-               if (pid == manager_pid) {
-            bundle_add_str(bundle_data, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_RESULT);
-               } else {
-            bundle_add_str(bundle_data, VC_BUNDLE_METHOD, VCD_METHOD_RESULT);
-               }
-               break;
-       case VC_COMMAND_TYPE_WIDGET:
-        bundle_add_str(bundle_data, VC_BUNDLE_METHOD, VCD_WIDGET_METHOD_RESULT);
-               break;
-       case VC_COMMAND_TYPE_SYSTEM:
-       case VC_COMMAND_TYPE_SYSTEM_BACKGROUND:
-       case VC_COMMAND_TYPE_EXCLUSIVE:
-        bundle_add_str(bundle_data, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_RESULT);
-               break;
-
-       default:
-               SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Command type is NOT valid(%d)", cmd_type);
-               return -1;
-       }
-
-    rpc_port_stub_vcd_stub_vc_notify_cb_invoke(info->notify_cb, pid, bundle_data);
-
-    return VCD_ERROR_NONE;
-}
-
 int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg)
 {
     if (NULL == err_msg) {
@@ -806,14 +746,14 @@ int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg)
                return VCD_ERROR_INVALID_PARAMETER;
     }
 
-    client_ipc_info_s* info = vcd_client_get_ipc_info(pid);
+    client_tidl_info_s* info = vcd_client_get_tidl_info(pid);
     if (NULL == info) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get ipc info. pid(%d)", pid);
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get tidl info. pid(%d)", pid);
         return VCD_ERROR_INVALID_PARAMETER;
     }
 
-    bundle* bundle_data = bundle_create();
-    if (NULL == bundle_data) {
+    bundle* msg = bundle_create();
+    if (NULL == msg) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to create bundle data");
         return VCD_ERROR_OUT_OF_MEMORY;
     }
@@ -825,12 +765,12 @@ int vcdc_send_error_signal_to_app(int pid, int reason, char *err_msg)
     snprintf(pid_char, 10, "%d", pid);
     snprintf(reason_char, 10, "%d", reason);
 
-    bundle_add_str(bundle_data, VC_BUNDLE_METHOD, VCD_METHOD_ERROR_TO_APP);
-    bundle_add_str(bundle_data, VC_BUNDLE_PID, pid_char);
-    bundle_add_str(bundle_data, VC_BUNDLE_REASON, reason_char);
-    bundle_add_str(bundle_data, VC_BUNDLE_ERR_MSG, err_msg);
+    bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_ERROR_TO_APP);
+    bundle_add_str(msg, VC_BUNDLE_PID, pid_char);
+    bundle_add_str(msg, VC_BUNDLE_REASON, reason_char);
+    bundle_add_str(msg, VC_BUNDLE_ERR_MSG, err_msg);
 
-    rpc_port_stub_vcd_stub_vc_notify_cb_invoke(info->notify_cb, pid, bundle_data);
+    rpc_port_stub_vcd_stub_vc_notify_cb_invoke(info->notify_cb, pid, msg);
 
     return VCD_ERROR_NONE;
 }
@@ -843,28 +783,28 @@ int vcdc_send_manager_pid(int manager_pid)
     int* client_list = NULL;
        int client_count = 0;
     int ret = -1;
-    ret = vcd_client_get_ipc_list(&client_list, &client_count);
+    ret = vcd_client_get_tidl_list(&client_list, &client_count);
     if (0 != ret || 0 == client_count) {
         SLOG(LOG_WARN, TAG_VCD, "[WARNING] There is no client");
         return VCD_ERROR_NONE;
     }
 
-    client_ipc_info_s* info;
+    client_tidl_info_s* info;
     int pid = -1;
-    bundle* bundle_data;
+    bundle* msg;
     char pid_char[10] = {0};
     char mgrpid_char[10] = {0};
     for (int i = 0 ; i < client_count ; i++) {
         pid = client_list[i];
 
-        info = vcd_client_get_ipc_info(pid);
+        info = vcd_client_get_tidl_info(pid);
         if (NULL == info) {
-            SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get ipc info. pid(%d)", pid);
+            SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get tidl info. pid(%d)", pid);
             continue;
         }
 
-        bundle_data = bundle_create();
-        if (NULL == bundle_data) {
+        msg = bundle_create();
+        if (NULL == msg) {
             SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to create bundle data");
             continue;
         }
@@ -874,13 +814,13 @@ int vcdc_send_manager_pid(int manager_pid)
         snprintf(pid_char, 10, "%d", pid);
         snprintf(mgrpid_char, 10, "%d", manager_pid);
 
-        bundle_add_str(bundle_data, VC_BUNDLE_METHOD, VCD_METHOD_SEND_MANAGER_PID);
-        bundle_add_str(bundle_data, VC_BUNDLE_PID, pid_char);
-        bundle_add_str(bundle_data, VC_BUNDLE_MANAGER_PID, mgrpid_char);
+        bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_SEND_MANAGER_PID);
+        bundle_add_str(msg, VC_BUNDLE_PID, pid_char);
+        bundle_add_str(msg, VC_BUNDLE_MANAGER_PID, mgrpid_char);
 
-        rpc_port_stub_vcd_stub_vc_notify_cb_invoke(info->notify_cb, pid, bundle_data);
+        rpc_port_stub_vcd_stub_vc_notify_cb_invoke(info->notify_cb, pid, msg);
 
-        bundle_free(bundle_data);
+        bundle_free(msg);
     }
 
     return VCD_ERROR_NONE;
@@ -893,14 +833,14 @@ int vcdc_send_feedback_streaming(int pid, int utt_id, vc_feedback_event_e event,
         return VCD_ERROR_INVALID_PARAMETER;
     }
 
-    client_ipc_info_s* info = vcd_client_get_ipc_info(pid);
+    client_tidl_info_s* info = vcd_client_get_tidl_info(pid);
     if (NULL == info) {
-        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get ipc info. pid(%d)", pid);
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to get tidl info. pid(%d)", pid);
         return VCD_ERROR_INVALID_PARAMETER;
     }
 
-    bundle* bundle_data = bundle_create();
-    if (NULL == bundle_data) {
+    bundle* msg = bundle_create();
+    if (NULL == msg) {
         SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to create bundle data");
         return VCD_ERROR_OUT_OF_MEMORY;
     }
@@ -916,8 +856,7 @@ int vcdc_send_feedback_streaming(int pid, int utt_id, vc_feedback_event_e event,
     return VCD_ERROR_NONE;
 }
 
-// TODO: remove _tidl after all dbus removed
-int vcdc_tidl_send_hello(int pid, vcd_client_type_e type)
+int vcdc_send_hello(int pid, vcd_client_type_e type)
 {
        SLOG(LOG_DEBUG, TAG_VCD, "[TIDL] Send hello");
 
@@ -927,8 +866,8 @@ int vcdc_tidl_send_hello(int pid, vcd_client_type_e type)
        snprintf(tmp_pid, 10, "%d", pid);
 
        if (VCD_CLIENT_TYPE_NORMAL == type) {
-               // bundle_add_str(msg, VC_CLIENT_BUNDLE_METHOD, VCD_CLIENT_METHOD_HELLO);
-               // bundle_add_str(msg, VC_CLIENT_BUNDLE_MESSAGE, tmp_pid);
+               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);
@@ -943,6 +882,7 @@ int vcdc_tidl_send_hello(int pid, vcd_client_type_e type)
 
        SLOG(LOG_DEBUG, TAG_VCD, "[TIDL] VCD SEND MESSAGE");
 
+    // TODO: VCD_CLIENT_TYPE_MANAGER?? type??
        __send_msg(msg, VCD_CLIENT_TYPE_MANAGER, pid);
        bundle_free(msg);
 
@@ -1043,22 +983,46 @@ int vcdc_send_show_tooltip(int pid, bool show)
        return VCD_ERROR_NONE;
 }
 
-// TODO: remove tidl after all dbus migrate to tidl
-int vcdc_tidl_send_result(int pid, int manager_pid, vcd_client_type_e type)
+int vcdc_send_result(int pid, int manager_pid, int cmd_type)
 {
        SLOG(LOG_DEBUG, TAG_VCD, "[TIDL] Send result");
 
+    vcd_client_type_e type;
        bundle* msg = bundle_create();
+    if (NULL == msg) {
+        SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Fail to create bundle data");
+        return VCD_ERROR_OUT_OF_MEMORY;
+    }
 
-       if (VCD_CLIENT_TYPE_MANAGER == type) {
-               bundle_add_str(msg, VC_MANAGER_BUNDLE_METHOD, VCD_MANAGER_METHOD_RESULT);
-       // TODO: uncomment after client done
-       // } else if (VCD_CLIENT_TYPE_NORMAL == type) {
-       //      // bundle_add_str(msg, VC_CLIENT_BUNDLE_METHOD, VCD_METHOD_RESULT);
-       } else if (VCD_CLIENT_TYPE_WIDGET == type) {
-               bundle_add_str(msg, VC_WIDGET_BUNDLE_METHOD, VCD_WIDGET_METHOD_RESULT);
-       } else {
-               SLOG(LOG_ERROR, TAG_VCD, "[ERROR] client type is NOT valid(%d)", type);
+       SLOG(LOG_INFO, TAG_VCD, "[TIDL] Result command type(%d)", cmd_type);
+
+       switch (cmd_type) {
+       case VC_COMMAND_TYPE_FOREGROUND:
+       case VC_COMMAND_TYPE_BACKGROUND:
+               if (pid == manager_pid) {
+            type = VCD_CLIENT_TYPE_MANAGER;
+            bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_RESULT);
+               } else {
+            type = VCD_CLIENT_TYPE_NORMAL;
+            char pid_char[10] = {0};
+            snprintf(pid_char, 10, "%d", pid);
+            bundle_add_str(msg, VC_BUNDLE_PID, pid_char);
+            bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_RESULT);
+               }
+               break;
+       case VC_COMMAND_TYPE_WIDGET:
+        type = VCD_CLIENT_TYPE_WIDGET;
+        bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_WIDGET_METHOD_RESULT);
+               break;
+       case VC_COMMAND_TYPE_SYSTEM:
+       case VC_COMMAND_TYPE_SYSTEM_BACKGROUND:
+       case VC_COMMAND_TYPE_EXCLUSIVE:
+        type = VCD_CLIENT_TYPE_MANAGER;
+        bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_MANAGER_METHOD_RESULT);
+               break;
+
+       default:
+               SLOG(LOG_ERROR, TAG_VCD, "[TIDL ERROR] Command type is NOT valid(%d)", cmd_type);
                bundle_free(msg);
                return VCD_ERROR_INVALID_PARAMETER;
        }
@@ -1165,9 +1129,8 @@ int vcdc_send_service_state(vcd_state_e 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);
 
-       // TODO: uncomment after client done
-       // bundle_add_str(msg, VC_CLIENT_BUNDLE_METHOD, VCD_METHOD_SET_SERVICE_STATE);
-       // bundle_add_str(msg, VC_CLIENT_BUNDLE_MESSAGE, tmp_state);
+       bundle_add_str(msg, VC_BUNDLE_METHOD, VCD_METHOD_SET_SERVICE_STATE);
+       bundle_add_str(msg, VC_BUNDLE_SERVICE_STATE, tmp_state);
 
        bundle_add_str(msg, VC_WIDGET_BUNDLE_METHOD, VCD_WIDGET_METHOD_SET_SERVICE_STATE);
        bundle_add_str(msg, VC_WIDGET_BUNDLE_MESSAGE, tmp_state);
@@ -1254,8 +1217,10 @@ int vcdc_tidl_send_error_to_manager(int manager_pid, int reason, char *err_msg)
        return VCD_ERROR_NONE;
 }
 
+/*
 // TODO: remove _tidl after remove dbus
 // TODO: make client, widget error signal
+// But... it seems there is no call of this function.. Need to check.
 int vcdc_tidl_send_error(int reason, char *err_msg)
 {
        SLOG(LOG_ERROR, TAG_VCD, "[TIDL] Send error signal");
@@ -1296,7 +1261,7 @@ int vcdc_tidl_send_error(int reason, char *err_msg)
 
        return VCD_ERROR_NONE;
 }
-
+*/
 int vcdc_send_request_set_private_data(int pid, const char* key, const char* data)
 {
        SLOG(LOG_DEBUG, TAG_VCD, "[TIDL] Set private data");
@@ -2129,7 +2094,7 @@ static void  __vc_mgr_send_utterance_status_cb(rpc_port_stub_vcd_mgr_stub_vc_mgr
 {
        SLOG(LOG_DEBUG, TAG_VCD, "@@@ VCD Manager send utterance status");
        SLOG(LOG_INFO, TAG_VCD, "[IN] vcd mgr send utterance status : utt_id(%d), utt_status(%d)", utt_id, utt_status);
-       // TODO: send parameter to client
+       // TODO: send parameter to client?? It seems to send method (no reply) to mgr. Need to check.
 
        SLOG(LOG_DEBUG, TAG_VCD, "@@@");
 }
index 715e3f3..7881923 100644 (file)
 extern "C" {
 #endif
 
-// typedef enum {
-//     VCD_CLIENT_TYPE_NORMAL,
-//     VCD_CLIENT_TYPE_WIDGET,
-//     VCD_CLIENT_TYPE_MANAGER
-// } vcd_client_type_e;
+typedef enum {
+       VCD_CLIENT_TYPE_NORMAL,
+       VCD_CLIENT_TYPE_WIDGET,
+       VCD_CLIENT_TYPE_MANAGER
+} vcd_client_type_e;
 
 
 int vcd_tidl_open_connection();
 
 int vcd_tidl_close_connection();
 
-int vcdc_tidl_send_hello(int pid, vcd_client_type_e type);
+int vcdc_send_hello(int pid, vcd_client_type_e type);
 
 int vcdc_send_set_volume(int manger_pid, float volume);
 
 int vcdc_send_show_tooltip(int pid, bool show);
 
-int vcdc_tidl_send_result(int pid, int manager_pid, vcd_client_type_e type);
+int vcdc_send_result(int pid, int manager_pid, int cmd_type);
 
 int vcdc_send_pre_result_to_manager(int manager_pid, int event, const char* pre_result);
 
@@ -51,7 +51,7 @@ int vcdc_send_result_to_manager(int manger_pid, int result_type);
 
 int vcdc_send_speech_detected(int manger_pid);
 
-int vcdc_tidl_send_error(int reason, char *err_msg);
+// int vcdc_tidl_send_error(int reason, char *err_msg);
 
 int vcdc_tidl_send_error_to_manager(int manager_pid, int reason, char *err_msg);