From 4c5c16c4a72d6383e9c78e37cd8edbe936458980 Mon Sep 17 00:00:00 2001 From: Semun Lee Date: Mon, 21 Oct 2019 20:35:08 +0900 Subject: [PATCH] Add TOUCH_SOUND setter function Change-Id: I3e15d0f0c2606cfe2ad3e703301c5ed8bf818d9c Signed-off-by: Semun Lee --- include/system_settings_private.h | 11 +++++++++++ src/system_setting_platform.c | 7 +++++++ src/system_settings.c | 2 +- 3 files changed, 19 insertions(+), 1 deletion(-) diff --git a/include/system_settings_private.h b/include/system_settings_private.h index 2fd0a77..b61c0ca 100644 --- a/include/system_settings_private.h +++ b/include/system_settings_private.h @@ -1076,6 +1076,17 @@ int system_setting_unset_changed_callback_sound_silent_mode(system_settings_key_ * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ int system_setting_get_sound_touch(system_settings_key_e key, void **value); + +/** + * @internal + * @since_tizen 5.5 + * @return 0 on success, otherwise a negative error value + * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful + * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error + * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error + */ +int system_setting_set_sound_touch(system_settings_key_e key, void *value); + /** * @internal * @since_tizen 2.3 diff --git a/src/system_setting_platform.c b/src/system_setting_platform.c index 174d697..b97a2a3 100644 --- a/src/system_setting_platform.c +++ b/src/system_setting_platform.c @@ -1750,6 +1750,13 @@ int system_setting_get_sound_touch(system_settings_key_e key, void **value) return ret; } +int system_setting_set_sound_touch(system_settings_key_e key, void *value) +{ + SETTING_TRACE_BEGIN; + return system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, *(bool *)value); +} + + int system_setting_set_changed_callback_sound_touch(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) { SETTING_TRACE_BEGIN; diff --git a/src/system_settings.c b/src/system_settings.c index 491d061..e7d6e88 100644 --- a/src/system_settings.c +++ b/src/system_settings.c @@ -314,7 +314,7 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTINGS_KEY_SOUND_TOUCH, SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_sound_touch, - NULL, + system_setting_set_sound_touch, system_setting_set_changed_callback_sound_touch, system_setting_unset_changed_callback_sound_touch, NULL, -- 2.7.4