Make ipc method name more specific 23/264723/1
authorSuyeon Hwang <stom.hwang@samsung.com>
Wed, 29 Sep 2021 02:26:42 +0000 (11:26 +0900)
committerSuyeon Hwang <stom.hwang@samsung.com>
Wed, 29 Sep 2021 02:26:42 +0000 (11:26 +0900)
Change-Id: Iff46d2653dbadfe8ed5de389166020912aaed2e3
Signed-off-by: Suyeon Hwang <stom.hwang@samsung.com>
server/ttsd_ipc.c
server/ttsd_ipc.h

index fdefe60c0b3545fd06dfae07228924e510132da2..cf7741414c78c5de4017754905b850b6e27d1ed0 100644 (file)
 #include "ttsd_data.h"
 
 
-int(*ttsd_dbus_vtable[])() = {&ttsd_dbus_open_connection, &ttsd_dbus_close_connection,
-                                               &ttsdc_dbus_send_utt_start_message, &ttsdc_dbus_send_error_message};
-int(*ttsd_tidl_vtable[])() = {&ttsd_tidl_open_connection, &ttsd_tidl_close_connection,
-                                               &ttsdc_tidl_send_message, &ttsdc_tidl_send_error_message};
+int(*ttsd_dbus_vtable[])() = {&ttsd_dbus_open_connection, &ttsd_dbus_close_connection, &ttsdc_dbus_send_utt_start_message,
+                                       &ttsdc_dbus_send_utt_finish_message, &ttsdc_dbus_send_set_state_message, &ttsdc_dbus_send_error_message};
+int(*ttsd_tidl_vtable[])() = {&ttsd_tidl_open_connection, &ttsd_tidl_close_connection, &ttsdc_tidl_send_message,
+                                       &ttsdc_tidl_send_message, &ttsdc_tidl_send_message, &ttsdc_tidl_send_error_message};
 
 int ttsd_ipc_open_connection()
 {
@@ -69,11 +69,11 @@ int ttsdc_ipc_send_utt_start_message(int pid, int uid, int uttid)
        {
        case TTS_IPC_METHOD_DBUS:
                SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : dbus");
-               return ttsd_dbus_vtable[SEND_MESSAGE](pid, uid, uttid, TTSD_METHOD_UTTERANCE_STARTED);
+               return ttsd_dbus_vtable[SEND_UTTERANCE_START](pid, uid, uttid);
 
        case TTS_IPC_METHOD_TIDL:
                SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : tidl");
-               return ttsd_tidl_vtable[SEND_MESSAGE](pid, uid, uttid, TTSD_METHOD_UTTERANCE_STARTED);
+               return ttsd_tidl_vtable[SEND_UTTERANCE_START](pid, uid, uttid, TTSD_METHOD_UTTERANCE_STARTED);
 
        default:
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] method is not valid");
@@ -95,11 +95,11 @@ int ttsdc_ipc_send_utt_finish_message(int pid, int uid, int uttid)
        {
        case TTS_IPC_METHOD_DBUS:
                SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : dbus");
-               return ttsd_dbus_vtable[SEND_MESSAGE](pid, uid, uttid, TTSD_METHOD_UTTERANCE_COMPLETED);
+               return ttsd_dbus_vtable[SEND_UTTERANCE_FINISH](pid, uid, uttid);
 
        case TTS_IPC_METHOD_TIDL:
                SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : tidl");
-               return ttsd_tidl_vtable[SEND_MESSAGE](pid, uid, uttid, TTSD_METHOD_UTTERANCE_COMPLETED);
+               return ttsd_tidl_vtable[SEND_UTTERANCE_FINISH](pid, uid, uttid, TTSD_METHOD_UTTERANCE_COMPLETED);
 
        default:
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] method is not valid");
@@ -121,11 +121,11 @@ int ttsdc_ipc_send_set_state_message(int pid, int uid, int state)
        {
        case TTS_IPC_METHOD_DBUS:
                SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : dbus");
-               return ttsd_dbus_vtable[SEND_MESSAGE](pid, uid, state, TTSD_METHOD_SET_STATE);
+               return ttsd_dbus_vtable[SEND_SET_STATE](pid, uid, state);
 
        case TTS_IPC_METHOD_TIDL:
                SLOG(LOG_DEBUG, tts_tag(), "[IPC] ipc method : tidl");
-               return ttsd_tidl_vtable[SEND_MESSAGE] (pid, uid, state, TTSD_METHOD_SET_STATE);
+               return ttsd_tidl_vtable[SEND_SET_STATE] (pid, uid, state, TTSD_METHOD_SET_STATE);
 
        default:
                SLOG(LOG_ERROR, tts_tag(), "[ERROR] method is not valid");
index af4afc11393e5f98ceb7f345a89d783b5250c3a6..878cfd6a45d8c141358de556f3a75d2eca2824b9 100644 (file)
@@ -24,7 +24,9 @@ extern "C" {
 typedef enum {
        OPEN_CONNECTION,
        CLOSE_CONNECTION,
-       SEND_MESSAGE,
+       SEND_UTTERANCE_START,
+       SEND_UTTERANCE_FINISH,
+       SEND_SET_STATE,
        SEND_ERROR
 } ttsd_ipc_vtable_e;