VBoxHostVersion.cpp revision 74804912a237136f06d0b49682a119577135902b
/* $Id$ */
/** @file
* VBoxHostVersion - Checks the host's VirtualBox version and notifies
* the user in case of an update.
*/
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#include "VBoxHostVersion.h"
#include "VBoxTray.h"
#include "VBoxHelpers.h"
#include <VBox/VBoxGuestLib.h>
/** @todo Move this part in VbglR3 and just provide a callback for the platform-specific
notification stuff, since this is very similar to the VBoxClient code. */
int VBoxCheckHostVersion()
{
int rc;
if (RT_SUCCESS(rc))
{
char *pszHostVersion;
char *pszGuestVersion;
bool bUpdate;
rc = VbglR3HostVersionCheckForUpdate(uGuestPropSvcClientID, &bUpdate, &pszHostVersion, &pszGuestVersion);
if (RT_SUCCESS(rc))
{
if (bUpdate)
{
char szTitle[64];
/** @todo Add some translation macros here. */
"We recommend updating to the latest version (%s) by choosing the "
if (RT_FAILURE(rc))
Log(("VBoxTray: Guest Additions update found; however: could not show version notifier balloon tooltip! rc = %d\n", rc));
}
/* Store host version to not notify again. */
}
}
return rc;
}