2 * Copyright (c) 2020 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #include "system_settings.h"
22 SYSTEM_SETTING_DATA_TYPE_STRING, /**< string */
23 SYSTEM_SETTING_DATA_TYPE_INT, /**< integer */
24 SYSTEM_SETTING_DATA_TYPE_BOOL, /**< boolean */
25 //SYSTEM_SETTING_DATA_TYPE_FLOAT,
26 //SYSTEM_SETTING_DATA_TYPE_DOULBE,
27 } sst_interface_data_type;
29 typedef struct _system_setting_s sst_interface;
31 typedef int (*sst_get_value_fn)(sst_interface *iface, void **value);
32 typedef int (*sst_set_value_fn)(sst_interface *iface, void *value);
33 typedef int (*sst_add_value_fn)(system_settings_key_e key, void *value);
34 typedef int (*sst_del_value_fn)(system_settings_key_e key, void *value);
35 typedef int (*sst_list_value_cb)(system_settings_key_e key, system_settings_iter_cb callback, void *user_data);
37 typedef int (*sst_check_feature_fn)(void *value);
39 struct _system_setting_s {
40 system_settings_key_e key;
41 const char* const vconf_key;
42 sst_interface_data_type data_type;
44 sst_get_value_fn get_value_cb;
45 sst_set_value_fn set_value_cb;
47 sst_add_value_fn add_value_cb;
48 sst_del_value_fn del_value_cb;
49 sst_list_value_cb list_value_cb;
51 sst_check_feature_fn feature_check_cb;
54 int sst_get_interface(system_settings_key_e key, sst_interface **iface);