/**
* @brief Enumeration for system settings error.
+ * @since_tizen 2.3
*/
typedef enum
{
/**
* @brief Enumeration for System Settings Key.
+ * @since_tizen 2.3
*/
typedef enum {
SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, /**< (string) The file path of the current ringtone */
SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, /**< (string) The file path of the current lock screen wallpaper */
SYSTEM_SETTINGS_KEY_FONT_SIZE, /**< (int) The current system font size */
SYSTEM_SETTINGS_KEY_FONT_TYPE, /**< (string) The current system font type */
+
SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, /**< (bool) Indicates whether the motion service is activated */
- SYSTEM_SETTINGS_KEY_MOTION_ENABLED = SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, /**< @internal GET (bool) Indicates whether the device user has enabled the motion feature. */
SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, /**< (string) The file path of the current email alert ringtone */
- SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, /**< (bool) Indicates whether the USB debugging is enabled */
- SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, /**< @internal (bool) Indicates whether the 3G data network is enabled */
- SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, /**< @internal (int) Indicates delaying time of 'tab and hold' (sec) */
- SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, /**< (string) Indicates lockscreen app pkg name */
- SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE,/**< (string) The current system default font type (only support Get) */
+ SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, /**< (bool) Indicates whether the USB debugging is enabled (Since 2.4) */
+ SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, /**< bool) Indicates whether the 3G data network is enabled (Since 2.4) */
+ SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP = SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED+2, /**< (string) Indicates lockscreen app pkg name */
+ SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE,/**< (string) The current system default font type (only support Get) */
SYSTEM_SETTINGS_KEY_LOCALE_COUNTRY, /**< (string) Indicates the current country setting in the <LANGUAGE>_<REGION> syntax. The country setting is in the ISO 639-2 format, and the region setting is in the ISO 3166-1 alpha-2 format */
SYSTEM_SETTINGS_KEY_LOCALE_LANGUAGE, /**< (string) Indicates the current language setting in the <LANGUAGE>_<REGION> syntax. The language setting is in the ISO 639-2 format and the region setting is in the ISO 3166-1 alpha-2 format. */
-
SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, /**< (bool) Indicates whether the 24-hour clock is used. If the value is @c false, the 12-hour clock is used. */
SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE, /**< (string) Indicates the current time zone. */
- SYSTEM_SETTINGS_KEY_TIME_CHANGED, /**< (int) Once System changes time, this event occurs to notify time change. */
+ SYSTEM_SETTINGS_KEY_TIME_CHANGED, /**< (int) Once System changes time, this event occurs to notify time change. */
SYSTEM_SETTINGS_KEY_SOUND_LOCK, /**< GET (bool) Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound */
SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE, /**< GET (bool) Indicates whether the device is in the silent mode. */
SYSTEM_SETTINGS_KEY_SOUND_TOUCH, /**< GET (bool) Indicates whether the screen touch sound is enabled on the device. */
-
SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO, /**< GET (bool) Indicates whether rotation control is automatic.*/
SYSTEM_SETTINGS_KEY_DEVICE_NAME, /**< GET (string) Indicates device name. */
+ SYSTEM_SETTINGS_KEY_MOTION_ENABLED, /**< GET (bool) Indicates whether the device user has enabled the motion feature. */
SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION, /**< GET (bool) Indicates whether Wi-Fi-related notifications are enabled on the device. */
SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE, /**< GET (bool) Indicates whether the device is in the flight mode. */
-
SYSTEM_SETTINGS_KEY_SCREEN_BACKLIGHT_TIME, /**< (int) Indicates the backlight time (in seconds). @internal The following values can be used: 15, 30, 60, 120, 300, and 600. */
SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION, /**< (string) Indicates the file path of the current notification tone set by the user. */
} system_settings_key_e;
-/**
- * @internal
- * @brief Enumeration for tap and hold delay.
- */
-typedef enum {
- SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT = 500, /**< @internal 500 msec */
- SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM = 1000, /**< @internal 1000 msec */
- SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_LONG = 1500, /**< @internal 1500 msec */
-} system_settings_tap_and_hold_delay_e;
/**
* @brief Enumeration for font size.
+ * @since_tizen 2.3
*/
typedef enum {
SYSTEM_SETTINGS_FONT_SIZE_SMALL = 0, /**< A small size */
typedef void (*system_settings_changed_cb)(system_settings_key_e key, void *user_data);
/**
- * @internal
+ * @platform
* @brief Sets the system settings value associated with the given key as an integer.
* @since_tizen 2.3
* @privlevel platform
* @brief Gets the system settings value associated with the given key as an integer.
* @since_tizen 2.3
* @privlevel public
- * @privilege %http://tizen.org/privilege/systemsettings
* @param[in] key The key name of the system settings
* @param[out] value The current system settings value of the given key
* @return @c 0 on success, otherwise a negative error value
/**
- * @internal
+ * @platform
* @brief Sets the system settings value associated with the given key as a boolean.
* @since_tizen 2.3
* @privlevel platform
* @brief Gets the system settings value associated with the given key as a boolean.
* @since_tizen 2.3
* @privlevel public
- * @privilege %http://tizen.org/privilege/systemsettings
* @param[in] key The key name of the system settings
* @param[out] value The current system settings value of the given key
* @return @c 0 on success, otherwise a negative error value
int system_settings_get_value_bool(system_settings_key_e key, bool *value);
/**
- * @internal
+ * @platform
* @brief Sets the system settings value associated with the given key as a string.
* @since_tizen 2.3
* @privlevel platform
* @brief Gets the system settings value associated with the given key as a string.
* @since_tizen 2.3
* @privlevel public
- * @privilege %http://tizen.org/privilege/systemsettings
* @remarks You must release @a value using free().
* @param[in] key The key name of the system settings
* @param[out] value The current system settings value of the given key
* @brief Registers a change event callback for the given system settings key.
* @since_tizen 2.3
* @privlevel public
- * @privilege %http://tizen.org/privilege/systemsettings
* @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb.
* @param[in] key The key name of the system settings
* @param[in] callback The callback function to invoke
* @brief Unregisters the callback function.
* @since_tizen 2.3
* @privlevel public
- * @privilege %http://tizen.org/privilege/systemsettings
* @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb.
* @param[in] key The key name of the system settings
* @return 0 on success, otherwise a negative error value
*/
int system_setting_get_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_CALL_RINGTONE_PATH_STR, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_get_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_NOTI_MSG_RINGTONE_PATH_STR, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_get_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
if (system_setting_vconf_get_value_string(VCONFKEY_BGSET, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_get_wallpaper_lock_screen(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
if (system_setting_vconf_get_value_string(VCONFKEY_IDLE_LOCK_BGSET, &vconf_value)) {
/* [int] vconf GET */
int system_setting_get_font_size(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
int vconf_value;
if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_ACCESSIBILITY_FONT_SIZE, &vconf_value)) {
int system_setting_get_default_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *font_name = _get_default_font();
if (font_name) {
*value = (void *)font_name;
/* [int] vconf GET */
int system_setting_get_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *font_name = _get_cur_font();
*value = (void *)font_name;
int system_setting_get_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, &vconf_value)) {
int system_setting_get_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, &vconf_value)) {
int system_setting_get_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
if (system_setting_vconf_get_value_bool(VCONFKEY_3G_ENABLE, &vconf_value)) {
/*////////////////////////////////////////////////////////////////////////////////////////////////// */
-int system_setting_get_tap_and_hold_delay(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
-{
- char *vconf_value = NULL;
- if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, &vconf_value)) {
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
- }
-
- int val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM;
- if (vconf_value && strcmp(vconf_value, "IDS_COM_POP_SHORT") == 0) {
- val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT;
- } else if (vconf_value && strcmp(vconf_value, "IDS_ST_BODY_MEDIUM") == 0) {
- val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM;
- } else if (vconf_value && strcmp(vconf_value, "IDS_COM_POP_LONG") == 0) {
- val = SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_LONG;
- }
-
- *value = (void *)val; /* float */
- return SYSTEM_SETTINGS_ERROR_NONE;
-}
-
/**
* get current lock scren app package name (string)
*
*/
int system_setting_get_lockscreen_app(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *pkg_name = NULL;
int locktype = -1;
system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_SCREEN_LOCK_TYPE_INT, &locktype);
int _is_file_accessible(const char *path)
{
+ SETTING_TRACE_BEGIN;
int ret = access(path , R_OK);
if (ret == 0) {
SETTING_TRACE("found the file %s", path);
return 0;
} else {
+ // error code : 13
SETTING_TRACE("found the file %s --- error code : %d ", path, errno);
- return errno;
+ return -errno;
}
}
int system_setting_set_incoming_call_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
vconf_value = (char *)value;
- int is_load = _is_file_accessible(vconf_value);
- if (is_load == 0) {
+ 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)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
}
} else {
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ /* @todo add a common ret_handler */
+ return ret;
}
return SYSTEM_SETTINGS_ERROR_NONE;
int system_setting_set_email_alert_ringtone(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
vconf_value = (char *)value;
- int is_load = _is_file_accessible(vconf_value);
- if (is_load == 0) {
+ 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)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
}
} else {
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ /*return SYSTEM_SETTINGS_ERROR_IO_ERROR;*/
+ /* @todo add a common ret_handler */
+ return ret;
}
return SYSTEM_SETTINGS_ERROR_NONE;
bool __is_supported_image_type_load(char *path)
{
+ SETTING_TRACE_BEGIN;
evas_init();
Ecore_Evas *ee;
Evas *evas;
bool __is_supported_image_type(char *path)
{
+ SETTING_TRACE_BEGIN;
bool ret = false;
evas_init();
#define PATH_EXT_CHECK_REG ".(jpe?g|jpg|png|gif)$"
bool __is_supported_image_type_by_ext(char *file_path)
{
+ SETTING_TRACE_BEGIN;
regex_t fsm;
regmatch_t str[2048 + 1];
#ifdef TIZEN_WEARABLE
static int system_setting_get_extended_wallpaper_num(const char *file_path, unsigned int *num)
{
+ SETTING_TRACE_BEGIN;
char buffer[256];
const char *find_str = "extended_wallpaper_";
char *ch = NULL;
static int system_setting_copy_extended_wallpaper(const char *dest_file_path, const char *source_file_path)
{
+ SETTING_TRACE_BEGIN;
if (!source_file_path || !dest_file_path) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
static int system_setting_remove_oldest_extended_wallpaper()
{
+ SETTING_TRACE_BEGIN;
DIR *dp;
struct dirent *dirp;
char *min_image_name = NULL;
static int system_setting_check_extended_wallpaper(const char *file_path)
{
+ SETTING_TRACE_BEGIN;
if (!file_path || !strlen(file_path))
return 0;
return (strstr(file_path, "/opt/usr/media/.bgwallpaper") != NULL);
int system_setting_set_wallpaper_home_screen(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
vconf_value = (char *)value;
int system_setting_set_font_type(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *font_name = NULL;
font_name = (char *)value;
int system_setting_set_motion_activation(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
bool *vconf_value;
vconf_value = (bool *)value;
if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_MOTION_ACTIVATION, *vconf_value)) {
int system_setting_set_usb_debugging_option(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
bool *vconf_value;
vconf_value = (bool *)value;
if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_USB_DEBUG_MODE_BOOL, *vconf_value)) {
int system_setting_set_3g_data_network(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
bool *vconf_value;
vconf_value = (bool *)value;
if (system_setting_vconf_set_value_bool(VCONFKEY_3G_ENABLE, *vconf_value)) {
return SYSTEM_SETTINGS_ERROR_NONE;
}
-/*
- "IDS_COM_POP_SHORT" 0.5
- "IDS_ST_BODY_MEDIUM" 1.0
- "IDS_COM_POP_LONG" 1.5
-*/
-int system_setting_set_tap_and_hold_delay(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
-{
- int *vconf_value;
- vconf_value = (int *)value;
-
- char *result = "IDS_ST_BODY_MEDIUM"; /* default as 'medium' */
- if (*vconf_value == SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_SHORT) {
- result = "IDS_COM_POP_SHORT";
- } else if (*vconf_value == SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_MEDIUM) {
- result = "IDS_ST_BODY_MEDIUM";
- } else if (*vconf_value == SYSTEM_SETTINGS_TAP_AND_HOLD_DELAY_LONG) {
- result = "IDS_COM_POP_LONG";
- } else {
- return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
- }
-
- if (system_setting_vconf_set_value_string(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, result)) {
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
- }
- return SYSTEM_SETTINGS_ERROR_NONE;
-}
-
static int category_func(const char *name, void *user_data)
{
SETTING_TRACE_BEGIN;
*/
int system_setting_set_lockscreen_app(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value;
vconf_value = (char *)value; /* ex) com.samsung.lockscreen */
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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 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, 1);
}
-int system_setting_set_changed_callback_tap_and_hold_delay(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
-{
- return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, 1, user_data);
-}
-
-int system_setting_unset_changed_callback_tap_and_hold_delay(system_settings_key_e key)
-{
- return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_ACCESSIBILITY_TAP_HOLD_DELAY_STR, 1);
-}
-
int system_setting_set_changed_callback_lockscreen_app(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
{
- return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY, 1, user_data);
+ SETTING_TRACE_BEGIN;
+ return system_setting_vconf_set_changed_cb(VCONFKEY_SETAPPL_3RD_LOCK_PKG_NAME_STR, SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP, 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, 1);
}
*/
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, 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, 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, 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, 3);
}
static char *_get_cur_font()
{
+ SETTING_TRACE_BEGIN;
xmlDocPtr doc = NULL;
xmlNodePtr cur = NULL;
xmlNodePtr cur2 = NULL;
static void font_config_set_notification()
{
+ SETTING_TRACE_BEGIN;
#if 0
/* notification */
Ecore_X_Window ecore_win = ecore_x_window_root_first_get();
static char *_get_default_font()
{
+ SETTING_TRACE_BEGIN;
xmlDocPtr doc = NULL;
xmlNodePtr cur = NULL;
xmlNodePtr cur2 = NULL;
static bool font_config_set(char *font_name)
{
+ SETTING_TRACE_BEGIN;
Eina_List *text_classes = NULL;
Elm_Text_Class *etc = NULL;
const Eina_List *l = NULL;
ea_theme_system_font_set(font_name, font_size);
ea_theme_system_fonts_apply();
#endif
+
+ elm_config_font_overlay_apply();
+ elm_config_all_flush();
+ elm_config_save();
return 1;
}
static void __font_size_set()
{
+ SETTING_TRACE_BEGIN;
Eina_List *text_classes = NULL;
Elm_Text_Class *etc = NULL;
const Eina_List *l = NULL;
ea_theme_system_font_set(font_name, font_size);
ea_theme_system_fonts_apply();
#endif
+
+ elm_config_font_overlay_apply();
+ elm_config_all_flush();
+ elm_config_save();
+
text_classes = NULL;
g_free(font_name);
}
static int __font_size_get()
{
+ SETTING_TRACE_BEGIN;
int font_size = -1;
int err = -1;
/*--------------------------------------- */
int system_setting_get_locale_country(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
if (system_setting_vconf_get_value_string(VCONFKEY_REGIONFORMAT, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_set_locale_country(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
vconf_value = (char *)value;
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, 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, 3);
}
/*--------------------------------------- */
int system_setting_get_locale_language(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
if (system_setting_vconf_get_value_string(VCONFKEY_LANGSET, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_set_locale_language(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
vconf_value = (char *)value;
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, 100, 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, 100);
}
/*--------------------------------------- */
int system_setting_get_locale_timeformat_24hour(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
int vconf_value;
if (system_setting_vconf_get_value_int(VCONFKEY_REGIONFORMAT_TIME1224, &vconf_value)) {
int system_setting_set_locale_timeformat_24hour(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
bool *vconf_value;
vconf_value = (bool *)value;
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, 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, 3);
}
int system_setting_get_locale_timezone(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char tzpath[256];
ssize_t len = readlink(SETTING_TZONE_SYMLINK_PATH, tzpath, sizeof(tzpath) - 1);
if (len != -1) {
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;
}
int system_setting_unset_changed_callback_locale_timezone_changed(system_settings_key_e key)
{
+ SETTING_TRACE_BEGIN;
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_setting_get_time_changed(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
time_t cur_tick;
cur_tick = time(NULL);
*value = (void *)cur_tick;
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, 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, 3);
}
/* SYSTEM_SETTINGS_KEY_SOUND_LOCK */
int system_setting_get_sound_lock(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_SOUND_LOCK_BOOL, &vconf_value)) {
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, 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, 3);
}
*/
int system_setting_get_sound_silent_mode(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool sound_cond;
bool vib_cond;
*/
int system_setting_set_sound_silent_mode(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
bool *vconf_value;
vconf_value = (bool *)value;
bool vconf_sound = false;
bool vconf_vib = false;
- if (vconf_value) {
+ if (*vconf_value) {
vconf_sound = false;
vconf_vib = false;
} else {
/* 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, 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, 3);
}
/* SYSTEM_SETTINGS_KEY_SOUND_TOUCH */
int system_setting_get_sound_touch(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
- if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &vconf_value)) {
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ int ret = system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_TOUCH_SOUNDS_BOOL, &vconf_value);
+ if (ret != SYSTEM_SETTINGS_ERROR_NONE) {
+ return ret;
}
*value = (void *)vconf_value;
+ return ret;
}
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, 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, 2);
}
int system_setting_get_auto_rotation_mode(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, &vconf_value)) {
int system_setting_set_auto_rotation_mode(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
bool *vconf_value;
vconf_value = (bool *)value;
if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL, *vconf_value)) {
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, 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, 2);
}
int system_setting_get_screen_backlight_time(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
int vconf_value;
if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_LCD_TIMEOUT_NORMAL, &vconf_value)) {
int *vconf_value;
vconf_value = (int *)value;
- if (*vconf_value < 0 || *vconf_value > 600) {
+ if (!(*vconf_value > 0 && *vconf_value < 600)) {
+ SETTING_TRACE(" ERR Betweeny here 0 ~ 600");
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
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_DISPLAY_SCREEN_ROTATION_AUTO, 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, 2);
}
int system_setting_get_sound_notification(system_settings_key_e key, system_setting_data_type_e data_type, 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)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_set_sound_notification(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
vconf_value = (char *)value;
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_INCOMING_CALL_RINGTONE, 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, 0);
}
int system_setting_get_notification_repetition_period(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
int vconf_value;
if (system_setting_vconf_get_value_int(VCONFKEY_SETAPPL_NOTI_MSG_ALERT_REP_TYPE_INT, &vconf_value)) {
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_DISPLAY_SCREEN_ROTATION_AUTO, 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, 1);
}
int system_setting_get_device_name(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
if (system_setting_vconf_get_value_string(VCONFKEY_SETAPPL_DEVICE_NAME_STR, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
int system_setting_set_device_name(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
+ SETTING_TRACE_BEGIN;
char *vconf_value = NULL;
vconf_value = (char *)value;
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, 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, 0);
}
/*---------------------------------------------- */
int system_setting_get_network_flight_mode(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
bool vconf_value;
if (system_setting_vconf_get_value_bool(VCONFKEY_TELEPHONY_FLIGHT_MODE, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
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, 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, 3);
}
int system_setting_get_network_wifi_notification(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
+ SETTING_TRACE_BEGIN;
int vconf_value;
if (system_setting_vconf_get_value_int(VCONFKEY_WIFI_ENABLE_QS, &vconf_value)) {
return SYSTEM_SETTINGS_ERROR_IO_ERROR;
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, 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, 4);
}
NULL /* user data */
},
{
- SYSTEM_SETTINGS_KEY_TAP_AND_HOLD_DELAY,
- SYSTEM_SETTING_DATA_TYPE_INT,
- system_setting_get_tap_and_hold_delay,
- system_setting_set_tap_and_hold_delay,
- system_setting_set_changed_callback_tap_and_hold_delay,
- system_setting_unset_changed_callback_tap_and_hold_delay,
- NULL,
- NULL /* user data */
- },
- {
SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP,
SYSTEM_SETTING_DATA_TYPE_STRING,
system_setting_get_lockscreen_app,
NULL /* user data */
},
{
+ SYSTEM_SETTINGS_KEY_MOTION_ENABLED,
+ SYSTEM_SETTING_DATA_TYPE_BOOL,
+ system_setting_get_motion_activation,
+ NULL,
+ system_setting_set_changed_callback_motion_activation,
+ system_setting_unset_changed_callback_motion_activation,
+ NULL,
+ NULL /* user data */
+ },
+ {
SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE,
SYSTEM_SETTING_DATA_TYPE_BOOL,
system_setting_get_network_flight_mode,
}
}
+static int _dump_context_node(int key)
+{
+ int index = 0;
+
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
+ }
+
+ while (system_setting_table[index].key != SYSTEM_SETTINGS_MAX) {
+ if (system_setting_table[index].key == key) {
+ int i = index;
+ LOGE("[%s] system_setting_table[i].key = %d", __FUNCTION__, system_setting_table[i].key);
+ LOGE("[%s] system_setting_table[i].data_type = %d", __FUNCTION__, system_setting_table[i].data_type);
+ LOGE("[%s] system_setting_table[i].get_value_cb = %x", __FUNCTION__, system_setting_table[i].get_value_cb);
+ LOGE("[%s] system_setting_table[i].set_value_cb = %x", __FUNCTION__, system_setting_table[i].set_value_cb);
+ LOGE("[%s] system_setting_table[i].set_changed_cb = %x <---", __FUNCTION__, system_setting_table[i].set_changed_cb);
+ LOGE("[%s] system_setting_table[i].unset_changed_cb = %x", __FUNCTION__, system_setting_table[i].unset_changed_cb);
+ LOGE("[%s] system_setting_table[i].changed_cb = %x", __FUNCTION__, system_setting_table[i].changed_cb);
+ return 0;
+ }
+ index++;
+ }
+
+ return -1;
+}
int system_settings_get_item(system_settings_key_e key, system_setting_h *item)
{
- int index = 0;
+ LOGE("Enter [%s], key=%d", __FUNCTION__, key);
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ LOGE("Enter [%s] catch invalid parameter error (%d) ", __FUNCTION__, key);
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
#if 0
_dump_context();
#endif
+ int index = 0;
while (system_setting_table[index].key != SYSTEM_SETTINGS_MAX) {
if (system_setting_table[index].key == key) {
*item = &system_setting_table[index];
- return 0;
+ LOGE("Enter [%s], index = %d, key = %d, type = %d", __FUNCTION__, index, key, (*item)->data_type);
+ return SYSTEM_SETTINGS_ERROR_NONE;
}
index++;
}
- return -1;
+ return TIZEN_ERROR_INVALID_PARAMETER;
}
int system_settings_get_value(system_settings_key_e key, system_setting_data_type_e data_type, void **value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
system_setting_h system_setting_item;
system_setting_get_value_cb system_setting_getter;
- if (system_settings_get_item(key, &system_setting_item)) {
+ if (0 != system_settings_get_item(key, &system_setting_item)) {
+ _dump_context_node(key);
LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key --- (%d)", __FUNCTION__, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER, key);
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
if (system_setting_item->data_type != data_type) {
- LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid data type", __FUNCTION__, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER);
+ _dump_context_node(key);
+ LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid data type --- key : (%d), datatype:(%d)", __FUNCTION__, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER, key, data_type);
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_settings_set_value(system_settings_key_e key, system_setting_data_type_e data_type, void *value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key) || value == NULL) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key) || value == NULL) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
system_setting_h system_setting_item;
system_setting_set_value_cb system_setting_setter;
- if (system_settings_get_item(key, &system_setting_item)) {
+ int ret = system_settings_get_item(key, &system_setting_item);
+
+ if (0 != ret ) {
LOGE("[%s] INVALID_PARAMETER(0x%08x) : invalid key", __FUNCTION__, SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER);
- return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
+ return SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API;
}
/* type check */
system_setting_setter = system_setting_item->set_value_cb;
if (system_setting_setter == NULL) {
- LOGE("[%s] IO_ERROR(0x%08x) : failed to call getter for the system settings", __FUNCTION__, SYSTEM_SETTINGS_ERROR_IO_ERROR);
- return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ LOGE("[%s] IO_ERROR(0x%08x) : failed to call setter for the system settings", __FUNCTION__, SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API);
+ return SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API;
}
return system_setting_setter(key, system_setting_item->data_type, value);
int system_settings_set_value_int(system_settings_key_e key, int value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_settings_get_value_int(system_settings_key_e key, int *value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key) || value == NULL) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_settings_set_value_bool(system_settings_key_e key, bool value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_settings_get_value_bool(system_settings_key_e key, bool *value)
{
+ LOGE("Enter [%s]", __FUNCTION__);
int flag = 0;
int ret;
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key) || value == NULL) {
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
-
-
ret = system_settings_get_value(key, SYSTEM_SETTING_DATA_TYPE_BOOL, (void **)&flag);
SETTING_TRACE(" inf (flag) value : %d ", flag);
if (flag == 0) {
int system_settings_set_value_string(system_settings_key_e key, const char *value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_settings_get_value_string(system_settings_key_e key, char **value)
{
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ LOGE("Enter [%s]", __FUNCTION__);
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
}
-/*
- - START
- - system_settings_set_changed_cb
- -> int (*system_setting_set_changed_callback_cb)(key, callback, user_data)
-*/
-
/*PUBLIC*/
int system_settings_set_changed_cb(system_settings_key_e key, system_settings_changed_cb callback, void *user_data)
{
+ LOGE("Enter [%s]", __FUNCTION__);
system_setting_h system_setting_item;
system_setting_set_changed_callback_cb system_setting_set_changed_cb;
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}
int system_settings_unset_changed_cb(system_settings_key_e key)
{
+ LOGE("Enter [%s]", __FUNCTION__);
system_setting_h system_setting_item;
system_setting_unset_changed_callback_cb system_setting_unset_changed_cb;
- if (!(key > 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
+ if (!(key >= 0 && SYSTEM_SETTINGS_KEY_MAX > key)) {
return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
}