#define SST_FEATURE_PROFILE "tizen.org/feature/profile"
#define SST_FEATURE_TELEPHONY "tizen.org/feature/network.telephony"
#define SST_FEATURE_WIFI "tizen.org/feature/network.wifi"
+#define SST_FEATURE_ETHERNET "tizen.org/feature/network.ethernet"
static int _check_feature(const char *path)
{
int ret = system_info_get_platform_string(feature, &profile);
if (ret != SYSTEM_INFO_ERROR_NONE) {
ERR("system_info_get_platform_string(%s) Fail(%d)", feature, ret);
+ free(profile);
return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
}
int can_rotary = _check_feature(SST_FEATURE_INPUT_ROTATING_BEZEL);
if (can_rotary == SYSTEM_SETTINGS_ERROR_IO_ERROR) {
ERR("system_info_get_platform_string(%s) Fail(%d)", feature, ret);
+ free(profile);
return SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
}
result = can_rotary;
return result;
}
+
+int sst_feature_check_automatic_time_update(void *value)
+{
+ static bool first_query = true;
+ static int ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
+ const char *feature[] = {
+ SST_FEATURE_TELEPHONY,
+ SST_FEATURE_WIFI,
+ SST_FEATURE_ETHERNET
+ };
+ int cnt = sizeof(feature) / sizeof(char*);
+
+ if (first_query == true) {
+ for (int i = 0 ; i < cnt ; i++) {
+ int feature_result = _check_feature(feature[i]);
+ if (SYSTEM_SETTINGS_ERROR_NONE == feature_result) {
+ ret = feature_result;
+ break;
+ }
+ if (SYSTEM_SETTINGS_ERROR_IO_ERROR == feature_result) {
+ ERR("_check_feature(%s) Fail(%d)", feature[i], ret);
+ ret = SYSTEM_SETTINGS_ERROR_NOT_SUPPORTED;
+ }
+ }
+ first_query = false;
+ }
+
+ return ret;
+}