runtime-info: Merge Tizen 2.3 source code into tizen branch 02/35102/3 accepted/tizen/common/20150210.094911 accepted/tizen/mobile/20150210.120109 accepted/tizen/tv/20150210.141230 accepted/tizen/wearable/20150210.115650 submit/tizen/20150210.060027
authorJiyoung Yun <jy910.yun@samsung.com>
Mon, 9 Feb 2015 06:53:15 +0000 (15:53 +0900)
committerJiyoung Yun <jy910.yun@samsung.com>
Tue, 10 Feb 2015 05:35:22 +0000 (14:35 +0900)
Details:
https://developer.tizen.org/dev-guide/native/2.3.0/org.tizen.mobile.native.apireference/group__CAPI__SYSTEM__RUNTIME__INFO__MODULE.html

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
Change-Id: I0c49d941e426b1c6b1369bc15377b9bf65c81843

13 files changed:
CMakeLists.txt
doc/runtime_info_doc.h [new file with mode: 0644]
include/runtime_info.h
include/runtime_info_private.h
packaging/capi-system-runtime-info-devel.manifest [deleted file]
packaging/capi-system-runtime-info.manifest
packaging/capi-system-runtime-info.spec
src/runtime_info.c
src/runtime_info_connectivity.c
src/runtime_info_locale.c
src/runtime_info_location.c
src/runtime_info_system.c
src/runtime_info_vconf.c

index 5add3fb..70ed8d7 100755 (executable)
@@ -19,7 +19,7 @@ FOREACH(flag ${${fw_name}_CFLAGS})
     SET(EXTRA_CFLAGS "${EXTRA_CFLAGS} ${flag}")
 ENDFOREACH(flag)
 
-SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror")
+SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${EXTRA_CFLAGS} -fPIC -Wall -Werror -fvisibility=hidden")
 SET(CMAKE_C_FLAGS_DEBUG "-O0 -g")
 
 IF("${ARCH}" STREQUAL "arm")
@@ -29,7 +29,7 @@ ENDIF("${ARCH}" STREQUAL "arm")
 ADD_DEFINITIONS("-DPREFIX=\"${CMAKE_INSTALL_PREFIX}\"")
 ADD_DEFINITIONS("-DSLP_DEBUG")
 
