* @description Called before each test
* @parameter NA
* @return NA
-*/
+*/
void ITs_system_settings_startup(void)
{
- struct stat stBuff;
+ struct stat stBuff;
if ( stat(ERR_LOG, &stBuff) == 0 )
{
remove(ERR_LOG);
* @{
*/
-//& purpose: Get the system settings value associated with the given key as a boolean.
+//& purpose: Get the system settings value associated with the given key as a boolean.
//& type: auto
/**
* @testcase ITc_system_settings_get_value_bool_p
*/
int ITc_system_settings_get_value_bool_p(void)
{
- START_TEST;
+ START_TEST;
int nRetVal = SYSTEM_SETTINGS_ERROR_NONE;
system_settings_key_e eSystem_Settings_Key[]=
{
* @author SRID(parshant.v)
* @reviewer SRID(gupta.sanjay)
* @type auto
-* @description Gets the system settings value associated with the given key as a string.
-* @scenario Gets the system settings value associated with the given key as a string.
+* @description Gets the system settings value associated with the given key as a string.
+* @scenario Gets the system settings value associated with the given key as a string.
* @apicovered system_settings_get_value_string
* @passcase If system_settings_get_value_string return 0
* @failcase If system_settings_get_value_string return non zero
return 0;
}
-//& purpose: Gets the system settings value associated with the given key as an integer.
+//& purpose: Gets the system settings value associated with the given key as an integer.
//& type: auto
/**
* @testcase ITc_system_settings_get_value_int_p
* @author SRID(parshant.v)
* @reviewer SRID(gupta.sanjay)
* @type auto
-* @description Gets the system settings value associated with the given key as an integer.
+* @description Gets the system settings value associated with the given key as an integer.
* @scenario Gets the system settings value associated with the given key as an integer.
* @apicovered system_settings_get_value_int
* @passcase If system_settings_get_value_int return 0
* @author SRID(parshant.v)
* @reviewer SRID(gupta.sanjay)
* @type auto
-* @description Registers and Unregister a change event callback for the given system settings key
+* @description Registers and Unregister a change event callback for the given system settings key
* @scenario Registers and Unregister a change event callback for the given system settings key
* @apicovered system_settings_set_changed_cb, system_settings_unset_changed_cb
* @passcase If system_settings_set_changed_cb and system_settings_unset_changed_cb return 0
int ITc_system_settings_set_unset_changed_cb_p(void)
{
START_TEST;
-
- system_settings_key_e key = SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION;
+
+ int nRetVal = -1;
void *pvUserData = "User data";
- int nRetVal = system_settings_set_changed_cb(key,System_settings_changed_cb_p, pvUserData);//target api//register callback
- if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+ system_settings_key_e e_System_Settings_Key[]=
{
- FPRINTF("\\n[Line : %d][%s] system_settings_set_changed_cb failed , error returned = %s", __LINE__, API_NAMESPACE, SystemSettingsGetError(nRetVal));
- return 1;
- }
- //Unregisters the callback function.
- nRetVal = system_settings_unset_changed_cb(key);//target api//unregister callback
- if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+ SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION,
+ SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE,
+ SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR
+ };
+ int nEnumSize = sizeof(e_System_Settings_Key) / sizeof(e_System_Settings_Key[0]);
+ int enum_counter=0;
+ system_settings_key_e key;
+ for ( enum_counter=0; enum_counter<nEnumSize; enum_counter++ )
{
- FPRINTF("\\n[Line : %d][%s] system_settings_unset_changed_cb failed , error returned = %s", __LINE__, API_NAMESPACE, SystemSettingsGetError(nRetVal));
- return 1;
+ key = e_System_Settings_Key[enum_counter];
+
+ nRetVal = system_settings_set_changed_cb(key,System_settings_changed_cb_p, pvUserData);//target api//register callback
+ if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("\\n[Line : %d][%s] system_settings_set_changed_cb failed , error returned = %s", __LINE__, API_NAMESPACE, SystemSettingsGetError(nRetVal));
+ return 1;
+ }
+ //Unregisters the callback function.
+ nRetVal = system_settings_unset_changed_cb(key);//target api//unregister callback
+ if ( nRetVal != SYSTEM_SETTINGS_ERROR_NONE && nRetVal != SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED )
+ {
+ FPRINTF("\\n[Line : %d][%s] system_settings_unset_changed_cb failed , error returned = %s", __LINE__, API_NAMESPACE, SystemSettingsGetError(nRetVal));
+ return 1;
+ }
}
+
return 0;
}
return 0;
}
-/** @} */
-/** @} */
+/** @} */
+/** @} */