From: sooyeon.kim Date: Tue, 26 Apr 2016 05:01:36 +0000 (+0900) Subject: check and revise by coding rule X-Git-Tag: submit/tizen/20160503.082212~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e988974014afab766acba60011c49fecb0ff2de7;p=platform%2Fcore%2Fuifw%2Fstt.git check and revise by coding rule Change-Id: Id8fde696d12c5527ce375ae062feaaf41a49fe3d Signed-off-by: sooyeon.kim --- diff --git a/client/stt.c b/client/stt.c index 4394ae9..442b1c3 100755 --- a/client/stt.c +++ b/client/stt.c @@ -751,11 +751,11 @@ int stt_get_state(stt_h stt, stt_state_e* state) *state = client->current_state; switch (*state) { - case STT_STATE_CREATED: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'CREATED'"); break; - case STT_STATE_READY: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'Ready'"); break; - case STT_STATE_RECORDING: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'Recording'"); break; - case STT_STATE_PROCESSING: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'Processing'"); break; - default: SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid value"); break; + case STT_STATE_CREATED: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'CREATED'"); break; + case STT_STATE_READY: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'Ready'"); break; + case STT_STATE_RECORDING: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'Recording'"); break; + case STT_STATE_PROCESSING: SLOG(LOG_DEBUG, TAG_STTC, "Current state is 'Processing'"); break; + default: SLOG(LOG_ERROR, TAG_STTC, "[ERROR] Invalid value"); break; } return STT_ERROR_NONE; diff --git a/client/stt_dbus.h b/client/stt_dbus.h old mode 100644 new mode 100755 index 5c2ad00..72ed1a1 --- a/client/stt_dbus.h +++ b/client/stt_dbus.h @@ -11,7 +11,7 @@ * limitations under the License. */ - + #ifndef __STT_DBUS_H_ #define __STT_DBUS_H_ diff --git a/client/stt_file.c b/client/stt_file.c old mode 100644 new mode 100755 index e1998df..423eaaa --- a/client/stt_file.c +++ b/client/stt_file.c @@ -563,10 +563,10 @@ int stt_file_get_state(stt_file_state_e* state) *state = client->current_state; switch (*state) { - case STT_FILE_STATE_NONE: SLOG(LOG_DEBUG, TAG_STTFC, "Current state is 'NONE'"); break; - case STT_FILE_STATE_READY: SLOG(LOG_DEBUG, TAG_STTFC, "Current state is 'Ready'"); break; - case STT_FILE_STATE_PROCESSING: SLOG(LOG_DEBUG, TAG_STTFC, "Current state is 'Processing'"); break; - default: SLOG(LOG_ERROR, TAG_STTFC, "[ERROR] Invalid value"); break; + case STT_FILE_STATE_NONE: SLOG(LOG_DEBUG, TAG_STTFC, "Current state is 'NONE'"); break; + case STT_FILE_STATE_READY: SLOG(LOG_DEBUG, TAG_STTFC, "Current state is 'Ready'"); break; + case STT_FILE_STATE_PROCESSING: SLOG(LOG_DEBUG, TAG_STTFC, "Current state is 'Processing'"); break; + default: SLOG(LOG_ERROR, TAG_STTFC, "[ERROR] Invalid value"); break; } return STT_FILE_ERROR_NONE; diff --git a/client/stt_main.h b/client/stt_main.h old mode 100644 new mode 100755 index b10e429..564c3f6 --- a/client/stt_main.h +++ b/client/stt_main.h @@ -11,7 +11,7 @@ * limitations under the License. */ - + #ifndef __STT_MAIN_H_ #define __STT_MAIN_H_ diff --git a/common/stt_config_mgr.h b/common/stt_config_mgr.h index 614b666..b6b024e 100755 --- a/common/stt_config_mgr.h +++ b/common/stt_config_mgr.h @@ -11,7 +11,7 @@ * limitations under the License. */ - + #ifndef __STT_CONFIG_MANAGER_H_ #define __STT_CONFIG_MANAGER_H_ diff --git a/common/stt_config_parser.c b/common/stt_config_parser.c old mode 100644 new mode 100755 index c64ae6c..dadfed4 --- a/common/stt_config_parser.c +++ b/common/stt_config_parser.c @@ -908,7 +908,7 @@ int stt_parser_get_time_info(GSList** time_list) if (0 == i) temp_info->event = 0; else if (count -1 == i) temp_info->event = 2; - else temp_info->event = 1; + else temp_info->event = 1; if (0 == xmlStrcmp(time_node->name, (const xmlChar *)STT_TAG_TIME_TEXT)) { key = xmlNodeGetContent(time_node); diff --git a/common/stt_config_parser.h b/common/stt_config_parser.h index 8b626f2..81ca0cf 100755 --- a/common/stt_config_parser.h +++ b/common/stt_config_parser.h @@ -11,7 +11,7 @@ * limitations under the License. */ - + #ifndef __STT_CONFIG_PARSER_H_ #define __STT_CONFIG_PARSER_H_ diff --git a/server/sttd_recorder.c b/server/sttd_recorder.c index c34683d..df81874 100755 --- a/server/sttd_recorder.c +++ b/server/sttd_recorder.c @@ -71,18 +71,18 @@ static int g_count = 1; const char* __stt_get_focus_changed_reason_code(sound_stream_focus_change_reason_e reason) { switch (reason) { - case SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA: return "SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA"; - case SOUND_STREAM_FOCUS_CHANGED_BY_SYSTEM: return "SOUND_STREAM_FOCUS_CHANGED_BY_SYSTEM"; - case SOUND_STREAM_FOCUS_CHANGED_BY_ALARM: return "SOUND_STREAM_FOCUS_CHANGED_BY_ALARM"; - case SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION: return "SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION"; - case SOUND_STREAM_FOCUS_CHANGED_BY_EMERGENCY: return "SOUND_STREAM_FOCUS_CHANGED_BY_EMERGENCY"; - case SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION: return "SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION"; - case SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION: return "SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION"; - case SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE: return "SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE"; - case SOUND_STREAM_FOCUS_CHANGED_BY_VOIP: return "SOUND_STREAM_FOCUS_CHANGED_BY_VOIP"; - case SOUND_STREAM_FOCUS_CHANGED_BY_CALL: return "SOUND_STREAM_FOCUS_CHANGED_BY_CALL"; - case SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA_EXTERNAL_ONLY: return "SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA_EXTERNAL_ONLY"; - default: return "Undefined reason code"; + case SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA: return "SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA"; + case SOUND_STREAM_FOCUS_CHANGED_BY_SYSTEM: return "SOUND_STREAM_FOCUS_CHANGED_BY_SYSTEM"; + case SOUND_STREAM_FOCUS_CHANGED_BY_ALARM: return "SOUND_STREAM_FOCUS_CHANGED_BY_ALARM"; + case SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION: return "SOUND_STREAM_FOCUS_CHANGED_BY_NOTIFICATION"; + case SOUND_STREAM_FOCUS_CHANGED_BY_EMERGENCY: return "SOUND_STREAM_FOCUS_CHANGED_BY_EMERGENCY"; + case SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION: return "SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_INFORMATION"; + case SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION: return "SOUND_STREAM_FOCUS_CHANGED_BY_VOICE_RECOGNITION"; + case SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE: return "SOUND_STREAM_FOCUS_CHANGED_BY_RINGTONE"; + case SOUND_STREAM_FOCUS_CHANGED_BY_VOIP: return "SOUND_STREAM_FOCUS_CHANGED_BY_VOIP"; + case SOUND_STREAM_FOCUS_CHANGED_BY_CALL: return "SOUND_STREAM_FOCUS_CHANGED_BY_CALL"; + case SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA_EXTERNAL_ONLY: return "SOUND_STREAM_FOCUS_CHANGED_BY_MEDIA_EXTERNAL_ONLY"; + default: return "Undefined reason code"; } } @@ -219,21 +219,21 @@ int sttd_recorder_create(int engine_id, int uid, sttp_audio_type_e type, int cha audio_in_h temp_in_h; switch (channel) { - case 1: audio_ch = AUDIO_CHANNEL_MONO; break; - case 2: audio_ch = AUDIO_CHANNEL_STEREO; break; - default: - SLOG(LOG_ERROR, TAG_STTD, "[Recorder ERROR] Input channel is not supported"); - return STTD_ERROR_OPERATION_FAILED; - break; + case 1: audio_ch = AUDIO_CHANNEL_MONO; break; + case 2: audio_ch = AUDIO_CHANNEL_STEREO; break; + default: + SLOG(LOG_ERROR, TAG_STTD, "[Recorder ERROR] Input channel is not supported"); + return STTD_ERROR_OPERATION_FAILED; + break; } switch (type) { - case STTP_AUDIO_TYPE_PCM_S16_LE: audio_type = AUDIO_SAMPLE_TYPE_S16_LE; break; - case STTP_AUDIO_TYPE_PCM_U8: audio_type = AUDIO_SAMPLE_TYPE_U8; break; - default: - SLOG(LOG_ERROR, TAG_STTD, "[Recorder ERROR] Invalid Audio Type"); - return STTD_ERROR_OPERATION_FAILED; - break; + case STTP_AUDIO_TYPE_PCM_S16_LE: audio_type = AUDIO_SAMPLE_TYPE_S16_LE; break; + case STTP_AUDIO_TYPE_PCM_U8: audio_type = AUDIO_SAMPLE_TYPE_U8; break; + default: + SLOG(LOG_ERROR, TAG_STTD, "[Recorder ERROR] Invalid Audio Type"); + return STTD_ERROR_OPERATION_FAILED; + break; } int ret;