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)
*/
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
#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"
BuildRequires: cmake
BuildRequires: pkgconfig(dlog)
BuildRequires: pkgconfig(capi-base-common)
-BuildRequires: pkgconfig(vconf)
BuildRequires: pkgconfig(iniparser)
BuildRequires: pkgconfig(libxml-2.0)
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;
+++ /dev/null
-/*
- * 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 <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include <vconf.h>
-#include <dlog.h>
-
-#include <system_info.h>
-#include <system_info_private.h>
-
-#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;
- }
-}