/*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011-2020 Samsung Electronics Co., Ltd All Rights Reserved
*
- * Licensed under the Apache License, Version 2.0 (the License);
+ * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an AS IS BASIS,
+ * distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
#ifndef __TIZEN_SYSTEM_SYSTEM_SETTINGS_H__
#define __TIZEN_SYSTEM_SYSTEM_SETTINGS_H__
* @{
*/
-
/**
* @brief Enumeration for system settings error.
* @since_tizen 2.3
SYSTEM_SETTINGS_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
SYSTEM_SETTINGS_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
- SYSTEM_SETTINGS_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< Internal I/O error */
- SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
- SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported @if MOBILE (Since 2.3.1) @endif */
+ SYSTEM_SETTINGS_ERROR_IO_ERROR = TIZEN_ERROR_IO_ERROR, /**< Internal I/O error */
+ SYSTEM_SETTINGS_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED, /**< Permission denied */
+ SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported @if MOBILE (Since 2.3.1) @endif */
SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported @if MOBILE (Since 2.3.1) @endif */
/* lock screen app error code */
SYSTEM_SETTINGS_ERROR_LOCKSCREEN_APP_PASSWORD_MODE = TIZEN_ERROR_SYSTEM_SETTING | 0x01, /**< Current lock screen app set 'password' type */
} system_settings_error_e;
-
/**
* @brief Enumeration for System Settings Key.
* @since_tizen 2.3
SYSTEM_SETTINGS_KEY_EMAIL_ALERT_RINGTONE, /**< (string) The file path of the current email alert ringtone */
SYSTEM_SETTINGS_KEY_USB_DEBUGGING_ENABLED, /**< (bool) Indicates whether the USB debugging is enabled (Since @if MOBILE 2.4 @elseif WEARABLE 3.0 @endif) */
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) */
- SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP = SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED+2, /**< (string) Indicates lockscreen app pkg name */
+ SYSTEM_SETTINGS_KEY_LOCKSCREEN_APP = SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED + 2, /**< (string) Indicates lockscreen app pkg name */
SYSTEM_SETTINGS_KEY_DEFAULT_FONT_TYPE,/**< (string) The current system default font type (only support Get) */
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 */
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. */
SYSTEM_SETTINGS_KEY_DEVELOPER_OPTION_STATE, /**< (bool) Indicates whether developer option state is enabled on the device. (Since 5.0) */
SYSTEM_SETTINGS_KEY_ACCESSIBILITY_GRAYSCALE, /**< (bool) Indicates whether accessibility grayscale is enabled on the device. (Since 5.5) */
SYSTEM_SETTINGS_KEY_ACCESSIBILITY_NEGATIVE_COLOR, /**< (bool) Indicates whether accessibility negative color is enabled on the device. (Since 5.5) */
+ SYSTEM_SETTINGS_KEY_ROTARY_EVENT_ENABLED, /**< (bool) Indicates whether rotary event is enabled on the device. (Since 5.5) */
SYSTEM_SETTINGS_KEY_MAX,
} system_settings_key_e;
SYSTEM_SETTINGS_LOCK_STATE_LAUNCHING_LOCK /**< Device is being locked */
} system_settings_idle_lock_state_e;
-
/**
* @brief Enumeration for font size.
* @since_tizen 2.3
SYSTEM_SETTINGS_UDS_ON_WHITELISTED, /**< UDS on and the app is whitelisted */
} system_settings_uds_state_e;
-
-
/**
* @brief Called when the system settings changes.
* @since_tizen 2.3
*/
typedef void (*system_settings_changed_cb)(system_settings_key_e key, void *user_data);
+
+typedef void* system_settings_cb_id;
+
/**
* @platform
* @brief Sets the system settings value associated with the given key as an integer.
*/
int system_settings_get_value_int(system_settings_key_e key, int *value);
-
/**
* @platform
* @brief Sets the system settings value associated with the given key as a boolean.
*/
int system_settings_unset_changed_cb(system_settings_key_e key);
-
/**
* @platform
* @brief Called to get each string value from string typed list.
* @param[in] cb_data The user data passed from the foreach function
* @return @c true to continue with the next iteration of the loop, otherwise false to break out of the loop
*/
-typedef bool (*system_settings_iter_cb)(int index, const char* value, void *cb_data);
+typedef bool (*system_settings_iter_cb)(int index, const char *value, void *cb_data);
/**
* @platform
*/
int system_settings_delete_value_string(system_settings_key_e key, const char *value);
-
/**
* @brief Adds a change event callback for the given system settings key.
* @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.
* @}
*/
-
#ifdef __cplusplus
}
#endif