1 | /** @file
|
---|
2 | * VBox frontends: VBoxManage (command-line interface):
|
---|
3 | * VBoxManage header.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2006-2007 Sun Microsystems, Inc.
|
---|
8 | *
|
---|
9 | * This file is part of VirtualBox Open Source Edition (OSE), as
|
---|
10 | * available from http://www.virtualbox.org. This file is free software;
|
---|
11 | * you can redistribute it and/or modify it under the terms of the GNU
|
---|
12 | * General Public License (GPL) as published by the Free Software
|
---|
13 | * Foundation, in version 2 as it comes in the "COPYING" file of the
|
---|
14 | * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
|
---|
15 | * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
|
---|
16 | *
|
---|
17 | * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
|
---|
18 | * Clara, CA 95054 USA or visit http://www.sun.com if you need
|
---|
19 | * additional information or have any questions.
|
---|
20 | */
|
---|
21 |
|
---|
22 | #ifndef ___H_VBOXMANAGE
|
---|
23 | #define ___H_VBOXMANAGE
|
---|
24 |
|
---|
25 | #include <iprt/types.h>
|
---|
26 | #include <VBox/com/ptr.h>
|
---|
27 | #include <VBox/com/VirtualBox.h>
|
---|
28 |
|
---|
29 | /** @name Syntax diagram category.
|
---|
30 | * @{ */
|
---|
31 | #define USAGE_DUMPOPTS 0
|
---|
32 | #define USAGE_LIST RT_BIT_64(0)
|
---|
33 | #define USAGE_SHOWVMINFO RT_BIT_64(1)
|
---|
34 | #define USAGE_REGISTERVM RT_BIT_64(2)
|
---|
35 | #define USAGE_UNREGISTERVM RT_BIT_64(3)
|
---|
36 | #define USAGE_CREATEVM RT_BIT_64(4)
|
---|
37 | #define USAGE_MODIFYVM RT_BIT_64(5)
|
---|
38 | #define USAGE_STARTVM RT_BIT_64(6)
|
---|
39 | #define USAGE_CONTROLVM RT_BIT_64(7)
|
---|
40 | #define USAGE_DISCARDSTATE RT_BIT_64(8)
|
---|
41 | #define USAGE_SNAPSHOT RT_BIT_64(9)
|
---|
42 | #define USAGE_REGISTERIMAGE RT_BIT_64(10)
|
---|
43 | #define USAGE_UNREGISTERIMAGE RT_BIT_64(11)
|
---|
44 | #define USAGE_SHOWVDIINFO RT_BIT_64(12)
|
---|
45 | #define USAGE_CREATEVDI RT_BIT_64(13)
|
---|
46 | #define USAGE_MODIFYVDI RT_BIT_64(14)
|
---|
47 | #define USAGE_CLONEVDI RT_BIT_64(15)
|
---|
48 | #define USAGE_ADDISCSIDISK RT_BIT_64(16)
|
---|
49 | #define USAGE_CREATEHOSTIF RT_BIT_64(17)
|
---|
50 | #define USAGE_REMOVEHOSTIF RT_BIT_64(18)
|
---|
51 | #define USAGE_GETEXTRADATA RT_BIT_64(19)
|
---|
52 | #define USAGE_SETEXTRADATA RT_BIT_64(20)
|
---|
53 | #define USAGE_SETPROPERTY RT_BIT_64(21)
|
---|
54 | #define USAGE_USBFILTER (RT_BIT_64(22) | RT_BIT_64(23) | RT_BIT_64(24))
|
---|
55 | #define USAGE_USBFILTER_ADD RT_BIT_64(22)
|
---|
56 | #define USAGE_USBFILTER_MODIFY RT_BIT_64(23)
|
---|
57 | #define USAGE_USBFILTER_REMOVE RT_BIT_64(24)
|
---|
58 | #define USAGE_SHAREDFOLDER (RT_BIT_64(25) | RT_BIT_64(26))
|
---|
59 | #define USAGE_SHAREDFOLDER_ADD RT_BIT_64(25)
|
---|
60 | #define USAGE_SHAREDFOLDER_REMOVE RT_BIT_64(26)
|
---|
61 | #define USAGE_LOADSYMS RT_BIT_64(29)
|
---|
62 | #define USAGE_UNLOADSYMS RT_BIT_64(30)
|
---|
63 | #define USAGE_SETVDIUUID RT_BIT_64(31)
|
---|
64 | #define USAGE_CONVERTDD RT_BIT_64(32)
|
---|
65 | #define USAGE_LISTPARTITIONS RT_BIT_64(33)
|
---|
66 | #define USAGE_CREATERAWVMDK RT_BIT_64(34)
|
---|
67 | #define USAGE_VM_STATISTICS RT_BIT_64(35)
|
---|
68 | #define USAGE_ADOPTSTATE RT_BIT_64(36)
|
---|
69 | #define USAGE_MODINSTALL RT_BIT_64(37)
|
---|
70 | #define USAGE_MODUNINSTALL RT_BIT_64(38)
|
---|
71 | #define USAGE_RENAMEVMDK RT_BIT_64(39)
|
---|
72 | #define USAGE_ALL (~(uint64_t)0)
|
---|
73 | /** @} */
|
---|
74 |
|
---|
75 | typedef uint64_t USAGECATEGORY;
|
---|
76 |
|
---|
77 | /** flag whether we're in internal mode */
|
---|
78 | extern bool g_fInternalMode;
|
---|
79 |
|
---|
80 | /** showVMInfo details */
|
---|
81 | typedef enum
|
---|
82 | {
|
---|
83 | VMINFO_NONE = 0,
|
---|
84 | VMINFO_STANDARD = 1, /**< standard details */
|
---|
85 | VMINFO_STATISTICS = 2, /**< guest statistics */
|
---|
86 | VMINFO_FULL = 3, /**< both */
|
---|
87 | VMINFO_MACHINEREADABLE = 4 /**< both, and make it machine readable */
|
---|
88 | } VMINFO_DETAILS;
|
---|
89 |
|
---|
90 | /*
|
---|
91 | * Prototypes
|
---|
92 | */
|
---|
93 | int errorSyntax(USAGECATEGORY u64Cmd, const char *pszFormat, ...);
|
---|
94 | int errorArgument(const char *pszFormat, ...);
|
---|
95 |
|
---|
96 | void printUsageInternal(USAGECATEGORY u64Cmd);
|
---|
97 | int handleInternalCommands(int argc, char *argv[],
|
---|
98 | ComPtr <IVirtualBox> aVirtualBox, ComPtr<ISession> aSession);
|
---|
99 | unsigned long VBoxSVNRev();
|
---|
100 |
|
---|
101 | #endif /* !___H_VBOXMANAGE */
|
---|