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