+
+int system_setting_get_profile_info(int *value)
+{
+ char *profile_string = NULL;
+ static int is_first = 1;
+ static int profile_data = 0;
+
+ if (value == NULL)
+ return SYSTEM_SETTINGS_ERROR_INVALID_PARAMETER;
+
+ *value = 0;
+
+ if (!is_first) {
+ *value = profile_data;
+ return SYSTEM_SETTINGS_ERROR_NONE;
+ }
+
+ is_first = 0;
+
+ int ret = system_info_get_platform_string(SETTING_PROFILE_PATH, &profile_string);
+ if (ret != SYSTEM_INFO_ERROR_NONE) {
+ SETTING_TRACE("Setting - reading profile string failed, %d", ret);
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ }
+
+ if (profile_string == NULL)
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+
+ LOGE("Profile : %s", profile_string);
+
+ if (!strcmp(profile_string, "mobile"))
+ *value = SYSTEM_SETTING_SUPPORTED_PROFILE_MOBILE;
+ else if (!strcmp(profile_string, "wearable"))
+ *value = SYSTEM_SETTING_SUPPORTED_PROFILE_WEARABLE;
+ else if (!strcmp(profile_string, "tv"))
+ *value = SYSTEM_SETTING_SUPPORTED_PROFILE_TV;
+ else if (!strcmp(profile_string, "common"))
+ *value = SYSTEM_SETTING_SUPPORTED_PROFILE_COMMON;
+ else {
+ FREE(profile_string);
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+ }
+
+ profile_data = *value;
+ FREE(profile_string);
+ return SYSTEM_SETTINGS_ERROR_NONE;
+}
+
+int system_setting_feature_check_profile_tv(void * value)
+{
+ int profile_data = 0;
+
+ if (system_setting_get_profile_info(&profile_data) != SYSTEM_SETTINGS_ERROR_NONE)
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+
+ if (profile_data == SYSTEM_SETTING_SUPPORTED_PROFILE_TV)
+ return SYSTEM_SETTINGS_ERROR_NONE;
+ else
+ return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
+}
+
+int system_setting_feature_check_profile_mobile_wearable(void * value)
+{
+ int profile_data = 0;
+
+ if (system_setting_get_profile_info(&profile_data) != SYSTEM_SETTINGS_ERROR_NONE)
+ return SYSTEM_SETTINGS_ERROR_IO_ERROR;
+
+ if (profile_data == SYSTEM_SETTING_SUPPORTED_PROFILE_MOBILE ||
+ profile_data == SYSTEM_SETTING_SUPPORTED_PROFILE_WEARABLE)
+ return SYSTEM_SETTINGS_ERROR_NONE;
+ else {
+ return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
+ }
+}
+