Removing conditional statements for Mobile/Wearable profile
[platform/core/api/system-settings.git] / include / system_settings.h
index c2ecb5f..5f29a89 100644 (file)
@@ -1,19 +1,18 @@
 /*
- * 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__
 
@@ -33,7 +32,6 @@ extern "C"
  * @{
  */
 
-
 /**
  * @brief Enumeration for system settings error.
  * @since_tizen 2.3
@@ -42,16 +40,15 @@ typedef enum {
        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_CALL_UNSUPPORTED_API = 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 (Since 2.3.1) */
+       SYSTEM_SETTINGS_ERROR_CALL_UNSUPPORTED_API = TIZEN_ERROR_NOT_SUPPORTED, /**< Not supported (Since 2.3.1) */
 
        /* 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
@@ -64,9 +61,9 @@ typedef enum {
        SYSTEM_SETTINGS_KEY_FONT_TYPE, /**< (string) The current system font type */
        SYSTEM_SETTINGS_KEY_MOTION_ACTIVATION, /**< (bool) Indicates whether the motion service is activated */
        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_USB_DEBUGGING_ENABLED,      /**< (bool) Indicates whether the USB debugging is enabled (Since 2.4) */
+       SYSTEM_SETTINGS_KEY_3G_DATA_NETWORK_ENABLED,  /**< (bool) Indicates whether the 3G data network is enabled (Since 2.4) */
+       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. */
@@ -94,6 +91,7 @@ typedef enum {
        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;
 
@@ -107,7 +105,6 @@ typedef enum {
        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
@@ -130,8 +127,6 @@ typedef enum {
        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
@@ -143,6 +138,9 @@ typedef enum {
  */
 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.
@@ -177,7 +175,6 @@ int system_settings_set_value_int(system_settings_key_e key, int value);
  */
 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.
@@ -283,7 +280,6 @@ int system_settings_set_changed_cb(system_settings_key_e key, system_settings_ch
  */
 int system_settings_unset_changed_cb(system_settings_key_e key);
 
-
 /**
  * @platform
  * @brief Called to get each string value from string typed list.
@@ -293,7 +289,7 @@ int system_settings_unset_changed_cb(system_settings_key_e key);
  * @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 charvalue, void *cb_data);
+typedef bool (*system_settings_iter_cb)(int index, const char *value, void *cb_data);
 
 /**
  * @platform
@@ -350,7 +346,6 @@ int system_settings_add_value_string(system_settings_key_e key, const char *valu
  */
 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.
@@ -391,7 +386,6 @@ int system_settings_remove_changed_cb(system_settings_key_e key, system_settings
  * @}
  */
 
-
 #ifdef __cplusplus
 }
 #endif