[ACR-1409] Add SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED
[platform/core/api/system-settings.git] / include / system_settings.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.0 (the License);
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an AS IS BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 #ifndef __TIZEN_SYSTEM_SYSTEM_SETTINGS_H__
18 #define __TIZEN_SYSTEM_SYSTEM_SETTINGS_H__
19
20 #include <tizen.h>
21
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26
27 /**
28  * @file system_settings.h
29  */
30
31 /**
32  * @addtogroup CAPI_SYSTEM_SYSTEM_SETTINGS_MODULE
33  * @{
34  */
35
36
37 /**
38  * @brief Enumeration for system settings error.
39  * @since_tizen 2.3
40  */
41 typedef enum {
42         SYSTEM_SETTINGS_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
43         SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
44         SYSTEM_SETTINGS_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
45         SYSTEM_SETTINGS_ERROR_IO_ERROR =  TIZEN_ERROR_IO_ERROR, /**< Internal I/O error */
46         SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED =  TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
47         SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED =  TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported @if MOBILE (Since 2.3.1) @endif */
48         SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported @if MOBILE (Since 2.3.1) @endif */
49
50         /* lock screen app error code */
51         SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE = TIZEN_ERROR_SYSTEM_SETTING | 0x01, /**< Current lock screen app set 'password' type */
52 } system_settings_error_e;
53
54
55 /**
56  * @brief Enumeration for System Settings Key.
57  * @since_tizen 2.3
58  */
59 typedef enum {
60         SYSTEM_SETTINGS_KEY_INCOMING_CALL_RINGTONE, /**< (string) The file path of the current ringtone */
61         SYSTEM_SETTINGS_KEY_WALLPAPER_HOME_SCREEN, /**< (string) The file path of the current home screen wallpaper */
62         SYSTEM_SETTINGS_KEY_WALLPAPER_LOCK_SCREEN, /**< (string) The file path of the current lock screen wallpaper */
63         SYSTEM_SETTINGS_KEY_FONT_SIZE, /**< (int) The current system font size */
64         SYSTEM_SETTINGS_KEY_FONT_TYPE, /**< (string) The current system font type */
65         SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, /**< (bool) Indicates whether the motion service is activated */
66         SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE,  /**< (string) The file path of the current email alert ringtone */
67         SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED,      /**< (bool) Indicates whether the USB debugging is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
68         SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED,  /**< (bool) Indicates whether the 3G data network is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
69         SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP = SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED+2,      /**< (string) Indicates lockscreen app pkg name  */
70         SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE,/**< (string) The current system default font type (only support Get) */
71         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 */
72         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. */
73         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. */
74         SYSTEM_SETTINGS_KEY_LOCALE_TIMEZONE,    /**< (string) Indicates the current time zone. */
75         SYSTEM_SETTINGS_KEY_TIME_CHANGED,               /**< (int) Once System changes time, this event occurs to notify time change. */
76         SYSTEM_SETTINGS_KEY_SOUND_LOCK,                                 /**< GET (bool) Indicates whether the screen lock sound is enabled on the device. ex) LCD on/off sound */
77         SYSTEM_SETTINGS_KEY_SOUND_SILENT_MODE,                  /**< GET (bool) Indicates whether the device is in the silent mode. */
78         SYSTEM_SETTINGS_KEY_SOUND_TOUCH,                                /**< GET (bool) Indicates whether the screen touch sound is enabled on the device. */
79         SYSTEM_SETTINGS_KEY_DISPLAY_SCREEN_ROTATION_AUTO,       /**< GET (bool) Indicates whether rotation control is automatic.*/
80         SYSTEM_SETTINGS_KEY_DEVICE_NAME,                                        /**< GET (string) Indicates device name. */
81         SYSTEM_SETTINGS_KEY_MOTION_ENABLED,                                     /**< GET (bool) Indicates whether the device user has enabled the motion feature. */
82         SYSTEM_SETTINGS_KEY_NETWORK_WIFI_NOTIFICATION,          /**< GET (bool) Indicates whether Wi-Fi-related notifications are enabled on the device. */
83         SYSTEM_SETTINGS_KEY_NETWORK_FLIGHT_MODE,                        /**< GET (bool) Indicates whether the device is in the flight mode. */
84         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. */
85         SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION,                         /**< (string) Indicates the file path of the current notification tone set by the user. */
86         SYSTEM_SETTINGS_KEY_SOUND_NOTIFICATION_REPETITION_PERIOD,       /**< (int) Indicates the time period for notification repetitions. */
87         SYSTEM_SETTINGS_KEY_LOCK_STATE,         /**< (int) Indicates the current lock state */
88         SYSTEM_SETTINGS_KEY_ADS_ID, /**< (string) Indicates Ads ID for each device (Since 3.0) */
89         SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE, /**< (int) Indicates Ultra Data Save status, one of #system_settings_uds_state_e values (Since 4.0) */
90         SYSTEM_SETTINGS_KEY_ULTRA_DATA_SAVE_PKG_LIST, /**< (string) Indicates Ultra Data Save Package List (Since 4.0), the list is a string containing whitelisted package names separated with semicolons (;) */
91         SYSTEM_SETTINGS_KEY_ACCESSIBILITY_TTS,                          /**< GET (bool) Indicates whether the accessibility TTS is enabled on the device. (Since 4.0) */
92         SYSTEM_SETTINGS_KEY_VIBRATION,                          /**< (bool) Indicates whether vibration is enabled on the device. (Since 4.0) */
93         SYSTEM_SETTINGS_KEY_AUTOMATIC_TIME_UPDATE,      /**< (bool) Indicates whether updating time automatically is enabled on the device. (Since 5.0) */
94         SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE,     /**< (bool) Indicates whether developer option state is enabled on the device. (Since 5.0) */
95         SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE,    /**< (bool) Indicates whether accessibility grayscale is enabled on the device. (Since 5.5) */
96         SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR,       /**< (bool) Indicates whether accessibility negative color is enabled on the device. (Since 5.5) */
97         SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED,       /**< (bool) Indicates whether rotary event is enabled on the device. (Since 5.5) */
98         SYSTEM_SETTINGS_KEY_MAX,
99 } system_settings_key_e;
100
101 /**
102  * @brief Enumeration for Idle Lock State.
103  * @since_tizen 2.3.1
104  */
105 typedef enum {
106         SYSTEM_SETTINGS_LOCK_STATE_UNLOCK = 0, /**< Device is unlocked */
107         SYSTEM_SETTINGS_LOCK_STATE_LOCK, /**< Device is locked */
108         SYSTEM_SETTINGS_LOCK_STATE_LAUNCHING_LOCK /**< Device is being locked */
109 } system_settings_idle_lock_state_e;
110
111
112 /**
113  * @brief Enumeration for font size.
114  * @since_tizen 2.3
115  */
116 typedef enum {
117         SYSTEM_SETTINGS_FONT_SIZE_SMALL = 0, /**< A small size */
118         SYSTEM_SETTINGS_FONT_SIZE_NORMAL, /**< A normal size */
119         SYSTEM_SETTINGS_FONT_SIZE_LARGE, /**< A large size */
120         SYSTEM_SETTINGS_FONT_SIZE_HUGE, /**< A huge size */
121         SYSTEM_SETTINGS_FONT_SIZE_GIANT, /**< A giant size */
122 } system_settings_font_size_e;
123
124 /**
125  * @brief Enumeration for Ultra Data Save.
126  * @since_tizen 4.0
127  */
128 typedef enum {
129         SYSTEM_SETTINGS_UDS_OFF = 0,                    /**< OFF */
130         SYSTEM_SETTINGS_UDS_ON,                                 /**< ON */
131         SYSTEM_SETTINGS_UDS_ON_WHITELISTED,             /**< UDS on and the app is whitelisted */
132 } system_settings_uds_state_e;
133
134
135
136 /**
137  * @brief Called when the system settings changes.
138  * @since_tizen 2.3
139  * @param[in] key The key name of the system settings changed system settings
140  * @param[in] user_data The user data passed from the callback registration function
141  * @pre system_settings_set_changed_cb() will invoke this callback function.
142  * @see system_settings_set_changed_cb()
143  * @see system_settings_unset_changed_cb()
144  */
145 typedef void (*system_settings_changed_cb)(system_settings_key_e key, void *user_data);
146
147 /**
148  * @platform
149  * @brief Sets the system settings value associated with the given key as an integer.
150  * @since_tizen 2.3
151  * @privlevel platform
152  * @privilege %http://tizen.org/privilege/systemsettings.admin
153  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
154  * @param[in] key The key name of the system settings
155  * @param[out] value The new system settings value of the given key
156  * @return @c 0 on success, otherwise a negative error value
157  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
158  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
159  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
160  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
161  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
162  */
163 int system_settings_set_value_int(system_settings_key_e key, int value);
164
165 /**
166  * @brief Gets the system settings value associated with the given key as an integer.
167  * @since_tizen 2.3
168  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
169  * @param[in] key The key name of the system settings
170  * @param[out] value The current system settings value of the given key
171  * @return @c 0 on success, otherwise a negative error value
172  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
173  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
174  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
175  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
176  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
177  * @warning %http://tizen.org/privilege/systemsettings (public level privilege) <b>MUST NOT</b> be declared to use this function since 2.3.1.
178  */
179 int system_settings_get_value_int(system_settings_key_e key, int *value);
180
181
182 /**
183  * @platform
184  * @brief Sets the system settings value associated with the given key as a boolean.
185  * @since_tizen 2.3
186  * @privlevel platform
187  * @privilege %http://tizen.org/privilege/systemsettings.admin
188  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
189  * @param[in] key The key name of the system settings
190  * @param[out] value The new system settings value of the given key
191  * @return @c 0 on success, otherwise a negative error value
192  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
193  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
194  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
195  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
196  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
197  */
198 int system_settings_set_value_bool(system_settings_key_e key, bool value);
199
200 /**
201  * @brief Gets the system settings value associated with the given key as a boolean.
202  * @since_tizen 2.3
203  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
204  * @param[in] key The key name of the system settings
205  * @param[out] value The current system settings value of the given key
206  * @return @c 0 on success, otherwise a negative error value
207  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
208  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
209  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
210  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
211  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
212  * @warning %http://tizen.org/privilege/systemsettings (public level privilege) <b>MUST NOT</b> be declared to use this function since 2.3.1.
213  */
214 int system_settings_get_value_bool(system_settings_key_e key, bool *value);
215
216 /**
217  * @platform
218  * @brief Sets the system settings value associated with the given key as a string.
219  * @since_tizen 2.3
220  * @privlevel platform
221  * @privilege %http://tizen.org/privilege/systemsettings.admin
222  * @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for setting. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
223  * @param[in] key The key name of the system settings
224  * @param[out] value The new system settings value of the given key
225  * @return @c 0 on success, otherwise a negative error value
226  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
227  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
228  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
229  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
230  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
231  */
232 int system_settings_set_value_string(system_settings_key_e key, const char *value);
233
234 /**
235  * @brief Gets the system settings value associated with the given key as a string.
236  * @since_tizen 2.3
237  * @remarks You must release @a value using free(). When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
238  * @param[in] key The key name of the system settings
239  * @param[out] value The current system settings value of the given key
240  * @return 0 on success, otherwise a negative error value
241  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
242  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
243  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
244  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
245  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
246  * @warning %http://tizen.org/privilege/systemsettings (public level privilege) <b>MUST NOT</b> be declared to use this function since 2.3.1.
247  */
248 int system_settings_get_value_string(system_settings_key_e key, char **value);
249
250 /**
251  * @brief Sets a change event callback for the given system settings key.
252  * @since_tizen 2.3
253  * @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
254  * @param[in] key The key name of the system settings
255  * @param[in] callback The callback function to invoke
256  * @param[in] user_data The user data to be passed to the callback function
257  * @return 0 on success, otherwise a negative error value
258  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
259  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
260  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
261  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
262  * @post system_settings_changed_cb() will be invoked.
263  *
264  * @see system_settings_unset_changed_cb()
265  * @see system_settings_changed_cb()
266  * @warning %http://tizen.org/privilege/systemsettings (public level privilege) <b>MUST NOT</b> be declared to use this function since 2.3.1.
267  *
268 */
269 int system_settings_set_changed_cb(system_settings_key_e key, system_settings_changed_cb callback, void *user_data);
270
271 /**
272  * @brief Unsets the callback function.
273  * @since_tizen 2.3
274  * @remarks #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE is not available for set_changed_cb. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
275  * @param[in] key The key name of the system settings
276  * @return 0 on success, otherwise a negative error value
277  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
278  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
279  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
280  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
281  *
282  * @see system_settings_set_changed_cb()
283  * @warning %http://tizen.org/privilege/systemsettings (public level privilege) <b>MUST NOT</b> be declared to use this function since 2.3.1.
284  */
285 int system_settings_unset_changed_cb(system_settings_key_e key);
286
287
288 /**
289  * @platform
290  * @brief Called to get each string value from string typed list.
291  * @since_tizen 3.0
292  * @param[in] index zero based number indicating index of node in a list
293  * @param[in] value value returned from the list
294  * @param[in] cb_data  The user data passed from the foreach function
295  * @return @c true to continue with the next iteration of the loop, otherwise false to break out of the loop
296  */
297 typedef bool (*system_settings_iter_cb)(int index, const char* value, void *cb_data);
298
299 /**
300  * @platform
301  * @brief Iterate the system settings value associated with the given key as a string type.
302  * @since_tizen 3.0
303  * @privlevel platform
304  * @privilege %http://tizen.org/privilege/systemsettings.admin
305  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
306  * @param[in] key The key name of the system settings
307  * @param[in] callback The callback-function name for iteration
308  * @param[in] user_data  The user data passed from caller-side
309  * @return @c 0 on success, otherwise a negative error value
310  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
311  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
312  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
313  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
314  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
315  */
316 int system_settings_foreach_value_string(system_settings_key_e key, system_settings_iter_cb callback, void *user_data);
317
318 /**
319  * @platform
320  * @brief Adds the system settings value associated with the given key as a string type if it supports List iteration.
321  * @since_tizen 3.0
322  * @privlevel platform
323  * @privilege %http://tizen.org/privilege/systemsettings.admin
324  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
325  * @param[in] key The key name of the system settings
326  * @param[in] value string typed value to be appended
327  * @return @c 0 on success, otherwise a negative error value
328  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
329  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
330  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
331  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
332  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
333  */
334 int system_settings_add_value_string(system_settings_key_e key, const char *value);
335
336 /**
337  * @platform
338  * @brief Delete the system settings value associated with the given key as an string type if it supports List iteration.
339  * @since_tizen 3.0
340  * @privlevel platform
341  * @privilege %http://tizen.org/privilege/systemsettings.admin
342  * @remarks When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
343  * @param[in] key The key name of the system settings
344  * @param[in] value string typed value to be removed
345  * @return @c 0 on success, otherwise a negative error value
346  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
347  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
348  * @retval #SYSTEM_SETTINGS_ERROR_IO_ERROR Internal I/O error
349  * @retval #SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED Permission violation error
350  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
351  */
352 int system_settings_delete_value_string(system_settings_key_e key, const char *value);
353
354
355 /**
356  * @brief Adds a change event callback for the given system settings key.
357  * @details The difference between this function and system_settings_set_changed_cb() is that system_settings_set_changed_cb() can set only one callback for a given key, while system_settings_add_changed_cb() can set multiple callbacks for a given key.
358  * @since_tizen 5.0
359  * @remarks The @a key cannot be #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
360
361  * @param[in] key The key name of the system settings
362  * @param[in] callback The callback function to invoke
363  * @param[in] user_data The user data to be passed to the callback function
364  * @return 0 on success, otherwise a negative error value
365  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
366  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
367  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
368  * @post system_settings_changed_cb() will be invoked.
369  *
370  * @see system_settings_remove_changed_cb()
371  * @see system_settings_changed_cb()
372  *
373 */
374 int system_settings_add_changed_cb(system_settings_key_e key, system_settings_changed_cb callback, void *user_data);
375
376 /**
377  * @brief Removes a change event callback function.
378  * @details The difference between this function and system_settings_unset_changed_cb() is that system_settings_unset_changed_cb() unsets the callback set with system_settings_set_changed_cb(), while system_settings_remove_changed_cb() removes callbacks added with system_settings_add_changed_cb()
379  * @since_tizen 5.0
380  * @remarks The @a key cannot be #SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE. When the feature related to the @a key is not supported on the device, #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED will be returned.
381  * @param[in] key The key name of the system settings
382  * @param[in] callback The callback function to be removed
383  * @return 0 on success, otherwise a negative error value
384  * @retval #SYSTEM_SETTINGS_ERROR_NONE Successful
385  * @retval #SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER Invalid parameter
386  * @retval #SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED The related feature is not supported on the device
387  *
388  * @see system_settings_add_changed_cb()
389  */
390 int system_settings_remove_changed_cb(system_settings_key_e key, system_settings_changed_cb callback);
391 /**
392  * @}
393  */
394
395
396 #ifdef __cplusplus
397 }
398 #endif
399
400 #endif /* __TIZEN_SYSTEM_SYSTEM_SETTINGS_H__ */