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);
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;
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;
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;
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);
}
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();
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);
}
}
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);
}
}
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);
}
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",
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");
}
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
}
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);
}