VBoxManageGuestProp.cpp revision fb4b0f4ca593a27c7fbec391aa8fce062a75b9c7
/** @file
*
* VBox frontends: VBoxManage (command-line interface), Guest Properties
*/
/*
* Copyright (C) 2006-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 "VBoxManage.h"
using namespace com;
void usageGuestProperty(void)
{
RTPrintf("VBoxManage guestproperty get <vmname>|<uuid>\n"
" <property> [-verbose]\n"
"\n");
RTPrintf("VBoxManage guestproperty set <vmname>|<uuid>\n"
" <property> [<value>] [-flags <flags>]\n"
"\n");
RTPrintf("VBoxManage guestproperty enumerate <vmname>|<uuid>\n"
" [-patterns <patterns>]\n"
"\n");
}
{
bool verbose = false;
verbose = true;
else if (argc != 2)
/* assume it's a UUID */
{
/* must be a name */
}
if (machine)
{
/* open a session for the VM */
/* get the mutable session machine */
if (!value)
RTPrintf("No value set!\n");
if (value)
{
}
}
}
{
/*
* Check the syntax. We can deduce the correct syntax from the number of
* arguments.
*/
bool usageOK = true;
if (3 == argc)
{
}
else if (4 == argc)
{
usageOK = false;
}
else if (5 == argc)
{
usageOK = false;
}
else if (argc != 2)
usageOK = false;
if (!usageOK)
/* assume it's a UUID */
{
/* must be a name */
}
if (machine)
{
/* open a session for the VM */
/* get the mutable session machine */
else
}
}
/**
* Enumerates the properties in the guest property store.
*
* @returns 0 on success, 1 on failure
* @note see the command line API description for parameters
*/
{
/*
* Check the syntax. We can deduce the correct syntax from the number of
* arguments.
*/
const char *paszPatterns = NULL;
else if (argc != 1)
/*
* Count the size of the patterns and pack them.
*/
size_t cchPatterns = 0;
if (argc > 2)
for (int i = 1; i < argc; ++i)
return errorArgument ("out of memory");
if (argc > 2)
{
for (int i = 1; i < argc; ++i)
{
}
}
/*
* Make the actual call to Main.
*/
/* assume it's a UUID */
{
/* must be a name */
}
if (machine)
{
/* open a session for the VM */
/* get the mutable session machine */
{
RTPrintf("No properties found.\n");
RTPrintf("Name: %lS, value: %lS, timestamp: %lld, flags: %lS\n",
}
}
}
/**
* Access the guest property store.
*
* @returns 0 on success, 1 on failure
* @note see the command line API description for parameters
*/
{
if (0 == argc)
/* else */
}