From: Nam KwanWoo Date: Thu, 20 Jun 2013 01:05:00 +0000 (+0900) Subject: remove API for external feature X-Git-Tag: submit/tizen/20130916.212456~1^2~11 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0d5ec6a85d668a894fb05aa4f0c6366ecfcabb54;p=platform%2Fcore%2Fapi%2Fsystem-info.git remove API for external feature Change-Id: I7ccb66a06c63ca57af9a18a3efac6c0288fa2cb2 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index f55ff35..a276b01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,7 +10,7 @@ SET(PREFIX ${CMAKE_INSTALL_PREFIX}) SET(INC_DIR include) INCLUDE_DIRECTORIES(${INC_DIR}) -SET(requires "dlog capi-base-common vconf iniparser libxml-2.0") +SET(requires "dlog capi-base-common iniparser libxml-2.0") SET(pc_requires "capi-base-common") INCLUDE(FindPkgConfig) diff --git a/include/system_info.h b/include/system_info.h index 80b5dd4..4a61aeb 100644 --- a/include/system_info.h +++ b/include/system_info.h @@ -143,11 +143,6 @@ int system_info_get_value_double(system_info_key_e key, double *value); */ int system_info_get_value_string(system_info_key_e key, char **value); -int system_info_get_external_bool(const char *key, bool *value); -int system_info_get_external_int(const char *key, int *value); -int system_info_get_external_double(const char *key, double *value); -int system_info_get_external_string(const char *key, char **value); - /** * @brief Gets the boolean value of the platform feature * @param[in] key The name of the platform feature to get diff --git a/include/system_info_private.h b/include/system_info_private.h index a01a821..862b283 100644 --- a/include/system_info_private.h +++ b/include/system_info_private.h @@ -30,8 +30,6 @@ extern "C" #define CONFIG_FILE_PATH "/etc/config/model-config.xml" #define MAXBUFSIZE 512 -#define EXTERNAL_VCONF_PREFIX "db/externals/" - #define PLATFORM_TAG "platform" #define CUSTOM_TAG "custom" #define INTERNAL_TAG "internal" diff --git a/packaging/capi-system-info.spec b/packaging/capi-system-info.spec index 10b0cdd..769c985 100644 --- a/packaging/capi-system-info.spec +++ b/packaging/capi-system-info.spec @@ -9,7 +9,6 @@ Source0: %{name}-%{version}.tar.gz BuildRequires: cmake BuildRequires: pkgconfig(dlog) BuildRequires: pkgconfig(capi-base-common) -BuildRequires: pkgconfig(vconf) BuildRequires: pkgconfig(iniparser) BuildRequires: pkgconfig(libxml-2.0) diff --git a/src/system_info.c b/src/system_info.c index cfe546f..b54627d 100644 --- a/src/system_info.c +++ b/src/system_info.c @@ -522,62 +522,6 @@ int system_info_get_value_string(system_info_key_e key, char **value) return system_info_get_value(key, SYSTEM_INFO_DATA_TYPE_STRING, (void **)value); } -int system_info_get_external_bool(const char *key, bool *value) -{ - char vconfkey[MAXBUFSIZE] = {0,}; - - snprintf(vconfkey, strlen(EXTERNAL_VCONF_PREFIX)+strlen(key)+1, "%s%s", EXTERNAL_VCONF_PREFIX, key); - - if (system_info_vconf_get_value_bool(vconfkey, value)) { - LOGE("key : %s, failed get bool value", key); - return SYSTEM_INFO_ERROR_IO_ERROR; - } - - return SYSTEM_INFO_ERROR_NONE; -} - -int system_info_get_external_int(const char *key, int *value) -{ - char vconfkey[MAXBUFSIZE] = {0,}; - - snprintf(vconfkey, strlen(EXTERNAL_VCONF_PREFIX)+strlen(key)+1, "%s%s", EXTERNAL_VCONF_PREFIX, key); - - if (system_info_vconf_get_value_int(vconfkey, value)) { - LOGE("key : %s, failed get int value", key); - return SYSTEM_INFO_ERROR_IO_ERROR; - } - - return SYSTEM_INFO_ERROR_NONE; -} - -int system_info_get_external_double(const char *key, double *value) -{ - char vconfkey[MAXBUFSIZE] = {0,}; - - snprintf(vconfkey, strlen(EXTERNAL_VCONF_PREFIX)+strlen(key)+1, "%s%s", EXTERNAL_VCONF_PREFIX, key); - - if (system_info_vconf_get_value_double(vconfkey, value)) { - LOGE("key : %s, failed get double value", key); - return SYSTEM_INFO_ERROR_IO_ERROR; - } - - return SYSTEM_INFO_ERROR_NONE; -} - -int system_info_get_external_string(const char *key, char **value) -{ - char vconfkey[MAXBUFSIZE] = {0,}; - - snprintf(vconfkey, strlen(EXTERNAL_VCONF_PREFIX)+strlen(key)+1, "%s%s", EXTERNAL_VCONF_PREFIX, key); - - if (system_info_vconf_get_value_string(vconfkey, value)) { - LOGE("key : %s, failed get string value", key); - return SYSTEM_INFO_ERROR_IO_ERROR; - } - - return SYSTEM_INFO_ERROR_NONE; -} - int system_info_get_platform_bool(const char *key, bool *value) { int ret; diff --git a/src/system_info_vconf.c b/src/system_info_vconf.c deleted file mode 100644 index 264dabf..0000000 --- a/src/system_info_vconf.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Copyright (c) 2011 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. - */ - -#include -#include -#include - -#include -#include - -#include -#include - -#ifdef LOG_TAG -#undef LOG_TAG -#endif - -#define LOG_TAG "CAPI_SYSTEM_INFO" - -int system_info_vconf_get_value_int(const char *vconf_key, int *value) -{ - return vconf_get_int(vconf_key, value); -} - -int system_info_vconf_get_value_bool(const char *vconf_key, bool *value) -{ - return vconf_get_bool(vconf_key, (int *)value); -} - -int system_info_vconf_get_value_double(const char *vconf_key, double *value) -{ - return vconf_get_dbl(vconf_key, value); -} - -int system_info_vconf_get_value_string(const char *vconf_key, char **value) -{ - char *str_value = NULL; - - str_value = vconf_get_str(vconf_key); - - if (str_value != NULL) { - *value = str_value; - return 0; - } else { - return -1; - } -}