#include <system_settings.h>
#include <system_settings_multi_callback.h>
+#ifndef VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST
+#define VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST "db/setting/accessibility/high_contrast"
+#endif
+
+#ifndef VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE
+#define VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE "db/setting/accessibility/greyscale"
+#endif
+
+
#ifdef LOG_TAG
#undef LOG_TAG
#endif
#define SETTING_WIFI_PATH "tizen.org/feature/network.wifi"
#define SETTING_FONT_PATH "tizen.org/feature/systemsetting.font"
#define SETTING_TELEPHONY_PATH "tizen.org/feature/network.telephony"
+#define SETTING_ACCESSIBILITY_GRAYSCALE_PATH "tizen.org/feature/accessibility.grayscale"
+#define SETTING_ACCESSIBILITY_NEGATIVE_PATH "tizen.org/feature/accessibility.negative"
/**
* @internal
/**
* @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 3.0
* @return 0 on success, otherwise a negative error value
* @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
*/
int system_setting_feature_check_telephony(void *value);
-
/**
* @internal
* @since_tizen 4.0
*/
int system_setting_feature_check_font(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_NOT_SUPPORTED Not support system-settings API
+ */
+int system_setting_feature_check_accessibility_grayscale(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_NOT_SUPPORTED Not support system-settings API
+ */
+int system_setting_feature_check_accessibility_negative(void *value);
+
/*// */
#ifdef __cplusplus
}
-int system_setting_feature_check_incoming_call(void * value)
+int system_setting_feature_check_incoming_call(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
return ret;
}
-int system_setting_feature_check_home_screen(void * value)
+int system_setting_feature_check_home_screen(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
return ret;
}
-int system_setting_feature_check_lock_screen(void * value)
+int system_setting_feature_check_lock_screen(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
return ret;
}
-int system_setting_feature_check_notification_email(void * value)
+int system_setting_feature_check_notification_email(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
return ret;
}
-int system_setting_feature_check_wifi(void * value)
+int system_setting_feature_check_wifi(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
return ret;
}
-int system_setting_feature_check_telephony(void * value)
+int system_setting_feature_check_telephony(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
}
-int system_setting_feature_check_font(void * value)
+int system_setting_feature_check_font(void *value)
{
static bool first_query = true;
static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
return ret;
}
+int system_setting_feature_check_accessibility_grayscale(void *value)
+{
+ static bool first_query = true;
+ static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
+
+ if (first_query == true) {
+ ret = system_settings_feature_check_bool(SETTING_ACCESSIBILITY_GRAYSCALE_PATH);
+ first_query = false;
+ }
+
+ return ret;
+}
+
+int system_setting_feature_check_accessibility_negative(void *value)
+{
+ static bool first_query = true;
+ static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
+
+ if (first_query == true) {
+ ret = system_settings_feature_check_bool(SETTING_ACCESSIBILITY_NEGATIVE_PATH);
+ first_query = false;
+ }
+
+ return ret;
+}
+
/* LCOV_EXCL_START */
int system_setting_get_uds_state(system_settings_key_e key, void **value)
{
return system_setting_vconf_unset_changed_cb(VCONFKEY_SETAPPL_DEVELOPER_OPTION_STATE, 2);
}
+/* SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE */
+int system_setting_get_accessibility_grayscale(system_settings_key_e key, void **value)
+{
+ SETTING_TRACE_BEGIN;
+ bool vconf_value;
+
+ if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE, &vconf_value)) {
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ }
+ *value = (void *)vconf_value;
+
+ return SYSTEM_SETTINGS_ERROR_NONE;
+}
+
+/* LCOV_EXCL_START */
+int system_setting_set_accessibility_grayscale(system_settings_key_e key, void *value)
+{
+ SETTING_TRACE_BEGIN;
+ bool *vconf_value;
+ vconf_value = (bool *)value;
+ if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_GREYSCALE, *vconf_value)) {
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ }
+
+ return SYSTEM_SETTINGS_ERROR_NONE;
+}
+/* LCOV_EXCL_STOP */
+
+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, 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, 2);
+}
+
+/* SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR */
+int system_setting_get_accessibility_negative_color(system_settings_key_e key, void **value)
+{
+ SETTING_TRACE_BEGIN;
+ bool vconf_value;
+
+ if (system_setting_vconf_get_value_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, &vconf_value)) {
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ }
+ *value = (void *)vconf_value;
+
+ return SYSTEM_SETTINGS_ERROR_NONE;
+}
+
+/* LCOV_EXCL_START */
+int system_setting_set_accessibility_negative_color(system_settings_key_e key, void *value)
+{
+ SETTING_TRACE_BEGIN;
+ bool *vconf_value;
+ vconf_value = (bool *)value;
+ if (system_setting_vconf_set_value_bool(VCONFKEY_SETAPPL_ACCESSIBILITY_HIGH_CONTRAST, *vconf_value)) {
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ }
+
+ return SYSTEM_SETTINGS_ERROR_NONE;
+}
+/* LCOV_EXCL_STOP */
+
+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, 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, 2);
+}
+
static int my_assert_ret(int retcode)
{
- if (retcode == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
- assert(retcode == SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED);
- } else {
+ if (retcode != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
+ if (retcode != SYSTEM_SETTINGS_ERROR_NONE)
+ printf("Error!!\n");
+ assert(retcode == SYSTEM_SETTINGS_ERROR_NONE);
+ }
+ return 1;
+}
+
+static int my_assert_ret_eq_bool(int retcode, bool a, bool b)
+{
+ if (retcode != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED) {
if (retcode != SYSTEM_SETTINGS_ERROR_NONE)
printf("Error!!\n");
assert(retcode == SYSTEM_SETTINGS_ERROR_NONE);
+ assert_eq(a, b);
}
return 1;
}
RETURN(0);
}
+/**
+ * @testcase utc_system_settings_get_value_bool_p12
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to get the property
+ */
+RETTYPE utc_system_settings_get_value_bool_p12(void)
+{
+ bool value = false;
+
+ int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, &value);
+ my_assert_ret(retcode);
+
+ RETURN(0);
+}
+
+/**
+ * @testcase utc_system_settings_get_value_bool_p13
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to get the property
+ */
+RETTYPE utc_system_settings_get_value_bool_p13(void)
+{
+ bool value = false;
+
+ int retcode = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, &value);
+ my_assert_ret(retcode);
+
+ RETURN(0);
+}
+
/**
* @testcase utc_system_settings_set_changed_cb_p1
RETTYPE utc_system_settings_set_value_bool_p3(void)
{
int ret;
- bool state = true;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, state);
- my_assert_ret(ret);
bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &ret_state);
+ bool cur_state = false;
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &cur_state);
my_assert_ret(ret);
- //assert_eq(state, ret_state);
-
- /* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, !state);
+ bool state = !cur_state;
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, state);
my_assert_ret(ret);
+ /* check current state */
ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, &ret_state);
- //assert_eq(ret_state, !state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
+
+ /* roll back */
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_LOCALE_TIMEFORMAT_24HOUR, cur_state);
+ my_assert_ret(ret);
RETURN(0);
}
int ret;
/* get current state */
+ bool cur_state = false;
bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &ret_state);
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &cur_state);
my_assert_ret(ret);
-
- bool state = !ret_state;
+ bool state = !cur_state;
ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, state);
my_assert_ret(ret);
+ /* check current state */
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
+
/* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, ret_state);
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED, cur_state);
my_assert_ret(ret);
- assert(state != ret_state);
-
RETURN(0);
}
int ret;
/* get current state */
+ bool cur_state = false;
bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &ret_state);
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &cur_state);
my_assert_ret(ret);
-
- bool state = !ret_state;
+ bool state = !cur_state;
ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, state);
my_assert_ret(ret);
+ /* check current state */
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
/* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, ret_state);
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, cur_state);
my_assert_ret(ret);
- assert(state != ret_state);
RETURN(0);
}
int ret;
/* get current state */
+ bool cur_state = false;
bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, &ret_state);
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, &cur_state);
my_assert_ret(ret);
-
- bool state = !ret_state;
+ bool state = !cur_state;
ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, state);
my_assert_ret(ret);
+ /* check current state */
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
/* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, ret_state);
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_VIBRATION, cur_state);
my_assert_ret(ret);
- assert(state != ret_state);
RETURN(0);
}
int ret;
/* get current state */
+ bool cur_state = false;
bool ret_state = false;
- ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, &ret_state);
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, &cur_state);
my_assert_ret(ret);
-
- bool state = !ret_state;
+ bool state = !cur_state;
ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, state);
my_assert_ret(ret);
+ /* check current state */
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
/* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, ret_state);
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE, cur_state);
my_assert_ret(ret);
- assert(state != ret_state);
RETURN(0);
}
int ret;
/* get current state */
+ bool cur_state = false;
bool ret_state = false;
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, &cur_state);
+ my_assert_ret(ret);
+
+ bool state = !cur_state;
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, state);
+ my_assert_ret(ret);
+
+ /* check current state */
ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
+
+ /* roll back */
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, cur_state);
my_assert_ret(ret);
+ RETURN(0);
+}
- bool state = !ret_state;
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, state);
+/**
+ * @testcase utc_system_settings_set_value_bool_p9
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to set the property.
+ * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to get the property.
+ */
+RETTYPE utc_system_settings_set_value_bool_p9(void)
+{
+ int ret;
+
+ /* get current state */
+ bool cur_state = false;
+ bool ret_state = false;
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, &cur_state);
my_assert_ret(ret);
+ bool state = !cur_state;
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, state);
+ my_assert_ret(ret);
+
+ /* check current state */
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
/* roll back */
- ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, ret_state);
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, cur_state);
+ my_assert_ret(ret);
+
+ RETURN(0);
+}
+
+/**
+ * @testcase utc_system_settings_set_value_bool_p10
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to set the property.
+ * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to get the property.
+ */
+RETTYPE utc_system_settings_set_value_bool_p10(void)
+{
+ int ret;
+
+ /* get current state */
+ bool cur_state = false;
+ bool ret_state = false;
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, &cur_state);
+ my_assert_ret(ret);
+
+ bool state = !cur_state;
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, state);
+ my_assert_ret(ret);
+
+ /* check current state */
+ ret = system_settings_get_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, &ret_state);
+ my_assert_ret_eq_bool(ret, state, ret_state);
+
+ /* roll back */
+ ret = system_settings_set_value_bool(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, cur_state);
my_assert_ret(ret);
- assert(state != ret_state);
RETURN(0);
}
/**
RETURN(0);
}
+
+
+/**
+ * @testcase utc_system_settings_set_changed_cb_p39
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to set the callback for change-notification.
+ */
+RETTYPE utc_system_settings_set_changed_cb_p39(void)
+{
+ system_settings_changed_cb callback = get_system_settings_test_callback();
+ int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE,
+ callback, NULL);
+ my_assert_ret(retcode);
+
+ RETURN(0);
+}
+
+
+/**
+ * @testcase utc_system_settings_unset_changed_cb_p38
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to set the callback for change-notification.
+ * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE is able to unset the callback for change-notification.
+ */
+RETTYPE utc_system_settings_unset_changed_cb_p38(void)
+{
+ system_settings_changed_cb callback = get_system_settings_test_callback();
+ int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE,
+ callback, NULL);
+
+ retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE);
+ my_assert_ret(retcode);
+
+ RETURN(0);
+}
+
+/**
+ * @testcase utc_system_settings_set_changed_cb_p41
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to set the callback for change-notification.
+ */
+RETTYPE utc_system_settings_set_changed_cb_p41(void)
+{
+ system_settings_changed_cb callback = get_system_settings_test_callback();
+ int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR,
+ callback, NULL);
+ my_assert_ret(retcode);
+
+ RETURN(0);
+}
+
+
+/**
+ * @testcase utc_system_settings_unset_changed_cb_p40
+ * @since_tizen 5.5
+ * @description check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to set the callback for change-notification.
+ * check if SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR is able to unset the callback for change-notification.
+ */
+RETTYPE utc_system_settings_unset_changed_cb_p40(void)
+{
+ system_settings_changed_cb callback = get_system_settings_test_callback();
+ int retcode = system_settings_set_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR,
+ callback, NULL);
+
+ retcode = system_settings_unset_changed_cb(SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR);
+ my_assert_ret(retcode);
+
+ RETURN(0);
+}
+
void unittest_api()
{
/* hook up your test functions */
add_test_func("/utc_system_settings_get_value_bool_p8", utc_system_settings_get_value_bool_p8);
add_test_func("/utc_system_settings_get_value_bool_p9", utc_system_settings_get_value_bool_p9);
add_test_func("/utc_system_settings_get_value_bool_p10", utc_system_settings_get_value_bool_p10);
+ add_test_func("/utc_system_settings_get_value_bool_p11", utc_system_settings_get_value_bool_p11);
+ add_test_func("/utc_system_settings_get_value_bool_p12", utc_system_settings_get_value_bool_p12);
+ add_test_func("/utc_system_settings_get_value_bool_p13", utc_system_settings_get_value_bool_p13);
add_test_func("/utc_system_settings_get_value_bool_n", utc_system_settings_get_value_bool_n);
add_test_func("/utc_system_settings_get_value_int_p1", utc_system_settings_get_value_int_p1);
add_test_func("/utc_system_settings_get_value_int_p2", utc_system_settings_get_value_int_p2);
add_test_func("/utc_system_settings_get_value_n", utc_system_settings_get_value_n);
add_test_func("/utc_system_settings_get_value_int_p3", utc_system_settings_get_value_int_p3);
- add_test_func("/utc_system_settings_get_value_bool_p11", utc_system_settings_get_value_bool_p11);
add_test_func("/utc_system_settings_get_value_int_p4", utc_system_settings_get_value_int_p4);
g_test_add_func("/utc_system_settings_set_value_string_n2", utc_system_settings_set_value_string_n2);
g_test_add_func("/utc_system_settings_set_value_string_n3", utc_system_settings_set_value_string_n3);
g_test_add_func("/utc_system_settings_unset_changed_cb_p34", utc_system_settings_unset_changed_cb_p34);
g_test_add_func("/utc_system_settings_set_changed_cb_p37", utc_system_settings_set_changed_cb_p37);
g_test_add_func("/utc_system_settings_unset_changed_cb_p36", utc_system_settings_unset_changed_cb_p36);
+ g_test_add_func("/utc_system_settings_set_changed_cb_p39", utc_system_settings_set_changed_cb_p39);
+ g_test_add_func("/utc_system_settings_unset_changed_cb_p38", utc_system_settings_unset_changed_cb_p38);
+ g_test_add_func("/utc_system_settings_set_changed_cb_p41", utc_system_settings_set_changed_cb_p41);
+ g_test_add_func("/utc_system_settings_unset_changed_cb_p40", utc_system_settings_unset_changed_cb_p40);
g_test_add_func("/utc_system_settings_add_ringtone_list_p1", utc_system_settings_add_ringtone_list_p1);
g_test_add_func("/utc_system_settings_delete_ringtone_list_p1", utc_system_settings_delete_ringtone_list_p1);
add_test_func("/utc_system_settings_set_value_string_p1", utc_system_settings_set_value_string_p1);
g_test_add_func("/utc_system_settings_set_value_string_p3", utc_system_settings_set_value_string_p3);
g_test_add_func("/utc_system_settings_set_value_string_p4", utc_system_settings_set_value_string_p4);
add_test_func("/utc_system_settings_set_value_bool_n1", utc_system_settings_set_value_bool_n1);
- add_test_func("/utc_system_settings_set_value_bool_n2", utc_system_settings_set_value_bool_n2);
- add_test_func("/utc_system_settings_set_value_bool_n3", utc_system_settings_set_value_bool_n3);
add_test_func("/utc_system_settings_set_value_bool_n4", utc_system_settings_set_value_bool_n4);
add_test_func("/utc_system_settings_set_value_bool_n5", utc_system_settings_set_value_bool_n5);
add_test_func("/utc_system_settings_set_value_bool_n6", utc_system_settings_set_value_bool_n6);
add_test_func("/utc_system_settings_set_value_bool_p6", utc_system_settings_set_value_bool_p6);
add_test_func("/utc_system_settings_set_value_bool_p7", utc_system_settings_set_value_bool_p7);
add_test_func("/utc_system_settings_set_value_bool_p8", utc_system_settings_set_value_bool_p8);
+ add_test_func("/utc_system_settings_set_value_bool_p9", utc_system_settings_set_value_bool_p9);
+ add_test_func("/utc_system_settings_set_value_bool_p10", utc_system_settings_set_value_bool_p10);
add_test_func("/utc_system_settings_set_value_int_p2", utc_system_settings_set_value_int_p2);
add_test_func("/utc_system_settings_set_value_string_n6", utc_system_settings_set_value_string_n6);
g_test_add_func("/utc_system_settings_unset_changed_cb_n", utc_system_settings_unset_changed_cb_n);