2 * Copyright (c) 2011 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.
24 #include <runtime_info.h>
25 #include <runtime_info_private.h>
31 #define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
33 static const char *VCONF_LOCATION_SERVICE_ENABLED = VCONFKEY_LOCATION_ENABLED;
34 static const char *VCONF_LOCATION_AGPS_ENABLED = VCONFKEY_LOCATION_AGPS_ENABLED;
35 static const char *VCONF_LOCATION_NETWORK_ENABLED = VCONFKEY_LOCATION_NETWORK_ENABLED;
37 int runtime_info_location_service_get_value(runtime_info_value_h value)
41 if (runtime_info_vconf_get_value_int(VCONF_LOCATION_SERVICE_ENABLED, &vconf_value))
44 value->b = vconf_value;
46 return RUNTIME_INFO_ERROR_NONE;
49 int runtime_info_location_service_set_event_cb()
51 return runtime_info_vconf_set_event_cb(VCONF_LOCATION_SERVICE_ENABLED, RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED, 0);
54 void runtime_info_location_service_unset_event_cb()
56 runtime_info_vconf_unset_event_cb(VCONF_LOCATION_SERVICE_ENABLED, 0);
59 int runtime_info_location_agps_get_value(runtime_info_value_h value)
63 if (runtime_info_vconf_get_value_int(VCONF_LOCATION_AGPS_ENABLED, &vconf_value))
66 value->b = vconf_value;
68 return RUNTIME_INFO_ERROR_NONE;
71 int runtime_info_location_agps_set_event_cb()
73 return runtime_info_vconf_set_event_cb(VCONF_LOCATION_AGPS_ENABLED, RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED, 0);
76 void runtime_info_location_agps_unset_event_cb()
78 runtime_info_vconf_unset_event_cb(VCONF_LOCATION_AGPS_ENABLED, 0);
81 int runtime_info_location_network_get_value(runtime_info_value_h value)
85 if (runtime_info_vconf_get_value_int(VCONF_LOCATION_NETWORK_ENABLED, &vconf_value))
88 value->b = vconf_value;
90 return RUNTIME_INFO_ERROR_NONE;
93 int runtime_info_location_network_set_event_cb()
95 return runtime_info_vconf_set_event_cb(VCONF_LOCATION_NETWORK_ENABLED, RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED, 0);
98 void runtime_info_location_network_unset_event_cb()
100 runtime_info_vconf_unset_event_cb(VCONF_LOCATION_NETWORK_ENABLED, 0);