+tizen_profile_t _get_tizen_profile()
+{
+ static tizen_profile_t profile = _PROFILE_UNKNOWN;
+ char *profileName = NULL;
+
+ if (__builtin_expect(profile != _PROFILE_UNKNOWN, 1))
+ return profile;
+
+ system_info_get_platform_string("http://tizen.org/feature/profile", &profileName);
+ if (!profileName)
+ return _PROFILE_UNKNOWN;
+
+ switch (*profileName) {
+ case 'm':
+ case 'M':
+ profile = _PROFILE_MOBILE;
+ break;
+ case 'w':
+ case 'W':
+ profile = _PROFILE_WEARABLE;
+ break;
+ case 't':
+ case 'T':
+ profile = _PROFILE_TV;
+ break;
+ case 'i':
+ case 'I':
+ if (!strncasecmp(profileName, "ivi", 3))
+ profile = _PROFILE_IVI;
+ else if (!strncasecmp(profileName, "iot", 3))
+ profile = _PROFILE_IOT;
+ else
+ profile = _PROFILE_COMMON;
+ break;
+ default: // common or unknown ==> ALL ARE COMMON.
+ profile = _PROFILE_COMMON;
+ }
+ free(profileName);
+
+ return profile;
+}
+