diff options
author | Yunhee Seo <yuni.seo@samsung.com> | 2023-09-15 15:27:28 +0900 |
---|---|---|
committer | Yunhee Seo <yuni.seo@samsung.com> | 2023-09-15 15:50:22 +0900 |
commit | c9be19714587e5e66d7a31abc7be461850640399 (patch) | |
tree | 86a087324b7b7800b2d8b5ff45acc52a37965ba7 | |
parent | 0c0c907296fe8b983be9ae43c9693a433a012d23 (diff) | |
download | libsvi-c9be19714587e5e66d7a31abc7be461850640399.tar.gz libsvi-c9be19714587e5e66d7a31abc7be461850640399.tar.bz2 libsvi-c9be19714587e5e66d7a31abc7be461850640399.zip |
feedback: Support using all_str_pattern for common profileaccepted/tizen/unified/20230918.063835
All_str_pattern is supported to be used in common profile.
Change-Id: If081f2610c314e58ab4b7ef71bf49ce4060ee6c1
Signed-off-by: Yunhee Seo <yuni.seo@samsung.com>
-rw-r--r-- | src/check.c | 67 |
1 files changed, 5 insertions, 62 deletions
diff --git a/src/check.c b/src/check.c index 6ce3a71..ee031ff 100644 --- a/src/check.c +++ b/src/check.c @@ -658,63 +658,6 @@ static const struct pattern_field all_str_pattern[] = { {"FEEDBACK_PATTERN_DISCONNECTED", FEEDBACK_PATTERN_DISCONNECTED}, }; -static const struct pattern_field common_str_pattern[] = { - {"FEEDBACK_PATTERN_TAP", FEEDBACK_PATTERN_TAP}, - {"FEEDBACK_PATTERN_SIP", FEEDBACK_PATTERN_SIP}, - - {"FEEDBACK_PATTERN_KEY0", FEEDBACK_PATTERN_KEY0}, - {"FEEDBACK_PATTERN_KEY1", FEEDBACK_PATTERN_KEY1}, - {"FEEDBACK_PATTERN_KEY2", FEEDBACK_PATTERN_KEY2}, - {"FEEDBACK_PATTERN_KEY3", FEEDBACK_PATTERN_KEY3}, - {"FEEDBACK_PATTERN_KEY4", FEEDBACK_PATTERN_KEY4}, - {"FEEDBACK_PATTERN_KEY5", FEEDBACK_PATTERN_KEY5}, - {"FEEDBACK_PATTERN_KEY6", FEEDBACK_PATTERN_KEY6}, - {"FEEDBACK_PATTERN_KEY7", FEEDBACK_PATTERN_KEY7}, - {"FEEDBACK_PATTERN_KEY8", FEEDBACK_PATTERN_KEY8}, - {"FEEDBACK_PATTERN_KEY9", FEEDBACK_PATTERN_KEY9}, - {"FEEDBACK_PATTERN_KEY_STAR", FEEDBACK_PATTERN_KEY_STAR}, - {"FEEDBACK_PATTERN_KEY_SHARP", FEEDBACK_PATTERN_KEY_SHARP}, - {"FEEDBACK_PATTERN_KEY_BACK", FEEDBACK_PATTERN_KEY_BACK}, - {"FEEDBACK_PATTERN_HOLD", FEEDBACK_PATTERN_HOLD}, - - {"FEEDBACK_PATTERN_HW_TAP", FEEDBACK_PATTERN_HW_TAP}, - {"FEEDBACK_PATTERN_HW_HOLD", FEEDBACK_PATTERN_HW_HOLD}, - - {"FEEDBACK_PATTERN_MESSAGE", FEEDBACK_PATTERN_MESSAGE}, - - {"FEEDBACK_PATTERN_EMAIL", FEEDBACK_PATTERN_EMAIL}, - - {"FEEDBACK_PATTERN_WAKEUP", FEEDBACK_PATTERN_WAKEUP}, - - {"FEEDBACK_PATTERN_SCHEDULE", FEEDBACK_PATTERN_SCHEDULE}, - - {"FEEDBACK_PATTERN_TIMER", FEEDBACK_PATTERN_TIMER}, - - {"FEEDBACK_PATTERN_GENERAL", FEEDBACK_PATTERN_GENERAL}, - - {"FEEDBACK_PATTERN_POWERON", FEEDBACK_PATTERN_POWERON}, - {"FEEDBACK_PATTERN_POWEROFF", FEEDBACK_PATTERN_POWEROFF}, - {"FEEDBACK_PATTERN_CHARGERCONN", FEEDBACK_PATTERN_CHARGERCONN}, - - {"FEEDBACK_PATTERN_CHARGING_ERROR", FEEDBACK_PATTERN_CHARGING_ERROR}, - - {"FEEDBACK_PATTERN_FULLCHARGED", FEEDBACK_PATTERN_FULLCHARGED}, - - {"FEEDBACK_PATTERN_LOWBATT", FEEDBACK_PATTERN_LOWBATT}, - - {"FEEDBACK_PATTERN_LOCK", FEEDBACK_PATTERN_LOCK}, - {"FEEDBACK_PATTERN_UNLOCK", FEEDBACK_PATTERN_UNLOCK}, - - {"FEEDBACK_PATTERN_VIBRATION_ON", FEEDBACK_PATTERN_VIBRATION_ON}, - {"FEEDBACK_PATTERN_SILENT_OFF", FEEDBACK_PATTERN_SILENT_OFF}, - {"FEEDBACK_PATTERN_BT_CONNECTED", FEEDBACK_PATTERN_BT_CONNECTED}, - {"FEEDBACK_PATTERN_BT_DISCONNECTED", FEEDBACK_PATTERN_BT_DISCONNECTED}, - - {"FEEDBACK_PATTERN_LIST_REORDER", FEEDBACK_PATTERN_LIST_REORDER}, - {"FEEDBACK_PATTERN_LIST_SLIDER", FEEDBACK_PATTERN_LIST_SLIDER}, - {"FEEDBACK_PATTERN_VOLUME_KEY", FEEDBACK_PATTERN_VOLUME_KEY}, -}; - typedef enum { FEEDBACK_STANDARD_START = 2000, A, @@ -996,7 +939,7 @@ static int profile_get_num_of_pattern() else if (prof == PROFILE_DA) return ARR_SIZE(all_str_pattern); else - return ARR_SIZE(common_str_pattern); + return ARR_SIZE(all_str_pattern); //LCOV_EXCL_STOP } @@ -1055,8 +998,8 @@ static const char *profile_str_pattern(int pattern) } else { //LCOV_EXCL_STOP for (i = 0; i < profile_get_num_of_pattern(); i++) { - if (pattern == common_str_pattern[i].id) - return common_str_pattern[i].string; + if (pattern == all_str_pattern[i].id) + return all_str_pattern[i].string; } } return ""; @@ -1098,8 +1041,8 @@ static int profile_get_pattern_enum(char *pattern) } } else { for (i = 0; i < profile_get_num_of_pattern(); i++) { - if (!strncmp(pattern, common_str_pattern[i].string, len)) - return common_str_pattern[i].id; + if (!strncmp(pattern, all_str_pattern[i].string, len)) + return all_str_pattern[i].id; } } //LCOV_EXCL_STOP |