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