#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)
{
- bool camera;
- int *count = 0;
+ int *count;
+ char *devicecount;
count = (int *)value;
*count = 0;
- if (system_info_get_platform_bool("tizen.org/feature/camera.back", &camera) == SYSTEM_INFO_ERROR_NONE
- && camera == true)
- (*count)++;
- if (system_info_get_platform_bool("tizen.org/feature/camera.front", &camera) == SYSTEM_INFO_ERROR_NONE
- && camera == true)
- (*count)++;
+ 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;
}
strcat(textureformat, "utc ");
if (system_info_get_platform_bool("tizen.org/feature/opengles.texture_format.ptc", &texture) == SYSTEM_INFO_ERROR_NONE
&& texture == true)
- strcat(textureformat, "| ptc ");
+ strcat(textureformat, "ptc ");
if (system_info_get_platform_bool("tizen.org/feature/opengles.texture_format.etc", &texture) == SYSTEM_INFO_ERROR_NONE
&& texture == true)
- strcat(textureformat, "| etc ");
+ strcat(textureformat, "etc ");
if (system_info_get_platform_bool("tizen.org/feature/opengles.texture_format.3dc", &texture) == SYSTEM_INFO_ERROR_NONE
&& texture == true)
- strcat(textureformat, "| 3dc ");
+ strcat(textureformat, "3dc ");
if (system_info_get_platform_bool("tizen.org/feature/opengles.texture_format.atc", &texture) == SYSTEM_INFO_ERROR_NONE
&& texture == true)
- strcat(textureformat, "| atc ");
+ strcat(textureformat, "atc ");
if (system_info_get_platform_bool("tizen.org/feature/opengles.texture_format.pvrtc", &texture) == SYSTEM_INFO_ERROR_NONE
&& texture == true)
- strcat(textureformat, "| pvrtc");
+ strcat(textureformat, "pvrtc");
OPENGLES_TEXTURE_FORMAT = strdup(textureformat);
int system_info_get_screen_width(system_info_key_e key, system_info_data_type_e data_type, void **value)
{
- bool check;
- int *width = 0;
-
- width = (int *)value;
-
- if (system_info_get_platform_bool("tizen.org/feature/screen.size.normal.480.800", &check) == SYSTEM_INFO_ERROR_NONE
- && check == true)
- *width = 480;
- if (system_info_get_platform_bool("tizen.org/feature/screen.size.normal.720.1280", &check) == SYSTEM_INFO_ERROR_NONE
- && check == true)
- *width = 720;
-
- if (*width)
- return SYSTEM_INFO_ERROR_NONE;
- else
- return SYSTEM_INFO_ERROR_IO_ERROR;
+ return system_info_get_platform_int("tizen.org/feature/screen.width", (int *)value);
}
int system_info_get_screen_height(system_info_key_e key, system_info_data_type_e data_type, void **value)
{
- bool check;
- int *height = 0;
-
- height = (int *)value;
-
- if (system_info_get_platform_bool("tizen.org/feature/screen.size.normal.480.800", &check) == SYSTEM_INFO_ERROR_NONE
- && check == true)
- *height = 800;
- if (system_info_get_platform_bool("tizen.org/feature/screen.size.normal.720.1280", &check) == SYSTEM_INFO_ERROR_NONE
- && check == true)
- *height = 1280;
-
- if (*height)
- return SYSTEM_INFO_ERROR_NONE;
- else
- return SYSTEM_INFO_ERROR_IO_ERROR;
+ 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)