+int system_info_get_front_camera_af_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+ char str[MAXBUFSIZE];
+ char tmpStr[MAXBUFSIZE];
+ int tmpInt[6];
+ FILE *info = NULL;
+
+ supported = (bool *)value;
+ /* default value is false */
+ *supported = false;
+
+ /* setting camera direction */
+ set_camera_direction_path();
+
+ /* Return false, if there is no "/usr/etc/mmfw_camcorder_dev_video_sec.ini" file */
+ if (access(FRONT_CAM_PATH, R_OK))
+ return SYSTEM_INFO_ERROR_NONE;
+
+ info = fopen(FRONT_CAM_PATH, "r");
+ if (NULL == info) {
+ LOGE("[%s] cannot file open %s file!!!", __func__, FRONT_CAM_PATH);
+ return SYSTEM_INFO_ERROR_IO_ERROR;
+ } else {
+ while (fgets(str, MAXBUFSIZE, info)) {
+ if (!strncmp(";", str, strlen(";")))
+ continue;
+ else if (!strncmp("FocusMode", str, strlen("FocusMode"))) {
+ sscanf(str, "%s = %d,%d,%d,%d,%d,%d", tmpStr, &tmpInt[0], &tmpInt[1], &tmpInt[2], &tmpInt[3], &tmpInt[4], &tmpInt[5]);
+ if (tmpInt[2] != -255 || tmpInt[4] != -255)
+ *supported = true;
+ break;
+ } else
+ continue;
+ }
+ }
+
+ /* free used memory for camera direction */
+ free(FRONT_CAM_PATH);
+ free(BACK_CAM_PATH);
+
+ fclose(info);
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_front_camera_flash_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+ char str[MAXBUFSIZE];
+ char tmpStr[MAXBUFSIZE];
+ int tmpInt[8];
+ int i = 0;
+ FILE *info = NULL;
+
+ supported = (bool *)value;
+ /* default value is false */
+ *supported = false;
+
+ /* setting camera direction */
+ set_camera_direction_path();
+
+ /* Return false, if there is no "/usr/etc/mmfw_camcorder_dev_video_sec.ini" file */
+ if (access(FRONT_CAM_PATH, R_OK))
+ return SYSTEM_INFO_ERROR_NONE;
+
+ info = fopen(FRONT_CAM_PATH, "r");
+ if (NULL == info) {
+ LOGE("[%s] cannot file open %s file!!!", __func__, FRONT_CAM_PATH);
+ return SYSTEM_INFO_ERROR_IO_ERROR;
+ } else {
+ while (fgets(str, MAXBUFSIZE, info)) {
+ if (!strncmp(";", str, strlen(";")))
+ continue;
+ else if (!strncmp("StrobeMode", str, strlen("StrobeMode"))) {
+ sscanf(str, "%s = %d,%d,%d,%d,%d,%d,%d,%d", tmpStr, &tmpInt[0], &tmpInt[1], &tmpInt[2], &tmpInt[3], &tmpInt[4], &tmpInt[5], &tmpInt[6], &tmpInt[7]);
+ for (i = 1; i < 8; i++) {
+ if (tmpInt[i] != -255)
+ *supported = true;
+ }
+ break;
+ } else
+ continue;
+ }
+ }
+
+ /* free used memory for camera direction */
+ free(FRONT_CAM_PATH);
+ free(BACK_CAM_PATH);
+
+ fclose(info);
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_back_camera_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+
+ supported = (bool *)value;
+
+ /* setting camera direction */
+ set_camera_direction_path();
+
+ if (!access(BACK_CAM_PATH, R_OK))
+ *supported = true;
+ else
+ *supported = false;
+
+ /* free used memory for camera direction */
+ free(FRONT_CAM_PATH);
+ free(BACK_CAM_PATH);
+
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_back_camera_af_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+ char str[MAXBUFSIZE];
+ char tmpStr[MAXBUFSIZE];
+ int tmpInt[6];
+ FILE *info = NULL;
+
+ supported = (bool *)value;
+ /* default value is false */
+ *supported = false;
+
+ /* setting camera direction */
+ set_camera_direction_path();
+
+ /* Return false, if there is no "/usr/etc/mmfw_camcorder_dev_video_pri.ini" file */
+ if (access(BACK_CAM_PATH, R_OK))
+ return SYSTEM_INFO_ERROR_NONE;
+
+ info = fopen(BACK_CAM_PATH, "r");
+ if (NULL == info) {
+ LOGE("[%s] cannot file open %s file!!!", __func__, BACK_CAM_PATH);
+ return SYSTEM_INFO_ERROR_IO_ERROR;
+ } else {
+ while (fgets(str, MAXBUFSIZE, info)) {
+ if (!strncmp(";", str, strlen(";")))
+ continue;
+ else if (!strncmp("FocusMode", str, strlen("FocusMode"))) {
+ sscanf(str, "%s = %d,%d,%d,%d,%d,%d", tmpStr, &tmpInt[0], &tmpInt[1], &tmpInt[2], &tmpInt[3], &tmpInt[4], &tmpInt[5]);
+ if (tmpInt[2] != -255 || tmpInt[4] != -255)
+ *supported = true;
+ break;
+ } else
+ continue;
+ }
+ }
+
+ /* free used memory for camera direction */
+ free(FRONT_CAM_PATH);
+ free(BACK_CAM_PATH);
+
+ fclose(info);
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_back_camera_flash_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+ char str[MAXBUFSIZE];
+ char tmpStr[MAXBUFSIZE];
+ int tmpInt[8];
+ int i = 0;
+ FILE *info = NULL;
+
+ supported = (bool *)value;
+ /* default value is false */
+ *supported = false;
+
+ /* setting camera direction */
+ set_camera_direction_path();
+
+ /* Return false, if there is no "/usr/etc/mmfw_camcorder_dev_video_pri.ini" file */
+ if (access(BACK_CAM_PATH, R_OK))
+ return SYSTEM_INFO_ERROR_NONE;
+
+ info = fopen(BACK_CAM_PATH, "r");
+ if (NULL == info) {
+ LOGE("[%s] cannot file open %s file!!!", __func__, BACK_CAM_PATH);
+ return SYSTEM_INFO_ERROR_IO_ERROR;
+ } else {
+ while (fgets(str, MAXBUFSIZE, info)) {
+ if (!strncmp(";", str, strlen(";")))
+ continue;
+ else if (!strncmp("StrobeMode", str, strlen("StrobeMode"))) {
+ sscanf(str, "%s = %d,%d,%d,%d,%d,%d,%d,%d", tmpStr, &tmpInt[0], &tmpInt[1], &tmpInt[2], &tmpInt[3], &tmpInt[4], &tmpInt[5], &tmpInt[6], &tmpInt[7]);
+ for (i = 1; i < 8; i++) {
+ if (tmpInt[i] != -255)
+ *supported = true;
+ }
+ break;
+ } else
+ continue;
+ }
+ }
+
+ /* free used memory for camera direction */
+ free(FRONT_CAM_PATH);
+ free(BACK_CAM_PATH);
+
+ fclose(info);
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+
+int system_info_get_sip_voip_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+
+ supported = (bool *)value;
+
+ *supported = SIP_VOIP_SUPPROT;
+
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_microphone_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+ sound_device_in_e in;
+ sound_device_out_e out;
+
+ supported = (bool *)value;
+
+ if (SOUND_MANAGER_ERROR_NONE == sound_manager_get_active_device(&in, &out)) {
+ if (in == SOUND_DEVICE_IN_MIC)
+ *supported = true;
+ else
+ *supported = false;
+ } else
+ *supported = false;
+
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_speech_recognition_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+
+ supported = (bool *)value;
+
+ *supported = SPEECH_RECOGNITION_SUPPROT;
+
+ return SYSTEM_INFO_ERROR_NONE;
+}
+
+int system_info_get_barometer_sensor_supported(system_info_key_e key, system_info_data_type_e data_type, void **value)
+{
+ bool *supported;
+
+ supported = (bool *)value;
+
+ if (sf_is_sensor_event_available(BAROMETER_SENSOR, 0))
+ *supported = false;
+ else
+ *supported = true;
+
+ return SYSTEM_INFO_ERROR_NONE;
+}