Merge "Reduce log while waiting for comming synthesized pcm data" into tizen
authorWonnam Jang <wn.jang@samsung.com>
Tue, 2 Aug 2022 08:47:08 +0000 (08:47 +0000)
committerGerrit Code Review <gerrit@review>
Tue, 2 Aug 2022 08:47:08 +0000 (08:47 +0000)
17 files changed:
client/tts_core.c
client/tts_dbus.c
client/tts_dbus.h
client/tts_ipc.c
client/tts_ipc.h
client/tts_tidl.c
client/tts_tidl.h
common/tts_defs.h
server/ttsd_data.cpp
server/ttsd_data.h
server/ttsd_dbus.c
server/ttsd_dbus_server.c
server/ttsd_dbus_server.h
server/ttsd_server.c
server/ttsd_server.h
server/ttsd_tidl.c
tidl/tts.tidl

index 89c3a66..a8db105 100644 (file)
@@ -986,8 +986,6 @@ int tts_core_receive_hello(unsigned int uid, int ret, int credential_needed)
                return TTS_ERROR_OPERATION_FAILED;
        }
 
-       tts_ipc_request_set_mode(uid, tts_client_get_mode(client));
-
        tts_core_notify_state_changed(client, TTS_STATE_READY);
 
        SLOG(LOG_DEBUG, TAG_TTSC, "@@@");
@@ -1052,7 +1050,6 @@ int tts_core_prepare_sync(tts_client_s* client)
                return TTS_ERROR_OPERATION_FAILED;
        }
 
-       tts_ipc_request_set_mode(uid, tts_client_get_mode(client));
        tts_core_notify_state_changed(client, TTS_STATE_READY);
 
        SLOG(LOG_DEBUG, TAG_TTSC, "@@@");
index 6836420..768035d 100644 (file)
@@ -655,30 +655,6 @@ int tts_dbus_request_finalize(unsigned int uid)
        return result;
 }
 
