From: Ji-hoon Lee Date: Mon, 6 Apr 2020 09:49:57 +0000 (+0900) Subject: Unify member function names in CServiceIpcDbus X-Git-Tag: accepted/tizen/unified/20200410.015514~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f47d5825126b0183627cb6840c360da88cc3e104;p=platform%2Fcore%2Fuifw%2Fmulti-assistant-service.git Unify member function names in CServiceIpcDbus Change-Id: I5f85cdec79077b12dc6852de912aecc22d03bf91 --- diff --git a/inc/service_ipc_dbus.h b/inc/service_ipc_dbus.h index e6778c4..9c5e40b 100644 --- a/inc/service_ipc_dbus.h +++ b/inc/service_ipc_dbus.h @@ -38,13 +38,13 @@ public: int send_hello(int pid); int send_error_message(int reason, const char* err_msg); int send_streaming_audio_data(int pid, int event, void* data, unsigned int data_size); - int active_state_change(int pid, int state); + int change_active_state(int pid, int state); int send_preprocessing_information(int pid, const char* app_id); int send_streaming_section_changed(int pid, int section); int send_preprocessing_result(int pid, bool result); int send_wakeup_engine_command(int pid, const char* command); - int service_state_change(int pid, int state); - int voice_key_status_change(int pid, int status); + int change_service_state(int pid, int state); + int change_voice_key_status(int pid, int status); int masc_ui_dbus_send_hello(void); int masc_ui_dbus_send_asr_result(int pid, int event, const char* asr_result); int masc_ui_dbus_send_result(int pid, const char* display_text, const char* utterance_text, const char* result_json); diff --git a/src/service_ipc_dbus.cpp b/src/service_ipc_dbus.cpp index fa3867d..72c18b4 100644 --- a/src/service_ipc_dbus.cpp +++ b/src/service_ipc_dbus.cpp @@ -281,7 +281,7 @@ int CServiceIpcDbus::send_streaming_audio_data(int pid, int event, void* data, u return 0; } -int CServiceIpcDbus::active_state_change(int pid, int state) +int CServiceIpcDbus::change_active_state(int pid, int state) { if (0 != __dbus_check()) { return -1; //MAS_ERROR_OPERATION_FAILED; @@ -547,7 +547,7 @@ int CServiceIpcDbus::send_wakeup_engine_command(int pid, const char* command) return 0; } -int CServiceIpcDbus::service_state_change(int pid, int state) +int CServiceIpcDbus::change_service_state(int pid, int state) { if (0 != __dbus_check()) { return -1; //MAS_ERROR_OPERATION_FAILED; @@ -597,7 +597,7 @@ int CServiceIpcDbus::service_state_change(int pid, int state) return 0; } -int CServiceIpcDbus::voice_key_status_change(int pid, int status) +int CServiceIpcDbus::change_voice_key_status(int pid, int status) { if (0 != __dbus_check()) { return -1; //MAS_ERROR_OPERATION_FAILED; diff --git a/src/service_main.cpp b/src/service_main.cpp index 7cb5fd9..b3d4dff 100644 --- a/src/service_main.cpp +++ b/src/service_main.cpp @@ -127,7 +127,7 @@ int CServiceMain::mas_client_send_voice_key_status_change(int pid, ma_voice_key_ int ret = -1; MAS_LOGD("[Enter] pid(%d)", pid); - ret = mServiceIpc.voice_key_status_change(pid, status); + ret = mServiceIpc.change_voice_key_status(pid, status); if (0 != ret) { MAS_LOGE("[ERROR] Fail to send voice key status changed information, ret(%d)", ret); } @@ -428,7 +428,7 @@ int CServiceMain::mas_ui_client_change_assistant(const char* appid) mas_client_send_voice_key_status_change(pid, mLastVoiceKeyStatus); } - mServiceIpc.active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); + mServiceIpc.change_active_state(pid, MA_ACTIVE_STATE_ACTIVE); MAS_LOGD("MA Client with appid %s exists, requesting speech data", (appid ? appid : "NULL")); /* int ret = mServicePlugin.start_streaming_utterance_data(); @@ -829,7 +829,7 @@ int CServiceMain::mas_set_current_client_by_wakeup_word(const char *wakeup_word) if (mCurrentClientInfo != prev_selection) { if (prev_selection >= 0 && prev_selection < MAX_MACLIENT_INFO_NUM) { int pid = mas_get_client_pid_by_appid(mClientInfo[prev_selection].appid); - mServiceIpc.active_state_change(pid, MA_ACTIVE_STATE_INACTIVE); + mServiceIpc.change_active_state(pid, MA_ACTIVE_STATE_INACTIVE); } } @@ -855,7 +855,7 @@ int CServiceMain::mas_set_current_client_by_appid(const char *appid) if (mCurrentClientInfo != prev_selection) { if (prev_selection >= 0 && prev_selection < MAX_MACLIENT_INFO_NUM) { int pid = mas_get_client_pid_by_appid(mClientInfo[prev_selection].appid); - mServiceIpc.active_state_change(pid, MA_ACTIVE_STATE_INACTIVE); + mServiceIpc.change_active_state(pid, MA_ACTIVE_STATE_INACTIVE); } } @@ -1102,7 +1102,7 @@ int CServiceMain::mas_set_current_service_state(ma_service_state_e state) int pid = mClientManager.find_client_pid_by_index(i); if (-1 != pid) { - int ret = mServiceIpc.service_state_change(pid, state); + int ret = mServiceIpc.change_service_state(pid, state); if (0 != ret) { MAS_LOGE("[ERROR] Fail to set service state change to %d, ret(%d)", pid, ret); } @@ -1365,7 +1365,7 @@ int CServiceMain::on_initialize(int pid) { if (0 == mWakeupClientAppId.compare(pid_appid)) { mWakeupClientAppId.clear(); - mServiceIpc.active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); + mServiceIpc.change_active_state(pid, MA_ACTIVE_STATE_ACTIVE); mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_ASSISTANT_ACTIVATED); } else { MAS_LOGE("[ERROR] mWakeupClientAppId and appid differ : %s %s", @@ -1375,7 +1375,7 @@ int CServiceMain::on_initialize(int pid) { MAS_LOGD("MA client connected, but its appid does not match with current maclient"); } - mServiceIpc.service_state_change(pid, mas_get_current_service_state()); + mServiceIpc.change_service_state(pid, mas_get_current_service_state()); } else { MAS_LOGE("[ERROR] Fail to retrieve appid"); } diff --git a/src/service_plugin.cpp b/src/service_plugin.cpp index f96f922..4fbddce 100644 --- a/src/service_plugin.cpp +++ b/src/service_plugin.cpp @@ -114,7 +114,7 @@ static Eina_Bool process_wakeup_event_by_appid_timer(void* data) service_main->mas_set_current_client_by_appid(appid); if ((pid = service_main->mas_get_client_pid_by_appid(appid)) != -1) { service_main->mas_client_send_preprocessing_information(pid); - service_ipc->active_state_change(pid, MA_ACTIVE_STATE_ACTIVE); + service_ipc->change_active_state(pid, MA_ACTIVE_STATE_ACTIVE); service_main->mas_process_preprocessing_state_event(PREPROCESSING_STATE_EVENT_ASSISTANT_ACTIVATED); } else { // Appropriate MA Client not available, trying to launch new one @@ -494,7 +494,7 @@ static void __wakeup_service_voice_key_status_changed_cb(ma_voice_key_status_e s } if (service_ipc && service_main) { int pid = service_main->mas_get_current_client_pid(); - int ret = service_ipc->voice_key_status_change(pid, status); + int ret = service_ipc->change_voice_key_status(pid, status); if (0 != ret) { MAS_LOGE("[ERROR] Fail to send voice key status changed information, ret(%d)", ret); }