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.
18 #include "system_settings.h"
21 SYSTEM_SETTING_DATA_TYPE_STRING, /**< string */
22 SYSTEM_SETTING_DATA_TYPE_INT, /**< integer */
23 SYSTEM_SETTING_DATA_TYPE_BOOL, /**< boolean */
24 //SYSTEM_SETTING_DATA_TYPE_FLOAT,
25 //SYSTEM_SETTING_DATA_TYPE_DOULBE,
26 } sst_interface_data_type;
28 typedef struct sst_interface_s sst_interface;
30 typedef int (*sst_check_feature_fn)(void *value);
32 typedef int (*sst_get_int_fn)(sst_interface *iface, int *value);
33 typedef int (*sst_get_bool_fn)(sst_interface *iface, bool *value);
34 typedef int (*sst_get_str_fn)(sst_interface *iface, char **value);
36 typedef int (*sst_set_int_fn)(sst_interface *iface, int value);
37 typedef int (*sst_set_bool_fn)(sst_interface *iface, bool value);
38 typedef int (*sst_set_str_fn)(sst_interface *iface, const char *value);
41 struct sst_interface_s {
42 system_settings_key_e key;
43 const char* const vconf_key;
44 sst_interface_data_type data_type;
45 sst_check_feature_fn feature_checker;
58 int sst_get_interface(system_settings_key_e key, sst_interface **iface);