/* $Id: */
/** @file
* VBoxWatchdogUtils - Misc. utility functions for modules.
*/
/*
* Copyright (C) 2011-2012 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.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include "VBoxWatchdogInternal.h"
/**
* Adds a group / a set of groups to the specified map.
* If a group in the group map exists there will be no action.
*
* @return IPRT status code.
* @param groups Map to add group(s) to.
* @param pszGroupsToAdd Comma-separated string of one or more groups to add.
* @param fFlags Flags to set to the groups added.
*/
{
try
{
{
}
}
catch (...)
{
AssertFailed();
}
return VINF_SUCCESS;
}
/**
* Retrieves a metric from a specified machine.
*
* @return IPRT status code.
* @param pMachine Pointer to the machine's internal structure.
* @param strName Name of metric to retrieve.
* @param pulData Pointer to value to retrieve the actual metric value.
*/
{
/* Input. */
/* Output. */
/* Query current memory free. */
#ifdef VBOX_WATCHDOG_GLOBAL_PERFCOL
#else
#endif
#if 0
/* Useful for metrics debugging. */
{
const char *separator = "";
for (unsigned k = 0; k < retLengths[j]; k++)
{
if (retScales[j] == 1)
else
separator = ", ";
}
RTPrintf("\n");
}
#endif
}
/**
* Returns the payload of a machine.
*
* @return void* Pointer to payload data. Mutable!
* @param pMachine Machine to get payload for.
* @param pszModule Module name to get payload from.
*/
{
return NULL;
}
{
if (ppszPayload)
*ppszPayload = p.pvData;
return VINF_SUCCESS;
}
{
{
}
}
{
return NULL;
}
{
return machineState;
return MachineState_Null;
}
{
/* Try per-VM approach. */
if (!rptrMachine.isNull())
{
strTemp.asOutParam());
{
}
}
{
/* Try global approach. */
strTemp.asOutParam());
{
}
}
{
return VERR_NOT_FOUND;
}
return VINF_SUCCESS;
}
{
if (RT_SUCCESS(rc))
{
}
else
return rc;
}