Tizen Native API
|
The System Settings API provides APIs for sharing configuration over a system. system_settings_key_e shows all of the supporting APIs in System-Settings.
Required Header
#include <system_settings.h>
Overview
System Settings API provides functions for getting the system configuration related to user preferences. The main features of the System Settings API include accessing system-wide configurations, such as ringtones, wallpapers, and etc.
For more information on feature, see System Settings Programming Guide.
Functions | |
int | system_settings_get_value_int (system_settings_key_e key, int *value) |
Gets the system settings value associated with the given key as an integer. | |
int | system_settings_get_value_bool (system_settings_key_e key, bool *value) |
Gets the system settings value associated with the given key as a boolean. | |
int | system_settings_get_value_string (system_settings_key_e key, char **value) |
Gets the system settings value associated with the given key as a string. | |
int | system_settings_set_changed_cb (system_settings_key_e key, system_settings_changed_cb callback, void *user_data) |
Registers a change event callback for the given system settings key. | |
int | system_settings_unset_changed_cb (system_settings_key_e key) |
Unregisters the callback function. | |
Typedefs | |
typedef void(* | system_settings_changed_cb )(system_settings_key_e key, void *user_data) |
Called when the system settings changes. |
Typedef Documentation
typedef void(* system_settings_changed_cb)(system_settings_key_e key, void *user_data) |
Called when the system settings changes.
- Since :
- 2.3.1
- Parameters:
-
[in] key The key name of the system settings changed system settings [in] user_data The user data passed from the callback registration function
- Precondition:
- system_settings_set_changed_cb() will invoke this callback function.
Enumeration Type Documentation
Enumeration for system settings error.
- Since :
- 2.3.1
- Enumerator:
Enumeration for System Settings Key.
- Since :
- 2.3.1
- Enumerator:
Function Documentation
int system_settings_get_value_bool | ( | system_settings_key_e | key, |
bool * | value | ||
) |
Gets the system settings value associated with the given key as a boolean.
- Since :
- 2.3.1
- Parameters:
-
[in] key The key name of the system settings [out] value The current system settings value of the given key
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
SYSTEM_SETTINGS_ERROR_NONE Successful SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
- Warning:
- http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1.
int system_settings_get_value_int | ( | system_settings_key_e | key, |
int * | value | ||
) |
Gets the system settings value associated with the given key as an integer.
- Since :
- 2.3.1
- Parameters:
-
[in] key The key name of the system settings [out] value The current system settings value of the given key
- Returns:
0
on success, otherwise a negative error value
- Return values:
-
SYSTEM_SETTINGS_ERROR_NONE Successful SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
- Warning:
- http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1.
int system_settings_get_value_string | ( | system_settings_key_e | key, |
char ** | value | ||
) |
Gets the system settings value associated with the given key as a string.
- Since :
- 2.3.1
- Remarks:
- You must release value using free().
- Parameters:
-
[in] key The key name of the system settings [out] value The current system settings value of the given key
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SYSTEM_SETTINGS_ERROR_NONE Successful SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
- Warning:
- http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1.
int system_settings_set_changed_cb | ( | system_settings_key_e | key, |
system_settings_changed_cb | callback, | ||
void * | user_data | ||
) |
Registers a change event callback for the given system settings key.
- Since :
- 2.3.1
- Remarks:
- SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb.
- Parameters:
-
[in] key The key name of the system settings [in] callback The callback function to invoke [in] user_data The user data to be passed to the callback function
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SYSTEM_SETTINGS_ERROR_NONE Successful SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
- Postcondition:
- system_settings_changed_cb() will be invoked.
- Warning:
- http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1.
Unregisters the callback function.
- Since :
- 2.3.1
- Remarks:
- SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb.
- Parameters:
-
[in] key The key name of the system settings
- Returns:
- 0 on success, otherwise a negative error value
- Return values:
-
SYSTEM_SETTINGS_ERROR_NONE Successful SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
- See also:
- system_settings_set_changed_cb()
- Warning:
- http://tizen.org/privilege/systemsettings (public level privilege) MUST NOT be declared to use this API since 2.3.1.