tstVBoxControl.cpp revision 8d43244aa3d322f7807a4b0488f1038dd2595dc1
/* $Id$ */
/** @file
* VBoxControl - Guest Additions Command Line Management Interface, test case
*/
/*
* Copyright (C) 2007 Sun Microsystems, Inc.
*
* 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.
*
* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
* Clara, CA 95054 USA or visit http://www.sun.com if you need
* additional information or have any questions.
*/
/*******************************************************************************
* Header Files *
*******************************************************************************/
#include <iprt/initterm.h>
#include <VBox/VBoxGuestLib.h>
#ifdef VBOX_WITH_GUEST_PROPS
#endif
VBGLR3DECL(int) VbglR3Init(void)
{
RTPrintf("Initialising guest library...\n");
return VINF_SUCCESS;
}
{
RTPrintf("Connect to guest property service...\n");
*pu32ClientId = 1;
return VINF_SUCCESS;
}
{
return VINF_SUCCESS;
}
const char *pszName,
const char *pszValue,
const char *pszFlags)
{
RTPrintf("Called SET_PROP, client %d, name %s, value %s, flags %s...\n",
return VINF_SUCCESS;
}
const char *pszName,
const char *pszValue)
{
RTPrintf("Called SET_PROP_VALUE, client %d, name %s, value %s...\n",
return VINF_SUCCESS;
}
const char *pszName,
void *pvBuf,
char **ppszValue,
char **ppszFlags,
{
RTPrintf("Called GET_PROP, client %d, name %s...\n",
static char szValue[] = "Value";
static char szFlags[] = "TRANSIENT";
if (VALID_PTR(pu64Timestamp))
*pu64Timestamp = 12345;
if (VALID_PTR(pcbBufActual))
*pcbBufActual = 256;
return VINF_SUCCESS;
}
struct VBGLR3GUESTPROPENUM
{
};
char const * const *ppaszPatterns,
char const **ppszName,
char const **ppszValue,
char const **ppszFlags)
{
static VBGLR3GUESTPROPENUM Handle = { 0 };
static char szName[] = "Name";
static char szValue[] = "Value";
static char szFlags[] = "TRANSIENT";
if (VALID_PTR(pu64Timestamp))
*pu64Timestamp = 12345;
return VINF_SUCCESS;
}
char const **ppszName,
char const **ppszValue,
char const **ppszFlags)
{
RTPrintf("Called enumerate next...\n");
if (VALID_PTR(pu64Timestamp))
*pu64Timestamp = 0;
return VINF_SUCCESS;
}
{
RTPrintf("Called enumerate free...\n");
}
const char *pszPatterns,
void *pvBuf,
char ** ppszName,
char **ppszValue,
char **ppszFlags,
{
if (u32Timeout == RT_INDEFINITE_WAIT)
RTPrintf("Called GET_NOTIFICATION, client %d, patterns %s, timestamp %llu,\n"
" timeout RT_INDEFINITE_WAIT...\n",
else
RTPrintf("Called GET_NOTIFICATION, client %d, patterns %s, timestamp %llu,\n"
" timeout %u...\n",
static char szName[] = "Name";
static char szValue[] = "Value";
static char szFlags[] = "TRANSIENT";
if (VALID_PTR(pu64Timestamp))
*pu64Timestamp = 12345;
if (VALID_PTR(pcbBufActual))
*pcbBufActual = 256;
return VINF_SUCCESS;
}