VBoxManageGuestProp.cpp revision 1b1dbe76c7e01191389b65cc293ebc200b0f0c6b
/** @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 - new or existing */
/* 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)
/* This is always needed. */
/* assume it's a UUID */
{
/* must be a name */
}
if (machine)
{
/* open a session for the VM - new or existing */
/* 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.
*/
/*
* Pack the patterns
*/
/*
* Make the actual call to Main.
*/
/* assume it's a UUID */
{
/* must be a name */
}
if (machine)
{
/* open a session for the VM - new or existing */
/* 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 */
}