-int tts_dbus_request_set_mode(unsigned int uid, tts_mode_e mode)
-{
-       DBusMessage* msg = __tts_dbus_make_message(uid, TTS_METHOD_SET_MODE);
-       if (NULL == msg) {
-               SLOG(LOG_ERROR, TAG_TTSC, ">>>> Request tts set mode : Fail to make message");
-               return TTS_ERROR_OPERATION_FAILED;
-       } else {
-               SLOG(LOG_DEBUG, TAG_TTSC, ">>>> Request tts set mode : uid(%u), mode(%d)", uid, mode);
-       }
-
-       if (true != dbus_message_append_args(msg,
-               DBUS_TYPE_UINT32, &uid,
-               DBUS_TYPE_INT32, &mode,
-               DBUS_TYPE_INVALID)) {
-               dbus_message_unref(msg);
-               SLOG(LOG_ERROR, TAG_TTSC, "[ERROR] Fail to append args");
-
-               return TTS_ERROR_OPERATION_FAILED;
-       }
-
-       int result = __send_message_and_get_result(msg, TTS_METHOD_SET_MODE);
-       return result;
-}
-
 int tts_dbus_request_add_text(unsigned int uid, const char* text, const char* lang, int vctype, int speed, int uttid, const char* credential)
 {
        if (NULL == text || NULL == lang) {
index bfdf349..d52ad49 100644 (file)
@@ -35,8 +35,6 @@ int tts_dbus_request_initialize(unsigned int uid, tts_mode_e mode, bool* credent
 
 int tts_dbus_request_finalize(unsigned int uid);
 
-int tts_dbus_request_set_mode(unsigned int uid, tts_mode_e mode);
-
 int tts_dbus_request_add_text(unsigned int uid, const char* text, const char* lang, int vctype, int speed, int uttid, const char* credential);
 
 int tts_dbus_request_play(unsigned int uid, const char* credential);
index 96f4bbb..ef8bad1 100644 (file)
@@ -32,8 +32,7 @@ typedef enum {
        REQUEST_GET_PRIVATE_DATA,
        REQUEST_PLAY_PCM,
        REQUEST_STOP_PCM,
-       REQUEST_ADD_PCM,
-       REQUEST_SET_MODE
+       REQUEST_ADD_PCM
 } tts_ipc_vtable_e;
 
 
@@ -41,13 +40,13 @@ static int(*ttsc_dbus_vtable[])() = { &tts_dbus_open_connection, &tts_dbus_close
                                                &tts_dbus_request_hello, &tts_dbus_request_hello_sync, &tts_dbus_request_initialize,
                                                &tts_dbus_request_finalize, &tts_dbus_request_add_text, &tts_dbus_request_play, &tts_dbus_request_stop,
                                                &tts_dbus_request_pause, &tts_dbus_request_set_private_data, &tts_dbus_request_get_private_data,
-                                               &tts_dbus_request_play_pcm, &tts_dbus_request_stop_pcm, &tts_dbus_request_add_pcm, &tts_dbus_request_set_mode };
+                                               &tts_dbus_request_play_pcm, &tts_dbus_request_stop_pcm, &tts_dbus_request_add_pcm };
 
 static int(*ttsc_tidl_vtable[])() = { &tts_tidl_open_connection, &tts_tidl_close_connection, &tts_tidl_stop_listening,
                                                &tts_tidl_request_hello, &tts_tidl_request_hello_sync, &tts_tidl_request_initialize,
                                                &tts_tidl_request_finalize, &tts_tidl_request_add_text, &tts_tidl_request_play, &tts_tidl_request_stop,
                                                &tts_tidl_request_pause, &tts_tidl_request_set_private_data, &tts_tidl_request_get_private_data,
-                                               &tts_tidl_request_play_pcm, &tts_tidl_request_stop_pcm, &tts_tidl_request_add_pcm, &tts_tidl_request_set_mode };
+                                               &tts_tidl_request_play_pcm, &tts_tidl_request_stop_pcm, &tts_tidl_request_add_pcm };
 
 static int (**g_vtable)();
 static tts_ipc_method_e g_ipc_method = TTS_IPC_METHOD_UNDEFINED;
@@ -236,13 +235,3 @@ int tts_ipc_request_add_pcm(unsigned int uid, int event, const char* data, int d
 
        return g_vtable[REQUEST_ADD_PCM](uid, event, data, data_size, audio_type, rate);
 }
-
-int tts_ipc_request_set_mode(unsigned int uid, tts_mode_e mode)
-{
-       SLOG(LOG_INFO, TAG_TTSC, "[IPC] tts_ipc_request_set_mode");
-
-       RETVM_IF(false == tts_client_is_valid_uid(uid), TTS_ERROR_INVALID_PARAMETER, "Fail to get tts_client with uid(%u)", uid);
-       RETVM_IF(NULL == g_vtable, TTS_ERROR_OPERATION_FAILED, "[ERROR] IPC method is not set");
-
-       return g_vtable[REQUEST_SET_MODE](uid, mode);
-}
index cf332cd..12615f0 100644 (file)
@@ -56,8 +56,6 @@ int tts_ipc_request_stop_pcm(unsigned int uid);
 
 int tts_ipc_request_add_pcm(unsigned int uid, int event, const char* data, int data_size, int audio_type, int rate);
 
-int tts_ipc_request_set_mode(unsigned int uid, tts_mode_e mode);
-
 #ifdef __cplusplus
 }
 #endif
index f2ffbf6..8b6edca 100644 (file)
@@ -785,29 +785,3 @@ int tts_tidl_request_add_pcm(unsigned int uid, int event, const char* data, int
 
        return TTS_ERROR_NONE;
 }
-
-int tts_tidl_request_set_mode(unsigned int uid, tts_mode_e mode)
-{
-       SLOG(LOG_DEBUG, TAG_TTSC, "[TIDL] tts_tidl_request_set_mode");
-
-       tts_client_s* client = tts_client_get_by_uid(uid);
-       RETVM_IF(NULL == client, TTS_ERROR_INVALID_PARAMETER, "[ERROR] Fail to get client");
-
-       tts_tidl_info_s* info = __get_tidl_info_s(uid);
-       RETVM_IF(NULL == info, TTS_ERROR_INVALID_PARAMETER, "[ERROR] Fail to get tidl info");
-
-       RETVM_IF(!info->connected, TTS_ERROR_OPERATION_FAILED, "[ERROR] Not Connected");
-
-       int ret = rpc_port_proxy_tts_invoke_set_mode(info->rpc_h, uid, mode);
-       int exception = get_last_result();
-       if (RPC_PORT_ERROR_NONE != exception) {
-               ret = __convert_unhandled_error(exception);
-       }
-
-       if (TTS_ERROR_NONE != ret) {
-               SLOG(LOG_ERROR, TAG_TTSC, ">>>> Request set private data : Fail to invoke message(%d)", ret);
-               return ret;
-       }
-
-       return TTS_ERROR_NONE;
-}
index 34e026f..f4f705e 100644 (file)
@@ -52,8 +52,6 @@ int tts_tidl_request_stop_pcm(unsigned int uid);
 
 int tts_tidl_request_add_pcm(unsigned int uid, int event, const char* data, int data_size, int audio_type, int rate);
 