-SET(CMAKE_EXE_LINKER_FLAGS "-fvisibility=hidden -Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
+SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -Wl,--rpath=${LIB_INSTALL_DIR}")
 
 aux_source_directory(src SOURCES)
 ADD_LIBRARY(${fw_name} SHARED ${SOURCES})
diff --git a/doc/runtime_info_doc.h b/doc/runtime_info_doc.h
new file mode 100644 (file)
index 0000000..77dbb8d
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the License);
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an AS IS BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+
+#ifndef __TIZEN_SYSTEM_RUNTIME_INFO_DOC_H__
+#define __TIZEN_SYSTEM_RUNTIME_INFO_DOC_H__
+
+/**
+ * @ingroup CAPI_SYSTEM_FRAMEWORK
+ * @defgroup CAPI_SYSTEM_RUNTIME_INFO_MODULE Runtime information
+ * @brief  The Runtime Information API provides functions to obtain runtime information.
+ *
+ * @section CAPI_SYSTEM_RUNTIME_INFO_MODULE_HEADER Required Header
+ *   \#include <runtime_info.h>
+ *
+ * @section CAPI_SYSTEM_RUNTIME_INFO_MODULE_OVERVIEW Overview
+ * The Runtime Information API provides functions to obtain runtime information, containing miscellaneous system preference.
+ * The Runtime Information available is stored in key/value pairs, where there may be different data types for the value.
+ *
+ * The runtime_info_set_changed_cb() registers a callback function for a particular key, which will be invoked by the System Service if the state matching that key changes.
+*
+*/
+
+#endif /* __TIZEN_SYSTEM_RUNTIME_INFO_DOC_H__ */
index ba730de..439f997 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -30,162 +30,200 @@ extern "C"
  */
 
 /**
- * @brief Enumeration of error code for runtime information
+ * @brief Enumeration for error codes for runtime information.
  */
 typedef enum {
-       RUNTIME_INFO_ERROR_NONE = TIZEN_ERROR_NONE, /**< Successful */
-       RUNTIME_INFO_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER, /**< Invalid parameter */
-       RUNTIME_INFO_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY, /**< Out of memory */
-       RUNTIME_INFO_ERROR_IO_ERROR =  TIZEN_ERROR_IO_ERROR, /**< An input/output error occurred when read value from system */
+       RUNTIME_INFO_ERROR_NONE = TIZEN_ERROR_NONE,                                                             /**< Successful */
+       RUNTIME_INFO_ERROR_INVALID_PARAMETER = TIZEN_ERROR_INVALID_PARAMETER,   /**< Invalid parameter */
+       RUNTIME_INFO_ERROR_OUT_OF_MEMORY = TIZEN_ERROR_OUT_OF_MEMORY,                   /**< Out of memory */
+       RUNTIME_INFO_ERROR_IO_ERROR =  TIZEN_ERROR_IO_ERROR,                                    /**< An input/output error occurred when read value from system */
+       RUNTIME_INFO_ERROR_PERMISSION_DENIED = TIZEN_ERROR_PERMISSION_DENIED,   /**< No permission to use the api */
 } runtime_info_error_e;
 
 /**
- * @brief Enumeration of key for runtime information
+ * @brief Enumeration for keys for runtime information..
  */
 typedef enum {
-       RUNTIME_INFO_KEY_FLIGHT_MODE_ENABLED, /**<Indicates whether the device is in flight mode. */
-       RUNTIME_INFO_KEY_WIFI_STATUS, /**<Indicates the current status of Wi-Fi. */
-       RUNTIME_INFO_KEY_BLUETOOTH_ENABLED, /**<Indicates whether Bluetooth is enabled. */
-       RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED, /**<Indicates whether Wi-Fi hotspot is enabled. */
-       RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED, /**<Indicates whether Bluetooth tethering is enabled. */
-       RUNTIME_INFO_KEY_USB_TETHERING_ENABLED, /**<Indicates whether USB tethering is enabled. */
-       RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED, /**<Indicates whether the location service is allowed to use location data from GPS satellites. */
-       RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED, /**<Indicates whether the location service is allowed to download location data for GPS operation. */
-       RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED, /**<Indicates whether the location service is allowed to use location data from cellular and Wi-Fi. */
-       RUNTIME_INFO_KEY_LOCATION_SENSOR_AIDING_ENABLED, /**<Indicates whether the location service is allowed to use pedestrian sensors for positioning performance. */
-       RUNTIME_INFO_KEY_PACKET_DATA_ENABLED, /**<Indicates Whether the packet data through 3G network is enabled. */
-       RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED, /**<Indicates whether data roaming is enabled. */
-       RUNTIME_INFO_KEY_SILENT_MODE_ENABLED, /**<Indicates whether the device is in silent mode. */
-       RUNTIME_INFO_KEY_VIBRATION_ENABLED, /**<Indicates whether vibration is enabled. */
-       RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED, /**<Indicates whether 24-hour clock is enabled. */
-       RUNTIME_INFO_KEY_FIRST_DAY_OF_WEEK, /**<Indicates the first day of week. */
-       RUNTIME_INFO_KEY_LANGUAGE, /**<Indicates the current language setting. */
-       RUNTIME_INFO_KEY_REGION, /**<Indicates the current region setting. */
-       RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED, /**<Indicates whether audio jack is connected. */
-       RUNTIME_INFO_KEY_GPS_STATUS, /**<Indicates the current status of GPS. */
-       RUNTIME_INFO_KEY_BATTERY_IS_CHARGING, /**<Indicates the battery is currently charging. */
-       RUNTIME_INFO_KEY_TV_OUT_CONNECTED, /**<Indicates whether TV out is connected. */
-       RUNTIME_INFO_KEY_AUDIO_JACK_STATUS, /**<Indicates the current status of audio jack. */
-       RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED, /**<Indicates whether sliding keyboard is opened. */
-       RUNTIME_INFO_KEY_USB_CONNECTED, /**<Indicates whether USB is connected. */
-       RUNTIME_INFO_KEY_CHARGER_CONNECTED, /**<Indicates whether charger is connected. */
-       RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK, /**<Indicates the current vibration level of haptic feedback. */
-       RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED, /**<Indicates whether auto rotation is enabled. */
+       RUNTIME_INFO_KEY_FLIGHT_MODE_ENABLED,                                   /**<@internal Indicates whether the device is in flight mode. */
+       RUNTIME_INFO_KEY_WIFI_STATUS,                                                   /**<@internal Indicates the current status of Wi-Fi. */
+       RUNTIME_INFO_KEY_BLUETOOTH_ENABLED,                                             /**<Indicates whether Bluetooth is enabled. */
+       RUNTIME_INFO_KEY_WIFI_HOTSPOT_ENABLED,                                  /**<Indicates whether Wi-Fi hotspot is enabled. */
+       RUNTIME_INFO_KEY_BLUETOOTH_TETHERING_ENABLED,                   /**<Indicates whether Bluetooth tethering is enabled. */
+       RUNTIME_INFO_KEY_USB_TETHERING_ENABLED,                                 /**<Indicates whether USB tethering is enabled. */
+       RUNTIME_INFO_KEY_LOCATION_SERVICE_ENABLED,                              /**<Indicates whether the location service is allowed to use location data from GPS satellites. */
+       RUNTIME_INFO_KEY_LOCATION_ADVANCED_GPS_ENABLED,                 /**<@internal Indicates whether the location service is allowed to download location data for GPS operation. */
+       RUNTIME_INFO_KEY_LOCATION_NETWORK_POSITION_ENABLED,             /**<Indicates whether the location service is allowed to use location data from cellular and Wi-Fi. */
+       RUNTIME_INFO_KEY_PACKET_DATA_ENABLED,                                   /**<Indicates Whether the packet data through 3G network is enabled. */
+       RUNTIME_INFO_KEY_DATA_ROAMING_ENABLED,                                  /**<Indicates whether data roaming is enabled. */
+       RUNTIME_INFO_KEY_SILENT_MODE_ENABLED,                                   /**<@internal Indicates whether the device is in silent mode. */
+       RUNTIME_INFO_KEY_VIBRATION_ENABLED,                                             /**<Indicates whether vibration is enabled. */
+       RUNTIME_INFO_KEY_24HOUR_CLOCK_FORMAT_ENABLED,                   /**<@internal Indicates whether 24-hour clock is enabled. */
+       RUNTIME_INFO_KEY_FIRST_DAY_OF_WEEK,                                             /**<@internal Indicates the first day of week. */
+       RUNTIME_INFO_KEY_LANGUAGE,                                                              /**<@internal Indicates the current language setting. */
+       RUNTIME_INFO_KEY_REGION,                                                                /**<@internal Indicates the current region setting. */
+       RUNTIME_INFO_KEY_AUDIO_JACK_CONNECTED,                                  /**<Indicates whether audio jack is connected. */
+       RUNTIME_INFO_KEY_GPS_STATUS,                                                    /**<Indicates the current status of GPS. */
+       RUNTIME_INFO_KEY_BATTERY_IS_CHARGING,                                   /**<Indicates the battery is currently charging. */
+       RUNTIME_INFO_KEY_TV_OUT_CONNECTED,                                              /**<Indicates whether TV out is connected. */
+       RUNTIME_INFO_KEY_AUDIO_JACK_STATUS,                                             /**<Indicates the current status of audio jack. */
+       RUNTIME_INFO_KEY_SLIDING_KEYBOARD_OPENED,                               /**<@internal Indicates whether sliding keyboard is opened. */
+       RUNTIME_INFO_KEY_USB_CONNECTED,                                                 /**<Indicates whether USB is connected. */
+       RUNTIME_INFO_KEY_CHARGER_CONNECTED,                                             /**<Indicates whether charger is connected. */
+       RUNTIME_INFO_KEY_VIBRATION_LEVEL_HAPTIC_FEEDBACK,               /**<@internal Indicates the current vibration level of haptic feedback. */
+       RUNTIME_INFO_KEY_AUTO_ROTATION_ENABLED,                                 /**<Indicates whether auto rotation is enabled. */
 } runtime_info_key_e;
 
 
 /**
- * @brief Enumeration of Wi-Fi status
+ * @brief Enumeration for Wi-Fi status.
  */
 typedef enum {
-       RUNTIME_INFO_WIFI_STATUS_DISABLED, /**< GPS is disabled. */
-       RUNTIME_INFO_WIFI_STATUS_UNCONNECTED, /**< Wi-Fi is enabled and network connection is not established. */
-       RUNTIME_INFO_WIFI_STATUS_CONNECTED, /**< Network connection is established in Wi-Fi network. */
+       RUNTIME_INFO_WIFI_STATUS_DISABLED,                              /**< GPS is disabled. */
+       RUNTIME_INFO_WIFI_STATUS_UNCONNECTED,                   /**< Wi-Fi is enabled and network connection is not established. */
+       RUNTIME_INFO_WIFI_STATUS_CONNECTED,                             /**< Network connection is established in Wi-Fi network. */
 } runtime_info_wifi_status_e;
 
 /**
- * @brief Enumeration of GPS status
+ * @brief Enumeration for GPS status.
  */
 typedef enum {
-       RUNTIME_INFO_GPS_STATUS_DISABLED, /**< GPS is disabled. */
-       RUNTIME_INFO_GPS_STATUS_SEARCHING, /**< GPS is searching for satellites. */
-       RUNTIME_INFO_GPS_STATUS_CONNECTED, /**< GPS connection is established. */
+       RUNTIME_INFO_GPS_STATUS_DISABLED,                               /**< GPS is disabled. */
+       RUNTIME_INFO_GPS_STATUS_SEARCHING,                              /**< GPS is searching for satellites. */
+       RUNTIME_INFO_GPS_STATUS_CONNECTED,                              /**< GPS connection is established. */
 } runtime_info_gps_status_e;
 
 /**
- * @brief Enumeration of first day of week
+ * @internal
+ * @brief Enumeration for first day of week.
  */
 typedef enum {
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_SUNDAY, /**< Sunday */
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_MONDAY, /**< Monday */
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_TUESDAY, /**< Tuesday */
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_WEDNESDAY, /**< Wednesday */
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_THURSDAY, /**< Thursday */
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_FRIDAY, /**< Friday */
-       RUNTIME_INFO_FIRST_DAY_OF_WEEK_SATURDAY, /**< Saturday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_SUNDAY,                  /**< Sunday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_MONDAY,                  /**< Monday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_TUESDAY,                 /**< Tuesday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_WEDNESDAY,               /**< Wednesday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_THURSDAY,                /**< Thursday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_FRIDAY,                  /**< Friday */
+       RUNTIME_INFO_FIRST_DAY_OF_WEEK_SATURDAY,                /**< Saturday */
 } runtime_info_first_day_of_week_e;
 
 /**
- * @brief Enumeration of audio jack status
+ * @brief Enumeration for audio jack status.
  */
 typedef enum {
-       RUNTIME_INFO_AUDIO_JACK_STATUS_UNCONNECTED, /**< audio jack is not connected */
-       RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_3WIRE, /**< 3-conductor wire is connected. */
-       RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_4WIRE, /**< 4-conductor wire is connected. */
+       RUNTIME_INFO_AUDIO_JACK_STATUS_UNCONNECTED,             /**< Audio jack is not connected */
+       RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_3WIRE, /**< 3-conductor wire is connected. */
+       RUNTIME_INFO_AUDIO_JACK_STATUS_CONNECTED_4WIRE, /**< 4-conductor wire is connected. */
 } runtime_info_audio_jack_status_e;
 
 
 /**
  * @brief   Called when the runtime information changes
- * @param[in] key Type of notification
+ * @since_tizen 2.3
+ *
+ * @param[in] key       The type of notification
  * @param[in] user_data The user data passed from the callback registration function
+ *
  * @pre runtime_info_set_changed_cb() will invoke this callback function.
+ *
  * @see runtime_info_set_changed_cb()
  * @see runtime_info_unset_changed_cb()
  */
 typedef void (*runtime_info_changed_cb)(runtime_info_key_e key, void *user_data);
 
 /**
- * @brief   Gets the integer value of the runtime information
+ * @brief   Gets the integer value of the runtime information.
  * @details This function gets current state of the given key which represents specific runtime information.
- * @param[in] key The runtime information status key from which data should be read
+ *
+ * @since_tizen 2.3
+ *
+ * @param[in]  key   The runtime information status key from which data should be read
  * @param[out] value The current value of the given key
- * @return  0 on success, otherwise a negative error value.
- * @retval  #RUNTIME_INFO_ERROR_NONE Successful
+ *
+ * @return  @c 0 on success,
+ *          otherwise a negative error value
+ *
+ * @retval  #RUNTIME_INFO_ERROR_NONE              Successful
  * @retval  #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval  #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_IO_ERROR          An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api
  */
 int runtime_info_get_value_int(runtime_info_key_e key, int *value);
 
 /**
- * @brief   Gets the boolean value from the runtime information
+ * @brief   Gets the boolean value from the runtime information.
  * @details This function gets current state of the given key which represents specific runtime information.
- * @param[in] key The runtime information  key from which data should be read
+ *
+ * @since_tizen 2.3
+ *
+ * @param[in]  key   The runtime information key from which data should be read
  * @param[out] value The current value of the given key
- * @return  0 on success, otherwise a negative error value.
- * @retval  #RUNTIME_INFO_ERROR_NONE Successful
+ *
+ * @return  @c 0 on success,
+ *          otherwise a negative error value
+ *
+ * @retval  #RUNTIME_INFO_ERROR_NONE              Successful
  * @retval  #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval  #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_IO_ERROR          An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api
  */
 int runtime_info_get_value_bool(runtime_info_key_e key, bool *value);
 
 /**
- * @brief   Gets the double value from the runtime information
+ * @brief   Gets the double value from the runtime information.
  * @details This function gets current state of the given key which represents specific runtime information.
- * @param[in] key The runtime information  key from which data should be read
+ *
+ * @since_tizen 2.3
+ *
+ * @param[in]  key   The runtime information key from which data should be read
  * @param[out] value The current value of the given key
- * @return  0 on success, otherwise a negative error value.
- * @retval  #RUNTIME_INFO_ERROR_NONE Successful
+ *
+ * @return  @c 0 on success,
+ *          otherwise a negative error value
+ *
+ * @retval  #RUNTIME_INFO_ERROR_NONE              Successful
  * @retval  #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval  #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_IO_ERROR          An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api
  */
 int runtime_info_get_value_double(runtime_info_key_e key, double *value);
 
 /**
- * @brief   Gets the string value for specified runtime information
+ * @brief   Gets the string value for specified runtime information.
  * @details This function gets current state of the given key which represents specific runtime information.
- * @remarks @a value must be released with @c free() by you.
- * @param[in] key The runtime information  key from which data should be read
+ *
+ * @since_tizen 2.3
+ *
+ * @remarks  You must release @a value using free().
+ *
+ * @param[in]  key   The runtime information key from which data should be read
  * @param[out] value The current value of the given key
- * @return  0 on success, otherwise a negative error value.
- * @retval  #RUNTIME_INFO_ERROR_NONE Successful
+ *
+ * @return  @c 0 on success,
+ *          otherwise a negative error value
+ *
+ * @retval  #RUNTIME_INFO_ERROR_NONE              Successful
  * @retval  #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter
- * @retval  #RUNTIME_INFO_ERROR_IO_ERROR An input/output error occurred when read value from system
- * @retval  #RUNTIME_INFO_ERROR_OUT_OF_MEMORY Out of memory
+ * @retval  #RUNTIME_INFO_ERROR_IO_ERROR          An input/output error occurred when read value from system
+ * @retval  #RUNTIME_INFO_ERROR_OUT_OF_MEMORY     Out of memory
+ * @retval  #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api
  */
 int runtime_info_get_value_string(runtime_info_key_e key, char **value);
 
 
 /**
  * @brief   Registers a change event callback for given runtime information key.
+ * @since_tizen 2.3
  *
- * @param[in] key The runtime information type
- * @param[in] callback The callback function to invoke
+ * @param[in] key       The runtime information type
+ * @param[in] callback  The callback function to invoke
  * @param[in] user_data The user data to be passed to the callback function
  *
- * @return  0 on success, otherwise a negative error value.
- * @retval  #RUNTIME_INFO_ERROR_NONE Successful
+ * @return  @c 0 on success,
+ *          otherwise a negative error value
+ *
+ * @retval  #RUNTIME_INFO_ERROR_NONE              Successful
  * @retval  #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter
+ * @retval  #RUNTIME_INFO_ERROR_PERMISSION_DENIED No permission to use the api
  * @post runtime_info_changed_cb() will be invoked.
  *
  * @see runtime_info_unset_changed_cb()
@@ -196,10 +234,14 @@ int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb
 
 /**
  * @brief   Unregisters the callback function.
+ * @since_tizen 2.3
  *
  * @param[in] key The runtime information type
- * @return  0 on success, otherwise a negative error value.
- * @retval  #RUNTIME_INFO_ERROR_NONE Successful
+ *
+ * @return  @c 0 on success,
+ *          otherwise a negative error value
+ *
+ * @retval  #RUNTIME_INFO_ERROR_NONE              Successful
  * @retval  #RUNTIME_INFO_ERROR_INVALID_PARAMETER Invalid parameter
  *
  * @see runtime_info_set_changed_cb()
index 381916e..7633286 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
+ * Copyright (c) 2011 - 2015 Samsung Electronics Co., Ltd All Rights Reserved
  *
  * Licensed under the Apache License, Version 2.0 (the License);
  * you may not use this file except in compliance with the License.
@@ -25,6 +25,10 @@ extern "C"
 {
 #endif
 
+#ifndef API
+#define API __attribute__ ((visibility("default")))
+#endif
+
 typedef enum {
        RUNTIME_INFO_DATA_TYPE_STRING,
        RUNTIME_INFO_DATA_TYPE_INT,
@@ -48,7 +52,7 @@ typedef void (*runtime_info_func_unset_event_cb) (void);
 void runtime_info_updated(runtime_info_key_e key);
 
 int runtime_info_vconf_get_value_int(const char *vconf_key, int *value);
-int runtime_info_vconf_get_value_bool(const char *vconf_key, bool *value);
+int runtime_info_vconf_get_value_bool(const char *vconf_key, int *value);
 int runtime_info_vconf_get_value_double(const char *vconf_key, double *value);
 int runtime_info_vconf_get_value_string(const char *vconf_key, char **value);
 
@@ -95,10 +99,6 @@ int runtime_info_location_network_get_value(runtime_info_value_h);
 int runtime_info_location_network_set_event_cb(void);
 void runtime_info_location_network_unset_event_cb(void);
 
-int runtime_info_location_sensor_get_value(runtime_info_value_h);
-int runtime_info_location_sensor_set_event_cb(void);
-void runtime_info_location_sensor_unset_event_cb(void);
-
 int runtime_info_packet_data_get_value(runtime_info_value_h);
 int runtime_info_packet_data_set_event_cb(void);
 void runtime_info_packet_data_unset_event_cb(void);
diff --git a/packaging/capi-system-runtime-info-devel.manifest b/packaging/capi-system-runtime-info-devel.manifest
deleted file mode 100644 (file)
index c00c25b..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-<manifest>
-        <request>
-                <domain name="_" />
-        </request>
-</manifest>
index c00c25b..97e8c31 100644 (file)
@@ -1,5 +1,5 @@
 <manifest>
-        <request>
-                <domain name="_" />
-        </request>
+       <request>
+               <domain name="_"/>
+       </request>
 </manifest>
index 96bf54a..7805681 100644 (file)
@@ -1,22 +1,24 @@
 Name:       capi-system-runtime-info
-Summary:    A Runtime Information library in Tizen Native API
+Summary:    A Runtime Information library in Core API
 Version:    0.0.3
 Release:    0
 Group:      System/API
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
 Source1001:    %{name}.manifest
-Source1002:    %{name}-devel.manifest
+
 BuildRequires:  cmake
 BuildRequires:  pkgconfig(dlog)
 BuildRequires:  pkgconfig(vconf)
 BuildRequires:  pkgconfig(capi-base-common)
+Requires(post): /sbin/ldconfig  
+Requires(postun): /sbin/ldconfig
 
 %description
-A Runtime Information library in Tizen Native API.
+
 
 %package devel
-Summary:  A Runtime Information library in Tizen Native API (Development)
+Summary:  A Runtime Information library in Core API (Development)
 Group:    Development/System
 Requires: %{name} = %{version}-%{release}
 Requires:  pkgconfig(capi-base-common)
@@ -28,8 +30,7 @@ Requires:  pkgconfig(capi-base-common)
 
 %prep
 %setup -q
-cp %{SOURCE1001} %{SOURCE1002} .
-
+cp %{SOURCE1001} .
 
 %build
 MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
@@ -52,7 +53,6 @@ make %{?jobs:-j%jobs}
 %{_libdir}/lib*.so.*
 
 %files devel
-%manifest %{name}-devel.manifest
 %{_includedir}/system/*.h
 %{_libdir}/pkgconfig/*.pc
 %{_libdir}/lib*.so
index 946e52f..f423341 100644 (file)
@@ -137,15 +137,6 @@ runtime_info_item_s runtime_info_item_table[] = {
 },
 
 {
-       RUNTIME_INFO_KEY_LOCATION_SENSOR_AIDING_ENABLED, /**<Indicates whether the location service is allowed to use pedestrian sensors for positioning performance. */
-       RUNTIME_INFO_DATA_TYPE_BOOL,
-       runtime_info_location_sensor_get_value,
-       runtime_info_location_sensor_set_event_cb,
-       runtime_info_location_sensor_unset_event_cb,
-       NULL
-},
-
-{
        RUNTIME_INFO_KEY_PACKET_DATA_ENABLED, /**<Indicates Whether the packet data through 3G network is enabled. */
        RUNTIME_INFO_DATA_TYPE_BOOL,
        runtime_info_packet_data_get_value,
@@ -359,7 +350,7 @@ int runtime_info_get_value(runtime_info_key_e key, runtime_info_data_type_e data
        return RUNTIME_INFO_ERROR_NONE;
 }
 
-int runtime_info_get_value_int(runtime_info_key_e key, int *value)
+API int runtime_info_get_value_int(runtime_info_key_e key, int *value)
 {
        int retcode;
        runtime_info_value_u runtime_info_value;
@@ -377,7 +368,7 @@ int runtime_info_get_value_int(runtime_info_key_e key, int *value)
        return retcode;
 }
 
-int runtime_info_get_value_bool(runtime_info_key_e key, bool *value)
+API int runtime_info_get_value_bool(runtime_info_key_e key, bool *value)
 {
        int retcode;
        runtime_info_value_u runtime_info_value;
@@ -395,7 +386,7 @@ int runtime_info_get_value_bool(runtime_info_key_e key, bool *value)
        return retcode;
 }
 
-int runtime_info_get_value_double(runtime_info_key_e key, double *value)
+API int runtime_info_get_value_double(runtime_info_key_e key, double *value)
 {
        int retcode;
        runtime_info_value_u runtime_info_value;
@@ -413,7 +404,7 @@ int runtime_info_get_value_double(runtime_info_key_e key, double *value)
        return retcode;
 }
 
-int runtime_info_get_value_string(runtime_info_key_e key, char **value)
+API int runtime_info_get_value_string(runtime_info_key_e key, char **value)
 {
        int retcode;
        runtime_info_value_u runtime_info_value;
@@ -431,7 +422,7 @@ int runtime_info_get_value_string(runtime_info_key_e key, char **value)
        return retcode;
 }
 
-int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb callback, void *user_data)
+API int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb callback, void *user_data)
 {
        runtime_info_item_h runtime_info_item;
        runtime_info_func_set_event_cb set_event_cb;
@@ -483,7 +474,7 @@ int runtime_info_set_changed_cb(runtime_info_key_e key, runtime_info_changed_cb
                return RUNTIME_INFO_ERROR_NONE;
 }
 
-int runtime_info_unset_changed_cb(runtime_info_key_e key)
+API int runtime_info_unset_changed_cb(runtime_info_key_e key)
 {
        runtime_info_item_h runtime_info_item;
        runtime_info_func_unset_event_cb unset_event_cb;
index 75b964b..d6c3ffc 100644 (file)
@@ -36,7 +36,7 @@ static const char *VCONF_WIFI_HOTSPOT_ENABLED = VCONFKEY_MOBILE_HOTSPOT_MODE;
 static const char *VCONF_BT_HOTSPOT_ENABLED = VCONFKEY_MOBILE_HOTSPOT_MODE;
 static const char *VCONF_USB_HOTSPOT_ENABLED = VCONFKEY_MOBILE_HOTSPOT_MODE;
 static const char *VCONF_PACKET_DATA_ENABLED = VCONFKEY_3G_ENABLE;
-static const char *VCONF_DATA_ROAMING_ENABLED = "db/setting/data_roaming";
+static const char *VCONF_DATA_ROAMING_ENABLED = VCONFKEY_SETAPPL_STATE_DATA_ROAMING_BOOL;
 static const char *VCONF_GPS_STATUS = VCONFKEY_LOCATION_GPS_STATE;
 
 int runtime_info_wifi_status_get_value(runtime_info_value_h value)
@@ -44,7 +44,7 @@ int runtime_info_wifi_status_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_WIFI_STATUS, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_WIFI_OFF;
 
        switch (vconf_value) {
        case VCONFKEY_WIFI_OFF:
@@ -82,7 +82,7 @@ int runtime_info_bt_enabled_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_BT_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_BT_STATUS_OFF;
 
        switch (vconf_value) {
        case VCONFKEY_BT_STATUS_OFF:
@@ -118,7 +118,7 @@ int runtime_info_wifi_hotspot_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_WIFI_HOTSPOT_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_MOBILE_HOTSPOT_MODE_NONE;
 
        value->b = (vconf_value&VCONFKEY_MOBILE_HOTSPOT_MODE_WIFI) ? true : false;
 
@@ -140,7 +140,7 @@ int runtime_info_bt_hotspot_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_BT_HOTSPOT_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_MOBILE_HOTSPOT_MODE_NONE;
 
        value->b = (vconf_value&VCONFKEY_MOBILE_HOTSPOT_MODE_BT) ? true : false;
 
@@ -162,7 +162,7 @@ int runtime_info_usb_hotspot_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_USB_HOTSPOT_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_MOBILE_HOTSPOT_MODE_NONE;
 
        value->b = (vconf_value&VCONFKEY_MOBILE_HOTSPOT_MODE_USB) ? true : false;
 
@@ -181,12 +181,12 @@ void runtime_info_usb_hotspot_unset_event_cb()
 
 int runtime_info_packet_data_get_value(runtime_info_value_h value)
 {
-       bool vconf_value;
+       int vconf_value;
 
        if (runtime_info_vconf_get_value_bool(VCONF_PACKET_DATA_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
-       value->b = vconf_value;
+       value->b = (bool)vconf_value;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
@@ -203,12 +203,12 @@ void runtime_info_packet_data_unset_event_cb()
 
 int runtime_info_data_roaming_get_value(runtime_info_value_h value)
 {
-       bool vconf_value;
+       int vconf_value;
 
        if (runtime_info_vconf_get_value_bool(VCONF_DATA_ROAMING_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
-       value->b = vconf_value;
+       value->b = (bool)vconf_value;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
@@ -228,7 +228,7 @@ int runtime_info_gps_status_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_GPS_STATUS, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_LOCATION_GPS_OFF;
 
        switch (vconf_value) {
        case VCONFKEY_LOCATION_GPS_OFF:
index ea133b3..36bc70c 100644 (file)
@@ -30,8 +30,8 @@
 
 #define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
-static const char *VCONF_24HOUR_FORMAT = "db/menu_widget/regionformat_time1224";
-static const char *VCONF_FIRST_DAY_OF_WEEK = "db/setting/weekofday_format";
+static const char *VCONF_24HOUR_FORMAT = VCONFKEY_REGIONFORMAT_TIME1224;
+static const char *VCONF_FIRST_DAY_OF_WEEK = VCONFKEY_SETAPPL_WEEKOFDAY_FORMAT_INT;
 static const char *VCONF_LANGUAGE = VCONFKEY_LANGSET;
 static const char *VCONF_REGION = VCONFKEY_REGIONFORMAT;
 
index c041063..09b6645 100644 (file)
 #define LOG_TAG "CAPI_SYSTEM_RUNTIME_INFO"
 
 static const char *VCONF_LOCATION_SERVICE_ENABLED = VCONFKEY_LOCATION_ENABLED;
-static const char *VCONF_LOCATION_AGPS_ENABLED = "db/location/setting/AgpsEnabled";
+static const char *VCONF_LOCATION_AGPS_ENABLED = VCONFKEY_LOCATION_AGPS_ENABLED;
 static const char *VCONF_LOCATION_NETWORK_ENABLED = VCONFKEY_LOCATION_NETWORK_ENABLED;
-static const char *VCONF_LOCATION_SENSOR_ENABLED = "db/location/setting/SensorEnabled";
 
 int runtime_info_location_service_get_value(runtime_info_value_h value)
 {
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_LOCATION_SERVICE_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
        value->b = vconf_value;
 
@@ -62,7 +61,7 @@ int runtime_info_location_agps_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_LOCATION_AGPS_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
        value->b = vconf_value;
 
@@ -84,7 +83,7 @@ int runtime_info_location_network_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_LOCATION_NETWORK_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
        value->b = vconf_value;
 
@@ -100,26 +99,3 @@ void runtime_info_location_network_unset_event_cb()
 {
        runtime_info_vconf_unset_event_cb(VCONF_LOCATION_NETWORK_ENABLED, 0);
 }
-
-int runtime_info_location_sensor_get_value(runtime_info_value_h value)
-{
-       int vconf_value;
-
-       if (runtime_info_vconf_get_value_int(VCONF_LOCATION_SENSOR_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
-
-       value->b = vconf_value;
-
-       return RUNTIME_INFO_ERROR_NONE;
-}
-
-int runtime_info_location_sensor_set_event_cb()
-{
-       return runtime_info_vconf_set_event_cb(VCONF_LOCATION_SENSOR_ENABLED, RUNTIME_INFO_KEY_LOCATION_SENSOR_AIDING_ENABLED, 0);
-}
-
-void runtime_info_location_sensor_unset_event_cb()
-{
-       runtime_info_vconf_unset_event_cb(VCONF_LOCATION_SENSOR_ENABLED, 0);
-}
-
index f244772..322f5a8 100644 (file)
@@ -32,8 +32,8 @@
 
 static const char *VCONF_FLIGHT_MODE = VCONFKEY_TELEPHONY_FLIGHT_MODE;
 static const char *VCONF_AUDIO_JACK = VCONFKEY_SYSMAN_EARJACK;
-static const char *VCONF_SILENT_MODE = "db/setting/sound/sound_on";
-static const char *VCONF_VIBRATION_ENABLED = "db/setting/sound/vibration_on";
+static const char *VCONF_SOUND_ENABLED = VCONFKEY_SETAPPL_SOUND_STATUS_BOOL;
+static const char *VCONF_VIBRATION_ENABLED = VCONFKEY_SETAPPL_VIBRATION_STATUS_BOOL;
 static const char *VCONF_ROTATION_LOCK_ENABLED = VCONFKEY_SETAPPL_AUTO_ROTATE_SCREEN_BOOL;
 static const char *VCONF_BATTERY_CHARGING = VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW;
 static const char *VCONF_TVOUT_CONNECTED = VCONFKEY_SYSMAN_EARJACK;
@@ -45,12 +45,12 @@ static const char *VCONF_CHARGER_CONNECTED = VCONFKEY_SYSMAN_CHARGER_STATUS;
 
 int runtime_info_flightmode_get_value(runtime_info_value_h value)
 {
-       bool vconf_value;
+       int vconf_value;
 
        if (runtime_info_vconf_get_value_bool(VCONF_FLIGHT_MODE, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
-       value->b = vconf_value;
+       value->b = (bool)vconf_value;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
@@ -70,7 +70,7 @@ int runtime_info_audiojack_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_AUDIO_JACK, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_SYSMAN_EARJACK_REMOVED;
 
        switch (vconf_value) {
        case VCONFKEY_SYSMAN_EARJACK_3WIRE:
@@ -98,34 +98,51 @@ void runtime_info_audiojack_unset_event_cb(void)
 
 int runtime_info_silent_mode_get_value(runtime_info_value_h value)
 {
-       bool vconf_value;
+       int sound, vib;
 
-       if (runtime_info_vconf_get_value_bool(VCONF_SILENT_MODE, &vconf_value))
+       if (runtime_info_vconf_get_value_bool(VCONF_SOUND_ENABLED, &sound))
                return RUNTIME_INFO_ERROR_IO_ERROR;
 
-       value->b = vconf_value;
+       if (runtime_info_vconf_get_value_bool(VCONF_VIBRATION_ENABLED, &vib))
+               return RUNTIME_INFO_ERROR_IO_ERROR;
+
+       if (sound == 0 && vib == 0)
+               value->b = true;
+       else
+               value->b = false;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
 
 int runtime_info_silent_mode_set_event_cb(void)
 {
-       return runtime_info_vconf_set_event_cb(VCONF_SILENT_MODE, RUNTIME_INFO_KEY_SILENT_MODE_ENABLED, 0);
+       int ret;
+
+       ret = runtime_info_vconf_set_event_cb(VCONF_SOUND_ENABLED, RUNTIME_INFO_KEY_SILENT_MODE_ENABLED, 0);
+       if (ret != RUNTIME_INFO_ERROR_NONE)
+               return ret;
+
+       ret = runtime_info_vconf_set_event_cb(VCONF_VIBRATION_ENABLED, RUNTIME_INFO_KEY_SILENT_MODE_ENABLED, 1);
+       if (ret != RUNTIME_INFO_ERROR_NONE)
+               runtime_info_vconf_unset_event_cb(VCONF_SOUND_ENABLED, 0);
+
+       return ret;
 }
 
 void runtime_info_silent_mode_unset_event_cb(void)
 {
-       runtime_info_vconf_unset_event_cb(VCONF_SILENT_MODE, 0);
+       runtime_info_vconf_unset_event_cb(VCONF_SOUND_ENABLED, 0);
+       runtime_info_vconf_unset_event_cb(VCONF_VIBRATION_ENABLED, 1);
 }
 
 int runtime_info_vibration_enabled_get_value(runtime_info_value_h value)
 {
-       bool vconf_value;
+       int vconf_value;
 
        if (runtime_info_vconf_get_value_bool(VCONF_VIBRATION_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
-       value->b = vconf_value;
+       value->b = (bool)vconf_value;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
@@ -142,12 +159,12 @@ void runtime_info_vibration_enabled_unset_event_cb(void)
 
 int runtime_info_auto_rotation_enabled_get_value(runtime_info_value_h value)
 {
-       bool vconf_value;
+       int vconf_value;
 
        if (runtime_info_vconf_get_value_bool(VCONF_ROTATION_LOCK_ENABLED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = 0;
 
-       value->b = vconf_value;
+       value->b = (bool)vconf_value;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
@@ -190,7 +207,7 @@ int runtime_info_tvout_connected_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_TVOUT_CONNECTED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_SYSMAN_EARJACK_REMOVED;
 
        switch (vconf_value) {
        case VCONFKEY_SYSMAN_EARJACK_TVOUT:
@@ -221,7 +238,7 @@ int runtime_info_audio_jack_status_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_AUDIO_JACK_STATUS, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_SYSMAN_EARJACK_REMOVED;
 
        switch (vconf_value) {
        case VCONFKEY_SYSMAN_EARJACK_3WIRE:
@@ -256,7 +273,7 @@ int runtime_info_sliding_keyboard_opened_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_SLIDING_KEYBOARD_STATUS, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_SYSMAN_SLIDING_KEYBOARD_NOT_SUPPORTED;
 
        switch (vconf_value) {
        case VCONFKEY_SYSMAN_SLIDING_KEYBOARD_NOT_AVAILABE:
@@ -294,7 +311,7 @@ int runtime_info_usb_connected_get_value(runtime_info_value_h value)
        int vconf_value;
 
        if (runtime_info_vconf_get_value_int(VCONF_USB_CONNECTED, &vconf_value))
-               return RUNTIME_INFO_ERROR_IO_ERROR;
+               vconf_value = VCONFKEY_SYSMAN_USB_DISCONNECTED;
 
        switch (vconf_value) {
        case VCONFKEY_SYSMAN_USB_DISCONNECTED:
@@ -367,7 +384,7 @@ int runtime_info_vibration_level_haptic_feedback_get_value(runtime_info_value_h
        if (runtime_info_vconf_get_value_int(VCONFKEY_SETAPPL_TOUCH_FEEDBACK_VIBRATION_LEVEL_INT, &vconf_value))
                return RUNTIME_INFO_ERROR_IO_ERROR;
 
-               value->i = vconf_value;
+       value->i = vconf_value;
 
        return RUNTIME_INFO_ERROR_NONE;
 }
index f2db3ef..4f40980 100644 (file)
@@ -35,9 +35,9 @@ int runtime_info_vconf_get_value_int(const char *vconf_key, int *value)
        return vconf_get_int(vconf_key, value);
 }
 
-int runtime_info_vconf_get_value_bool(const char *vconf_key, bool *value)
+int runtime_info_vconf_get_value_bool(const char *vconf_key, int *value)
 {
-       return vconf_get_bool(vconf_key, (int *)value);
+       return vconf_get_bool(vconf_key, value);
 }
 
 int runtime_info_vconf_get_value_double(const char *vconf_key, double *value)