From: Suyeon Hwang Date: Fri, 14 Jan 2022 10:32:01 +0000 (+0900) Subject: Remove unused parameter of ttsd_server_pause() X-Git-Tag: submit/tizen/20220325.021820~10 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F88%2F271888%2F2;p=platform%2Fcore%2Fuifw%2Ftts.git Remove unused parameter of ttsd_server_pause() Change-Id: Id1970c88a563b86ccbbf3125cbd8b409fb876927 Signed-off-by: Suyeon Hwang --- diff --git a/server/ttsd_dbus_server.c b/server/ttsd_dbus_server.c index 617d8631..51a0ed3d 100644 --- a/server/ttsd_dbus_server.c +++ b/server/ttsd_dbus_server.c @@ -554,7 +554,6 @@ int ttsd_dbus_server_pause(DBusConnection* conn, DBusMessage* msg) dbus_error_init(&err); unsigned int uid; - int uttid; int ret = 0; dbus_message_get_args(msg, &err, DBUS_TYPE_UINT32, &uid, @@ -568,7 +567,7 @@ int ttsd_dbus_server_pause(DBusConnection* conn, DBusMessage* msg) ret = TTSD_ERROR_OPERATION_FAILED; } else { SECURE_SLOG(LOG_DEBUG, tts_tag(), "[IN] tts pause : uid(%u)", uid); - ret = ttsd_server_pause(uid, &uttid); + ret = ttsd_server_pause(uid); } DBusMessage* reply; diff --git a/server/ttsd_server.c b/server/ttsd_server.c index 1bd35ecf..36f3165d 100644 --- a/server/ttsd_server.c +++ b/server/ttsd_server.c @@ -929,23 +929,6 @@ int ttsd_server_add_text(unsigned int uid, const char* text, const char* lang, i return TTSD_ERROR_NONE; } -static int __pause_client(unsigned int uid) -{ - int ret = ttsd_data_set_client_state(uid, APP_STATE_PAUSED); - if (TTSD_ERROR_NONE != ret) { - SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail set pause state() : ret(%d)", ret); - return TTSD_ERROR_OPERATION_FAILED; - } - - ret = ttsd_player_pause(uid); - if (TTSD_ERROR_NONE != ret) { - SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail player_pause() : ret(%d)", ret); - return TTSD_ERROR_OPERATION_FAILED; - } - - return TTSD_ERROR_NONE; -} - void __send_interrupt_client(unsigned int uid) { SLOG(LOG_INFO, tts_tag(), "[Server] Send new state by policy. uid(%u)", uid); @@ -1013,7 +996,7 @@ int ttsd_server_play(unsigned int uid, const char* credential) SLOG(LOG_DEBUG, tts_tag(), "[Server] Old uid(%u) will be interrupted into 'Pause' state ", current_uid); /* pause player */ - if (0 != __pause_client(current_uid)) { + if (0 != ttsd_server_pause(current_uid)) { SLOG(LOG_WARN, tts_tag(), "[Server ERROR] Fail to ttsd_server_pause() : uid (%u)", current_uid); } } @@ -1098,7 +1081,7 @@ int ttsd_server_stop(unsigned int uid) return TTSD_ERROR_NONE; } -int ttsd_server_pause(unsigned int uid, int* utt_id) +int ttsd_server_pause(unsigned int uid) { app_tts_state_e state = ttsd_data_get_client_state(uid); if (APP_STATE_NONE == state) { @@ -1111,17 +1094,20 @@ int ttsd_server_pause(unsigned int uid, int* utt_id) return TTSD_ERROR_INVALID_STATE; } - g_is_paused = true; - - *utt_id = g_utt.uttid; - SLOG(LOG_INFO, tts_tag(), "[Server] server pause, uid(%u), g_uid(%u), utt_id(%d)", uid, g_utt.uid, *utt_id); + int ret = ttsd_data_set_client_state(uid, APP_STATE_PAUSED); + if (TTSD_ERROR_NONE != ret) { + SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail set pause state() : ret(%d)", ret); + return TTSD_ERROR_OPERATION_FAILED; + } - int ret = __pause_client(uid); + ret = ttsd_player_pause(uid); if (TTSD_ERROR_NONE != ret) { - SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail to pause player : ret(%d)", ret); + SLOG(LOG_ERROR, tts_tag(), "[Server ERROR] Fail player_pause() : ret(%d)", ret); return TTSD_ERROR_OPERATION_FAILED; } + g_is_paused = true; + return TTSD_ERROR_NONE; } @@ -1267,7 +1253,7 @@ int ttsd_server_play_pcm(unsigned int uid) SLOG(LOG_DEBUG, tts_tag(), "[Server] Old uid(%u) will be interrupted into 'Pause' state ", current_uid); /* pause player */ - if (0 != __pause_client(current_uid)) { + if (0 != ttsd_server_pause(current_uid)) { SLOG(LOG_WARN, tts_tag(), "[Server ERROR] Fail to ttsd_server_pause() : uid (%u)", current_uid); } } diff --git a/server/ttsd_server.h b/server/ttsd_server.h index 8fe95c6f..726b0856 100644 --- a/server/ttsd_server.h +++ b/server/ttsd_server.h @@ -67,7 +67,7 @@ int ttsd_server_play(unsigned int uid, const char* credential); int ttsd_server_stop(unsigned int uid); -int ttsd_server_pause(unsigned int uid, int* utt_id); +int ttsd_server_pause(unsigned int uid); int ttsd_server_set_private_data(unsigned int uid, const char* key, const char* data); diff --git a/server/ttsd_tidl.c b/server/ttsd_tidl.c index 134cad2b..00f1ba04 100644 --- a/server/ttsd_tidl.c +++ b/server/ttsd_tidl.c @@ -355,11 +355,10 @@ static int __stop_cb(rpc_port_stub_tts_context_h context, int uid, void *user_da static int __pause_cb(rpc_port_stub_tts_context_h context, int uid, void *user_data) { - int uttid; unsigned int u_uid = (unsigned int)uid; SLOG(LOG_DEBUG, tts_tag(), ">>>>> TTS PLAYER PAUSE (%u)", u_uid); - int ret = ttsd_server_pause(u_uid, &uttid); + int ret = ttsd_server_pause(u_uid); if (TTSD_ERROR_NONE != ret) { SLOG(LOG_ERROR, tts_tag(), "[ERROR] TTS PLAYER PAUSE (%u) fail (%d/%s) <<<<<", u_uid, ret, get_error_message(ret)); return ret;