-int tts_tidl_request_set_mode(unsigned int uid, tts_mode_e mode);
-
 #ifdef __cplusplus
 }
 #endif
index 91f0948..ee1a585 100644 (file)
@@ -65,7 +65,6 @@ extern "C" {
 #define TTS_METHOD_HELLO_SYNC       "tts_method_hello_sync"
 #define TTS_METHOD_INITIALIZE          "tts_method_initialize"
 #define TTS_METHOD_FINALIZE            "tts_method_finalilze"
-#define TTS_METHOD_SET_MODE     "tts_method_set_mode"
 #define TTS_METHOD_GET_SUPPORT_VOICES  "tts_method_get_support_voices"
 #define TTS_METHOD_GET_CURRENT_VOICE   "tts_method_get_current_voice"
 #define TTS_METHOD_ADD_TEXT            "tts_method_add_text"
index 110cd11..7d08828 100644 (file)
@@ -153,7 +153,7 @@ static app_data_s* __get_client_app_data(unsigned int uid)
        return nullptr;
 }
 
-int ttsd_data_new_client(int pid, unsigned int uid)
+int ttsd_data_new_client(int pid, unsigned int uid, ttsd_mode_e mode, tts_ipc_method_e method)
 {
        lock_guard<mutex> lock(g_app_data_mutex);
        if(nullptr != __get_client_app_data(uid) ) {
@@ -167,9 +167,9 @@ int ttsd_data_new_client(int pid, unsigned int uid)
        app.utt_id_stopped = 0;
        app.state = APP_STATE_READY;
        app.type = TTS_APP_PLAY_TYPE_SYNTH;
-       app.mode = TTSD_MODE_DEFAULT;
+       app.mode = mode;
        app.result_event = TTSE_RESULT_EVENT_FAIL;
-       app.ipc_method = TTS_IPC_METHOD_UNDEFINED;
+       app.ipc_method = method;
        app.credential = nullptr;
        app.paused_data_existing = false;
 
@@ -304,20 +304,6 @@ int ttsd_data_get_pid(unsigned int uid)
        return app_data->pid;
 }
 
-int ttsd_data_set_ipc_method(unsigned int uid, tts_ipc_method_e method)
-{
-       lock_guard<mutex> lock(g_app_data_mutex);
-       app_data_s* app_data = __get_client_app_data(uid);
-       if (nullptr == app_data) {
-               SECURE_SLOG(LOG_ERROR, tts_tag(), "[DATA ERROR] uid is not valid (%u)", uid);
-               return TTSD_ERROR_INVALID_PARAMETER;
-       }
-
-       app_data->ipc_method = method;
-
-       return TTSD_ERROR_NONE;
-}
-
 tts_ipc_method_e ttsd_data_get_ipc_method(unsigned int uid)
 {
        lock_guard<mutex> lock(g_app_data_mutex);
@@ -330,20 +316,6 @@ tts_ipc_method_e ttsd_data_get_ipc_method(unsigned int uid)
        return app_data->ipc_method;
 }
 
-int ttsd_data_set_mode(unsigned int uid, ttsd_mode_e mode)
-{
-       lock_guard<mutex> lock(g_app_data_mutex);
-       app_data_s* app_data = __get_client_app_data(uid);
-       if (nullptr == app_data) {
-               SECURE_SLOG(LOG_ERROR, tts_tag(), "[DATA ERROR] uid is not valid (%u)", uid);
-               return TTSD_ERROR_INVALID_PARAMETER;
-       }
-
-       app_data->mode = mode;
-
-       return TTSD_ERROR_NONE;
-}
-
 ttsd_mode_e ttsd_data_get_mode(unsigned int uid)
 {
        lock_guard<mutex> lock(g_app_data_mutex);
index 740cb6f..b9c5e98 100644 (file)
@@ -70,7 +70,7 @@ ttsd_synthesis_control_e ttsd_data_get_synth_control();
 
 typedef void (* ttsd_used_voice_cb)(const char* lang, int type);
 
-int ttsd_data_new_client(int pid, unsigned int uid);
+int ttsd_data_new_client(int pid, unsigned int uid, ttsd_mode_e mode, tts_ipc_method_e method);
 
 int ttsd_data_delete_client(unsigned int uid);
 
@@ -80,12 +80,8 @@ int ttsd_data_get_client_count();
 
 int ttsd_data_get_pid(unsigned int uid);
 
-int ttsd_data_set_ipc_method(unsigned int uid, tts_ipc_method_e method);
-
 tts_ipc_method_e ttsd_data_get_ipc_method(unsigned int uid);
 
-int ttsd_data_set_mode(unsigned int uid, ttsd_mode_e mode);
-
 ttsd_mode_e ttsd_data_get_mode(unsigned int uid);
 
 int ttsd_data_set_credential(unsigned int uid, const char* credential);
index f639b53..129b5c7 100644 (file)
@@ -225,9 +225,6 @@ static Eina_Bool listener_event_callback(void* data, Ecore_Fd_Handler *fd_handle
                } else if (dbus_message_is_method_call(msg, g_service_interface, TTS_METHOD_FINALIZE)) {
                        ttsd_dbus_server_finalize(g_conn_listener, msg);
 
-               } else if (dbus_message_is_method_call(msg, g_service_interface, TTS_METHOD_SET_MODE)) {
-                       ttsd_dbus_server_set_mode(g_conn_listener, msg);
-
                } else if (dbus_message_is_method_call(msg, g_service_interface, TTS_METHOD_GET_SUPPORT_VOICES)) {
                        ttsd_dbus_server_get_support_voices(g_conn_listener, msg);
 
index 95b6d1b..eb7ec0b 100644 (file)
@@ -46,7 +46,7 @@ int ttsd_dbus_server_hello(DBusConnection* conn, DBusMessage* msg)
 
                ttsd_server_is_already_initialized(pid, uid, &is_initialized);
                if (false == is_initialized) {
-                       ret = ttsd_server_initialize(pid, uid, TTS_IPC_METHOD_DBUS, &is_credential_needed);
+                       ret = ttsd_server_initialize(pid, uid, (ttsd_mode_e)mode, TTS_IPC_METHOD_DBUS, &is_credential_needed);
                        if (0 != ret) {
                                SLOG(LOG_ERROR, tts_tag(), "[IN ERROR] ttsd Hello : server initialize, ret(%d)", ret);
                        }
@@ -113,9 +113,8 @@ int ttsd_dbus_server_initialize(DBusConnection* conn, DBusMessage* msg)
                dbus_error_free(&err);
                ret = TTSD_ERROR_OPERATION_FAILED;
        } else {
-
                SECURE_SLOG(LOG_DEBUG, tts_tag(), "[IN] tts initialize : pid(%d), uid(%u), mode(%d)", pid, uid, mode);
-               ret = ttsd_server_initialize(pid, uid, TTS_IPC_METHOD_DBUS, &credential_needed);
+               ret = ttsd_server_initialize(pid, uid, (ttsd_mode_e)mode, TTS_IPC_METHOD_DBUS, &credential_needed);
        }
 
        DBusMessage* reply;
@@ -194,62 +193,6 @@ int ttsd_dbus_server_finalize(DBusConnection* conn, DBusMessage* msg)
        return 0;
 }
 
-int ttsd_dbus_server_set_mode(DBusConnection* conn, DBusMessage* msg)
-{
-       DBusError err;
-       dbus_error_init(&err);
-
-       unsigned int uid;
-       int tmp_mode;
-       ttsd_mode_e mode;
-       int ret = 0;
-       dbus_message_get_args(msg, &err,
-               DBUS_TYPE_UINT32, &uid,
-               DBUS_TYPE_INT32, &tmp_mode,
-               DBUS_TYPE_INVALID);
-
-       mode = (ttsd_mode_e)tmp_mode;
-       SLOG(LOG_DEBUG, tts_tag(), ">>>>> TTS set mode");
-
-       if (dbus_error_is_set(&err)) {
-               SLOG(LOG_ERROR, tts_tag(), "[IN ERROR] Fail to get arguments (%s)", err.message);
-               dbus_error_free(&err);
-               ret = TTSD_ERROR_OPERATION_FAILED;
-       } else {
-               SLOG(LOG_DEBUG, tts_tag(), "[IN] tts set mode. uid(%u), mode(%d)", uid, mode);
-               ret = ttsd_server_set_mode(uid, mode);
-       }
-
-       DBusMessage* reply;
-       reply = dbus_message_new_method_return(msg);
-
-       if (NULL != reply) {
-               dbus_message_append_args(reply,
-                       DBUS_TYPE_INT32, &ret,
-                       DBUS_TYPE_INVALID);
-
-               if (0 == ret) {
-                       SLOG(LOG_DEBUG, tts_tag(), "[OUT] tts set mode : (%d)", ret);
-               } else {
-                       SLOG(LOG_ERROR, tts_tag(), "[OUT ERROR] tts set mode : (%d)", ret);
-               }
-
-               if (!dbus_connection_send(conn, reply, NULL)) {
-                       SLOG(LOG_ERROR, tts_tag(), "[OUT ERROR] Fail to send reply");
-               }
-
-               dbus_connection_flush(conn);
-               dbus_message_unref(reply);
-       } else {
-               SLOG(LOG_ERROR, tts_tag(), "[OUT ERROR] Fail to create reply message");
-       }
-
-       SLOG(LOG_DEBUG, tts_tag(), "<<<<<");
-       SLOG(LOG_DEBUG, tts_tag(), "");
-
-       return 0;
-}
-
 int ttsd_dbus_server_get_support_voices(DBusConnection* conn, DBusMessage* msg)
 {
        DBusError err;
index dad43c0..01f79e3 100644 (file)
@@ -1,5 +1,5 @@
 /*
-*  Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved 
+*  Copyright (c) 2011-2016 Samsung Electronics Co., Ltd All Rights Reserved
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
@@ -27,14 +27,12 @@ int ttsd_dbus_server_hello_sync(DBusConnection* conn, DBusMessage* msg);
 
 /*
 * Dbus Server functions for APIs
-*/ 
+*/
 
 int ttsd_dbus_server_initialize(DBusConnection* conn, DBusMessage* msg);
 
 int ttsd_dbus_server_finalize(DBusConnection* conn, DBusMessage* msg);
 
-int ttsd_dbus_server_set_mode(DBusConnection* conn, DBusMessage* msg);
-
 int ttsd_dbus_server_get_support_voices(DBusConnection* conn, DBusMessage* msg);
 
 int ttsd_dbus_server_get_current_voice(DBusConnection* conn, DBusMessage* msg);
index 6b01702..d47a778 100644 (file)
@@ -677,7 +677,7 @@ int ttsd_server_is_already_initialized(int pid, unsigned int uid, bool* is_initi
        return TTSD_ERROR_NONE;
 }
 
-int ttsd_server_initialize(int pid, unsigned int uid, tts_ipc_method_e method, bool* credential_needed)
+int ttsd_server_initialize(int pid, unsigned int uid, ttsd_mode_e mode, tts_ipc_method_e method, bool* credential_needed)
 {
        SLOG(LOG_INFO, tts_tag(), "[Server] Server initialize");
 
@@ -712,16 +712,11 @@ int ttsd_server_initialize(int pid, unsigned int uid, tts_ipc_method_e method, b
                }
        }
 
-       if (0 != ttsd_data_new_client(pid, uid)) {
+       if (0 != ttsd_data_new_client(pid, uid, mode, method)) {
                SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to add client info");
                return TTSD_ERROR_OPERATION_FAILED;
        }
 
-       if (0 != ttsd_data_set_ipc_method(uid, method)) {
-               SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to set ipc method");
-               return TTSD_ERROR_OPERATION_FAILED;
-       }
-
        return TTSD_ERROR_NONE;
 }
 
@@ -768,29 +763,6 @@ int ttsd_server_finalize(unsigned int uid)
        return TTSD_ERROR_NONE;
 }
 
-int ttsd_server_set_mode(unsigned int uid, ttsd_mode_e mode)
-{
-       app_tts_state_e state = ttsd_data_get_client_state(uid);
-       if (APP_STATE_NONE == state) {
-               SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] uid(%u) is NOT valid", uid);
-               return TTSD_ERROR_INVALID_PARAMETER;
-       }
-
-       if (APP_STATE_READY != state) {
-               SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Current state(%d) is NOT 'READY'", uid);
-               return TTSD_ERROR_INVALID_STATE;
-       }
-
-       int ret = ttsd_data_set_mode(uid, mode);
-       if (0 != ret) {
-               SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to set mode : ret(%d)", ret);
-       } else {
-               SLOG(LOG_DEBUG, tts_tag(), "[Server] Set mode. uid(%u), mode(%d)", uid, mode);
-       }
-
-       return ret;
-}
-
 static bool __is_connected_to_network()
 {
        /* Check network */
index ca5ae12..271a8eb 100644 (file)
@@ -46,12 +46,10 @@ int ttsd_set_private_data_requested_cb(ttse_private_data_requested_cb callback);
 
 int ttsd_server_is_already_initialized(int pid, unsigned int uid, bool* is_initialized);
 
-int ttsd_server_initialize(int pid, unsigned int uid, tts_ipc_method_e method, bool* credential_needed);
+int ttsd_server_initialize(int pid, unsigned int uid, ttsd_mode_e mode, tts_ipc_method_e method, bool* credential_needed);
 
 int ttsd_server_finalize(unsigned int uid);
 
-int ttsd_server_set_mode(unsigned int uid, ttsd_mode_e mode);
-
 int ttsd_server_get_support_voices(unsigned int uid, GList** voice_list);
 
 int ttsd_server_get_current_voice(unsigned int uid, char** language, int* voice_type);
index adf3abe..a516f7f 100644 (file)
@@ -149,7 +149,7 @@ static void __register_cb(rpc_port_stub_tts_context_h context, int pid, int uid,
        int credential_needed = 0;
        if (false == is_initialized) {
                bool is_credential_needed = false;
-               ret = ttsd_server_initialize(pid, u_uid, TTS_IPC_METHOD_TIDL, &is_credential_needed);
+               ret = ttsd_server_initialize(pid, u_uid, mode, TTS_IPC_METHOD_TIDL, &is_credential_needed);
                if (0 != ret) {
                        SLOG(LOG_ERROR, tts_tag(), "[IN ERROR] ttsd Hello : server initialize, ret(%d)", ret);
                }
@@ -235,21 +235,6 @@ static int __register_cb_sync(rpc_port_stub_tts_context_h context, int pid, int
        return TTSD_ERROR_NONE;
 }
 
-static int __set_mode_cb(rpc_port_stub_tts_context_h context, int uid, int mode, void* user_data)
-{
-       unsigned int u_uid = (unsigned int)uid;
-       SLOG(LOG_INFO, tts_tag(), ">>>>> TTS SET MODE. uid(%u). mode (%d)", u_uid, mode);
-
-       int ret = ttsd_server_set_mode(u_uid, mode);
-       if (TTSD_ERROR_NONE != ret) {
-               SLOG(LOG_ERROR, tts_tag(), "[ERROR] TTS SET MODE (%u) fail (%d/%s) <<<<<", u_uid, ret, get_error_message(ret));
-               return ret;
-       }
-
-       SLOG(LOG_DEBUG, tts_tag(), "<<<<<");
-       return TTSD_ERROR_NONE;
-}
-
 int ttsdc_tidl_send_hello(int pid, unsigned int uid, int ret, int credential_needed)
 {
        SLOG(LOG_INFO, tts_tag(), "[TIDL] ttsdc_tidl_send_hello : pid(%d), uid(%u), credential_needed(%d)", pid, uid, credential_needed);
@@ -281,7 +266,7 @@ static int __initialize_cb(rpc_port_stub_tts_context_h context, int pid, int uid
        unsigned int u_uid = (unsigned int)uid;
        SECURE_SLOG(LOG_ERROR, tts_tag(), "[IN] tts initialize : pid(%d), uid(%u), mode(%d)", pid, u_uid, mode);
 
-       if (0 != ttsd_server_initialize(pid, u_uid, TTS_IPC_METHOD_TIDL, credential_needed)) {
+       if (0 != ttsd_server_initialize(pid, u_uid, mode, TTS_IPC_METHOD_TIDL, credential_needed)) {
                return TTSD_ERROR_OPERATION_FAILED;
        }
 
@@ -473,7 +458,6 @@ int ttsd_tidl_open_connection()
 
        g_callback.create = __create_client_cb;
        g_callback.terminate = __destroy_client_cb;
-       g_callback.set_mode = __set_mode_cb;
        g_callback.register_cb = __register_cb;
        g_callback.register_cb_sync = __register_cb_sync;
        g_callback.initialize = __initialize_cb;
index c112d9a..bcc1387 100644 (file)
@@ -3,7 +3,6 @@ interface tts {
        void register_cb(int pid, int uid, int mode, notify_cb callback) async;
        int register_cb_sync(int pid, int uid, notify_cb callback);
 
-       int set_mode(in int uid, in int mode);
        int initialize(in int pid, in int uid, in int mode, out bool credential_needed);
        int finalize(in int uid);
        int add_text(int uid, string text, string lang, int vctype, int speed, int uttid, string credential);