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