GuestCtrlPrivate.cpp revision 7e8ef90d3160234df0f254131b87af4243d79476
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * Internal helpers/structures for guest control functionality.
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * Copyright (C) 2011-2012 Oracle Corporation
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * available from http://www.virtualbox.org. This file is free software;
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * you can redistribute it and/or modify it under the terms of the GNU
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * General Public License (GPL) as published by the Free Software
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync/******************************************************************************
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync * Header Files *
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync ******************************************************************************/
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync#endif /* DEBUG */
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync/******************************************************************************
7420e5ee5565b181c144eabb14da0da9e8cce657vboxsync * Structures and Typedefs *
9a3faa0b7c1afced2e57bc05acfe3f232f855bd4vboxsync ******************************************************************************/
if (!uTimeoutMS)
return rc;
cbData(0),
uFlags(0)
cbData(0),
uFlags(0)
Destroy();
switch (enmType)
PCALLBACKDATAEXECINSTATUS pData = (PCALLBACKDATAEXECINSTATUS)RTMemAlloc(sizeof(CALLBACKDATAEXECINSTATUS));
return rc;
if (pvData)
cbData = 0;
if (!cbData)
return VINF_SUCCESS;
if (!pvData)
return VERR_NO_MEMORY;
return VINF_SUCCESS;
: mWaitFlags(0)
Destroy();
if (cEnv)
char *pszEnv;
if (pcbEnv)
if (pcEnvVars)
return rc;
++it)
return rc;
size_t s = 0;
++it, ++s)
return VINF_SUCCESS;
if (pvEnv)
return strRet;
return VERR_INVALID_PARAMETER;
return rc;
return VINF_SUCCESS;
size_t p = 0;
return rc;
return VINF_SUCCESS;
return VERR_NOT_FOUND;
++it)
int GuestEnvironment::appendToEnvBlock(const char *pszEnv, void **ppvList, size_t *pcbList, uint32_t *pcEnvVars)
if (*ppvList)
char *pszTmp;
*pcEnvVars = 0;
*pcbList = 0;
return rc;
Clear();
#ifdef DEBUG
if (pszValue)
return VINF_SUCCESS;
return VERR_NOT_FOUND;
return iVal;
return NULL;
if (pszValue)
return VINF_SUCCESS;
return VERR_NOT_FOUND;
return uVal;
if (pszValue)
return rc;
: m_cbAllocated(0),
m_cbSize(0),
m_cbOffset(0),
Destroy();
if (fAddToSet)
if (cbInBuf == 0)
m_cbOffset = 0;
if (pvNew)
return rc;
if (m_pbBuffer)
m_cbAllocated = 0;
m_cbSize = 0;
m_cbOffset = 0;
#ifdef DEBUG
int rc = RTFileOpen(&hFile, pszFile, RTFILE_O_CREATE_REPLACE | RTFILE_O_WRITE | RTFILE_O_DENY_WRITE);
return m_cbOffset;
return m_cbSize;
if ( !m_pbBuffer
|| !m_cbSize)
return VERR_NO_DATA;
return VERR_NO_DATA;
while (*pszStart)
if (pszSep)
return rc;
if ( !uDistance
uDistance++;
return rc;