From: jinwang.an Date: Tue, 31 Mar 2020 03:03:54 +0000 (+0900) Subject: Revise set/unset changed callback X-Git-Tag: submit/tizen/20200402.064751~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=5c971acfc88cf37d6cd9062eae2876f374c71688;p=platform%2Fcore%2Fapi%2Fsystem-settings.git Revise set/unset changed callback Change-Id: I96bcd980fd76e8a02d5cdb310c7bd4c82a36693d Signed-off-by: jinwang.an --- diff --git a/include/system_settings_private.h b/include/system_settings_private.h index 0f48f3e..b161cca 100644 --- a/include/system_settings_private.h +++ b/include/system_settings_private.h @@ -116,6 +116,8 @@ typedef enum { } system_setting_callback_slot_e; +typedef struct _system_setting_s *system_setting_h; + /** * @internal * @since_tizen 2.3 @@ -125,7 +127,7 @@ system_setting_callback_slot_e; * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -typedef int (*system_setting_get_value_cb)(system_settings_key_e key, void **value); +typedef int (*system_setting_get_value_cb)(system_setting_h item, void **value); /** * @internal @@ -136,7 +138,7 @@ typedef int (*system_setting_get_value_cb)(system_settings_key_e key, void **val * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -typedef int (*system_setting_set_value_cb)(system_settings_key_e key, void *value); +typedef int (*system_setting_set_value_cb)(system_setting_h item, void *value); typedef int (*system_setting_add_value_cb)(system_settings_key_e key, void *value); typedef int (*system_setting_del_value_cb)(system_settings_key_e key, void *value); typedef int (*system_setting_list_value_cb)(system_settings_key_e key, system_settings_iter_cb callback, void *user_data); @@ -152,7 +154,7 @@ typedef int (*system_setting_feature_check_cb)(void *value); * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -typedef int (*system_setting_set_changed_callback_cb)(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); +typedef int (*system_setting_set_changed_callback_cb)(system_setting_h item, void *user_data); /** * @internal @@ -163,7 +165,7 @@ typedef int (*system_setting_set_changed_callback_cb)(system_settings_key_e key, * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -typedef int (*system_setting_unset_changed_callback_cb)(system_settings_key_e key); +typedef int (*system_setting_unset_changed_callback_cb)(system_setting_h item); /** @@ -174,7 +176,7 @@ typedef int (*system_setting_unset_changed_callback_cb)(system_settings_key_e ke * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error */ -typedef struct { +typedef struct _system_setting_s { system_settings_key_e key; /**< key */ const char * const vconf_key; /**< vconf key */ system_setting_data_type_e data_type; /**< data type */ @@ -197,7 +199,6 @@ typedef struct { } system_setting_s; -typedef system_setting_s *system_setting_h; /** @@ -298,33 +299,60 @@ int system_setting_vconf_set_value_string(const char *vconf_key, char *value); * @brief get vconf value for genernal case * @since_tizen 6.0 * - * @param[in] system_settings_key_e key + * @param[in] system_setting_h item * @param[in] void value pointer * * @return 0 on success, -1 on error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_get_vconf(system_settings_key_e key, void **value); +int system_setting_get_vconf(system_setting_h item, void **value); /** * @internal * @brief set vconf value for genernal case * @since_tizen 6.0 * - * @param[in] system_settings_key_e key + * @param[in] system_setting_h item * @param[in] void value pointer * * @return 0 on success, -1 on error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_vconf(system_settings_key_e key, void *value); +int system_setting_set_vconf(system_setting_h item, void *value); + +/** + * @internal + * @brief set vconf notification callback for genernal case + * @since_tizen 6.0 + * + * @param[in] system_setting_h item + * @param[in] system_settings_changed_cb callback + * @param[in] user_data user data + * + * @return 0 on success, -1 on error + * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error + */ +int system_setting_set_changed_vconf_genernal_callback(system_setting_h item, void *user_data); + +/** + * @internal + * @brief unset vconf notification callback for genernal case + * @since_tizen 6.0 + * + * @param[in] system_setting_h item + * + * @return 0 on success, -1 on error + * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error + */ +int system_setting_unset_changed_vconf_genernal_callback(system_setting_h item); + /** * @internal * @brief Set the system settings notification callback * @since_tizen 2.3 * @param[in] vconf_key * @param[in] key - * @param[in] slot internal slot to set the key (0~5) + * @param[in] slot internal slot to set the key (0~4) * @param[in] user_data user data * @return 0 on success, otherwise a negative error value * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful @@ -383,19 +411,6 @@ int system_setting_vconf_set_changed_multi_cb(const char *vconf_key, system_sett */ int system_setting_vconf_unset_changed_multi_cb(const char *vconf_key, system_settings_key_e key); -/** - * @internal - * @brief get current font size - * @since_tizen 2.3 - * @param[in] key key name should be SYSTEM_SETTINGS_KEY_FONT_SIZE - * @param[in] datatype should be SYSTEM_SETTING_DATA_TYPE_INT - * @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_get_font_size(system_settings_key_e key, void **value); - /** * @internal * @brief set current font size @@ -408,30 +423,14 @@ int system_setting_get_font_size(system_settings_key_e key, void **value); * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_font_size(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_font_size(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_font_size(system_settings_key_e key); - - +int system_setting_set_font_size(system_setting_h item, void *value); /** * @internal * @since_tizen 2.3 * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_get_incoming_call_ringtone(system_settings_key_e key, void **value); +int system_setting_get_incoming_call_ringtone(system_setting_h item, void **value); /** * @internal @@ -445,7 +444,7 @@ int system_setting_get_incoming_call_ringtone(system_settings_key_e key, void ** * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_incoming_call_ringtone(system_settings_key_e key, void *value); +int system_setting_set_incoming_call_ringtone(system_setting_h item, void *value); /** @@ -470,22 +469,7 @@ int system_setting_list_incoming_call_ringtone(system_settings_key_e key, system * @since_tizen 2.3 * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_changed_callback_incoming_call_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_incoming_call_ringtone(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_email_alert_ringtone(system_settings_key_e key, void **value); +int system_setting_get_email_alert_ringtone(system_setting_h item, void **value); /** * @internal @@ -499,30 +483,7 @@ int system_setting_get_email_alert_ringtone(system_settings_key_e key, void **va * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_email_alert_ringtone(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_email_alert_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_email_alert_ringtone(system_settings_key_e key); - - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_wallpaper_home_screen(system_settings_key_e key, void **value); +int system_setting_set_email_alert_ringtone(system_setting_h item, void *value); /** * @internal @@ -536,30 +497,7 @@ int system_setting_get_wallpaper_home_screen(system_settings_key_e key, void **v * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_wallpaper_home_screen(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_wallpaper_home_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_wallpaper_home_screen(system_settings_key_e key); - - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, void **value); +int system_setting_set_wallpaper_home_screen(system_setting_h item, void *value); /** * @internal @@ -573,37 +511,14 @@ int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, void **v * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_wallpaper_lock_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_wallpaper_lock_screen(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_default_font_type(system_settings_key_e key, void **value); - +int system_setting_set_wallpaper_lock_screen(system_setting_h item, void *value); /** * @internal * @since_tizen 2.3 * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_get_font_type(system_settings_key_e key, void **value); +int system_setting_get_default_font_type(system_setting_h item, void **value); /** * @internal @@ -617,116 +532,37 @@ int system_setting_get_font_type(system_settings_key_e key, void **value); * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_font_type(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_font_type(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_font_type(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_motion_activation(system_settings_key_e key, void **value); +int system_setting_set_font_type(system_setting_h item, void *value); /** * @internal - * @brief set on/off of the motion activation * @since_tizen 2.3 - * @param[in] key key name should be SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION - * @param[in] datatype should be SYSTEM_SETTING_DATA_TYPE_BOOL - * @param[out] value the motion activation * @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_motion_activation(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_motion_activation(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_motion_activation(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_usb_debugging_option(system_settings_key_e key, void **value); +int system_setting_get_lockscreen_app(system_setting_h item, void **value); /** * @internal - * @brief set on/off of the debugging options * @since_tizen 2.3 - * @param[in] key key name should be SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED - * @param[in] datatype should be SYSTEM_SETTING_DATA_TYPE_BOOL - * @param[out] value the usb debug option * @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_usb_debugging_option(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_set_changed_callback_usb_debugging_option(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_unset_changed_callback_usb_debugging_option(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 2.3 - * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error - */ -int system_setting_get_3g_data_network(system_settings_key_e key, void **value); +int system_setting_set_lockscreen_app(system_setting_h item, void *value); /** * @internal - * @brief set on/off of the 3G data network option * @since_tizen 2.3 - * @param[in] key key name should be SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED - * @param[in] datatype should be SYSTEM_SETTING_DATA_TYPE_BOOL - * @param[out] value the 3G data network option * @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_3g_data_network(system_settings_key_e key, void *value); - +int system_setting_get_locale_country(system_setting_h item, void **value); /** * @internal * @since_tizen 2.3 @@ -735,7 +571,7 @@ int system_setting_set_3g_data_network(system_settings_key_e key, void *value); * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_changed_callback_3g_data_network(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); +int system_setting_set_locale_country(system_setting_h item, void *value); /** * @internal @@ -745,8 +581,7 @@ int system_setting_set_changed_callback_3g_data_network(system_settings_key_e ke * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_unset_changed_callback_3g_data_network(system_settings_key_e key); - +int system_setting_get_locale_language(system_setting_h item, void **value); /** * @internal * @since_tizen 2.3 @@ -755,7 +590,7 @@ int system_setting_unset_changed_callback_3g_data_network(system_settings_key_e * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_get_tap_and_hold_delay(system_settings_key_e key, void **value); +int system_setting_set_locale_language(system_setting_h item, void *value); /** * @internal @@ -765,8 +600,7 @@ int system_setting_get_tap_and_hold_delay(system_settings_key_e key, void **valu * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_tap_and_hold_delay(system_settings_key_e key, void *value); - +int system_setting_get_locale_timeformat_24hour(system_setting_h item, void **value); /** * @internal * @since_tizen 2.3 @@ -775,7 +609,7 @@ int system_setting_set_tap_and_hold_delay(system_settings_key_e key, void *value * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_set_changed_callback_tap_and_hold_delay(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); +int system_setting_set_locale_timeformat_24hour(system_setting_h item, void *value); /** * @internal @@ -785,1009 +619,110 @@ int system_setting_set_changed_callback_tap_and_hold_delay(system_settings_key_e * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error */ -int system_setting_unset_changed_callback_tap_and_hold_delay(system_settings_key_e key); +int system_setting_get_locale_timezone(system_setting_h item, void **value); /** * @internal - * @since_tizen 2.3 + * @since_tizen 3.0 * @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_get_lockscreen_app(system_settings_key_e key, void **value); +int system_setting_set_locale_timezone(system_setting_h item, void *value); /** * @internal - * @since_tizen 2.3 - * @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 + * @brief get current UDS status + * @since_tizen 3.0 + * @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_lockscreen_app(system_settings_key_e key, void *value); +int system_setting_get_uds_state(system_setting_h item, void **value); /** * @internal - * @since_tizen 2.3 - * @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 + * @brief get current ADS ID + * @since_tizen 3.0 + * @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_changed_callback_lockscreen_app(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); +int system_setting_get_ads_id(system_setting_h item, void **value); /** * @internal - * @since_tizen 2.3 - * @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 + * @brief set ADS ID + * @since_tizen 3.0 + * @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_unset_changed_callback_lockscreen_app(system_settings_key_e key); +int system_setting_set_ads_id(system_setting_h item, void *value); /** * @internal * @since_tizen 2.3 - * @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_get_locale_country(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_locale_country(system_settings_key_e key, void *value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_locale_country(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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 + * @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_unset_changed_callback_locale_country(system_settings_key_e key); +int system_setting_set_sound_notification(system_setting_h item, void *value); /** * @internal * @since_tizen 2.3 - * @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 + * @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_get_locale_language(system_settings_key_e key, void **value); +int system_setting_set_screen_backlight_time(system_setting_h item, void *value); + /** * @internal * @since_tizen 2.3 - * @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 + * @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_locale_language(system_settings_key_e key, void *value); +int system_setting_get_network_wifi_notification(system_setting_h item, void **value); + /** * @internal * @since_tizen 2.3 - * @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 + * @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_changed_callback_locale_language(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); +int system_setting_get_sound_silent_mode(system_setting_h item, void **value); + /** * @internal * @since_tizen 2.3 - * @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 + * @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_unset_changed_callback_locale_language(system_settings_key_e key); +int system_setting_set_sound_silent_mode(system_setting_h item, void *value); /** * @internal * @since_tizen 2.3 - * @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_get_locale_timeformat_24hour(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_locale_timeformat_24hour(system_settings_key_e key, void *value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_locale_timeformat_24hour(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_locale_timeformat_24hour(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_locale_timezone(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 3.0 - * @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_locale_timezone(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 3.0 - * @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_changed_callback_locale_timezone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 3.0 - * @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_unset_changed_callback_locale_timezone(system_settings_key_e key); - - - -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_locale_timezone_changed(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_locale_timezone_changed(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_time_changed(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_time_changed(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_time_changed(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 2.3 - * @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_get_sound_lock(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_sound_lock(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_sound_lock(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_sound_silent_mode(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 2.3 - * @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_silent_mode(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_sound_silent_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_sound_silent_mode(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_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 - * @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_changed_callback_sound_touch(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_sound_touch(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_auto_rotation_mode(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_auto_rotation_mode(system_settings_key_e key, void *value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_auto_rotation_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_auto_rotation_mode(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_screen_backlight_time(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_screen_backlight_time(system_settings_key_e key, void *value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_screen_backlight_time(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_screen_backlight_time(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_sound_notification(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_notification(system_settings_key_e key, void *value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_sound_notification(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_sound_notification(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_notification_repetition_period(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_notification_repetition_period(system_settings_key_e key, void *value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_notification_repetition_period(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_notification_repetition_period(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_device_name(system_settings_key_e key, void **value); -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_device_name(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_device_name(system_settings_key_e key); - -/** - * @internal - * @since_tizen 2.3 - * @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_get_network_flight_mode(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_network_flight_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_network_flight_mode(system_settings_key_e key); - - - -/** - * @internal - * @since_tizen 2.3 - * @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_get_network_wifi_notification(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_network_wifi_notification(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_network_wifi_notification(system_settings_key_e key); - - -/** - * @internal - * @brief get current Idle Lock State - * @since_tizen 2.3.1 - * @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_get_lock_state(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 2.3 - * @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_lock_state(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 2.3 - * @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_changed_callback_lock_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 2.3 - * @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_unset_changed_callback_lock_state(system_settings_key_e key); - -/** - * @internal - * @brief get current ADS ID - * @since_tizen 3.0 - * @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_get_ads_id(system_settings_key_e key, void **value); - -/** - * @internal - * @brief set ADS ID - * @since_tizen 3.0 - * @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_ads_id(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 3.0 - * @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_changed_callback_ads_id(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 3.0 - * @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_unset_changed_callback_ads_id(system_settings_key_e key); - -/** - * @internal - * @brief get current UDS status - * @since_tizen 3.0 - * @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_get_uds_state(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 3.0 - * @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_changed_callback_uds_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 3.0 - * @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_unset_changed_callback_uds_state(system_settings_key_e key); - - -/** - * @internal - * @since_tizen 3.0 - * @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_changed_callback_uds_pkg_list(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - - -/** - * @internal - * @since_tizen 4.0 - * @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_get_accessibility_tts(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_accessibility_tts(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 4.0 - * @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_changed_callback_accessibility_tts(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); -/** - * @internal - * @since_tizen 4.0 - * @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_unset_changed_callback_accessibility_tts(system_settings_key_e key); - -/** - * @internal - * @since_tizen 4.0 - * @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_get_vibration(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 4.0 - * @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_vibration(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 4.0 - * @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_changed_callback_vibration(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 4.0 - * @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_unset_changed_callback_vibration(system_settings_key_e key); - -/** - * @internal - * @since_tizen 5.0 - * @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_get_automatic_time_update(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 5.0 - * @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_automatic_time_update(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 5.0 - * @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_changed_callback_automatic_time_update(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 5.0 - * @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_unset_changed_callback_automatic_time_update(system_settings_key_e key); - -/** - * @internal - * @since_tizen 5.0 - * @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_get_developer_option_state(system_settings_key_e key, void **value); - -/** - * @internal - * @since_tizen 5.0 - * @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_developer_option_state(system_settings_key_e key, void *value); - -/** - * @internal - * @since_tizen 5.0 - * @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_changed_callback_developer_option_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @internal - * @since_tizen 5.0 - * @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_unset_changed_callback_developer_option_state(system_settings_key_e key); - -/** - * @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_get_accessibility_grayscale(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_accessibility_grayscale(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_changed_callback_accessibility_grayscale(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @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_unset_changed_callback_accessibility_grayscale(system_settings_key_e key); - -/** - * @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_get_accessibility_negative_color(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_accessibility_negative_color(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_changed_callback_accessibility_negative_color(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @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_unset_changed_callback_accessibility_negative_color(system_settings_key_e key); - -/** - * @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_get_rotary_event_enabled(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_rotary_event_enabled(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_changed_callback_rotary_event_enabled(system_settings_key_e key, system_settings_changed_cb callback, void *user_data); - -/** - * @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_unset_changed_callback_rotary_event_enabled(system_settings_key_e key); - -/** - * @internal - * @since_tizen 3.0 - * @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 + * @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_unset_changed_callback_uds_pkg_list(system_settings_key_e key); +int system_setting_get_time_changed(system_setting_h item, void **value); /** * @internal diff --git a/src/system_setting_platform.c b/src/system_setting_platform.c index 976d78b..67d86f3 100644 --- a/src/system_setting_platform.c +++ b/src/system_setting_platform.c @@ -90,11 +90,11 @@ static void dl_font_config_set_notification(); * @return the ringtone file path specified by user in normal case * if it's not accessable, return the default ringtone path */ -int system_setting_get_incoming_call_ringtone(system_settings_key_e key, void **value) +int system_setting_get_incoming_call_ringtone(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; - if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, &vconf_value)) { + if (system_setting_vconf_get_value_string(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -104,7 +104,7 @@ int system_setting_get_incoming_call_ringtone(system_settings_key_e key, void ** if (is_load == 0) { *value = vconf_value; } else { /* not zero on errro */ - *value = vconf_get_str(VCONFKEY_SETAPPL_CALL_RINGTONE_DEFAULT_PATH_STR); + *value = vconf_get_str(item->vconf_key); free(vconf_value); } @@ -113,11 +113,12 @@ int system_setting_get_incoming_call_ringtone(system_settings_key_e key, void ** } -int system_setting_get_email_alert_ringtone(system_settings_key_e key, void **value) +/* LCOV_EXCL_START */ +int system_setting_get_email_alert_ringtone(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; - if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, &vconf_value)) { + if (system_setting_vconf_get_value_string(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -133,9 +134,10 @@ int system_setting_get_email_alert_ringtone(system_settings_key_e key, void **va return SYSTEM_SETTINGS_ERROR_NONE; } +/* LCOV_EXCL_STOP */ -int system_setting_get_default_font_type(system_settings_key_e key, void **value) +int system_setting_get_default_font_type(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; char *font_name = dl_get_default_font_info(); @@ -149,14 +151,13 @@ int system_setting_get_default_font_type(system_settings_key_e key, void **value /*////////////////////////////////////////////////////////////////////////////////////////////////// */ - - /** * get current lock scren app package name (string) * * @return SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE raise exception if current lock type is 'password' */ -int system_setting_get_lockscreen_app(system_settings_key_e key, void **value) +/* LCOV_EXCL_START */ +int system_setting_get_lockscreen_app(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; char *pkg_name = NULL; @@ -165,7 +166,7 @@ int system_setting_get_lockscreen_app(system_settings_key_e key, void **value) return SYSTEM_SETTINGS_ERROR_IO_ERROR; } - if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, &pkg_name)) { + if (system_setting_vconf_get_value_string(item->vconf_key, &pkg_name)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -177,7 +178,7 @@ int system_setting_get_lockscreen_app(system_settings_key_e key, void **value) *value = pkg_name; return SYSTEM_SETTINGS_ERROR_NONE; } - +/* LCOV_EXCL_STOP */ /*////////////////////////////////////////////////////////////////////////////////////////////////// */ @@ -392,7 +393,7 @@ int system_setting_list_incoming_call_ringtone(system_settings_key_e key, system /* LCOV_EXCL_START */ -int system_setting_set_incoming_call_ringtone(system_settings_key_e key, void *value) +int system_setting_set_incoming_call_ringtone(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value; @@ -400,7 +401,7 @@ int system_setting_set_incoming_call_ringtone(system_settings_key_e key, void *v int ret = _is_file_accessible(vconf_value); if (ret == 0) { - if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } } else { @@ -414,7 +415,7 @@ int system_setting_set_incoming_call_ringtone(system_settings_key_e key, void *v /* LCOV_EXCL_START */ -int system_setting_set_email_alert_ringtone(system_settings_key_e key, void *value) +int system_setting_set_email_alert_ringtone(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value; @@ -422,7 +423,7 @@ int system_setting_set_email_alert_ringtone(system_settings_key_e key, void *val int ret = _is_file_accessible(vconf_value); if (ret == 0) { - if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } } else { @@ -729,7 +730,7 @@ static int system_setting_check_extended_wallpaper(const char *file_path) #define WALLPAPER_MAX_COUNT 10 #endif /* LCOV_EXCL_START */ -int system_setting_set_wallpaper_home_screen(system_settings_key_e key, void *value) +int system_setting_set_wallpaper_home_screen(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value; @@ -748,7 +749,7 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, void *va if (_is_file_accessible(vconf_value) != 0) return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; #ifdef TIZEN_MOBILE - if (system_setting_vconf_set_value_string(VCONFKEY_BGSET, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } #endif @@ -810,7 +811,7 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, void *va } } - if (system_setting_vconf_set_value_string(VCONFKEY_BGSET, file_name_buffer)) { + if (system_setting_vconf_set_value_string(item->vconf_key, file_name_buffer)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -819,7 +820,7 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, void *va return SYSTEM_SETTINGS_ERROR_IO_ERROR; } } else { - if (system_setting_vconf_set_value_string(VCONFKEY_BGSET, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } } @@ -830,7 +831,7 @@ int system_setting_set_wallpaper_home_screen(system_settings_key_e key, void *va /* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ -int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, void *value) +int system_setting_set_wallpaper_lock_screen(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value; @@ -849,7 +850,7 @@ int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, void *va if (_is_file_accessible(vconf_value) != 0) return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; - if (system_setting_vconf_set_value_string(VCONFKEY_IDLE_LOCK_BGSET, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -858,7 +859,7 @@ int system_setting_set_wallpaper_lock_screen(system_settings_key_e key, void *va /* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ -int system_setting_set_font_size(system_settings_key_e key, void *value) +int system_setting_set_font_size(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; int *vconf_value; @@ -868,7 +869,7 @@ int system_setting_set_font_size(system_settings_key_e key, void *value) return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; } - if (system_setting_vconf_set_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, *vconf_value)) { + if (system_setting_vconf_set_value_int(item->vconf_key, *vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } dl_font_size_set(); @@ -978,7 +979,7 @@ void *font_conf_doc_parse(char *doc_name, char *font_name) /* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ -int system_setting_set_font_type(system_settings_key_e key, void *value) +int system_setting_set_font_type(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *font_name = NULL; @@ -1015,7 +1016,7 @@ int system_setting_set_font_type(system_settings_key_e key, void *value) char *vconf_value; vconf_value = (char *)value; - if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } return SYSTEM_SETTINGS_ERROR_NONE; @@ -1046,7 +1047,7 @@ static int category_func(const char *name, void *user_data) */ /* LCOV_EXCL_START */ -int system_setting_set_lockscreen_app(system_settings_key_e key, void *value) +int system_setting_set_lockscreen_app(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value; @@ -1092,140 +1093,18 @@ int system_setting_set_lockscreen_app(system_settings_key_e key, void *value) /* LCOV_EXCL_STOP */ /*/////////////////////////////////////////////////////////////////////////////////////////////// */ -/* */ - -int system_setting_set_changed_callback_incoming_call_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_incoming_call_ringtone(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - -int system_setting_set_changed_callback_email_alert_ringtone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_email_alert_ringtone(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - -int system_setting_set_changed_callback_wallpaper_home_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_BGSET, SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_wallpaper_home_screen(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_BGSET, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - -int system_setting_set_changed_callback_wallpaper_lock_screen(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_IDLE_LOCK_BGSET, SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_wallpaper_lock_screen(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_IDLE_LOCK_BGSET, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - -int system_setting_set_changed_callback_font_size(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, SYSTEM_SETTINGS_KEY_FONT_SIZE, SYSTEM_SETTING_CALLBACK_SLOT_1, user_data); -} - -int system_setting_unset_changed_callback_font_size(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, SYSTEM_SETTING_CALLBACK_SLOT_1); -} - -int system_setting_set_changed_callback_usb_debugging_option(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, SYSTEM_SETTING_CALLBACK_SLOT_1, user_data); -} - -int system_setting_unset_changed_callback_usb_debugging_option(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_1); -} - -int system_setting_set_changed_callback_3g_data_network(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_3G_ENABLE, SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, SYSTEM_SETTING_CALLBACK_SLOT_1, user_data); -} - -int system_setting_unset_changed_callback_3g_data_network(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_3G_ENABLE, SYSTEM_SETTING_CALLBACK_SLOT_1); -} - -int system_setting_set_changed_callback_lockscreen_app(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, SYSTEM_SETTING_CALLBACK_SLOT_1, user_data); -} - -int system_setting_unset_changed_callback_lockscreen_app(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, SYSTEM_SETTING_CALLBACK_SLOT_1); -} - - /** * @todo need to add custom event notification method */ -int system_setting_set_changed_callback_font_type(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, SYSTEM_SETTINGS_KEY_FONT_TYPE, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_font_type(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, SYSTEM_SETTING_CALLBACK_SLOT_2); -} -/* TODO : 2th argument, callback, is not in use. */ -int system_setting_set_changed_callback_motion_activation(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -int system_setting_unset_changed_callback_motion_activation(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_MOTION_ACTIVATION, SYSTEM_SETTING_CALLBACK_SLOT_3); -} /*//////////////////////////////////////////////////////////////////////////////////////// */ /*--------------------------------------- */ -int system_setting_get_locale_country(system_settings_key_e key, void **value) +int system_setting_get_locale_country(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; - if (system_setting_vconf_get_value_string(VCONFKEY_REGIONFORMAT, &vconf_value)) { + if (system_setting_vconf_get_value_string(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1248,7 +1127,7 @@ int system_setting_get_locale_country(system_settings_key_e key, void **value) } /* LCOV_EXCL_START */ -int system_setting_set_locale_country(system_settings_key_e key, void *value) +int system_setting_set_locale_country(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; @@ -1259,32 +1138,19 @@ int system_setting_set_locale_country(system_settings_key_e key, void *value) char arr[20]; snprintf(arr, 20, "%s.%s", vconf_value, ext); - if (system_setting_vconf_set_value_string(VCONFKEY_REGIONFORMAT, arr)) { + if (system_setting_vconf_set_value_string(item->vconf_key, arr)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } return SYSTEM_SETTINGS_ERROR_NONE; } /* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_locale_country(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_REGIONFORMAT, SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -int system_setting_unset_changed_callback_locale_country(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_REGIONFORMAT, SYSTEM_SETTING_CALLBACK_SLOT_3); -} - - /*--------------------------------------- */ -int system_setting_get_locale_language(system_settings_key_e key, void **value) +int system_setting_get_locale_language(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; - if (system_setting_vconf_get_value_string(VCONFKEY_LANGSET, &vconf_value)) { + if (system_setting_vconf_get_value_string(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1306,7 +1172,7 @@ int system_setting_get_locale_language(system_settings_key_e key, void **value) } /* LCOV_EXCL_START */ -int system_setting_set_locale_language(system_settings_key_e key, void *value) +int system_setting_set_locale_language(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; @@ -1317,34 +1183,21 @@ int system_setting_set_locale_language(system_settings_key_e key, void *value) char arr[20]; snprintf(arr, 20, "%s.%s", vconf_value, ext); - if (system_setting_vconf_set_value_string(VCONFKEY_LANGSET, arr)) { + if (system_setting_vconf_set_value_string(item->vconf_key, arr)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } return SYSTEM_SETTINGS_ERROR_NONE; } /* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_locale_language(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - /*return system_setting_vconf_set_changed_cb(VCONFKEY_LANGSET, SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, 3, user_data ); */ - return system_setting_vconf_set_changed_cb(VCONFKEY_LANGSET, SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, SYSTEM_SETTING_CALLBACK_SLOT_5, user_data); -} - -int system_setting_unset_changed_callback_locale_language(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_LANGSET, SYSTEM_SETTING_CALLBACK_SLOT_5); -} - /*--------------------------------------- */ /* LCOV_EXCL_START */ -int system_setting_get_locale_timeformat_24hour(system_settings_key_e key, void **value) +int system_setting_get_locale_timeformat_24hour(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; int vconf_value; - if (system_setting_vconf_get_value_int(VCONFKEY_REGIONFORMAT_TIME1224, &vconf_value)) { + if (system_setting_vconf_get_value_int(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1360,7 +1213,8 @@ int system_setting_get_locale_timeformat_24hour(system_settings_key_e key, void } /* LCOV_EXCL_STOP */ -int system_setting_set_locale_timeformat_24hour(system_settings_key_e key, void *value) +/* LCOV_EXCL_START */ +int system_setting_set_locale_timeformat_24hour(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; bool *vconf_value; @@ -1368,12 +1222,12 @@ int system_setting_set_locale_timeformat_24hour(system_settings_key_e key, void vconf_value = (bool *)value; if (*vconf_value) { - if (system_setting_vconf_set_value_int(VCONFKEY_REGIONFORMAT_TIME1224, VCONFKEY_TIME_FORMAT_24)) { + if (system_setting_vconf_set_value_int(item->vconf_key, VCONFKEY_TIME_FORMAT_24)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } } else { - if (system_setting_vconf_set_value_int(VCONFKEY_REGIONFORMAT_TIME1224, VCONFKEY_TIME_FORMAT_12)) { + if (system_setting_vconf_set_value_int(item->vconf_key, VCONFKEY_TIME_FORMAT_12)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1381,20 +1235,10 @@ int system_setting_set_locale_timeformat_24hour(system_settings_key_e key, void return SYSTEM_SETTINGS_ERROR_NONE; } +/* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_locale_timeformat_24hour(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_REGIONFORMAT_TIME1224, SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -int system_setting_unset_changed_callback_locale_timeformat_24hour(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_REGIONFORMAT_TIME1224, SYSTEM_SETTING_CALLBACK_SLOT_3); -} - -int system_setting_get_locale_timezone(system_settings_key_e key, void **value) +/* LCOV_EXCL_START */ +int system_setting_get_locale_timezone(system_setting_h item, void **value) { char tzpath[256]; ssize_t len = readlink(SETTING_TZONE_SYMLINK_PATH, tzpath, sizeof(tzpath)-1); @@ -1409,9 +1253,10 @@ int system_setting_get_locale_timezone(system_settings_key_e key, void **value) *value = strdup(&tzpath[20]); return SYSTEM_SETTINGS_ERROR_NONE; } +/* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ -int system_setting_set_locale_timezone(system_settings_key_e key, void *value) +int system_setting_set_locale_timezone(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *timezone_value = NULL; @@ -1424,7 +1269,7 @@ int system_setting_set_locale_timezone(system_settings_key_e key, void *value) if (is_load == 0) { alarmmgr_set_timezone(tz_path); - if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_TIMEZONE_ID, timezone_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, timezone_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } return SYSTEM_SETTINGS_ERROR_NONE; @@ -1433,41 +1278,8 @@ int system_setting_set_locale_timezone(system_settings_key_e key, void *value) } /* LCOV_EXCL_STOP */ - - -/* LCOV_EXCL_START */ -int system_setting_set_changed_callback_locale_timezone(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_TIMEZONE_ID, SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, SYSTEM_SETTING_CALLBACK_SLOT_4, user_data); -} -/* LCOV_EXCL_STOP */ - /* LCOV_EXCL_START */ -int system_setting_unset_changed_callback_locale_timezone(system_settings_key_e key) -{ - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_TIMEZONE_ID, SYSTEM_SETTING_CALLBACK_SLOT_4); -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_set_changed_callback_locale_timezone_changed(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_unset_changed_callback_locale_timezone_changed(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; -} -/* LCOV_EXCL_STOP */ - - -/* LCOV_EXCL_START */ -int system_setting_get_time_changed(system_settings_key_e key, void **value) +int system_setting_get_time_changed(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; time_t cur_tick; @@ -1481,46 +1293,22 @@ int system_setting_get_time_changed(system_settings_key_e key, void **value) } /* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_time_changed(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SYSTEM_TIME_CHANGED, SYSTEM_SETTINGS_KEY_TIME_CHANGED, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -int system_setting_unset_changed_callback_time_changed(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SYSTEM_TIME_CHANGED, SYSTEM_SETTING_CALLBACK_SLOT_3); -} - -int system_setting_set_changed_callback_sound_lock(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, SYSTEM_SETTINGS_KEY_SOUND_LOCK, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -int system_setting_unset_changed_callback_sound_lock(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_3); -} - /** - * a = VCONFKEY_SETAPPL_SOUND_STATUS_BOOL b = VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL + * a = VCONFKEY_SETAPPL_SOUND_STATUS_BOOL(==item->vconf_key) b = VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL * * a == false, b == false --> silent mode * a == true, b == false --> sound mode * a == false, b == true --> vibration mode */ /* LCOV_EXCL_START */ -int system_setting_get_sound_silent_mode(system_settings_key_e key, void **value) +int system_setting_get_sound_silent_mode(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; bool sound_cond; bool vib_cond; bool vconf_value; - if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, &sound_cond)) { + if (system_setting_vconf_get_value_bool(item->vconf_key, &sound_cond)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1540,12 +1328,12 @@ int system_setting_get_sound_silent_mode(system_settings_key_e key, void **value /* LCOV_EXCL_STOP */ /** - * a = VCONFKEY_SETAPPL_SOUND_STATUS_BOOL b = VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL + * a = VCONFKEY_SETAPPL_SOUND_STATUS_BOOL(==item->vconf_key) b = VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL * * a == false, b == false --> silent mode * a == true, b == false --> sound mode */ -int system_setting_set_sound_silent_mode(system_settings_key_e key, void *value) +int system_setting_set_sound_silent_mode(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; bool *vconf_value; @@ -1563,7 +1351,7 @@ int system_setting_set_sound_silent_mode(system_settings_key_e key, void *value) vconf_vib = false; } - if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, vconf_sound)) { + if (system_setting_vconf_set_value_bool(item->vconf_key, vconf_sound)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, vconf_vib)) { @@ -1573,48 +1361,8 @@ int system_setting_set_sound_silent_mode(system_settings_key_e key, void *value) return SYSTEM_SETTINGS_ERROR_NONE; } - - -/* TODO */ -int system_setting_set_changed_callback_sound_silent_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -/* TODO */ -int system_setting_unset_changed_callback_sound_silent_mode(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_3); -} - -int system_setting_set_changed_callback_sound_touch(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, SYSTEM_SETTINGS_KEY_SOUND_TOUCH, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_sound_touch(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -int system_setting_set_changed_callback_auto_rotation_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_auto_rotation_mode(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - /* LCOV_EXCL_START */ -int system_setting_set_screen_backlight_time(system_settings_key_e key, void *value) +int system_setting_set_screen_backlight_time(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; int *vconf_value; @@ -1625,7 +1373,7 @@ int system_setting_set_screen_backlight_time(system_settings_key_e key, void *va return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; } - if (system_setting_vconf_set_value_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, *vconf_value)) { + if (system_setting_vconf_set_value_int(item->vconf_key, *vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } SETTING_TRACE_END; @@ -1633,20 +1381,8 @@ int system_setting_set_screen_backlight_time(system_settings_key_e key, void *va } /* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_screen_backlight_time(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_screen_backlight_time(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - /* LCOV_EXCL_START */ -int system_setting_set_sound_notification(system_settings_key_e key, void *value) +int system_setting_set_sound_notification(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; @@ -1655,7 +1391,7 @@ int system_setting_set_sound_notification(system_settings_key_e key, void *value int is_load = _is_file_accessible(vconf_value); if (is_load == 0) { //SETTING_TRACE(" system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, %s) TRY", vconf_value); - if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { //SETTING_TRACE(" system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, %s) FAIL", vconf_value); return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1668,30 +1404,6 @@ int system_setting_set_sound_notification(system_settings_key_e key, void *value } /* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_sound_notification(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_sound_notification(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - -int system_setting_set_changed_callback_notification_repetition_period(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD, SYSTEM_SETTING_CALLBACK_SLOT_1, user_data); -} - -int system_setting_unset_changed_callback_notification_repetition_period(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, SYSTEM_SETTING_CALLBACK_SLOT_1); -} - /* LCOV_EXCL_START */ int system_setting_set_device_name(system_settings_key_e key, void *value) { @@ -1707,35 +1419,11 @@ int system_setting_set_device_name(system_settings_key_e key, void *value) } /* LCOV_EXCL_STOP */ -int system_setting_set_changed_callback_device_name(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_DEVICE_NAME_STR, SYSTEM_SETTINGS_KEY_DEVICE_NAME, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_device_name(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_DEVICE_NAME_STR, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - -int system_setting_set_changed_callback_network_flight_mode(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_TELEPHONY_FLIGHT_MODE, SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} - -int system_setting_unset_changed_callback_network_flight_mode(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_TELEPHONY_FLIGHT_MODE, SYSTEM_SETTING_CALLBACK_SLOT_3); -} - -int system_setting_get_network_wifi_notification(system_settings_key_e key, void **value) +int system_setting_get_network_wifi_notification(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; int vconf_value; - if (system_setting_vconf_get_value_int(VCONFKEY_WIFI_ENABLE_QS, &vconf_value)) { + if (system_setting_vconf_get_value_int(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } bool bret ; @@ -1745,37 +1433,11 @@ int system_setting_get_network_wifi_notification(system_settings_key_e key, void return SYSTEM_SETTINGS_ERROR_NONE; } -int system_setting_set_changed_callback_network_wifi_notification(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_WIFI_ENABLE_QS, SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, SYSTEM_SETTING_CALLBACK_SLOT_4, user_data); -} - -int system_setting_unset_changed_callback_network_wifi_notification(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_WIFI_ENABLE_QS, SYSTEM_SETTING_CALLBACK_SLOT_4); -} - -/* LCOV_EXCL_START */ -int system_setting_set_changed_callback_lock_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - return system_setting_vconf_set_changed_cb(VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, SYSTEM_SETTINGS_KEY_LOCK_STATE, SYSTEM_SETTING_CALLBACK_SLOT_4, user_data); -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_unset_changed_callback_lock_state(system_settings_key_e key) -{ - return system_setting_vconf_unset_changed_cb(VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, SYSTEM_SETTING_CALLBACK_SLOT_4); -} -/* LCOV_EXCL_STOP */ - //---------------------------------------------------------------------------------------------------------------------------- #define DEFAULT_ADS_ID "00000000-0000-0000-0000-000000000000" -int system_setting_get_ads_id(system_settings_key_e key, void **value) +int system_setting_get_ads_id(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; int optout_value = 0; @@ -1789,7 +1451,7 @@ int system_setting_get_ads_id(system_settings_key_e key, void **value) } char *vconf_value = NULL; - if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_AD_ID, &vconf_value)) { + if (system_setting_vconf_get_value_string(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1808,13 +1470,13 @@ void make_ad_id(void) system_setting_set_ad_id(key, uuid_unparsed); //example of setting the value } #endif -int system_setting_set_ads_id(system_settings_key_e key, void *value) +int system_setting_set_ads_id(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; char *vconf_value = NULL; vconf_value = (char *)value; - if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_AD_ID, vconf_value)) { + if (system_setting_vconf_set_value_string(item->vconf_key, vconf_value)) { SETTING_TRACE("Setting VCONFKEY_SETAPPL_AD_ID failed"); return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -1822,18 +1484,6 @@ int system_setting_set_ads_id(system_settings_key_e key, void *value) return SYSTEM_SETTINGS_ERROR_NONE; } -int system_setting_set_changed_callback_ads_id(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_AD_ID, SYSTEM_SETTINGS_KEY_ADS_ID, SYSTEM_SETTING_CALLBACK_SLOT_0, user_data); -} - -int system_setting_unset_changed_callback_ads_id(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_AD_ID, SYSTEM_SETTING_CALLBACK_SLOT_0); -} - int system_settings_feature_check_bool(char *path) { bool feature_data = false; @@ -1967,6 +1617,7 @@ int system_setting_feature_check_accessibility_negative(void *value) return ret; } +/* LCOV_EXCL_START */ int system_setting_feature_check_wearable_profile(void *value) { static bool first_query = true; @@ -1996,15 +1647,16 @@ int system_setting_feature_check_wearable_profile(void *value) return ret; } +/* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ -int system_setting_get_uds_state(system_settings_key_e key, void **value) +int system_setting_get_uds_state(system_setting_h item, void **value) { int ** p_value = (int**)value; int vconf_value; char *vconf_string_value = NULL; - if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_UDSM, &vconf_value)) { + if (system_setting_vconf_get_value_int(item->vconf_key, &vconf_value)) { return SYSTEM_SETTINGS_ERROR_IO_ERROR; } @@ -2059,119 +1711,3 @@ int system_setting_get_uds_state(system_settings_key_e key, void **value) return SYSTEM_SETTINGS_ERROR_NONE; } /* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_set_changed_callback_uds_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_UDSM, SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE, SYSTEM_SETTING_CALLBACK_SLOT_4, user_data); -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_unset_changed_callback_uds_state(system_settings_key_e key) -{ - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_UDSM, SYSTEM_SETTING_CALLBACK_SLOT_4); -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_set_changed_callback_uds_pkg_list(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_UDSM_PKGID_LIST, SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST, SYSTEM_SETTING_CALLBACK_SLOT_4, user_data); -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_unset_changed_callback_uds_pkg_list(system_settings_key_e key) -{ - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_UDSM_PKGID_LIST, SYSTEM_SETTING_CALLBACK_SLOT_4); -} -/* LCOV_EXCL_STOP */ - -int system_setting_set_changed_callback_accessibility_tts(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_accessibility_tts(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -int system_setting_set_changed_callback_vibration(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, SYSTEM_SETTINGS_KEY_VIBRATION, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_vibration(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -int system_setting_set_changed_callback_automatic_time_update(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_automatic_time_update(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -int system_setting_set_changed_callback_developer_option_state(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_DEVELOPER_OPTION_STATE, SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_developer_option_state(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_DEVELOPER_OPTION_STATE, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -int system_setting_set_changed_callback_accessibility_grayscale(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE, SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_accessibility_grayscale(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -int system_setting_set_changed_callback_accessibility_negative_color(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, SYSTEM_SETTING_CALLBACK_SLOT_2, user_data); -} - -int system_setting_unset_changed_callback_accessibility_negative_color(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, SYSTEM_SETTING_CALLBACK_SLOT_2); -} - -/* LCOV_EXCL_START */ -int system_setting_set_changed_callback_rotary_event_enabled(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ROTARY_EVENT_ENABLED_BOOL, SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, SYSTEM_SETTING_CALLBACK_SLOT_3, user_data); -} -/* LCOV_EXCL_STOP */ - -/* LCOV_EXCL_START */ -int system_setting_unset_changed_callback_rotary_event_enabled(system_settings_key_e key) -{ - SETTING_TRACE_BEGIN; - return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ROTARY_EVENT_ENABLED_BOOL, SYSTEM_SETTING_CALLBACK_SLOT_3); -} -/* LCOV_EXCL_STOP */ diff --git a/src/system_settings.c b/src/system_settings.c index c5b36a6..634a36b 100644 --- a/src/system_settings.c +++ b/src/system_settings.c @@ -1,4 +1,5 @@ -/* * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved +/* + * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved * * Licensed under the Apache License, Version 2.0 (the License); * you may not use this file except in compliance with the License. @@ -30,6 +31,7 @@ #define LOG_TAG "TIZEN_N_SYSTEM_SETTINGS" #define SYSTEM_SETTINGS_MAX -1 +#define GET_SLOT(x) ((x)%4) system_setting_s system_setting_table[] = { @@ -39,8 +41,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_incoming_call_ringtone, system_setting_set_incoming_call_ringtone, - system_setting_set_changed_callback_incoming_call_ringtone, - system_setting_unset_changed_callback_incoming_call_ringtone, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, system_setting_add_incoming_call_ringtone, /* ADD */ system_setting_del_incoming_call_ringtone, /* DEL */ @@ -56,8 +58,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_vconf, system_setting_set_wallpaper_home_screen, - system_setting_set_changed_callback_wallpaper_home_screen, - system_setting_unset_changed_callback_wallpaper_home_screen, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -73,8 +75,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_vconf, system_setting_set_wallpaper_lock_screen, - system_setting_set_changed_callback_wallpaper_lock_screen, - system_setting_unset_changed_callback_wallpaper_lock_screen, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -90,8 +92,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_INT, system_setting_get_vconf, system_setting_set_font_size, - system_setting_set_changed_callback_font_size, - system_setting_unset_changed_callback_font_size, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -107,8 +109,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_vconf, system_setting_set_font_type, - system_setting_set_changed_callback_font_type, - system_setting_unset_changed_callback_font_type, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -124,8 +126,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_motion_activation, - system_setting_unset_changed_callback_motion_activation, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -141,8 +143,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_email_alert_ringtone, system_setting_set_email_alert_ringtone, - system_setting_set_changed_callback_email_alert_ringtone, - system_setting_unset_changed_callback_email_alert_ringtone, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -157,8 +159,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_usb_debugging_option, - system_setting_unset_changed_callback_usb_debugging_option, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -173,8 +175,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_3g_data_network, - system_setting_unset_changed_callback_3g_data_network, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -192,8 +194,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_lockscreen_app, system_setting_set_lockscreen_app, - system_setting_set_changed_callback_lockscreen_app, - system_setting_unset_changed_callback_lockscreen_app, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -224,8 +226,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_locale_country, system_setting_set_locale_country, - system_setting_set_changed_callback_locale_country, - system_setting_unset_changed_callback_locale_country, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -240,8 +242,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_locale_language, system_setting_set_locale_language, - system_setting_set_changed_callback_locale_language, - system_setting_unset_changed_callback_locale_language, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -256,8 +258,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_locale_timeformat_24hour, system_setting_set_locale_timeformat_24hour, - system_setting_set_changed_callback_locale_timeformat_24hour, - system_setting_unset_changed_callback_locale_timeformat_24hour, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -272,8 +274,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_locale_timezone, system_setting_set_locale_timezone, - system_setting_set_changed_callback_locale_timezone, - system_setting_unset_changed_callback_locale_timezone, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -288,8 +290,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_INT, system_setting_get_time_changed, NULL, - system_setting_set_changed_callback_time_changed, - system_setting_unset_changed_callback_time_changed, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -304,8 +306,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, NULL, - system_setting_set_changed_callback_sound_lock, - system_setting_unset_changed_callback_sound_lock, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -320,8 +322,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_sound_silent_mode, system_setting_set_sound_silent_mode, - system_setting_set_changed_callback_sound_silent_mode, - system_setting_unset_changed_callback_sound_silent_mode, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -336,8 +338,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_sound_touch, - system_setting_unset_changed_callback_sound_touch, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -352,8 +354,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_auto_rotation_mode, - system_setting_unset_changed_callback_auto_rotation_mode, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -368,8 +370,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_vconf, NULL, - system_setting_set_changed_callback_device_name, - system_setting_unset_changed_callback_device_name, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -384,8 +386,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, NULL, - system_setting_set_changed_callback_motion_activation, - system_setting_unset_changed_callback_motion_activation, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -400,8 +402,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_network_wifi_notification, NULL, - system_setting_set_changed_callback_network_wifi_notification, - system_setting_unset_changed_callback_network_wifi_notification, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -416,8 +418,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, NULL, - system_setting_set_changed_callback_network_flight_mode, - system_setting_unset_changed_callback_network_flight_mode, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -432,8 +434,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_INT, system_setting_get_vconf, system_setting_set_screen_backlight_time, - system_setting_set_changed_callback_screen_backlight_time, - system_setting_unset_changed_callback_screen_backlight_time, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -448,8 +450,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_vconf, system_setting_set_sound_notification, - system_setting_set_changed_callback_sound_notification, - system_setting_unset_changed_callback_sound_notification, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -464,8 +466,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_INT, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_notification_repetition_period, - system_setting_unset_changed_callback_notification_repetition_period, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -480,8 +482,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_INT, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_lock_state, - system_setting_unset_changed_callback_lock_state, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* add */ NULL, /* del */ @@ -496,8 +498,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, system_setting_get_ads_id, system_setting_set_ads_id, - system_setting_set_changed_callback_ads_id, - system_setting_unset_changed_callback_ads_id, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* add */ NULL, /* del */ @@ -513,8 +515,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_INT, system_setting_get_uds_state, NULL, - system_setting_set_changed_callback_uds_state, - system_setting_unset_changed_callback_uds_state, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* add */ NULL, /* del */ @@ -529,8 +531,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_STRING, NULL, NULL, - system_setting_set_changed_callback_uds_pkg_list, - system_setting_unset_changed_callback_uds_pkg_list, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* add */ NULL, /* del */ @@ -545,8 +547,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_accessibility_tts, - system_setting_unset_changed_callback_accessibility_tts, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -561,8 +563,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_vibration, - system_setting_unset_changed_callback_vibration, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -577,8 +579,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_automatic_time_update, - system_setting_unset_changed_callback_automatic_time_update, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -593,8 +595,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_developer_option_state, - system_setting_unset_changed_callback_developer_option_state, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -609,8 +611,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_accessibility_grayscale, - system_setting_unset_changed_callback_accessibility_grayscale, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -625,8 +627,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_accessibility_negative_color, - system_setting_unset_changed_callback_accessibility_negative_color, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -641,8 +643,8 @@ system_setting_s system_setting_table[] = { SYSTEM_SETTING_DATA_TYPE_BOOL, system_setting_get_vconf, system_setting_set_vconf, - system_setting_set_changed_callback_rotary_event_enabled, - system_setting_unset_changed_callback_rotary_event_enabled, + system_setting_set_changed_vconf_genernal_callback, + system_setting_unset_changed_vconf_genernal_callback, NULL, NULL, /* ADD */ NULL, /* DEL */ @@ -738,6 +740,7 @@ int system_settings_get_item(system_settings_key_e key, system_setting_h *item) } #else +/* LCOV_EXCL_START */ int binary_search_for_item(system_settings_key_e key) { int start = 0; @@ -757,8 +760,10 @@ int binary_search_for_item(system_settings_key_e key) LOGE("Enter [%s], key=%d, Can NOT find the key", __FUNCTION__, key); return -1; } +/* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ int system_settings_get_item(system_settings_key_e key, system_setting_h *item) { LOGE("Enter [%s], key=%d", __FUNCTION__, key); @@ -787,25 +792,16 @@ int system_settings_get_item(system_settings_key_e key, system_setting_h *item) } #endif +/* LCOV_EXCL_STOP */ -int system_setting_get_vconf(system_settings_key_e key, void **value) +int system_setting_get_vconf(system_setting_h item, void **value) { SETTING_TRACE_BEGIN; - system_setting_h item; char *vconf_char; int vconf_int; int **val = (int**)value; bool vconf_bool; - int ret = system_settings_get_item(key, &item); - if (ret != 0) { - if (ret == SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER) { - _dump_context_node(key); - LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER); - } - return ret; - } - switch(item->data_type) { case SYSTEM_SETTING_DATA_TYPE_STRING: if (system_setting_vconf_get_value_string(item->vconf_key, &vconf_char)) @@ -830,23 +826,15 @@ int system_setting_get_vconf(system_settings_key_e key, void **value) return SYSTEM_SETTINGS_ERROR_NONE; } -int system_setting_set_vconf(system_settings_key_e key, void *value) + +/* LCOV_EXCL_START */ +int system_setting_set_vconf(system_setting_h item, void *value) { SETTING_TRACE_BEGIN; - system_setting_h item; char *vconf_char; int vconf_int; bool vconf_bool; - int ret = system_settings_get_item(key, &item); - if (ret != 0) { - if (ret == SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER) { - _dump_context_node(key); - LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER); - } - return ret; - } - switch(item->data_type) { case SYSTEM_SETTING_DATA_TYPE_STRING: vconf_char = (char*)value; @@ -870,6 +858,7 @@ int system_setting_set_vconf(system_settings_key_e key, void *value) return SYSTEM_SETTINGS_ERROR_NONE; } +/* LCOV_EXCL_STOP */ int system_settings_get_value(system_settings_key_e key, system_setting_data_type_e data_type, void **value) { @@ -903,7 +892,7 @@ int system_settings_get_value(system_settings_key_e key, system_setting_data_typ return SYSTEM_SETTINGS_ERROR_IO_ERROR; } - return system_setting_getter(key, value); + return system_setting_getter(system_setting_item, value); } /* LCOV_EXCL_START */ @@ -939,12 +928,13 @@ int system_settings_set_value(system_settings_key_e key, system_setting_data_typ return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED; } - return system_setting_setter(key, value); + return system_setting_setter(system_setting_item, value); } /* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ int system_settings_add_value(system_settings_key_e key, system_setting_data_type_e data_type, void *value) { LOGE("Enter [%s]", __FUNCTION__); @@ -979,8 +969,10 @@ int system_settings_add_value(system_settings_key_e key, system_setting_data_typ return system_setting_adder(key, value); } +/* LCOV_EXCL_STOP */ +/* LCOV_EXCL_START */ int system_settings_del_value(system_settings_key_e key, system_setting_data_type_e data_type, void *value) { LOGE("Enter [%s]", __FUNCTION__); @@ -1014,11 +1006,10 @@ int system_settings_del_value(system_settings_key_e key, system_setting_data_typ return system_setting_deler(key, value); } +/* LCOV_EXCL_STOP */ - - - +/* LCOV_EXCL_START */ int system_settings_list_value(system_settings_key_e key, system_setting_data_type_e data_type, bool (*system_setting_data_iterator)(int, const char* , void *), void *user_data) { LOGE("Enter [%s]", __FUNCTION__); @@ -1054,11 +1045,7 @@ int system_settings_list_value(system_settings_key_e key, system_setting_data_ty return system_setting_lister(key, system_setting_data_iterator, user_data); } - - - - - +/* LCOV_EXCL_STOP */ /* LCOV_EXCL_START */ int system_settings_set_value_int(system_settings_key_e key, int value) @@ -1154,6 +1141,17 @@ int system_settings_get_value_string(system_settings_key_e key, char **value) return system_settings_get_value(key, SYSTEM_SETTING_DATA_TYPE_STRING, (void **)value); } +int system_setting_set_changed_vconf_genernal_callback(system_setting_h item, void *user_data) +{ + SETTING_TRACE_BEGIN; + return system_setting_vconf_set_changed_cb(item->vconf_key, item->key, GET_SLOT(item->key), user_data); +} + +int system_setting_unset_changed_vconf_genernal_callback(system_setting_h item) +{ + SETTING_TRACE_BEGIN; + return system_setting_vconf_unset_changed_cb(item->vconf_key, GET_SLOT(item->key)); +} /*PUBLIC*/ int system_settings_set_changed_cb(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) @@ -1191,7 +1189,7 @@ int system_settings_set_changed_cb(system_settings_key_e key, system_settings_ch return SYSTEM_SETTINGS_ERROR_IO_ERROR; } - return system_setting_set_changed_cb(key, callback, user_data); + return system_setting_set_changed_cb(system_setting_item, user_data); } @@ -1227,13 +1225,12 @@ int system_settings_unset_changed_cb(system_settings_key_e key) return SYSTEM_SETTINGS_ERROR_IO_ERROR; } - return system_setting_unset_changed_cb(key); + return system_setting_unset_changed_cb(system_setting_item); } int system_settings_add_changed_cb(system_settings_key_e key, system_settings_changed_cb callback, void *user_data) { LOGE("Enter [%s]", __FUNCTION__); - char *vconf_string = NULL; system_setting_h system_setting_item; if (callback == NULL) @@ -1249,8 +1246,10 @@ int system_settings_add_changed_cb(system_settings_key_e key, system_settings_ch return ret; } - system_settings_vconf_get_key_string(key, &vconf_string); - LOGE("[%s] key = %d %s", __FUNCTION__, key, vconf_string ? vconf_string : "NULL"); + if (system_setting_item->vconf_key == NULL) + return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; + + LOGE("[%s] key = %d %s", __FUNCTION__, key, system_setting_item->vconf_key); /* Store the callback function from application side */ ret = add_multi_callback(&system_setting_item->changed_cb_list, callback, user_data); @@ -1260,7 +1259,7 @@ int system_settings_add_changed_cb(system_settings_key_e key, system_settings_ch } if (!system_setting_item->changed_cb_list.is_registered) { - int ret = system_setting_vconf_set_changed_multi_cb(vconf_string, key); + int ret = system_setting_vconf_set_changed_multi_cb(system_setting_item->vconf_key, key); if (ret == SYSTEM_SETTINGS_ERROR_NONE) system_setting_item->changed_cb_list.is_registered = 1; LOGE("Leave [%s]", __FUNCTION__); @@ -1274,7 +1273,6 @@ int system_settings_add_changed_cb(system_settings_key_e key, system_settings_ch int system_settings_remove_changed_cb(system_settings_key_e key, system_settings_changed_cb callback) { LOGE("Enter [%s]", __FUNCTION__); - char *vconf_string = NULL; system_setting_h system_setting_item; if (callback == NULL) { @@ -1296,10 +1294,9 @@ int system_settings_remove_changed_cb(system_settings_key_e key, system_settings if (system_setting_item->changed_cb_list.list == NULL) { int ret = 0; - system_settings_vconf_get_key_string(key, &vconf_string); - if (vconf_string == NULL) + if (system_setting_item->vconf_key == NULL) return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER; - ret = system_setting_vconf_unset_changed_multi_cb(vconf_string, key); + ret = system_setting_vconf_unset_changed_multi_cb(system_setting_item->vconf_key, key); if (ret == SYSTEM_SETTINGS_ERROR_NONE) system_setting_item->changed_cb_list.is_registered = 0; LOGE("Leave [%s]", __FUNCTION__); diff --git a/src/system_settings_vconf.c b/src/system_settings_vconf.c index ca2bad2..047cbf2 100644 --- a/src/system_settings_vconf.c +++ b/src/system_settings_vconf.c @@ -30,49 +30,6 @@ #define LOG_TAG "TIZEN_N_SYSTEM_SETTINGS" -static char *_system_settings_vconf_table[] = { - VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, - VCONFKEY_BGSET, - VCONFKEY_IDLE_LOCK_BGSET, - VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, - VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_NAME, - VCONFKEY_SETAPPL_MOTION_ACTIVATION, - VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, - VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, - VCONFKEY_3G_ENABLE, - NULL, - VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, - NULL, - VCONFKEY_REGIONFORMAT, - VCONFKEY_LANGSET, - VCONFKEY_REGIONFORMAT_TIME1224, - VCONFKEY_SETAPPL_TIMEZONE_ID, - VCONFKEY_SYSTEM_TIME_CHANGED, - VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, - VCONFKEY_SETAPPL_SOUND_STATUS_BOOL, - VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, - VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, - VCONFKEY_SETAPPL_DEVICE_NAME_STR, - VCONFKEY_SETAPPL_MOTION_ACTIVATION, - VCONFKEY_WIFI_ENABLE_QS, - VCONFKEY_TELEPHONY_FLIGHT_MODE, - VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, - VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, - VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, - VCONFKEY_IDLE_LOCK_STATE_READ_ONLY, - VCONFKEY_SETAPPL_AD_ID, - VCONFKEY_SETAPPL_UDSM, - VCONFKEY_SETAPPL_UDSM_PKGID_LIST, - VCONFKEY_SETAPPL_ACCESSIBILITY_TTS, - VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL, - VCONFKEY_SETAPPL_STATE_AUTOMATIC_TIME_UPDATE_BOOL, - VCONFKEY_SETAPPL_DEVELOPER_OPTION_STATE, - VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE, - VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, - VCONFKEY_SETAPPL_ROTARY_EVENT_ENABLED_BOOL, - "MAX" -}; - int system_setting_vconf_get_value_int(const char *vconf_key, int *value) { return vconf_get_int(vconf_key, value); @@ -173,14 +130,6 @@ static void system_setting_vconf_event_cb4(keynode_t *node, void *event_data) } /* LCOV_EXCL_STOP */ -/* LCOV_EXCL_START */ -static void system_setting_vconf_event_cb5(keynode_t *node, void *event_data) -{ - system_setting_vconf_event_cb0(node, event_data); -} -/* LCOV_EXCL_STOP */ - - /* LCOV_EXCL_START */ static system_setting_vconf_event_cb system_setting_vconf_get_event_cb_slot(system_setting_callback_slot_e slot) { @@ -195,8 +144,6 @@ static system_setting_vconf_event_cb system_setting_vconf_get_event_cb_slot(syst return system_setting_vconf_event_cb3; case SYSTEM_SETTING_CALLBACK_SLOT_4: return system_setting_vconf_event_cb4; - case SYSTEM_SETTING_CALLBACK_SLOT_5: - return system_setting_vconf_event_cb5; default: return NULL; } @@ -214,11 +161,7 @@ int system_setting_vconf_set_changed_cb(const char *vconf_key, system_settings_k return SYSTEM_SETTINGS_ERROR_IO_ERROR; } -#if 1 if (vconf_notify_key_changed(vconf_key, vconf_event_cb, (void *)key)) -#else - if (vconf_notify_key_changed(vconf_key, vconf_event_cb, (void *)user_data)) -#endif { LOGE("[%s] INVALID_error , %s", __FUNCTION__, "vconf_notify_key_changed error"); return SYSTEM_SETTINGS_ERROR_IO_ERROR; @@ -240,21 +183,6 @@ int system_setting_vconf_unset_changed_cb(const char *vconf_key, system_setting_ return SYSTEM_SETTINGS_ERROR_NONE; } -int system_settings_vconf_get_key_string(system_settings_key_e key, char **key_string) -{ - if (key == SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE) { - *key_string = NULL; /* Not Supported changed callback*/ - return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED; - } - - *key_string = _system_settings_vconf_table[(int)key]; - - if (*key_string == NULL) - return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED; - - return SYSTEM_SETTINGS_ERROR_NONE; -} - static void system_setting_vconf_event_multi_cb(keynode_t *node, void *event_data) { LOGE("Enter [%s]", __FUNCTION__);