SYSTEM_INFO_KEY_TIZEN_VERSION, /**< The version of the Tizen API */
SYSTEM_INFO_KEY_PLATFORM_NAME, /**< The name of platform */
SYSTEM_INFO_KEY_TIZEN_VERSION_NAME, /**< The name of tizen version */
- SYSTEM_INFO_KEY_NETWORK_TYPE, /**< The supported network type */
SYSTEM_INFO_KEY_MANUFACTURER, /**< The manufacturer of the device */
SYSTEM_INFO_KEY_CORE_CPU_ARCH, /**< The CORE CPU architecture of model */
SYSTEM_INFO_KEY_CORE_CPU_FREQ, /**< The CORE CPU frequency of model */
SYSTEM_INFO_KEY_SCREEN_WIDTH, /**< The width of the screen in pixels */
SYSTEM_INFO_KEY_PHYSICAL_SCREEN_HEIGHT, /**< The physical screen height in millimeters */
SYSTEM_INFO_KEY_PHYSICAL_SCREEN_WIDTH, /**< The physical screen width in millimeters */
- SYSTEM_INFO_KEY_SCREEN_DPI, /**< The width of the screen DPI */
- SYSTEM_INFO_KEY_CAMERA_COUNT, /**< The number of cameras in the device */
- SYSTEM_INFO_KEY_BLUETOOTH_SUPPORTED, /**< Indicates whether the device supports Bluetooth */
- SYSTEM_INFO_KEY_GPS_SUPPORTED, /**< Indicates whether the device supports GPS */
- SYSTEM_INFO_KEY_NFC_SUPPORTED, /**< Indicates whether the device supports NFC */
- SYSTEM_INFO_KEY_WIFI_SUPPORTED, /**< Indicates whether the device supports Wi-Fi */
SYSTEM_INFO_KEY_TETHERING_SUPPORTED, /**< Indicates whether the device supports tethering */
} system_info_key_e;
int system_info_get_tizen_version_name(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_core_cpu_arch(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_core_cpu_freq(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_bluetooth_supported(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_camera_count(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_gps_supported(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_network_type(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_nfc_supported(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_screen_height(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_screen_width(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_screen_DPI(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_physical_screen_height(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_physical_screen_width(system_info_key_e key, system_info_data_type_e data_type, void **value);
-int system_info_get_wifi_supported(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_manufacturer(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_build_string(system_info_key_e key, system_info_data_type_e data_type, void **value);
int system_info_get_build_date(system_info_key_e key, system_info_data_type_e data_type, void **value);
},
{
- /**< Indicates whether the device supports Bluetooth */
- SYSTEM_INFO_KEY_BLUETOOTH_SUPPORTED,
- SYSTEM_INFO_DATA_TYPE_BOOL,
- system_info_get_bluetooth_supported
-},
-
-{
- /**< The number of cameras in the device */
- SYSTEM_INFO_KEY_CAMERA_COUNT,
- SYSTEM_INFO_DATA_TYPE_INT,
- system_info_get_camera_count
-},
-
-{
- /**< Indicates whether the device supports GPS */
- SYSTEM_INFO_KEY_GPS_SUPPORTED,
- SYSTEM_INFO_DATA_TYPE_BOOL,
- system_info_get_gps_supported
-},
-
-{
- /**< The supported network type */
- SYSTEM_INFO_KEY_NETWORK_TYPE,
- SYSTEM_INFO_DATA_TYPE_STRING,
- system_info_get_network_type
-},
-
-{
- /**< Indicates whether the device supports NFC */
- SYSTEM_INFO_KEY_NFC_SUPPORTED,
- SYSTEM_INFO_DATA_TYPE_BOOL,
- system_info_get_nfc_supported
-},
-
-{
/**< The height of the screen in pixels */
SYSTEM_INFO_KEY_SCREEN_HEIGHT,
SYSTEM_INFO_DATA_TYPE_INT,
},
{
- /**< Indicates whether the device supports Wi-Fi */
- SYSTEM_INFO_KEY_WIFI_SUPPORTED,
- SYSTEM_INFO_DATA_TYPE_BOOL,
- system_info_get_wifi_supported
-},
-
-{
/**< The Name of the Platform */
SYSTEM_INFO_KEY_PLATFORM_NAME,
SYSTEM_INFO_DATA_TYPE_STRING,
},
{
- /**< The height of the screen DPI */
- SYSTEM_INFO_KEY_SCREEN_DPI,
- SYSTEM_INFO_DATA_TYPE_INT,
- system_info_get_screen_DPI
-},
-
-{
/**< The CORE CPU architecture of model */
SYSTEM_INFO_KEY_CORE_CPU_ARCH,
SYSTEM_INFO_DATA_TYPE_STRING,
#define LOG_TAG "CAPI_SYSTEM_INFO"
#define TETHERING_INFO_FILE_PATH "/etc/config/connectivity/sysinfo-tethering.xml"
-#define CAMERA_INFO_FILE_PATH "/usr/etc/mmfw_camcorder.ini"
-
-int system_info_get_camera_count(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- int *count;
- char *devicecount;
-
- count = (int *)value;
- *count = 0;
-
- if (system_info_ini_get_string(CAMERA_INFO_FILE_PATH, "videoinput:devicecount", &devicecount)
- != SYSTEM_INFO_ERROR_NONE) {
- return SYSTEM_INFO_ERROR_IO_ERROR;
- }
-
- *count = atoi(devicecount);
-
- free(devicecount);
-
- return SYSTEM_INFO_ERROR_NONE;
-}
-
-int system_info_get_bluetooth_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- return system_info_get_platform_bool("tizen.org/feature/network.bluetooth", (bool *)value);
-}
-
-int system_info_get_gps_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- return system_info_get_platform_bool("tizen.org/feature/location.gps", (bool *)value);
-}
-
-int system_info_get_nfc_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- return system_info_get_platform_bool("tizen.org/feature/network.nfc", (bool *)value);
-}
-
-int system_info_get_wifi_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- return system_info_get_platform_bool("tizen.org/feature/network.wifi", (bool *)value);
-}
int system_info_get_manufacturer(system_info_key_e key, system_info_data_type_e data_type, void **value)
{
+++ /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 <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_get_network_type(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- bool service_type = 0;
- char *NET_TYPE = NULL;
- char NETWORK_TYPE[MAXBUFSIZE];
-
- NETWORK_TYPE[0] = '\0';
-
- strcat(NETWORK_TYPE, "Emergency ");
-
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.cdma", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| cdma ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.edge", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| edge ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.gprs", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| gprs ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.gsm", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| gsm ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.hsdpa", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| hsdpa ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.hspa", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| hspa ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.hsupa", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| hsupa ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.umts", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| umts ");
- if (system_info_get_platform_bool("tizen.org/feature/network.telephony.service.lte", &service_type) == SYSTEM_INFO_ERROR_NONE
- && service_type == true)
- strcat(NETWORK_TYPE, "| lte ");
-
- NET_TYPE = strdup(NETWORK_TYPE);
-
- if (NET_TYPE == NULL) {
- LOGE("OUT_OF_MEMORY(0x%08x)", SYSTEM_INFO_ERROR_OUT_OF_MEMORY);
- return SYSTEM_INFO_ERROR_OUT_OF_MEMORY;
- }
-
- *value = NET_TYPE;
-
- return SYSTEM_INFO_ERROR_NONE;
-}
return system_info_get_platform_int("tizen.org/feature/screen.height", (int *)value);
}
-int system_info_get_screen_DPI(system_info_key_e key, system_info_data_type_e data_type, void **value)
-{
- return system_info_get_platform_int("tizen.org/feature/screen.dpi", (int *)value);
-}
-
int system_info_get_physical_screen_height(system_info_key_e key, system_info_data_type_e data_type, void **value)
{
int *height;