VBoxManage.h revision 9a7f2d6ff1e25f8701f019bc315243b28be3badb
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @file
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VBox frontends: VBoxManage (command-line interface):
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VBoxManage header.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
00550544656e1a1537bad42c4f4bacef814637cavboxsync/*
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Copyright (C) 2006-2007 Sun Microsystems, Inc.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * available from http://www.virtualbox.org. This file is free software;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * you can redistribute it and/or modify it under the terms of the GNU
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * General Public License (GPL) as published by the Free Software
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync *
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Clara, CA 95054 USA or visit http://www.sun.com if you need
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * additional information or have any questions.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifndef ___H_VBOXMANAGE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define ___H_VBOXMANAGE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <iprt/types.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/com/ptr.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#include <VBox/com/VirtualBox.h>
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** @name Syntax diagram category.
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * @{ */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_DUMPOPTS 0
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_LIST RT_BIT_64(0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SHOWVMINFO RT_BIT_64(1)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_REGISTERVM RT_BIT_64(2)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_UNREGISTERVM RT_BIT_64(3)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_CREATEVM RT_BIT_64(4)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_MODIFYVM RT_BIT_64(5)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_STARTVM RT_BIT_64(6)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_CONTROLVM RT_BIT_64(7)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_DISCARDSTATE RT_BIT_64(8)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SNAPSHOT RT_BIT_64(9)
101e4426c962b6d124219de44d4fd2cf2a23b178vboxsync#define USAGE_REGISTERIMAGE RT_BIT_64(10)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_UNREGISTERIMAGE RT_BIT_64(11)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SHOWVDIINFO RT_BIT_64(12)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_CREATEVDI RT_BIT_64(13)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_MODIFYVDI RT_BIT_64(14)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_CLONEVDI RT_BIT_64(15)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_ADDISCSIDISK RT_BIT_64(16)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_CREATEHOSTIF RT_BIT_64(17)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_REMOVEHOSTIF RT_BIT_64(18)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_GETEXTRADATA RT_BIT_64(19)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SETEXTRADATA RT_BIT_64(20)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SETPROPERTY RT_BIT_64(21)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_USBFILTER (RT_BIT_64(22) | RT_BIT_64(23) | RT_BIT_64(24))
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_USBFILTER_ADD RT_BIT_64(22)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_USBFILTER_MODIFY RT_BIT_64(23)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_USBFILTER_REMOVE RT_BIT_64(24)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SHAREDFOLDER (RT_BIT_64(25) | RT_BIT_64(26))
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SHAREDFOLDER_ADD RT_BIT_64(25)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SHAREDFOLDER_REMOVE RT_BIT_64(26)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_LOADSYMS RT_BIT_64(29)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_UNLOADSYMS RT_BIT_64(30)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_SETVDIUUID RT_BIT_64(31)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_CONVERTDD RT_BIT_64(32)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef VBOX_OSE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define USAGE_LISTPARTITIONS (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define USAGE_CREATERAWVMDK (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#else /* !VBOX_OSE */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define USAGE_LISTPARTITIONS RT_BIT_64(33)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define USAGE_CREATERAWVMDK RT_BIT_64(34)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* !VBOX_OSE */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_VM_STATISTICS RT_BIT_64(35)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_ADOPTSTATE RT_BIT_64(36)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_MODINSTALL RT_BIT_64(37)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#define USAGE_MODUNINSTALL RT_BIT_64(38)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#ifdef VBOX_OSE
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync# define USAGE_RENAMEVMDK (0)
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#else
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync# define USAGE_RENAMEVMDK RT_BIT_64(39)
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync#endif /* !VBOX_OSE */
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync#define USAGE_ALL (~(uint64_t)0)
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsync/** @} */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef uint64_t USAGECATEGORY;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** flag whether we're in internal mode */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncextern bool g_fInternalMode;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/** showVMInfo details */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsynctypedef enum
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync{
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VMINFO_NONE = 0,
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VMINFO_STANDARD = 1, /**< standard details */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VMINFO_STATISTICS = 2, /**< guest statistics */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VMINFO_FULL = 3, /**< both */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync VMINFO_MACHINEREADABLE = 4 /**< both, and make it machine readable */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync} VMINFO_DETAILS;
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync/*
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync * Prototypes
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync */
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsyncint errorSyntax(USAGECATEGORY u64Cmd, const char *pszFormat, ...);
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsyncint errorArgument(const char *pszFormat, ...);
968c867cc19737e4e1fd97c396fcf75a3d52dd27vboxsync
b84a3f2aac9529d5c5840512b12d81bc62d0e665vboxsyncvoid printUsageInternal(USAGECATEGORY u64Cmd);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncint handleInternalCommands(int argc, char *argv[],
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync ComPtr <IVirtualBox> aVirtualBox, ComPtr<ISession> aSession);
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsyncunsigned long VBoxSVNRev();
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync#endif /* !___H_VBOXMANAGE */
0b74a2f80aba476dc8be8bc1c63891fc53945986vboxsync