diff options
Diffstat (limited to 'src/feedback.c')
-rw-r--r-- | src/feedback.c | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/src/feedback.c b/src/feedback.c index 83febea..3660d6b 100644 --- a/src/feedback.c +++ b/src/feedback.c @@ -128,7 +128,7 @@ static feedback_pattern_e check_pattern(feedback_type_e type, feedback_pattern_e bool result = false; if (type < FEEDBACK_TYPE_NONE || type >= FEEDBACK_TYPE_END) - type = FEEDBACK_TYPE_NONE; + type = FEEDBACK_TYPE_NONE; //LCOV_EXCL_LINE /* if you need to switch pattern */ if (profile->get_switched_pattern) @@ -173,9 +173,9 @@ API int feedback_play(feedback_pattern_e pattern) * this function regards as success. */ if (err == -ENOTSUP) - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } @@ -188,7 +188,7 @@ API int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern) /* check initialize */ pthread_mutex_lock(&fmutex); if (!init_cnt) { - _E("Not initialized"); //LCOV_EXCL_LINE + _E("Not initialized"); pthread_mutex_unlock(&fmutex); return FEEDBACK_ERROR_NOT_INITIALIZED; } @@ -196,30 +196,30 @@ API int feedback_play_type(feedback_type_e type, feedback_pattern_e pattern) if (type <= FEEDBACK_TYPE_NONE || type >= profile->max_type) { - _E("Invalid parameter : type(%d)", type); - return FEEDBACK_ERROR_INVALID_PARAMETER; + _E("Invalid parameter : type(%d)", type); //LCOV_EXCL_LINE + return FEEDBACK_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE } if (pattern <= FEEDBACK_PATTERN_NONE || pattern >= profile->max_pattern) { - _E("Invalid parameter : pattern(%d)", pattern); - return FEEDBACK_ERROR_INVALID_PARAMETER; + _E("Invalid parameter : pattern(%d)", pattern); //LCOV_EXCL_LINE + return FEEDBACK_ERROR_INVALID_PARAMETER; //LCOV_EXCL_LINE } /* play proper device */ dev = find_device(type); if (!dev) { _E("Not supported device : type(%s)", profile->str_type[type]); //LCOV_EXCL_LINE - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } err = dev->play(check_pattern(type, pattern, __func__), false); if (err == -ENOTSUP) - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE else if (err == -ECOMM || err == -EACCES) - return FEEDBACK_ERROR_PERMISSION_DENIED; + return FEEDBACK_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } @@ -240,11 +240,11 @@ API int feedback_stop(void) /* stop all device */ err = devices_stop(); if (err == -ENOTSUP) - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE else if (err == -ECOMM || err == -EACCES) - return FEEDBACK_ERROR_PERMISSION_DENIED; + return FEEDBACK_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } @@ -295,7 +295,7 @@ API int feedback_is_supported_pattern(feedback_type_e type, feedback_pattern_e p return FEEDBACK_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE System Error else if (err < 0) { _E("fail to invoke is_supported() : pattern(%d)", pattern); //LCOV_EXCL_LINE - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE } *status = supported; @@ -372,7 +372,7 @@ API int feedback_play_internal(feedback_pattern_internal_e internal_pattern) if (err == -ENOTSUP) return FEEDBACK_ERROR_NOT_SUPPORTED; else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } @@ -408,16 +408,16 @@ API int feedback_play_type_internal(feedback_type_e type, feedback_pattern_inter dev = find_device(type); if (!dev) { _E("Not supported device : type(%s)", profile->str_type[type]); //LCOV_EXCL_LINE - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } _D("request type %s with pattern %s(%d)", profile->str_type[type], profile->str_pattern(pattern), pattern); err = dev->play(check_pattern(type, pattern, __func__), true); if (err == -ENOTSUP) - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE else if (err == -ECOMM || err == -EACCES) - return FEEDBACK_ERROR_PERMISSION_DENIED; + return FEEDBACK_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } @@ -458,7 +458,7 @@ API int feedback_play_soundpath_internal(feedback_pattern_internal_e internal_pa if (err == -ENOTSUP) return FEEDBACK_ERROR_NOT_SUPPORTED; else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } @@ -499,7 +499,7 @@ API int feedback_play_type_soundpath_internal(feedback_type_e type, feedback_pat dev = find_device(type); if (!dev) { _E("Not supported device : type(%s)", profile->str_type[type]); //LCOV_EXCL_LINE - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE } _D("request type %s with pattern(%s), soundpath(%s)", profile->str_type[type], profile->str_pattern(pattern), soundpath?soundpath:"NULL"); if (type == FEEDBACK_TYPE_SOUND) { @@ -515,11 +515,11 @@ API int feedback_play_type_soundpath_internal(feedback_type_e type, feedback_pat } if (err == -ENOTSUP) - return FEEDBACK_ERROR_NOT_SUPPORTED; + return FEEDBACK_ERROR_NOT_SUPPORTED; //LCOV_EXCL_LINE else if (err == -ECOMM || err == -EACCES) - return FEEDBACK_ERROR_PERMISSION_DENIED; + return FEEDBACK_ERROR_PERMISSION_DENIED; //LCOV_EXCL_LINE else if (err < 0) - return FEEDBACK_ERROR_OPERATION_FAILED; + return FEEDBACK_ERROR_OPERATION_FAILED; //LCOV_EXCL_LINE return FEEDBACK_ERROR_NONE; } |