2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.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.tizenopensource.org/license
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.
17 #include "cst-debug.h"
22 void _cst_vconf_get_bool(const char *in_key, int *boolval)
24 if ((vconf_get_bool(in_key, boolval)) < 0)
25 DBG("vconf get error : %s", in_key);
28 void _cst_vconf_get_int(const char *in_key, int *intval)
30 if ((vconf_get_int(in_key, intval)) < 0)
31 DBG("vconf get error : %s", in_key);
34 char *_cst_vconf_get_str(const char *in_key)
37 result = vconf_get_str(in_key);
39 DBG("vconf get error : %s", in_key);
44 void _cst_vconf_set_bool(const char *in_key, const int boolval)
46 if (vconf_set_bool(in_key, boolval) < 0)
47 DBG("vconf set error : %s", in_key);
49 DBG("vconf set : %d(%s)", boolval, in_key);
52 void _cst_vconf_set_int(const char *in_key, const int intval)
54 if (vconf_set_int(in_key, intval) < 0)
55 DBG("vconf set error : %s", in_key);
57 DBG("vconf set : %d(%s)", intval, in_key);
60 void _cst_vconf_set_str(const char *in_key, const char *strval)
62 if (vconf_set_str(in_key, strval) < 0)
63 DBG("vconf set error : %s", in_key);
65 DBG("vconf set : %s(%s)", strval, in_key);
68 Eina_Bool _cst_check_flight_mode(void)
70 ENTER(_cst_check_flight_mode);
71 int flight_mode = EINA_FALSE;
73 _cst_vconf_get_bool(VCONFKEY_SETAPPL_FLIGHT_MODE_BOOL, &flight_mode);
77 Eina_Bool _cst_check_sim_status(void)
79 ENTER(_cst_check_sim_status);
80 int sim_status = VCONFKEY_TELEPHONY_SIM_UNKNOWN;
81 Eina_Bool sim_avail = EINA_FALSE;
83 _cst_vconf_get_int(VCONFKEY_TELEPHONY_SIM_SLOT, &sim_status);
84 if (sim_status == VCONFKEY_TELEPHONY_SIM_INSERTED) {
85 sim_avail = EINA_TRUE;