static const char* hippo_platform_impl_get_jabber_resource(HippoPlatform *platform) { HippoPlatformImpl *impl = HIPPO_PLATFORM_IMPL(platform); if (impl->jabber_resource == NULL) { // Create an XMPP resource identifier based on this machine's hardware // profile GUID. HW_PROFILE_INFO hwProfile; if (GetCurrentHwProfile(&hwProfile)) { HippoUStr guidUTF(hwProfile.szHwProfileGuid); impl->jabber_resource = g_strdup(guidUTF.c_str()); } else { hippoDebugLogW(L"Failed to get hardware profile!"); // uhhh... let's just make up a number, better than bombing out GTimeVal val; g_get_current_time(&val); impl->jabber_resource = g_strdup_printf("%d", val.tv_sec); } g_debug("jabber resource: '%s'", impl->jabber_resource); } return impl->jabber_resource; }
char *clamav_stats_get_hostid(void *cbdata) { HW_PROFILE_INFO HwProfInfo; if (!GetCurrentHwProfile(&HwProfInfo)) return strdup(STATS_ANON_UUID); return strdup(HwProfInfo.szHwProfileGuid); }