3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
21 * @brief This file is the source file of implementation of wrapping vconf function
30 #include <sync_agent.h>
32 #include "common/common_vconf.h"
34 char *get_vconf_str(char *base_key, char *key)
41 snprintf(path, sizeof(path), "%s%s", base_key, key);
42 value = vconf_get_str(path);
45 if (strcmp(value, "") == 0) {
63 char *get_vconf_str_key(char *key)
68 value = vconf_get_str(key);
71 if (strcmp(value, "") == 0) {
88 bool get_vconf_int(char *base_key, char *key, int *value)
96 snprintf(path, sizeof(path), "%s%s", base_key, key);
97 result = vconf_get_int(path, &temp);
108 bool get_vconf_int_key(char *key, int *value)
115 result = vconf_get_int(key, &temp);
126 bool set_vconf_str(char *base_key, char *key, char *value)
133 snprintf(path, sizeof(path), "%s%s", base_key, key);
134 result = vconf_set_str(path, value);
144 bool set_vconf_str_key(char *key, char *value)
149 result = vconf_set_str(key, value);
159 bool set_vconf_int(char *base_key, char *key, int value)
166 snprintf(path, sizeof(path), "%s%s", base_key, key);
167 result = vconf_set_int(path, value);
177 bool set_vconf_int_key(char *key, int value)
183 result = vconf_set_int(key, value);