VirtualBox

source: vbox/trunk/src/VBox/Main/idl/VirtualBox.xidl@ 23727

Last change on this file since 23727 was 23727, checked in by vboxsync, 15 years ago

Introduced Get/SetHWVirtExProperty and added the HWVirtExPropertyType_Exclusive property to control VT initialization.
(system wide or for each world switch; default system wide for all but Windows & Mac OS X)

  • Property svn:eol-style set to native
File size: 489.0 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4 * :tabSize=2:indentSize=2:noTabs=true:
5 * :folding=explicit:collapseFolds=1:
6 *
7 * Master declaration for VirtualBox's Main API, represented
8 * by COM/XPCOM and web service interfaces.
9 *
10 * From this document, the build system generates several files
11 * via XSLT that are then used during the build process.
12 *
13 * Below is the list of XSL templates that operate on this file and
14 * output files they generate. These XSL templates must be updated
15 * whenever the schema of this file changes:
16 *
17 * 1. src/VBox/Main/idl/midl.xsl =>
18 * out/<platform>/bin/sdk/idl/VirtualBox.idl
19 * (MS COM interface definition file for Main API)
20 *
21 * 2. src/VBox/Main/idl/xpidl.xsl =>
22 * out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
23 * (XPCOM interface definition file for Main API)
24 *
25 * 3. src/VBox/Main/idl/doxygen.xsl =>
26 * out/<platform>/obj/src/VBox/Main/VirtualBox.idl
27 * (pseudo-IDL for Doxygen to generate the official Main API
28 * documentation)
29 *
30 * 4. src/VBox/Main/webservice/*.xsl =>
31 * a bunch of WSDL and C++ files
32 * (VirtualBox web service sources and SOAP mappers;
33 * see src/VBox/Main/webservice/Makefile.kmk for details)
34 *
35 * 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
36 * out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
37 * (smart Qt-based C++ wrapper classes for COM interfaces
38 * of the Main API)
39 *
40 * 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
41 * out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
42 * (Main API TypeLib block for the WiX installer)
43 *
44 * 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
45 * out/<platform>/obj/Runtime/errmsgvboxcomdata.h
46 * (<result> extraction for the %Rhrc format specifier)
47 *
48 Copyright (C) 2006-2009 Sun Microsystems, Inc.
49
50 This file is part of VirtualBox Open Source Edition (OSE), as
51 available from http://www.virtualbox.org. This file is free software;
52 you can redistribute it and/or modify it under the terms of the GNU
53 General Public License (GPL) as published by the Free Software
54 Foundation, in version 2 as it comes in the "COPYING" file of the
55 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
56 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
57
58 Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
59 Clara, CA 95054 USA or visit http://www.sun.com if you need
60 additional information or have any questions.
61-->
62
63<idl>
64
65<desc>
66 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
67 describes the so-called <i>VirtualBox Main API</i> which comprises all public
68 COM interfaces and components provided by the VirtualBox server and by the
69 VirtualBox client library.
70
71 VirtualBox employs a client-server design, meaning that whenever any part of
72 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
73 interface or any virtual machine --, a dedicated server process named
74 VBoxSVC runs in the background. This allows multiple processes working with
75 VirtualBox to cooperate without conflicts. These processes communicate to each
76 other using inter-process communication facilities provided by the COM
77 implementation of the host computer.
78
79 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
80 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
81 implementation, is used.
82
83 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
84 the VBoxManage command-line interface and the VBoxVRDP server) are technically
85 front-ends to the Main API and only use the interfaces that are documented
86 in this Main API documentation. This ensures that, with any given release
87 version of VirtualBox, all capabilities of the product that could be useful
88 to an external client program are always exposed by way of this API.
89
90 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
91 contains two public component classes:
92 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
93 implement IVirtualBox and ISession interfaces respectively. These two classes
94 are of supreme importance and will be needed in order for any front-end
95 program to do anything useful. It is recommended to read the documentation of
96 the mentioned interfaces first.
97
98 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
99 there can be only one object of this class on the local machine at any given
100 time. This object is a parent of many other objects in the VirtualBox COM
101 library and lives in the VBoxSVC process. In fact, when you create an instance
102 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
103 process is already running, starts it if not, and returns you a reference to
104 the <tt>VirtualBox</tt> object created in this process. When the last reference
105 to this object is released, the VBoxSVC process ends (with a 5 second delay to
106 protect from too frequent restarts).
107
108 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
109 as many <tt>Session</tt> objects as you need but all of them will live in a
110 process which issues the object instantiation call. <tt>Session</tt> objects
111 represent virtual machine sessions which are used to configure virtual
112 machines and control their execution.
113</desc>
114
115<if target="midl">
116 <cpp line="enum {"/>
117 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
118 <cpp line=" kTypeLibraryMinorVersion = 0"/>
119 <cpp line="};"/>
120</if>
121
122<if target="xpidl">
123 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
124 <cpp>
125/* currently, nsISupportsImpl.h lacks the below-like macros */
126
127#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
128#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
129#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
130
131#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
132# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
133 NS_IMPL_THREADSAFE_ADDREF(_class) \
134 NS_IMPL_THREADSAFE_RELEASE(_class) \
135 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
136 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
137#endif
138
139#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
140# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
141 NS_IMPL_THREADSAFE_ADDREF(_class) \
142 NS_IMPL_THREADSAFE_RELEASE(_class) \
143 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
144 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
145#endif
146
147#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
148# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
149 NS_IMPL_THREADSAFE_ADDREF(_class) \
150 NS_IMPL_THREADSAFE_RELEASE(_class) \
151 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
152 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
153#endif
154
155#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
156# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
157 NS_INTERFACE_MAP_BEGIN(_class) \
158 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
159 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
160 NS_IMPL_QUERY_CLASSINFO(_class) \
161 NS_INTERFACE_MAP_END
162#endif
163
164#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
165# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
166 _i2, _ic2) \
167 NS_INTERFACE_MAP_BEGIN(_class) \
168 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
169 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
170 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
171 NS_IMPL_QUERY_CLASSINFO(_class) \
172 NS_INTERFACE_MAP_END
173#endif
174
175#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
176# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
177 _i2, _ic2, _i3, _ic3) \
178 NS_INTERFACE_MAP_BEGIN(_class) \
179 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
180 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
181 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
182 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
183 NS_IMPL_QUERY_CLASSINFO(_class) \
184 NS_INTERFACE_MAP_END
185#endif
186
187#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
188#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
189#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
190
191#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
192# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
193 NS_IMPL_THREADSAFE_ADDREF(_class) \
194 NS_IMPL_THREADSAFE_RELEASE(_class) \
195 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
196 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
197#endif
198
199#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
200# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
201 _i2, _ic2) \
202 NS_IMPL_THREADSAFE_ADDREF(_class) \
203 NS_IMPL_THREADSAFE_RELEASE(_class) \
204 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
205 _i2, _ic2) \
206 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
207#endif
208
209#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
210# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2, _i3, _ic3) \
212 NS_IMPL_THREADSAFE_ADDREF(_class) \
213 NS_IMPL_THREADSAFE_RELEASE(_class) \
214 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
215 _i2, _ic2, _i3, _ic3) \
216 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
217#endif
218
219 </cpp>
220</if>
221
222<library
223 name="VirtualBox"
224 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
225 version="1.3"
226 desc="VirtualBox Type Library"
227 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
228 supportsErrorInfo="yes"
229>
230
231
232 <!--
233 // COM result codes for VirtualBox
234 /////////////////////////////////////////////////////////////////////////
235 -->
236
237 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
238 <desc>
239 This section describes all VirtualBox-specific COM result codes that may
240 be returned by methods of VirtualBox COM interfaces in addition to
241 standard COM result codes.
242
243 Note that along with the result code, every VirtualBox method returns
244 extended error information through the IVirtualBoxErrorInfo interface on
245 failure. This interface is a preferred way to present the error to the end
246 user because it contains a human readable description of the error. Raw
247 result codes, both standard and described in this section, are intended to
248 be used by programs to analyze the reason of a failure and select an
249 appropriate course of action without involving the end user (for example,
250 retry the operation later or make a different call).
251
252 The standard COM result codes that may originate from our methods include:
253
254 <table>
255 <tr><td>E_INVALIDARG</td>
256 <td>
257 Returned when the value of the method's argument is not within the range
258 of valid values. This should not be confused with situations when the
259 value is within the range but simply doesn't suit the current object
260 state and there is a possibility that it will be accepted later (in such
261 cases VirtualBox-specific codes are returned, for example,
262 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
263 </td>
264 </tr>
265 <tr><td>E_POINTER</td>
266 <td>
267 Returned if a memory pointer for the output argument is invalid (for
268 example, @c null). Note that when pointers representing input
269 arguments (such as strings) are invalid, E_INVALIDARG is returned.
270 </td>
271 </tr>
272 <tr><td>E_ACCESSDENIED</td>
273 <td>
274 Returned when the called object is not ready. Since the lifetime of a
275 public COM object cannot be fully controlled by the implementation,
276 VirtualBox maintains the readiness state for all objects it creates and
277 returns this code in response to any method call on the object that was
278 deactivated by VirtualBox and is not functioning any more.
279 </td>
280 </tr>
281 <tr><td>E_OUTOFMEMORY</td>
282 <td>
283 Returned when a memory allocation operation fails.
284 </td>
285 </tr>
286 </table>
287 </desc>
288 </descGroup>
289
290 <!--
291 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
292 everything in <result>/<desc> after (and including) the first dot, so express
293 the matter of the error code in the first sentence and keep it short.
294 -->
295
296 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
297 <desc>
298 Object corresponding to the supplied arguments does not exist.
299 </desc>
300 </result>
301
302 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
303 <desc>
304 Current virtual machine state prevents the operation.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
309 <desc>
310 Virtual machine error occurred attempting the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
315 <desc>
316 File not accessible or erroneous file contents.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
321 <desc>
322 Runtime subsystem error.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
327 <desc>
328 Pluggable Device Manager error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
333 <desc>
334 Current object state prohibits operation.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
339 <desc>
340 Host operating system related error.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
345 <desc>
346 Requested operation is not supported.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
351 <desc>
352 Invalid XML found.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
357 <desc>
358 Current session state prohibits operation.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
363 <desc>
364 Object being in use prohibits operation.
365 </desc>
366 </result>
367
368 <!--
369 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
370 everything in <result>/<desc> after (and including) the first dot, so express
371 the matter of the error code in the first sentence and keep it short.
372 -->
373
374 <descGroup/>
375
376 <!--
377 // all common enums
378 /////////////////////////////////////////////////////////////////////////
379 -->
380
381 <enum name="SettingsVersion"
382 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
383 >
384 <desc>Settings version of VirtualBox settings files. This is written to
385 the "version" attribute of the root "VirtualBox" element in the settings
386 file XML and indicates which VirtualBox version wrote the file.
387 </desc>
388
389 <const name="Null" value="0">
390 <desc>Null value, indicates invalid version.</desc>
391 </const>
392 <const name="v1_0" value="1">
393 <desc>Legacy settings version, not currently supported.</desc>
394 </const>
395 <const name="v1_1" value="2">
396 <desc>Legacy settings version, not currently supported.</desc>
397 </const>
398 <const name="v1_2" value="3">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_3pre" value="4">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_3" value="5">
405 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
406 <!--
407 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
408 -->
409 </const>
410 <const name="v1_4" value="6">
411 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
412 <!--
413 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
414 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
415 -->
416 </const>
417 <const name="v1_5" value="7">
418 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
419 <!-- 2008-09-04: 2.0.0 released
420 2008-11-20: settings version 1.5 introduced
421 2008-12-17: 2.1.0 released
422 Machine changes:
423 guest OS identifiers changed;
424 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
425 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
426 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
427 -->
428 </const>
429 <const name="v1_6" value="8">
430 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
431 <!-- 2008-12-17: 2.1.0 released
432 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
433 2009-04-08: 2.2.0 released
434 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
435 -->
436 </const>
437 <const name="v1_7" value="9">
438 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
439 <!-- 2008-12-17: 2.1.0 released
440 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
441 2009-04-08: 2.2.0 released
442 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
443 Machine changes: HardDiskAttachments is now StorageControllers (done)
444 -->
445 </const>
446 <const name="v1_8" value="10">
447 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
448 <!-- Machine additions: Display/@accelerate2DVideo (done)
449 -->
450 </const>
451 <const name="v1_9" value="11">
452 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
453 <!-- The big storage controller / DVD / Floppy rework (done)
454 -->
455 </const>
456 <const name="Future" value="12">
457 <desc>Settings version greater than "1.9", written by a future VirtualBox version.</desc>
458 </const>
459 </enum>
460
461 <enum
462 name="AccessMode"
463 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
464 >
465 <desc>
466 Access mode for opening files.
467 </desc>
468
469 <const name="ReadOnly" value="1"/>
470 <const name="ReadWrite" value="2"/>
471 </enum>
472
473 <enum
474 name="MachineState"
475 uuid="f532545d-9ae7-4402-8b5f-1ea7d778cfc7"
476 >
477 <desc>
478 Virtual machine execution state.
479
480 This enumeration represents possible values of the <link
481 to="IMachine::state"/> attribute.
482
483 Below is the basic virtual machine state diagram. It shows how the state
484 changes during virtual machine execution. The text in square braces shows
485 a method of the IConsole interface that performs the given state
486 transition.
487
488 <pre>
489 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
490 V |
491 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
492 | | | | V |
493 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
494 | | ^ | ^ |
495 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
496 | ^ | | | |
497 | | +-----------------------------------------+-|-------------------+ +
498 | | | | |
499 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
500 | | | |
501 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
502 | | |
503 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
504 </pre>
505
506 Note that states to the right from PoweredOff, Aborted and Saved in the
507 above diagram are called <i>online VM states</i>. These states
508 represent the virtual machine which is being executed in a dedicated
509 process (usually with a GUI window attached to it where you can see the
510 activity of the virtual machine and interact with it). There are two
511 special pseudo-states, FirstOnline and LastOnline, that can be used in
512 relational expressions to detect if the given machine state is online or
513 not:
514
515 <pre>
516 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
517 machine.GetState() &lt;= MachineState_LastOnline)
518 {
519 ...the machine is being executed...
520 }
521 </pre>
522
523 When the virtual machine is in one of the online VM states (that is, being
524 executed), only a few machine settings can be modified. Methods working
525 with such settings contain an explicit note about that. An attempt to
526 change any oter setting or perform a modifying operation during this time
527 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
528
529 All online states except Running, Paused and Stuck are transitional: they
530 represent temporary conditions of the virtual machine that will last as
531 long as the operation that initiated such a condition.
532
533 The Stuck state is a special case. It means that execution of the machine
534 has reached the "Guru Meditation" condition. This condition indicates an
535 internal VMM (virtual machine manager) failure which may happen as a
536 result of either an unhandled low-level virtual hardware exception or one
537 of the recompiler exceptions (such as the <i>too-many-traps</i>
538 condition).
539
540 Note also that any online VM state may transit to the Aborted state. This
541 happens if the process that is executing the virtual machine terminates
542 unexpectedly (for example, crashes). Other than that, the Aborted state is
543 equivalent to PoweredOff.
544
545 There are also a few additional state diagrams that do not deal with
546 virtual machine execution and therefore are shown separately. The states
547 shown on these diagrams are called <i>offline VM states</i> (this includes
548 PoweredOff, Aborted and Saved too).
549
550 The first diagram shows what happens when a lengthy setup operation is
551 being executed (such as <link to="IMachine::attachDevice"/>).
552
553 <pre>
554 +----------------------------------(same state as before the call)------+
555 | |
556 +-&gt; PoweredOff --+ |
557 | | |
558 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
559 | |
560 +-&gt; Saved -------+
561 </pre>
562
563 The next two diagrams demonstrate the process of taking a snapshot of a
564 powered off virtual machine and performing one of the "discard..."
565 operations, respectively.
566
567 <pre>
568 +----------------------------------(same state as before the call)------+
569 | |
570 +-&gt; PoweredOff --+ |
571 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
572 +-&gt; Aborted -----+
573
574 +-&gt; PoweredOff --+
575 | |
576 | Aborted -----+--&gt;[discardSnapshot() ]-------------&gt; Discarding --+
577 | | [discardCurrentState()] |
578 +-&gt; Saved -------+ [discardCurrentSnapshotAndState()] |
579 | |
580 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
581 </pre>
582
583 Note that the Saving state is present in both the offline state group and
584 online state group. Currently, the only way to determine what group is
585 assumed in a particular case is to remember the previous machine state: if
586 it was Running or Paused, then Saving is an online state, otherwise it is
587 an offline state. This inconsistency may be removed in one of the future
588 versions of VirtualBox by adding a new state.
589
590 <note internal="yes">
591 For whoever decides to touch this enum: In order to keep the
592 comparisons involving FirstOnline and LastOnline pseudo-states valid,
593 the numeric values of these states must be correspondingly updated if
594 needed: for any online VM state, the condition
595 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
596 @c true. The same relates to transient states for which
597 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
598 @c true.
599 </note>
600 </desc>
601
602 <const name="Null" value="0">
603 <desc>Null value (never used by the API).</desc>
604 </const>
605 <const name="PoweredOff" value="1">
606 <desc>
607 The machine is not running and has no saved execution state; it has
608 either never been started or been shut down successfully.
609 </desc>
610 </const>
611 <const name="Saved" value="2">
612 <desc>
613 The machine is not currently running, but the execution state of the machine
614 has been saved to an external file when it was running, from where
615 it can be resumed.
616 </desc>
617 </const>
618 <const name="Aborted" value="3">
619 <desc>
620 The process running the machine has terminated abnormally. This may
621 indicate a crash of the VM process in host execution context, or
622 the VM process has been terminated externally.
623 </desc>
624 </const>
625 <const name="Running" value="4">
626 <desc>
627 The machine is currently being executed.
628 <note internal="yes">
629 For whoever decides to touch this enum: In order to keep the
630 comparisons in the old source code valid, this state must immediately
631 precede the Paused state.
632 </note>
633 </desc>
634 </const>
635 <const name="Paused" value="5">
636 <desc>
637 Execution of the machine has been paused.
638 <note internal="yes">
639 For whoever decides to touch this enum: In order to keep the
640 comparisons in the old source code valid, this state must immediately
641 follow the Running state.
642 </note>
643 </desc>
644 </const>
645 <const name="Stuck" value="6">
646 <desc>
647 Execution of the machine has reached the "Guru Meditation"
648 condition. This indicates a severe error in the hypervisor itself.
649 </desc>
650 </const>
651 <const name="Starting" value="7">
652 <desc>
653 Machine is being started after powering it on from a
654 zero execution state.
655 </desc>
656 </const>
657 <const name="Stopping" value="8">
658 <desc>
659 Machine is being normally stopped powering it off, or after the guest OS
660 has initiated a shutdown sequence.
661 </desc>
662 </const>
663 <const name="Saving" value="9">
664 <desc>
665 Machine is saving its execution state to a file, or an online
666 snapshot of the machine is being taken.
667 </desc>
668 </const>
669 <const name="Restoring" value="10">
670 <desc>
671 Execution state of the machine is being restored from a file
672 after powering it on from the saved execution state.
673 </desc>
674 </const>
675 <const name="MigratingFrom" value="11">
676 <desc>
677 Migrating the machine state from another host or process.
678 </desc>
679 </const>
680 <const name="Discarding" value="12">
681 <desc>
682 Snapshot of the machine is being discarded.
683 </desc>
684 </const>
685 <const name="SettingUp" value="13">
686 <desc>
687 Lengthy setup operation is in progress.
688 </desc>
689 </const>
690
691 <const name="FirstOnline" value="4" wsmap="suppress"> <!-- Running -->
692 <desc>
693 Pseudo-state: first online state (for use in relational expressions).
694 </desc>
695 </const>
696 <const name="LastOnline" value="11" wsmap="suppress"> <!-- Restoring -->
697 <desc>
698 Pseudo-state: last online state (for use in relational expressions).
699 </desc>
700 </const>
701
702 <const name="FirstTransient" value="7" wsmap="suppress"> <!-- Starting -->
703 <desc>
704 Pseudo-state: first transient state (for use in relational expressions).
705 </desc>
706 </const>
707 <const name="LastTransient" value="13" wsmap="suppress"> <!-- SettingUp -->
708 <desc>
709 Pseudo-state: last transient state (for use in relational expressions).
710 </desc>
711 </const>
712
713 </enum>
714
715 <enum
716 name="SessionState"
717 uuid="CF2700C0-EA4B-47ae-9725-7810114B94D8"
718 >
719 <desc>
720 Session state. This enumeration represents possible values of
721 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
722 attributes. See individual enumerator descriptions for the meaning for
723 every value.
724 </desc>
725
726 <const name="Null" value="0">
727 <desc>Null value (never used by the API).</desc>
728 </const>
729 <const name="Closed" value="1">
730 <desc>
731 The machine has no open sessions (<link to="IMachine::sessionState"/>);
732 the session is closed (<link to="ISession::state"/>)
733 </desc>
734 </const>
735 <const name="Open" value="2">
736 <desc>
737 The machine has an open direct session (<link to="IMachine::sessionState"/>);
738 the session is open (<link to="ISession::state"/>)
739 </desc>
740 </const>
741 <const name="Spawning" value="3">
742 <desc>
743 A new (direct) session is being opened for the machine
744 as a result of <link to="IVirtualBox::openRemoteSession"/>
745 call (<link to="IMachine::sessionState"/>);
746 the session is currently being opened
747 as a result of <link to="IVirtualBox::openRemoteSession"/>
748 call (<link to="ISession::state"/>)
749 </desc>
750 </const>
751 <const name="Closing" value="4">
752 <desc>
753 The direct session is being closed (<link to="IMachine::sessionState"/>);
754 the session is being closed (<link to="ISession::state"/>)
755 </desc>
756 </const>
757 </enum>
758
759 <enum
760 name="HWVirtExPropertyType"
761 uuid="843794f2-f392-46a7-8ff4-a0857a9b4b32"
762 >
763 <desc>
764 HWVirtEx property type. This enumeration represents possible values of the
765 IMachine get- and setHWVirtExProperty methods.
766 </desc>
767 <const name="Null" value="0">
768 <desc>Null value (never used by the API).</desc>
769 </const>
770 <const name="Enabled" value="1">
771 <desc>
772 HWVirtEx (VT-x/AMD-V) boolean property.
773 </desc>
774 </const>
775 <const name="Exclusive" value="2">
776 <desc>
777 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
778 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
779 </desc>
780 </const>
781 <const name="VPIDEnabled" value="3">
782 <desc>
783 VT-x VPID boolean property.
784 </desc>
785 </const>
786 <const name="NestedPagingEnabled" value="4">
787 <desc>
788 Nested Paging boolean property.
789 </desc>
790 </const>
791 </enum>
792
793 <enum
794 name="SessionType"
795 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
796 >
797 <desc>
798 Session type. This enumeration represents possible values of the
799 <link to="ISession::type"/> attribute.
800 </desc>
801
802 <const name="Null" value="0">
803 <desc>Null value (never used by the API).</desc>
804 </const>
805 <const name="Direct" value="1">
806 <desc>
807 Direct session
808 (opened by <link to="IVirtualBox::openSession"/>)
809 </desc>
810 </const>
811 <const name="Remote" value="2">
812 <desc>
813 Remote session
814 (opened by <link to="IVirtualBox::openRemoteSession"/>)
815 </desc>
816 </const>
817 <const name="Existing" value="3">
818 <desc>
819 Existing session
820 (opened by <link to="IVirtualBox::openExistingSession"/>)
821 </desc>
822 </const>
823 </enum>
824
825 <enum
826 name="DeviceType"
827 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
828 >
829 <desc>
830 Device type.
831 </desc>
832 <const name="Null" value="0">
833 <desc>
834 Null value, may also mean "no device" (not allowed for
835 <link to="IConsole::getDeviceActivity"/>).
836 </desc>
837 </const>
838 <const name="Floppy" value="1">
839 <desc>Floppy device.</desc>
840 </const>
841 <const name="DVD" value="2">
842 <desc>CD/DVD-ROM device.</desc>
843 </const>
844 <const name="HardDisk" value="3">
845 <desc>Hard disk device.</desc>
846 </const>
847 <const name="Network" value="4">
848 <desc>Network device.</desc>
849 </const>
850 <const name="USB" value="5">
851 <desc>USB device.</desc>
852 </const>
853 <const name="SharedFolder" value="6">
854 <desc>Shared folder device.</desc>
855 </const>
856 </enum>
857
858 <enum
859 name="DeviceActivity"
860 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
861 >
862 <desc>
863 Device activity for <link to="IConsole::getDeviceActivity"/>.
864 </desc>
865
866 <const name="Null" value="0"/>
867 <const name="Idle" value="1"/>
868 <const name="Reading" value="2"/>
869 <const name="Writing" value="3"/>
870 </enum>
871
872 <enum
873 name="ClipboardMode"
874 uuid="33364716-4008-4701-8f14-be0fa3d62950"
875 >
876 <desc>
877 Host-Guest clipboard interchange mode.
878 </desc>
879
880 <const name="Disabled" value="0"/>
881 <const name="HostToGuest" value="1"/>
882 <const name="GuestToHost" value="2"/>
883 <const name="Bidirectional" value="3"/>
884 </enum>
885
886 <enum
887 name="Scope"
888 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
889 >
890 <desc>
891 Scope of the operation.
892
893 A generic enumeration used in various methods to define the action or
894 argument scope.
895 </desc>
896
897 <const name="Global" value="0"/>
898 <const name="Machine" value="1"/>
899 <const name="Session" value="2"/>
900 </enum>
901
902 <enum
903 name="GuestStatisticType"
904 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
905 >
906 <desc>
907 Statistics type for <link to="IGuest::getStatistic"/>.
908 </desc>
909
910 <const name="CPULoad_Idle" value="0">
911 <desc>
912 Idle CPU load (0-100%) for last interval.
913 </desc>
914 </const>
915 <const name="CPULoad_Kernel" value="1">
916 <desc>
917 Kernel CPU load (0-100%) for last interval.
918 </desc>
919 </const>
920 <const name="CPULoad_User" value="2">
921 <desc>
922 User CPU load (0-100%) for last interval.
923 </desc>
924 </const>
925 <const name="Threads" value="3">
926 <desc>
927 Total number of threads in the system.
928 </desc>
929 </const>
930 <const name="Processes" value="4">
931 <desc>
932 Total number of processes in the system.
933 </desc>
934 </const>
935 <const name="Handles" value="5">
936 <desc>
937 Total number of handles in the system.
938 </desc>
939 </const>
940 <const name="MemoryLoad" value="6">
941 <desc>
942 Memory load (0-100%).
943 </desc>
944 </const>
945 <const name="PhysMemTotal" value="7">
946 <desc>
947 Total physical memory in megabytes.
948 </desc>
949 </const>
950 <const name="PhysMemAvailable" value="8">
951 <desc>
952 Free physical memory in megabytes.
953 </desc>
954 </const>
955 <const name="PhysMemBalloon" value="9">
956 <desc>
957 Ballooned physical memory in megabytes.
958 </desc>
959 </const>
960 <const name="MemCommitTotal" value="10">
961 <desc>
962 Total amount of memory in the committed state in megabytes.
963 </desc>
964 </const>
965 <const name="MemKernelTotal" value="11">
966 <desc>
967 Total amount of memory used by the guest OS's kernel in megabytes.
968 </desc>
969 </const>
970 <const name="MemKernelPaged" value="12">
971 <desc>
972 Total amount of paged memory used by the guest OS's kernel in megabytes.
973 </desc>
974 </const>
975 <const name="MemKernelNonpaged" value="13">
976 <desc>
977 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
978 </desc>
979 </const>
980 <const name="MemSystemCache" value="14">
981 <desc>
982 Total amount of memory used by the guest OS's system cache in megabytes.
983 </desc>
984 </const>
985 <const name="PageFileSize" value="15">
986 <desc>
987 Pagefile size in megabytes.
988 </desc>
989 </const>
990 <const name="SampleNumber" value="16">
991 <desc>
992 Statistics sample number
993 </desc>
994 </const>
995 <const name="MaxVal" value="17"/>
996 </enum>
997
998 <enum
999 name="BIOSBootMenuMode"
1000 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1001 >
1002 <desc>
1003 BIOS boot menu mode.
1004 </desc>
1005
1006 <const name="Disabled" value="0"/>
1007 <const name="MenuOnly" value="1"/>
1008 <const name="MessageAndMenu" value="2"/>
1009 </enum>
1010
1011 <enum
1012 name="ProcessorFeature"
1013 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1014 >
1015 <desc>
1016 CPU features.
1017 </desc>
1018
1019 <const name="HWVirtEx" value="0"/>
1020 <const name="PAE" value="1"/>
1021 <const name="LongMode" value="2"/>
1022 <const name="NestedPaging" value="3"/>
1023 </enum>
1024
1025 <enum
1026 name="FirmwareType"
1027 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1028 >
1029 <desc>
1030 Firmware type.
1031 </desc>
1032 <const name="BIOS" value="1">
1033 <desc>BIOS Firmware.</desc>
1034 </const>
1035 <const name="EFI" value="2">
1036 <desc>Efi firmware.</desc>
1037 </const>
1038 </enum>
1039
1040 <!--
1041 // IVirtualBoxErrorInfo
1042 /////////////////////////////////////////////////////////////////////////
1043 -->
1044
1045 <interface
1046 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1047 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1048 supportsErrorInfo="no"
1049 wsmap="managed"
1050 >
1051 <desc>
1052 The IVirtualBoxErrorInfo interface represents extended error information.
1053
1054 Extended error information can be set by VirtualBox components after
1055 unsuccessful or partially successful method invocation. This information
1056 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1057 and then shown to the client in addition to the plain 32-bit result code.
1058
1059 In MS COM, this interface extends the IErrorInfo interface,
1060 in XPCOM, it extends the nsIException interface. In both cases,
1061 it provides a set of common attributes to retrieve error
1062 information.
1063
1064 Sometimes invocation of some component's method may involve methods of
1065 other components that may also fail (independently of this method's
1066 failure), or a series of non-fatal errors may precede a fatal error that
1067 causes method failure. In cases like that, it may be desirable to preserve
1068 information about all errors happened during method invocation and deliver
1069 it to the caller. The <link to="#next"/> attribute is intended
1070 specifically for this purpose and allows to represent a chain of errors
1071 through a single IVirtualBoxErrorInfo object set after method invocation.
1072
1073 Note that errors are stored to a chain in the reverse order, i.e. the
1074 initial error object you query right after method invocation is the last
1075 error set by the callee, the object it points to in the @a next attribute
1076 is the previous error and so on, up to the first error (which is the last
1077 in the chain).
1078 </desc>
1079
1080 <attribute name="resultCode" type="long" readonly="yes">
1081 <desc>
1082 Result code of the error.
1083 Usually, it will be the same as the result code returned
1084 by the method that provided this error information, but not
1085 always. For example, on Win32, CoCreateInstance() will most
1086 likely return E_NOINTERFACE upon unsuccessful component
1087 instantiation attempt, but not the value the component factory
1088 returned. Value is typed 'long', not 'result',
1089 to make interface usable from scripting languages.
1090 <note>
1091 In MS COM, there is no equivalent.
1092 In XPCOM, it is the same as nsIException::result.
1093 </note>
1094 </desc>
1095 </attribute>
1096
1097 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1098 <desc>
1099 UUID of the interface that defined the error.
1100 <note>
1101 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1102 data type.
1103 In XPCOM, there is no equivalent.
1104 </note>
1105 </desc>
1106 </attribute>
1107
1108 <attribute name="component" type="wstring" readonly="yes">
1109 <desc>
1110 Name of the component that generated the error.
1111 <note>
1112 In MS COM, it is the same as IErrorInfo::GetSource.
1113 In XPCOM, there is no equivalent.
1114 </note>
1115 </desc>
1116 </attribute>
1117
1118 <attribute name="text" type="wstring" readonly="yes">
1119 <desc>
1120 Text description of the error.
1121 <note>
1122 In MS COM, it is the same as IErrorInfo::GetDescription.
1123 In XPCOM, it is the same as nsIException::message.
1124 </note>
1125 </desc>
1126 </attribute>
1127
1128 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1129 <desc>
1130 Next error object if there is any, or @c null otherwise.
1131 <note>
1132 In MS COM, there is no equivalent.
1133 In XPCOM, it is the same as nsIException::inner.
1134 </note>
1135 </desc>
1136 </attribute>
1137
1138 </interface>
1139
1140 <interface
1141 name="ILocalOwner" extends="$dispatched"
1142 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1143 >
1144 <desc>
1145 The ILocalOwner interface allows to register local objects
1146 (created without COM calls, but with new()).
1147 Once registered, calls to methods of such objects can be made
1148 from remote COM processes.
1149 The main usecase is the event callback implementation where
1150 API clients provide callback objects.
1151 </desc>
1152 <method name="setLocalObject">
1153 <desc>
1154 Set local object.
1155 </desc>
1156 <param name="object" type="$unknown" dir="in">
1157 <desc>Local object to forward requests to.
1158 If null, clears currently set local object.</desc>
1159 </param>
1160 </method>
1161 </interface>
1162
1163 <!--
1164 // IVirtualBox
1165 /////////////////////////////////////////////////////////////////////////
1166 -->
1167
1168 <interface
1169 name="IVirtualBoxCallback" extends="$unknown"
1170 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1171 wsmap="suppress"
1172 >
1173
1174 <method name="onMachineStateChange">
1175 <desc>
1176 The execution state of the given machine has changed.
1177 <see>IMachine::state</see>
1178 </desc>
1179 <param name="machineId" type="uuid" mod="string" dir="in">
1180 <desc>ID of the machine this event relates to.</desc>
1181 </param>
1182 <param name="state" type="MachineState" dir="in">
1183 <desc>New execution state.</desc>
1184 </param>
1185 </method>
1186
1187 <method name="onMachineDataChange">
1188 <desc>
1189 Any of the settings of the given machine has changed.
1190 </desc>
1191 <param name="machineId" type="uuid" mod="string" dir="in">
1192 <desc>ID of the machine this event relates to.</desc>
1193 </param>
1194 </method>
1195
1196 <method name="onExtraDataCanChange">
1197 <desc>
1198 Notification when someone tries to change extra data for
1199 either the given machine or (if @c null) global extra data.
1200 This gives the chance to veto against changes.
1201 </desc>
1202 <param name="machineId" type="uuid" mod="string" dir="in">
1203 <desc>
1204 ID of the machine this event relates to
1205 (@c null ID for global extra data change requests).
1206 </desc>
1207 </param>
1208 <param name="key" type="wstring" dir="in">
1209 <desc>
1210 Extra data key for the attempted write.
1211 </desc>
1212 </param>
1213 <param name="value" type="wstring" dir="in">
1214 <desc>
1215 Extra data value for the given key.
1216 </desc>
1217 </param>
1218 <param name="error" type="wstring" dir="out">
1219 <desc>
1220 Optional error message describing the reason of the
1221 veto (ignored if this notification returns @c true).
1222 </desc>
1223 </param>
1224 <param name="allowChange" type="boolean" dir="return">
1225 <desc>
1226 Flag to indicate whether the callee agrees (@c true)
1227 or vetoes against the change (@c false).
1228 </desc>
1229 </param>
1230 </method>
1231
1232 <method name="onExtraDataChange">
1233 <desc>
1234 Notification when machine specific or global extra data
1235 has changed.
1236 </desc>
1237 <param name="machineId" type="uuid" mod="string" dir="in">
1238 <desc>
1239 ID of the machine this event relates to.
1240 Null for global extra data changes.
1241 </desc>
1242 </param>
1243 <param name="key" type="wstring" dir="in">
1244 <desc>
1245 Extra data key that has changed.
1246 </desc>
1247 </param>
1248 <param name="value" type="wstring" dir="in">
1249 <desc>
1250 Extra data value for the given key.
1251 </desc>
1252 </param>
1253 </method>
1254
1255 <method name="onMediumRegistered">
1256 <desc>
1257 The given medium was registered or unregistered
1258 within this VirtualBox installation.
1259
1260 The @a mediumType parameter describes what type of
1261 medium the specified @a mediumId refers to. Possible
1262 values are:
1263
1264 <ul>
1265 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1266 that, if registered, can be obtained using the
1267 <link to="IVirtualBox::getHardDisk"/> call.</li>
1268 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1269 that, if registered, can be obtained using the
1270 <link to="IVirtualBox::getDVDImage"/> call.</li>
1271 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1272 that, if registered, can be obtained using the
1273 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1274 </ul>
1275
1276 Note that if this is a deregistration notification,
1277 there is no way to access the object representing the
1278 unregistered medium. It is supposed that the
1279 application will do required cleanup based on the
1280 @a mediumId value.
1281 </desc>
1282 <param name="mediumId" type="uuid" mod="string" dir="in">
1283 <desc>ID of the medium this event relates to.</desc>
1284 </param>
1285 <param name="mediumType" type="DeviceType" dir="in">
1286 <desc>Type of the medium this event relates to.</desc>
1287 </param>
1288 <param name="registered" type="boolean" dir="in">
1289 <desc>
1290 If @c true, the medium was registered, otherwise it was
1291 unregistered.
1292 </desc>
1293 </param>
1294 </method>
1295
1296 <method name="onMachineRegistered">
1297 <desc>
1298 The given machine was registered or unregistered
1299 within this VirtualBox installation.
1300 </desc>
1301 <param name="machineId" type="uuid" mod="string" dir="in">
1302 <desc>ID of the machine this event relates to.</desc>
1303 </param>
1304 <param name="registered" type="boolean" dir="in">
1305 <desc>
1306 If @c true, the machine was registered, otherwise it was
1307 unregistered.
1308 </desc>
1309 </param>
1310 </method>
1311
1312 <method name="onSessionStateChange">
1313 <desc>
1314 The state of the session for the given machine was changed.
1315 <see>IMachine::sessionState</see>
1316 </desc>
1317 <param name="machineId" type="uuid" mod="string" dir="in">
1318 <desc>ID of the machine this event relates to.</desc>
1319 </param>
1320 <param name="state" type="SessionState" dir="in">
1321 <desc>New session state.</desc>
1322 </param>
1323 </method>
1324
1325 <method name="onSnapshotTaken">
1326 <desc>
1327 A new snapshot of the machine has been taken.
1328 <see>ISnapshot</see>
1329 </desc>
1330 <param name="machineId" type="uuid" mod="string" dir="in">
1331 <desc>ID of the machine this event relates to.</desc>
1332 </param>
1333 <param name="snapshotId" type="uuid" mod="string" dir="in">
1334 <desc>ID of the new snapshot.</desc>
1335 </param>
1336 </method>
1337
1338 <method name="onSnapshotDiscarded">
1339 <desc>
1340 Snapshot of the given machine has been discarded.
1341
1342 <note>
1343 This notification is delivered <b>after</b> the snapshot
1344 object has been uninitialized on the server (so that any
1345 attempt to call its methods will return an error).
1346 </note>
1347
1348 <see>ISnapshot</see>
1349 </desc>
1350 <param name="machineId" type="uuid" mod="string" dir="in">
1351 <desc>ID of the machine this event relates to.</desc>
1352 </param>
1353 <param name="snapshotId" type="uuid" mod="string" dir="in">
1354 <desc>
1355 ID of the discarded snapshot. @c null means the current machine
1356 state has been discarded (restored from the current snapshot).
1357 </desc>
1358 </param>
1359 </method>
1360
1361 <method name="onSnapshotChange">
1362 <desc>
1363 Snapshot properties (name and/or description) have been changed.
1364 <see>ISnapshot</see>
1365 </desc>
1366 <param name="machineId" type="uuid" mod="string" dir="in">
1367 <desc>ID of the machine this event relates to.</desc>
1368 </param>
1369 <param name="snapshotId" type="uuid" mod="string" dir="in">
1370 <desc>ID of the changed snapshot.</desc>
1371 </param>
1372 </method>
1373
1374 <method name="onGuestPropertyChange">
1375 <desc>
1376 Notification when a guest property has changed.
1377 </desc>
1378 <param name="machineId" type="uuid" mod="string" dir="in">
1379 <desc>
1380 ID of the machine this event relates to.
1381 </desc>
1382 </param>
1383 <param name="name" type="wstring" dir="in">
1384 <desc>
1385 The name of the property that has changed.
1386 </desc>
1387 </param>
1388 <param name="value" type="wstring" dir="in">
1389 <desc>
1390 The new property value.
1391 </desc>
1392 </param>
1393 <param name="flags" type="wstring" dir="in">
1394 <desc>
1395 The new property flags.
1396 </desc>
1397 </param>
1398 </method>
1399
1400 </interface>
1401
1402 <interface
1403 name="IDHCPServer" extends="$unknown"
1404 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1405 wsmap="managed"
1406 >
1407 <desc>
1408 The IDHCPServer interface represents the vbox dhcp server configuration.
1409
1410 To enumerate all the dhcp servers on the host, use the
1411 <link to="IVirtualBox::DHCPServers"/> attribute.
1412 </desc>
1413
1414 <attribute name="enabled" type="boolean">
1415 <desc>
1416 specifies if the dhcp server is enabled
1417 </desc>
1418 </attribute>
1419
1420 <attribute name="IPAddress" type="wstring" readonly="yes">
1421 <desc>
1422 specifies server IP
1423 </desc>
1424 </attribute>
1425
1426 <attribute name="networkMask" type="wstring" readonly="yes">
1427 <desc>
1428 specifies server network mask
1429 </desc>
1430 </attribute>
1431
1432 <attribute name="networkName" type="wstring" readonly="yes">
1433 <desc>
1434 specifies internal network name the server is used for
1435 </desc>
1436 </attribute>
1437
1438 <attribute name="lowerIP" type="wstring" readonly="yes">
1439 <desc>
1440 specifies from IP adrres in server address range
1441 </desc>
1442 </attribute>
1443
1444 <attribute name="upperIP" type="wstring" readonly="yes">
1445 <desc>
1446 specifies to IP adrres in server address range
1447 </desc>
1448 </attribute>
1449
1450 <method name="setConfiguration">
1451 <desc>
1452 configures the server
1453 <result name="E_INVALIDARG">
1454 invalid configuration supplied
1455 </result>
1456 </desc>
1457 <param name="IPAddress" type="wstring" dir="in">
1458 <desc>
1459 server IP address
1460 </desc>
1461 </param>
1462 <param name="networkMask" type="wstring" dir="in">
1463 <desc>
1464 server network mask
1465 </desc>
1466 </param>
1467 <param name="FromIPAddress" type="wstring" dir="in">
1468 <desc>
1469 server From IP address for address range
1470 </desc>
1471 </param>
1472 <param name="ToIPAddress" type="wstring" dir="in">
1473 <desc>
1474 server To IP address for address range
1475 </desc>
1476 </param>
1477 </method>
1478
1479 <method name="start">
1480 <desc>
1481 Starts DHCP server process.
1482 <result name="E_FAIL">
1483 Failed to start the process.
1484 </result>
1485 </desc>
1486 <param name="networkName" type="wstring" dir="in">
1487 <desc>
1488 Name of internal network DHCP server should attach to.
1489 </desc>
1490 </param>
1491 <param name="trunkName" type="wstring" dir="in">
1492 <desc>
1493 Name of internal network trunk.
1494 </desc>
1495 </param>
1496 <param name="trunkType" type="wstring" dir="in">
1497 <desc>
1498 Type of internal network trunk.
1499 </desc>
1500 </param>
1501 </method>
1502
1503 <method name="stop">
1504 <desc>
1505 Stops DHCP server process.
1506 <result name="E_FAIL">
1507 Failed to stop the process.
1508 </result>
1509 </desc>
1510 </method>
1511 </interface>
1512
1513 <interface
1514 name="IVirtualBox" extends="$dispatched"
1515 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1516 wsmap="managed"
1517 >
1518 <desc>
1519 The IVirtualBox interface represents the main interface exposed by the
1520 product that provides virtual machine management.
1521
1522 An instance of IVirtualBox is required for the product to do anything
1523 useful. Even though the interface does not expose this, internally,
1524 IVirtualBox is implemented as a singleton and actually lives in the
1525 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1526 IVirtualBox can track the state of all virtual machines on a particular
1527 host, regardless of which frontend started them.
1528
1529 To enumerate all the virtual machines on the host, use the
1530 <link to="IVirtualBox::machines"/> attribute.
1531 </desc>
1532
1533 <attribute name="version" type="wstring" readonly="yes">
1534 <desc>
1535 A string representing the version number of the product. The
1536 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1537 last number represents the build number and will frequently change.
1538 </desc>
1539 </attribute>
1540
1541 <attribute name="revision" type="unsigned long" readonly="yes">
1542 <desc>
1543 The internal build revision number of the product.
1544 </desc>
1545 </attribute>
1546
1547 <attribute name="packageType" type="wstring" readonly="yes">
1548 <desc>
1549 A string representing the package type of this product. The
1550 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1551 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1552 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1553 this.
1554 </desc>
1555 </attribute>
1556
1557 <attribute name="homeFolder" type="wstring" readonly="yes">
1558 <desc>
1559 Full path to the directory where the global settings file,
1560 <tt>VirtualBox.xml</tt>, is stored.
1561
1562 In this version of VirtualBox, the value of this property is
1563 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1564 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1565 as determined by the host OS), and cannot be changed.
1566
1567 This path is also used as the base to resolve relative paths in
1568 places where relative paths are allowed (unless otherwise
1569 expressly indicated).
1570 </desc>
1571 </attribute>
1572
1573 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1574 <desc>
1575 Full name of the global settings file.
1576 The value of this property corresponds to the value of
1577 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1578 </desc>
1579 </attribute>
1580
1581 <attribute name="host" type="IHost" readonly="yes">
1582 <desc>Associated host object.</desc>
1583 </attribute>
1584
1585 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1586 <desc>Associated system information object.</desc>
1587 </attribute>
1588
1589 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1590 <desc>
1591 Array of machine objects registered within this VirtualBox instance.
1592 </desc>
1593 </attribute>
1594
1595 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1596 <desc>
1597 Array of medium objects known to this VirtualBox installation.
1598
1599 This array contains only base media. All differencing
1600 media of the given base medium can be enumerated using
1601 <link to="IMedium::children"/>.
1602 </desc>
1603 </attribute>
1604
1605 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1606 <desc>
1607 Array of CD/DVD image objects registered with this VirtualBox instance.
1608 </desc>
1609 </attribute>
1610
1611 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1612 <desc>
1613 Array of floppy image objects registered with this VirtualBox instance.
1614 </desc>
1615 </attribute>
1616
1617 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1618
1619 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1620
1621 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1622 <desc>
1623 Collection of global shared folders. Global shared folders are
1624 available to all virtual machines.
1625
1626 New shared folders are added to the collection using
1627 <link to="#createSharedFolder"/>. Existing shared folders can be
1628 removed using <link to="#removeSharedFolder"/>.
1629
1630 <note>
1631 In the current version of the product, global shared folders are not
1632 implemented and therefore this collection is always empty.
1633 </note>
1634 </desc>
1635 </attribute>
1636
1637 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1638 <desc>
1639 Associated performance collector object.
1640 </desc>
1641 </attribute>
1642
1643 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1644 <desc>
1645 dhcp server settings.
1646 </desc>
1647 </attribute>
1648
1649 <method name="createMachine">
1650 <desc>
1651 Creates a new virtual machine.
1652
1653 The new machine is created unregistered, with the initial configuration
1654 set according to the specified guest OS type. A typical sequence of
1655 actions to create a new virtual machine is as follows:
1656
1657 <ol>
1658 <li>
1659 Call this method to have a new machine created. The returned machine
1660 object will be "mutable" allowing to change any machine property.
1661 </li>
1662
1663 <li>
1664 Configure the machine using the appropriate attributes and methods.
1665 </li>
1666
1667 <li>
1668 Call <link to="IMachine::saveSettings" /> to write the settings
1669 to the machine's XML settings file. The configuration of the newly
1670 created machine will not be saved to disk until this method is
1671 called.
1672 </li>
1673
1674 <li>
1675 Call <link to="#registerMachine" /> to add the machine to the list
1676 of machines known to VirtualBox.
1677 </li>
1678 </ol>
1679
1680 You should specify valid name for the newly created machine when calling
1681 this method. See the <link to="IMachine::name"/> attribute description
1682 for more details about the machine name.
1683
1684 The specified guest OS type identifier must match an ID of one of known
1685 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1686 array.
1687
1688 Every machine has a <i>settings file</i> that is used to store
1689 the machine configuration. This file is stored in a directory called the
1690 <i>machine settings subfolder</i>. Both the settings subfolder and file
1691 will have a name that corresponds to the name of the virtual machine.
1692 You can specify where to create the machine setting subfolder using the
1693 @a baseFolder argument. The base folder can be absolute (full path) or
1694 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1695 directory</link>.
1696
1697 If @a baseFolder is a @c null or empty string (which is recommended), the
1698 <link to="ISystemProperties::defaultMachineFolder">default machine
1699 settings folder</link> will be used as a base folder for the created
1700 machine. Otherwise the given base folder will be used. In either case,
1701 the full path to the resulting settings file has the following
1702 structure:
1703 <pre>
1704 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1705 </pre>
1706
1707 Note that if the resulting settings file already exists, this method
1708 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1709
1710 Optionally, you may specify an UUID of to assign to the created machine.
1711 However, this is not recommended and you should normally pass an empty
1712 (@c null) UUID to this method so that a new UUID will be automatically
1713 generated for every created machine. You can use UUID
1714 00000000-0000-0000-0000-000000000000 as @c null value.
1715
1716 <note>
1717 There is no way to change the name of the settings file or
1718 subfolder of the created machine directly.
1719 </note>
1720
1721 <result name="VBOX_E_OBJECT_NOT_FOUND">
1722 @a osTypeId is invalid.
1723 </result>
1724 <result name="VBOX_E_FILE_ERROR">
1725 Resulting settings file name is invalid or the settings file already
1726 exists or could not be created due to an I/O error.
1727 </result>
1728 <result name="E_INVALIDARG">
1729 @a name is empty or @c null.
1730 </result>
1731 </desc>
1732
1733 <param name="name" type="wstring" dir="in">
1734 <desc>Machine name.</desc>
1735 </param>
1736 <param name="osTypeId" type="wstring" dir="in">
1737 <desc>Guest OS Type ID.</desc>
1738 </param>
1739 <param name="baseFolder" type="wstring" dir="in">
1740 <desc>Base machine folder (optional).</desc>
1741 </param>
1742 <param name="id" type="uuid" mod="string" dir="in">
1743 <desc>Machine UUID (optional).</desc>
1744 </param>
1745 <param name="machine" type="IMachine" dir="return">
1746 <desc>Created machine object.</desc>
1747 </param>
1748 </method>
1749
1750 <method name="createLegacyMachine">
1751 <desc>
1752 Creates a new virtual machine in "legacy" mode, using the specified
1753 settings file to store machine settings.
1754
1755 As opposed to machines created by <link to="#createMachine"/>,
1756 the settings file of the machine created in "legacy" mode is not
1757 automatically renamed when the machine name is changed -- it will always
1758 remain the same as specified in this method call.
1759
1760 The specified settings file name can be absolute (full path) or relative
1761 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1762 directory</link>. If the file name doesn't contain an extension, the
1763 default extension (.xml) will be appended.
1764
1765 Note that the configuration of the newly created machine is not
1766 saved to disk (and therefore no settings file is created)
1767 until <link to="IMachine::saveSettings"/> is called. If the
1768 specified settings file already exists, this method
1769 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1770
1771 See <link to="#createMachine"/> for more information.
1772
1773 @deprecated This method may be removed later. Use <link
1774 to="IVirtualBox::createMachine"/> instead.
1775
1776 <note>
1777 There is no way to change the name of the settings file
1778 of the machine created in "legacy" mode.
1779 </note>
1780
1781 <result name="VBOX_E_OBJECT_NOT_FOUND">
1782 @a osTypeId is invalid.
1783 </result>
1784 <result name="VBOX_E_FILE_ERROR">
1785 @a settingsFile is invalid or the settings file already exists or
1786 could not be created due to an I/O error.
1787 </result>
1788 <result name="E_INVALIDARG">
1789 @a name or @a settingsFile is empty or @c null.
1790 </result>
1791 </desc>
1792
1793 <param name="name" type="wstring" dir="in">
1794 <desc>Machine name.</desc>
1795 </param>
1796 <param name="osTypeId" type="wstring" dir="in">
1797 <desc>Machine OS Type ID.</desc>
1798 </param>
1799 <param name="settingsFile" type="wstring" dir="in">
1800 <desc>Name of the machine settings file.</desc>
1801 </param>
1802 <param name="id" type="uuid" mod="string" dir="in">
1803 <desc>Machine UUID (optional).</desc>
1804 </param>
1805 <param name="machine" type="IMachine" dir="return">
1806 <desc>Created machine object.</desc>
1807 </param>
1808 </method>
1809
1810 <method name="openMachine">
1811 <desc>
1812 Opens a virtual machine from the existing settings file.
1813 The opened machine remains unregistered until you call
1814 <link to="#registerMachine"/>.
1815
1816 The specified settings file name can be absolute
1817 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1818 VirtualBox home directory</link>. This file must exist
1819 and must be a valid machine settings file whose contents
1820 will be used to construct the machine object.
1821
1822 @deprecated Will be removed soon.
1823 <result name="VBOX_E_FILE_ERROR">
1824 Settings file name invalid, not found or sharing violation.
1825 </result>
1826 </desc>
1827 <param name="settingsFile" type="wstring" dir="in">
1828 <desc>
1829 Name of the machine settings file.
1830 </desc>
1831 </param>
1832 <param name="machine" type="IMachine" dir="return">
1833 <desc>Opened machine object.</desc>
1834 </param>
1835 <note>
1836 <link to="IMachine::settingsModified"/> will return
1837 @c false for the created machine, until any of machine settings
1838 are changed.
1839 </note>
1840 </method>
1841
1842 <method name="registerMachine">
1843 <desc>
1844
1845 Registers the machine previously created using
1846 <link to="#createMachine"/> or opened using
1847 <link to="#openMachine"/> within this VirtualBox installation. After
1848 successful method invocation, the
1849 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1850 to all registered callbacks.
1851
1852 <note>
1853 This method implicitly calls <link to="IMachine::saveSettings"/>
1854 to save all current machine settings before registering it.
1855 </note>
1856
1857 <result name="VBOX_E_OBJECT_NOT_FOUND">
1858 No matching virtual machine found.
1859 </result>
1860 <result name="VBOX_E_INVALID_OBJECT_STATE">
1861 Virtual machine was not created within this VirtualBox instance.
1862 </result>
1863
1864 </desc>
1865 <param name="machine" type="IMachine" dir="in"/>
1866 </method>
1867
1868 <method name="getMachine">
1869 <desc>
1870 Attempts to find a virtual machine given its UUID.
1871 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1872 instead.
1873
1874 <result name="VBOX_E_OBJECT_NOT_FOUND">
1875 Could not find registered machine matching @a id.
1876 </result>
1877
1878 </desc>
1879 <param name="id" type="uuid" mod="string" dir="in"/>
1880 <param name="machine" type="IMachine" dir="return"/>
1881 </method>
1882
1883 <method name="findMachine">
1884 <desc>
1885 Attempts to find a virtual machine given its name.
1886 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1887 instead.
1888
1889 <result name="VBOX_E_OBJECT_NOT_FOUND">
1890 Could not find registered machine matching @a name.
1891 </result>
1892
1893 </desc>
1894 <param name="name" type="wstring" dir="in"/>
1895 <param name="machine" type="IMachine" dir="return"/>
1896 </method>
1897
1898 <method name="unregisterMachine">
1899 <desc>
1900
1901 Unregisters the machine previously registered using
1902 <link to="#registerMachine"/>. After successful method invocation, the
1903 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1904 to all registered callbacks.
1905
1906 <note>
1907 The specified machine must not be in the Saved state, have an open
1908 (or a spawning) direct session associated with it, have snapshots or
1909 have hard disks attached.
1910 </note>
1911
1912 <note>
1913 This method implicitly calls <link to="IMachine::saveSettings"/> to
1914 save all current machine settings before unregistering it.
1915 </note>
1916
1917 <note>
1918 If the given machine is inaccessible (see
1919 <link to="IMachine::accessible"/>), it will be unregistered and
1920 fully uninitialized right afterwards. As a result, the returned
1921 machine object will be unusable and an attempt to call
1922 <b>any</b> method will return the "Object not ready" error.
1923 </note>
1924
1925 <result name="VBOX_E_OBJECT_NOT_FOUND">
1926 Could not find registered machine matching @a id.
1927 </result>
1928 <result name="VBOX_E_INVALID_VM_STATE">
1929 Machine is in Saved state.
1930 </result>
1931 <result name="VBOX_E_INVALID_OBJECT_STATE">
1932 Machine has snapshot or open session or hard disk attached.
1933 </result>
1934
1935 </desc>
1936 <param name="id" type="uuid" mod="string" dir="in">
1937 <desc>UUID of the machine to unregister.</desc>
1938 </param>
1939 <param name="machine" type="IMachine" dir="return">
1940 <desc>Unregistered machine object.</desc>
1941 </param>
1942 </method>
1943
1944 <method name="createAppliance">
1945 <desc>
1946 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1947 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1948 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1949 </desc>
1950 <param name="appliance" type="IAppliance" dir="return">
1951 <desc>New appliance.</desc>
1952 </param>
1953 </method>
1954
1955 <method name="createHardDisk">
1956 <desc>
1957 Creates a new base medium object that will use the given storage
1958 format and location for medium data.
1959
1960 Note that the actual storage unit is not created by this method. In
1961 order to do it, and before you are able to attach the created medium
1962 to virtual machines, you must call one of the following methods to
1963 allocate a format-specific storage unit at the specified location:
1964 <ul>
1965 <li><link to="IMedium::createBaseStorage"/></li>
1966 <li><link to="IMedium::createDiffStorage"/></li>
1967 </ul>
1968
1969 Some medium attributes, such as <link to="IMedium::id"/>, may
1970 remain uninitialized until the medium storage unit is successfully
1971 created by one of the above methods.
1972
1973 After the storage unit is successfully created, the medium gets
1974 remembered by this VirtualBox installation and will be accessible
1975 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1976 methods. Remembered base medium are also returned as part of
1977 the <link to="#hardDisks"/> array. See IMedium for more details.
1978
1979 The list of all storage formats supported by this VirtualBox
1980 installation can be obtained using
1981 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1982 attribute is empty or @c null then the default storage format
1983 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1984 be used for creating a storage unit of the medium.
1985
1986 Note that the format of the location string is storage format specific.
1987 See <link to="IMedium::location"/>, IMedium and
1988 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1989
1990 <result name="VBOX_E_OBJECT_NOT_FOUND">
1991 @a format identifier is invalid. See
1992 <link to="ISystemProperties::mediumFormats"/>.
1993 </result>
1994 <result name="VBOX_E_FILE_ERROR">
1995 @a location is a not valid file name (for file-based formats only).
1996 </result>
1997 </desc>
1998 <param name="format" type="wstring" dir="in">
1999 <desc>
2000 Identifier of the storage format to use for the new medium.
2001 </desc>
2002 </param>
2003 <param name="location" type="wstring" dir="in">
2004 <desc>
2005 Location of the storage unit for the new medium.
2006 </desc>
2007 </param>
2008 <param name="medium" type="IMedium" dir="return">
2009 <desc>Created medium object.</desc>
2010 </param>
2011 </method>
2012
2013 <method name="openHardDisk">
2014 <desc>
2015 Opens a medium from an existing location, optionally replacing
2016 the image UUID and/or parent UUID.
2017
2018 After the medium is successfully opened by this method, it gets
2019 remembered by (known to) this VirtualBox installation and will be
2020 accessible through <link to="#getHardDisk"/> and
2021 <link to="#findHardDisk"/> methods. Remembered base media
2022 are also returned as part of the <link to="#hardDisks"/> array and can
2023 be attached to virtual machines. See IMedium for more details.
2024
2025 If a differencing medium is to be opened by this method, the
2026 operation will succeed only if its parent medium and all ancestors,
2027 if any, are already known to this VirtualBox installation (for example,
2028 were opened by this method before).
2029
2030 This method tries to guess the storage format of the specified medium
2031 by reading medium data at the specified location.
2032
2033 If @a write is ReadWrite (which it should be), the image is opened for
2034 read/write access and must have according permissions, as VirtualBox
2035 may actually write status information into the disk's metadata sections.
2036
2037 Note that write access is required for all typical image usage in VirtualBox,
2038 since VirtualBox may need to write metadata such as a UUID into the image.
2039 The only exception is opening a source image temporarily for copying and
2040 cloning when the image will quickly be closed again.
2041
2042 Note that the format of the location string is storage format specific.
2043 See <link to="IMedium::location"/>, IMedium and
2044 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2045
2046 <result name="VBOX_E_FILE_ERROR">
2047 Invalid medium storage file location or could not find the medium
2048 at the specified location.
2049 </result>
2050 <result name="VBOX_E_IPRT_ERROR">
2051 Could not get medium storage format.
2052 </result>
2053 <result name="E_INVALIDARG">
2054 Invalid medium storage format.
2055 </result>
2056
2057 </desc>
2058 <param name="location" type="wstring" dir="in">
2059 <desc>
2060 Location of the storage unit that contains medium data in one of
2061 the supported storage formats.
2062 </desc>
2063 </param>
2064 <param name="accessMode" type="AccessMode" dir="in">
2065 <desc>
2066 Determines whether to open the image in read/write or read-only mode.
2067 </desc>
2068 </param>
2069 <param name="setImageId" type="boolean" dir="in">
2070 <desc>
2071 Select whether a new image UUID is set or not.
2072 </desc>
2073 </param>
2074 <param name="imageId" type="uuid" mod="string" dir="in">
2075 <desc>
2076 New UUID for the image. If an empty string is passed, then a new
2077 UUID is automatically created. Specifying a zero UUIDs is not valid.
2078 </desc>
2079 </param>
2080 <param name="setParentId" type="boolean" dir="in">
2081 <desc>
2082 Select whether a new parent UUID is set or not.
2083 </desc>
2084 </param>
2085 <param name="parentId" type="uuid" mod="string" dir="in">
2086 <desc>
2087 New parent UUID for the image. If an empty string is passed, then a
2088 new UUID is automatically created, provided @a setParentId is
2089 @c true. A zero UUID is valid.
2090 </desc>
2091 </param>
2092 <param name="medium" type="IMedium" dir="return">
2093 <desc>Opened medium object.</desc>
2094 </param>
2095 </method>
2096
2097 <method name="getHardDisk" const="yes">
2098 <desc>
2099 Returns a medium with the given UUID.
2100
2101 The medium with the given UUID must be known to this VirtualBox
2102 installation, i.e. it must be previously created by
2103 <link to="#createHardDisk"/> or opened by <link
2104 to="#openHardDisk"/>, or attached to some known virtual machine.
2105
2106 <result name="VBOX_E_OBJECT_NOT_FOUND">
2107 No medium object matching @a id found.
2108 </result>
2109
2110 </desc>
2111 <param name="id" type="uuid" mod="string" dir="in">
2112 <desc>UUID of the medium to look for.</desc>
2113 </param>
2114 <param name="medium" type="IMedium" dir="return">
2115 <desc>Found medium object.</desc>
2116 </param>
2117 </method>
2118
2119 <method name="findHardDisk">
2120 <desc>
2121 Returns a medium that uses the given location to store medium data.
2122
2123 The given medium must be known to this VirtualBox installation, i.e.
2124 it must be previously created by
2125 <link to="#createHardDisk"/> or opened by <link
2126 to="#openHardDisk"/>, or attached to some known virtual machine.
2127
2128 The search is done by comparing the value of the @a location argument to
2129 the <link to="IMedium::location"/> attribute of each known medium.
2130
2131 For locations represented by file names in the host's file system, the
2132 requested location can be a path relative to the
2133 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2134 only a file name without any path is given, the
2135 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2136 folder</link> will be prepended to the file name before searching. Note
2137 that on case sensitive file systems, a case sensitive comparison is
2138 performed, otherwise the case of symbols in the file path is ignored.
2139
2140 <result name="VBOX_E_OBJECT_NOT_FOUND">
2141 No medium object matching @a location found.
2142 </result>
2143
2144 </desc>
2145 <param name="location" type="wstring" dir="in">
2146 <desc>Location string to search for.</desc>
2147 </param>
2148 <param name="medium" type="IMedium" dir="return">
2149 <desc>Found medium object.</desc>
2150 </param>
2151 </method>
2152
2153 <method name="openDVDImage">
2154 <desc>
2155 Opens a CD/DVD image contained in the specified file of the supported
2156 format and assigns it the given UUID.
2157
2158 After the image is successfully opened by this method, it gets
2159 remembered by (known to) this VirtualBox installation and will be
2160 accessible through <link to="#getDVDImage"/> and
2161 <link to="#findDVDImage"/> methods. Remembered images are also
2162 returned as part of the <link to="#DVDImages"/> array and can be mounted
2163 to virtual machines. See IMedium for more details.
2164
2165 See <link to="IMedium::location"/> to get more details about the format
2166 of the location string.
2167
2168 <note>
2169 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2170 </note>
2171
2172 <result name="VBOX_E_FILE_ERROR">
2173 Invalid CD/DVD image file location or could not find the CD/DVD
2174 image at the specified location.
2175 </result>
2176 <result name="VBOX_E_INVALID_OBJECT_STATE">
2177 CD/DVD image already exists in the media registry.
2178 </result>
2179
2180 </desc>
2181 <param name="location" type="wstring" dir="in">
2182 <desc>
2183 Full path to the file that contains a valid CD/DVD image.
2184 </desc>
2185 </param>
2186 <param name="id" type="uuid" mod="string" dir="in">
2187 <desc>
2188 UUID to assign to the given image within this VirtualBox installation.
2189 If an empty (@c null) UUID is specified, the system will randomly
2190 generate a new UUID.
2191 </desc>
2192 </param>
2193 <param name="image" type="IMedium" dir="return">
2194 <desc>Opened CD/DVD image object.</desc>
2195 </param>
2196 </method>
2197
2198 <method name="getDVDImage">
2199 <desc>
2200 Returns a CD/DVD image with the given UUID.
2201
2202 The image with the given UUID must be known to this VirtualBox
2203 installation, i.e. it must be previously opened by <link
2204 to="#openDVDImage"/>, or mounted to some known virtual machine.
2205
2206 <result name="VBOX_E_OBJECT_NOT_FOUND">
2207 No matching DVD image found in the media registry.
2208 </result>
2209
2210 </desc>
2211 <param name="id" type="uuid" mod="string" dir="in">
2212 <desc>UUID of the image to look for.</desc>
2213 </param>
2214 <param name="image" type="IMedium" dir="return">
2215 <desc>Found CD/DVD image object.</desc>
2216 </param>
2217 </method>
2218
2219 <method name="findDVDImage">
2220 <desc>
2221 Returns a CD/DVD image with the given image location.
2222
2223 The image with the given UUID must be known to this VirtualBox
2224 installation, i.e. it must be previously opened by <link
2225 to="#openDVDImage"/>, or mounted to some known virtual machine.
2226
2227 The search is done by comparing the value of the @a location argument to
2228 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2229
2230 The requested location can be a path relative to the
2231 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2232 only a file name without any path is given, the
2233 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2234 folder</link> will be prepended to the file name before searching. Note
2235 that on case sensitive file systems, a case sensitive comparison is
2236 performed, otherwise the case in the file path is ignored.
2237
2238 <result name="VBOX_E_FILE_ERROR">
2239 Invalid image file location.
2240 </result>
2241 <result name="VBOX_E_OBJECT_NOT_FOUND">
2242 No matching DVD image found in the media registry.
2243 </result>
2244
2245 </desc>
2246 <param name="location" type="wstring" dir="in">
2247 <desc>CD/DVD image file path to look for.</desc>
2248 </param>
2249 <param name="image" type="IMedium" dir="return">
2250 <desc>Found CD/DVD image object.</desc>
2251 </param>
2252 </method>
2253
2254 <method name="openFloppyImage">
2255 <desc>
2256 Opens a floppy image contained in the specified file of the supported
2257 format and assigns it the given UUID.
2258
2259 After the image is successfully opened by this method, it gets
2260 remembered by (known to) this VirtualBox installation and will be
2261 accessible through <link to="#getFloppyImage"/> and
2262 <link to="#findFloppyImage"/> methods. Remembered images are also
2263 returned as part of the <link to="#floppyImages"/> array and can be
2264 mounted to virtual machines. See IMedium for more details.
2265
2266 See <link to="IMedium::location"/> to get more details about the format
2267 of the location string.
2268
2269 <result name="VBOX_E_FILE_ERROR">
2270 Invalid floppy image file location or could not find the floppy
2271 image at the specified location.
2272 </result>
2273 <result name="VBOX_E_INVALID_OBJECT_STATE">
2274 Floppy image already exists in the media registry.
2275 </result>
2276
2277 <note>
2278 Currently, only raw floppy images are supported by VirtualBox.
2279 </note>
2280 </desc>
2281 <param name="location" type="wstring" dir="in">
2282 <desc>
2283 Full path to the file that contains a valid floppy image.
2284 </desc>
2285 </param>
2286 <param name="id" type="uuid" mod="string" dir="in">
2287 <desc>
2288 UUID to assign to the given image file within this VirtualBox
2289 installation. If an empty (@c null) UUID is specified, the system will
2290 randomly generate a new UUID.
2291 </desc>
2292 </param>
2293 <param name="image" type="IMedium" dir="return">
2294 <desc>Opened floppy image object.</desc>
2295 </param>
2296 </method>
2297
2298 <method name="getFloppyImage">
2299 <desc>
2300 Returns a floppy image with the given UUID.
2301
2302 The image with the given UUID must be known to this VirtualBox
2303 installation, i.e. it must be previously opened by <link
2304 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2305
2306 <result name="VBOX_E_OBJECT_NOT_FOUND">
2307 No matching floppy image found in the media registry.
2308 </result>
2309
2310 </desc>
2311 <param name="id" type="uuid" mod="string" dir="in">
2312 <desc>UUID of the image to look for.</desc>
2313 </param>
2314 <param name="image" type="IMedium" dir="return">
2315 <desc>Found floppy image object.</desc>
2316 </param>
2317 </method>
2318
2319 <method name="findFloppyImage">
2320 <desc>
2321 Returns a floppy image with the given image location.
2322
2323 The image with the given UUID must be known to this VirtualBox
2324 installation, i.e. it must be previously opened by <link
2325 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2326
2327 The search is done by comparing the value of the @a location argument to
2328 the <link to="IMedium::location"/> attribute of each known floppy image.
2329
2330 The requested location can be a path relative to the
2331 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2332 only a file name without any path is given, the
2333 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2334 folder</link> will be prepended to the file name before searching. Note
2335 that on case sensitive file systems, a case sensitive comparison is
2336 performed, otherwise the case of symbols in the file path is ignored.
2337
2338 <result name="VBOX_E_FILE_ERROR">
2339 Invalid image file location.
2340 </result>
2341 <result name="VBOX_E_OBJECT_NOT_FOUND">
2342 No matching floppy image found in the media registry.
2343 </result>
2344
2345 </desc>
2346 <param name="location" type="wstring" dir="in">
2347 <desc>Floppy image file path to look for.</desc>
2348 </param>
2349 <param name="image" type="IMedium" dir="return">
2350 <desc>Found floppy image object.</desc>
2351 </param>
2352 </method>
2353
2354 <method name="getGuestOSType">
2355 <desc>
2356 Returns an object describing the specified guest OS type.
2357
2358 The requested guest OS type is specified using a string which is a
2359 mnemonic identifier of the guest operating system, such as
2360 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2361 particular virtual machine can be read or set using the
2362 <link to="IMachine::OSTypeId"/> attribute.
2363
2364 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2365 available guest OS type objects. Each object has an
2366 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2367 the guest OS this object describes.
2368
2369 <result name="E_INVALIDARG">
2370 @a id is not a valid Guest OS type.
2371 </result>
2372
2373 </desc>
2374 <param name="id" type="uuid" mod="string" dir="in">
2375 <desc>Guest OS type ID string.</desc>
2376 </param>
2377 <param name="type" type="IGuestOSType" dir="return">
2378 <desc>Guest OS type object.</desc>
2379 </param>
2380 </method>
2381
2382 <method name="createSharedFolder">
2383 <desc>
2384 Creates a new global shared folder by associating the given logical
2385 name with the given host path, adds it to the collection of shared
2386 folders and starts sharing it. Refer to the description of
2387 <link to="ISharedFolder"/> to read more about logical names.
2388 <note>
2389 In the current implementation, this operation is not
2390 implemented.
2391 </note>
2392 </desc>
2393 <param name="name" type="wstring" dir="in">
2394 <desc>Unique logical name of the shared folder.</desc>
2395 </param>
2396 <param name="hostPath" type="wstring" dir="in">
2397 <desc>Full path to the shared folder in the host file system.</desc>
2398 </param>
2399 <param name="writable" type="boolean" dir="in">
2400 <desc>Whether the share is writable or readonly</desc>
2401 </param>
2402 </method>
2403
2404 <method name="removeSharedFolder">
2405 <desc>
2406 Removes the global shared folder with the given name previously
2407 created by <link to="#createSharedFolder"/> from the collection of
2408 shared folders and stops sharing it.
2409 <note>
2410 In the current implementation, this operation is not
2411 implemented.
2412 </note>
2413 </desc>
2414 <param name="name" type="wstring" dir="in">
2415 <desc>Logical name of the shared folder to remove.</desc>
2416 </param>
2417 </method>
2418
2419 <method name="getExtraDataKeys">
2420 <desc>
2421 Returns an array representing the global extra data keys which currently
2422 have values defined.
2423 </desc>
2424 <param name="value" type="wstring" dir="return" safearray="yes">
2425 <desc>Array of extra data keys.</desc>
2426 </param>
2427 </method>
2428
2429 <method name="getExtraData">
2430 <desc>
2431 Returns associated global extra data.
2432
2433 If the requested data @a key does not exist, this function will
2434 succeed and return an empty string in the @a value argument.
2435
2436 <result name="VBOX_E_FILE_ERROR">
2437 Settings file not accessible.
2438 </result>
2439 <result name="VBOX_E_XML_ERROR">
2440 Could not parse the settings file.
2441 </result>
2442
2443 </desc>
2444 <param name="key" type="wstring" dir="in">
2445 <desc>Name of the data key to get.</desc>
2446 </param>
2447 <param name="value" type="wstring" dir="return">
2448 <desc>Value of the requested data key.</desc>
2449 </param>
2450 </method>
2451
2452 <method name="setExtraData">
2453 <desc>
2454 Sets associated global extra data.
2455
2456 If you pass @c null or empty string as a key @a value, the given @a key
2457 will be deleted.
2458
2459 <note>
2460 Before performing the actual data change, this method will ask all
2461 registered callbacks using the
2462 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2463 notification for a permission. If one of the callbacks refuses the
2464 new value, the change will not be performed.
2465 </note>
2466 <note>
2467 On success, the
2468 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2469 is called to inform all registered callbacks about a successful data
2470 change.
2471 </note>
2472
2473 <result name="VBOX_E_FILE_ERROR">
2474 Settings file not accessible.
2475 </result>
2476 <result name="VBOX_E_XML_ERROR">
2477 Could not parse the settings file.
2478 </result>
2479 <result name="E_ACCESSDENIED">
2480 Modification request refused.
2481 </result>
2482
2483 </desc>
2484 <param name="key" type="wstring" dir="in">
2485 <desc>Name of the data key to set.</desc>
2486 </param>
2487 <param name="value" type="wstring" dir="in">
2488 <desc>Value to assign to the key.</desc>
2489 </param>
2490 </method>
2491
2492 <method name="openSession">
2493 <desc>
2494 Opens a new direct session with the given virtual machine.
2495
2496 A direct session acts as a local lock on the given VM.
2497 There can be only one direct session open at a time for every
2498 virtual machine, protecting the VM from being manipulated by
2499 conflicting actions from different processes. Only after a
2500 direct session has been opened, one can change all VM settings
2501 and execute the VM in the process space of the session object.
2502
2503 Sessions therefore can be compared to mutex semaphores that
2504 lock a given VM for modification and execution.
2505 See <link to="ISession">ISession</link> for details.
2506
2507 <note>Unless you are writing a new VM frontend, you will not
2508 want to execute a VM in the current process. To spawn a new
2509 process that executes a VM, use
2510 <link to="IVirtualBox::openRemoteSession" />
2511 instead.</note>
2512
2513 Upon successful return, the session object can be used to
2514 get access to the machine and to the VM console.
2515
2516 In VirtualBox terminology, the machine becomes "mutable" after
2517 a session has been opened. Note that the "mutable" machine
2518 object, on which you may invoke IMachine methods to change its
2519 settings, will be a different object from the immutable IMachine
2520 objects returned by various IVirtualBox methods. To obtain a
2521 mutable IMachine object (upon which you can invoke settings methods),
2522 use the <link to="ISession::machine" /> attribute.
2523
2524 One must always call <link to="ISession::close" /> to release the
2525 lock on the machine, or the machine's state will eventually be
2526 set to "Aborted".
2527
2528 In other words, to change settings on a machine, the following
2529 sequence is typically performed:
2530
2531 <ol>
2532 <li>Call this method (openSession) to have a machine locked for
2533 the current session.</li>
2534
2535 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2536
2537 <li>Change the settings of the machine.</li>
2538
2539 <li>Call <link to="IMachine::saveSettings" />.</li>
2540
2541 <li>Close the session by calling <link to="ISession::close"/>.</li>
2542 </ol>
2543
2544 <result name="E_UNEXPECTED">
2545 Virtual machine not registered.
2546 </result>
2547 <result name="E_ACCESSDENIED">
2548 Process not started by OpenRemoteSession.
2549 </result>
2550 <result name="VBOX_E_OBJECT_NOT_FOUND">
2551 No matching virtual machine found.
2552 </result>
2553 <result name="VBOX_E_INVALID_OBJECT_STATE">
2554 Session already open or being opened.
2555 </result>
2556 <result name="VBOX_E_VM_ERROR">
2557 Failed to assign machine to session.
2558 </result>
2559
2560 </desc>
2561 <param name="session" type="ISession" dir="in">
2562 <desc>
2563 Session object that will represent the opened session after
2564 successful method invocation. This object must not represent
2565 the already open session.
2566 <note>
2567 This session will be automatically closed if the
2568 VirtualBox server is terminated for some reason.
2569 </note>
2570 </desc>
2571 </param>
2572 <param name="machineId" type="uuid" mod="string" dir="in">
2573 <desc>ID of the virtual machine to open a session with.</desc>
2574 </param>
2575 </method>
2576
2577 <method name="openRemoteSession">
2578 <desc>
2579 Spawns a new process that executes a virtual machine (called a
2580 "remote session").
2581
2582 Opening a remote session causes the VirtualBox server to start a new
2583 process that opens a direct session with the given VM. As a result, the
2584 VM is locked by that direct session in the new process, preventing
2585 conflicting changes from other processes. Since sessions act as locks
2586 that prevent conflicting changes, one cannot open a remote session
2587 for a VM that already has another open session (direct or remote), or
2588 is currently in the process of opening one (see <link
2589 to="IMachine::sessionState"/>).
2590
2591 While the remote session still provides some level of control over the
2592 VM execution to the caller (using the <link to="IConsole" /> interface),
2593 not all VM settings are available for modification within the remote
2594 session context.
2595
2596 This operation can take some time (a new VM is started in a new process,
2597 for which memory and other resources need to be set up). Because of this,
2598 an <link to="IProgress" /> is returned to allow the caller to wait for this
2599 asynchronous operation to be completed. Until then, the remote session
2600 object remains in the closed state, and accessing the machine or its
2601 console through it is invalid. It is recommended to use
2602 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2603 completion.
2604
2605 As with all <link to="ISession" /> objects, it is recommended to call
2606 <link to="ISession::close" /> on the local session object once openRemoteSession()
2607 has been called. However, the session's state (see <link to="ISession::state" />)
2608 will not return to "Closed" until the remote session has also closed (i.e.
2609 until the VM is no longer running). In that case, however, the state of
2610 the session will automatically change back to "Closed".
2611
2612 Currently supported session types (values of the @a type
2613 argument) are:
2614 <ul>
2615 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2616 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2617 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2618 </ul>
2619
2620 The @a environment argument is a string containing definitions of
2621 environment variables in the following format:
2622 @code
2623 NAME[=VALUE]\n
2624 NAME[=VALUE]\n
2625 ...
2626 @endcode
2627 where <tt>\\n</tt> is the new line character. These environment
2628 variables will be appended to the environment of the VirtualBox server
2629 process. If an environment variable exists both in the server process
2630 and in this list, the value from this list takes precedence over the
2631 server's variable. If the value of the environment variable is
2632 omitted, this variable will be removed from the resulting environment.
2633 If the environment string is @c null or empty, the server environment
2634 is inherited by the started process as is.
2635
2636 <see>openExistingSession</see>
2637
2638 <result name="E_UNEXPECTED">
2639 Virtual machine not registered.
2640 </result>
2641 <result name="E_INVALIDARG">
2642 Invalid session type @a type.
2643 </result>
2644 <result name="VBOX_E_OBJECT_NOT_FOUND">
2645 No machine matching @a machineId found.
2646 </result>
2647 <result name="VBOX_E_INVALID_OBJECT_STATE">
2648 Session already open or being opened.
2649 </result>
2650 <result name="VBOX_E_IPRT_ERROR">
2651 Launching process for machine failed.
2652 </result>
2653 <result name="VBOX_E_VM_ERROR">
2654 Failed to assign machine to session.
2655 </result>
2656
2657 </desc>
2658 <param name="session" type="ISession" dir="in">
2659 <desc>
2660 Session object that will represent the opened remote session
2661 after successful method invocation (this object must not
2662 represent an already open session).
2663 </desc>
2664 </param>
2665 <param name="machineId" type="uuid" mod="string" dir="in">
2666 <desc>ID of the virtual machine to open a session with.</desc>
2667 </param>
2668 <param name="type" type="wstring" dir="in">
2669 <desc>
2670 Type of the remote session (case sensitive).
2671 </desc>
2672 </param>
2673 <param name="environment" type="wstring" dir="in">
2674 <desc>
2675 Environment to pass to the opened session.
2676 </desc>
2677 </param>
2678 <param name="progress" type="IProgress" dir="return">
2679 <desc>Progress object to track the operation completion.</desc>
2680 </param>
2681 </method>
2682
2683 <method name="openExistingSession">
2684 <desc>
2685 Opens a new remote session with the virtual machine for
2686 which a direct session is already open.
2687
2688 The remote session provides some level of control over the VM
2689 execution (using the IConsole interface) to the caller; however,
2690 within the remote session context, not all VM settings are available
2691 for modification.
2692
2693 As opposed to <link to="#openRemoteSession"/>, the number of
2694 remote sessions opened this way is not limited by the API
2695
2696 <note>
2697 It is an error to open a remote session with the machine that
2698 doesn't have an open direct session.
2699 </note>
2700
2701 <result name="E_UNEXPECTED">
2702 Virtual machine not registered.
2703 </result>
2704 <result name="VBOX_E_OBJECT_NOT_FOUND">
2705 No machine matching @a machineId found.
2706 </result>
2707 <result name="VBOX_E_INVALID_OBJECT_STATE">
2708 Session already open or being opened.
2709 </result>
2710 <result name="VBOX_E_INVALID_SESSION_STATE">
2711 Direct session state not Open.
2712 </result>
2713 <result name="VBOX_E_VM_ERROR">
2714 Failed to get console object from direct session or assign
2715 machine to session.
2716 </result>
2717
2718 <see>openRemoteSession</see>
2719 </desc>
2720 <param name="session" type="ISession" dir="in">
2721 <desc>
2722 Session object that will represent the open remote session
2723 after successful method invocation. This object must not
2724 represent an already open session.
2725 <note>
2726 This session will be automatically closed when the peer
2727 (direct) session dies or gets closed.
2728 </note>
2729 </desc>
2730 </param>
2731 <param name="machineId" type="uuid" mod="string" dir="in">
2732 <desc>ID of the virtual machine to open a session with.</desc>
2733 </param>
2734 </method>
2735
2736 <method name="registerCallback">
2737 <desc>
2738 Registers a new global VirtualBox callback. The methods of the given
2739 callback object will be called by VirtualBox when an appropriate
2740 event occurs.
2741
2742 <result name="E_INVALIDARG">
2743 A @c null callback cannot be registered.
2744 </result>
2745
2746 </desc>
2747 <param name="callback" type="IVirtualBoxCallback" dir="in">
2748 <desc>Callback object to register.</desc>
2749 </param>
2750 </method>
2751
2752 <method name="unregisterCallback">
2753 <desc>
2754 Unregisters the previously registered global VirtualBox callback.
2755
2756 <result name="E_INVALIDARG">
2757 Specified @a callback not registered.
2758 </result>
2759
2760 </desc>
2761 <param name="callback" type="IVirtualBoxCallback" dir="in">
2762 <desc>Callback object to unregister.</desc>
2763 </param>
2764 </method>
2765
2766 <method name="waitForPropertyChange">
2767 <desc>
2768 Blocks the caller until any of the properties represented by the
2769 @a what argument changes the value or until the given timeout interval
2770 expires.
2771
2772 The @a what argument is a comma separated list of property masks that
2773 describe properties the caller is interested in. The property mask is
2774 a string in the following format:
2775
2776 <pre>
2777 [[group.]subgroup.]name
2778 </pre>
2779
2780 where @c name is the property name and @c group, @c subgroup are zero
2781 or more property group specifiers. Each element (group or name) in
2782 the property mask may be either a Latin string or an asterisk symbol
2783 (@c "*") which is used to match any string for the given element. A
2784 property mask that doesn't contain asterisk symbols represents a
2785 single fully qualified property name.
2786
2787 Groups in the fully qualified property name go from more generic (the
2788 left-most part) to more specific (the right-most part). The first
2789 element is usually a name of the object the property belongs to. The
2790 second element may be either a property name, or a child object name,
2791 or an index if the preceding element names an object which is one of
2792 many objects of the same type. This way, property names form a
2793 hierarchy of properties. Here are some examples of property names:
2794
2795 <table>
2796 <tr>
2797 <td><tt>VirtualBox.version</tt></td>
2798 <td><link to="IVirtualBox::version"/> property</td>
2799 </tr>
2800 <tr>
2801 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2802 <td><link to="IMachine::name"/> property of the machine with the
2803 given UUID</td>
2804 </tr>
2805 </table>
2806
2807 Most property names directly correspond to the properties of objects
2808 (components) provided by the VirtualBox library and may be used to
2809 track changes to these properties. However, there may be
2810 pseudo-property names that don't correspond to any existing object's
2811 property directly, as well as there may be object properties that
2812 don't have a corresponding property name that is understood by this
2813 method, and therefore changes to such properties cannot be
2814 tracked. See individual object's property descriptions to get a
2815 fully qualified property name that can be used with this method (if
2816 any).
2817
2818 There is a special property mask @c "*" (i.e. a string consisting of a
2819 single asterisk symbol) that can be used to match all properties.
2820 Below are more examples of property masks:
2821
2822 <table>
2823 <tr>
2824 <td><tt>VirtualBox.*</tt></td>
2825 <td>Track all properties of the VirtualBox object</td>
2826 </tr>
2827 <tr>
2828 <td><tt>Machine.*.name</tt></td>
2829 <td>Track changes to the <link to="IMachine::name"/> property of
2830 all registered virtual machines</td>
2831 </tr>
2832 </table>
2833
2834 <note>
2835 This function is not implemented in the current version of the
2836 product.
2837 </note>
2838 </desc>
2839 <param name="what" type="wstring" dir="in">
2840 <desc>Comma separated list of property masks.</desc>
2841 </param>
2842 <param name="timeout" type="unsigned long" dir="in">
2843 <desc>
2844 Wait timeout in milliseconds.
2845 Specify -1 for an indefinite wait.
2846 </desc>
2847 </param>
2848 <param name="changed" type="wstring" dir="out">
2849 <desc>
2850 Comma separated list of properties that have been changed and caused
2851 this method to return to the caller.
2852 </desc>
2853 </param>
2854 <param name="values" type="wstring" dir="out">
2855 <desc>Reserved, not currently used.</desc>
2856 </param>
2857 </method>
2858
2859 <!--method name="createDHCPServerForInterface">
2860 <desc>
2861 Creates a dhcp server settings to be used for the given interface
2862 <result name="E_INVALIDARG">
2863 Host network interface @a name already exists.
2864 </result>
2865 </desc>
2866 <param name="interface" type="IHostNetworkInterface" dir="in">
2867 <desc>Network Interface</desc>
2868 </param>
2869 <param name="server" type="IDHCPServer" dir="out">
2870 <desc>Dhcp server settings</desc>
2871 </param>
2872 </method-->
2873
2874 <method name="createDHCPServer">
2875 <desc>
2876 Creates a dhcp server settings to be used for the given internal network name
2877 <result name="E_INVALIDARG">
2878 Host network interface @a name already exists.
2879 </result>
2880 </desc>
2881 <param name="name" type="wstring" dir="in">
2882 <desc>server name</desc>
2883 </param>
2884 <param name="server" type="IDHCPServer" dir="return">
2885 <desc>Dhcp server settings</desc>
2886 </param>
2887 </method>
2888
2889 <method name="findDHCPServerByNetworkName">
2890 <desc>
2891 Searches a dhcp server settings to be used for the given internal network name
2892 <result name="E_INVALIDARG">
2893 Host network interface @a name already exists.
2894 </result>
2895
2896 </desc>
2897 <param name="name" type="wstring" dir="in">
2898 <desc>server name</desc>
2899 </param>
2900 <param name="server" type="IDHCPServer" dir="return">
2901 <desc>Dhcp server settings</desc>
2902 </param>
2903 </method>
2904
2905 <!--method name="findDHCPServerForInterface">
2906 <desc>
2907 Searches a dhcp server settings to be used for the given interface
2908 <result name="E_INVALIDARG">
2909 Host network interface @a name already exists.
2910 </result>
2911 </desc>
2912 <param name="interface" type="IHostNetworkInterface" dir="in">
2913 <desc>Network Interface</desc>
2914 </param>
2915 <param name="server" type="IDHCPServer" dir="out">
2916 <desc>Dhcp server settings</desc>
2917 </param>
2918 </method-->
2919
2920 <method name="removeDHCPServer">
2921 <desc>
2922 Removes the dhcp server settings
2923 <result name="E_INVALIDARG">
2924 Host network interface @a name already exists.
2925 </result>
2926 </desc>
2927 <param name="server" type="IDHCPServer" dir="in">
2928 <desc>Dhcp server settings to be removed</desc>
2929 </param>
2930 </method>
2931
2932 </interface>
2933
2934 <!--
2935 // IVFSExplorer
2936 /////////////////////////////////////////////////////////////////////////
2937 -->
2938
2939 <enum
2940 name="VFSType"
2941 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2942 >
2943 <desc>
2944 Virtual file systems supported by VFSExplorer.
2945 </desc>
2946
2947 <const name="File" value="1" />
2948 <const name="Cloud" value="2" />
2949 <const name="S3" value="3" />
2950 <const name="WebDav" value="4" />
2951 </enum>
2952
2953 <enum
2954 name="VFSFileType"
2955 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2956 >
2957 <desc>
2958 File types known by VFSExplorer.
2959 </desc>
2960
2961 <const name="Unknown" value="1" />
2962 <const name="Fifo" value="2" />
2963 <const name="DevChar" value="3" />
2964 <const name="Directory" value="4" />
2965 <const name="DevBlock" value="5" />
2966 <const name="File" value="6" />
2967 <const name="SymLink" value="7" />
2968 <const name="Socket" value="8" />
2969 <const name="WhiteOut" value="9" />
2970 </enum>
2971
2972 <interface
2973 name="IVFSExplorer" extends="$unknown"
2974 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2975 wsmap="managed"
2976 >
2977 <desc>
2978 The VFSExplorer interface unifies access to different file system
2979 types. This includes local file systems as well remote file systems like
2980 S3. For a list of supported types see <link to="VFSType" />.
2981 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2982 </desc>
2983
2984 <attribute name="path" type="wstring" readonly="yes">
2985 <desc>Returns the current path in the virtual file system.</desc>
2986 </attribute>
2987
2988 <attribute name="type" type="VFSType" readonly="yes">
2989 <desc>Returns the file system type which is currently in use.</desc>
2990 </attribute>
2991
2992 <method name="update">
2993 <desc>Updates the internal list of files/directories from the
2994 current directory level. Use <link to="#entryList" /> to get the full list
2995 after a call to this method.</desc>
2996
2997 <param name="aProgress" type="IProgress" dir="return">
2998 <desc>Progress object to track the operation completion.</desc>
2999 </param>
3000 </method>
3001
3002 <method name="cd">
3003 <desc>Change the current directory level.</desc>
3004
3005 <param name="aDir" type="wstring" dir="in">
3006 <desc>The name of the directory to go in.</desc>
3007 </param>
3008
3009 <param name="aProgress" type="IProgress" dir="return">
3010 <desc>Progress object to track the operation completion.</desc>
3011 </param>
3012 </method>
3013
3014 <method name="cdUp">
3015 <desc>Go one directory upwards from the current directory level.</desc>
3016
3017 <param name="aProgress" type="IProgress" dir="return">
3018 <desc>Progress object to track the operation completion.</desc>
3019 </param>
3020 </method>
3021
3022 <method name="entryList">
3023 <desc>Returns a list of files/directories after a call to <link
3024 to="#update" />. The user is responsible for keeping this internal
3025 list up do date.</desc>
3026
3027 <param name="aNames" type="wstring" safearray="yes" dir="out">
3028 <desc>The list of names for the entries.</desc>
3029 </param>
3030
3031 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3032 <desc>The list of types for the entries.</desc>
3033 </param>
3034 </method>
3035
3036 <method name="exists">
3037 <desc>Checks if the given file list exists in the current directory
3038 level.</desc>
3039
3040 <param name="aNames" type="wstring" safearray="yes" dir="in">
3041 <desc>The names to check.</desc>
3042 </param>
3043
3044 <param name="aExists" type="wstring" safearray="yes" dir="return">
3045 <desc>The names which exist.</desc>
3046 </param>
3047 </method>
3048
3049 <method name="remove">
3050 <desc>Deletes the given files in the current directory level.</desc>
3051
3052 <param name="aNames" type="wstring" safearray="yes" dir="in">
3053 <desc>The names to remove.</desc>
3054 </param>
3055
3056 <param name="aProgress" type="IProgress" dir="return">
3057 <desc>Progress object to track the operation completion.</desc>
3058 </param>
3059 </method>
3060
3061 </interface>
3062
3063 <!--
3064 // IAppliance
3065 /////////////////////////////////////////////////////////////////////////
3066 -->
3067
3068 <interface
3069 name="IAppliance" extends="$unknown"
3070 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3071 wsmap="managed"
3072 >
3073 <desc>
3074 Represents a platform-independent appliance in OVF format. An instance of this is returned
3075 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3076 appliances with VirtualBox.
3077
3078 The OVF standard suggests two different physical file formats:
3079
3080 <ol>
3081 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3082 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3083 this descriptor file references other files, as OVF appliances distributed as a set of
3084 files most likely do, those files must be in the same directory as the descriptor file.</li>
3085
3086 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3087 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3088 files and optionally other files.
3089
3090 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3091 be added with a later version.</li>
3092 </ol>
3093
3094 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3095 <link to="IMachine" /> involves the following sequence of API calls:
3096
3097 <ol>
3098 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3099 </li>
3100
3101 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3102 would like to import. So long as this file is syntactically valid, this will succeed
3103 and return an instance of IAppliance that contains the parsed data from the OVF file.
3104 </li>
3105
3106 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3107 contents of the IAppliance attributes accordingly. These can be inspected by a
3108 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3109 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3110 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3111 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3112 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3113 The GUI can then give the user the option to confirm and/or change these suggestions.
3114 </li>
3115
3116 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3117 virtual system to override the suggestions made by the interpret() routine.
3118 </li>
3119
3120 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3121 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3122 virtual system descriptions.
3123 </li>
3124 </ol>
3125
3126 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3127
3128 <ol>
3129 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3130 an empty IAppliance object.
3131 </li>
3132
3133 <li>For each machine you would like to export, call <link to="IMachine::export" />
3134 with the IAppliance object you just created. This creates an instance of
3135 <link to="IVirtualSystemDescription" /> inside the appliance.
3136 </li>
3137
3138 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3139 virtual system to override the suggestions made by the export() routine.
3140 </li>
3141
3142 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3143 file written.</li>
3144 </ol>
3145
3146 </desc>
3147
3148 <attribute name="path" type="wstring" readonly="yes">
3149 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3150 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3151 <link to="#write" /> (for export).
3152 This attribute is empty until one of these methods has been called.
3153 </desc>
3154 </attribute>
3155
3156 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3157 <desc>
3158 Array of virtual disk definitions. One such description exists for each
3159 disk definition in the OVF; each string array item represents one such piece of
3160 disk information, with the information fields separated by tab (\\t) characters.
3161
3162 The caller should be prepared for additional fields being appended to
3163 this string in future versions of VirtualBox and therefore check for
3164 the number of tabs in the strings returned.
3165
3166 In the current version, the following eight fields are returned per string
3167 in the array:
3168
3169 <ol>
3170 <li>Disk ID (unique string identifier given to disk)</li>
3171
3172 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3173
3174 <li>Populated size (optional unsigned integer indicating the current size of the
3175 disk; can be approximate; -1 if unspecified)</li>
3176
3177 <li>Format (string identifying the disk format, typically
3178 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3179
3180 <li>Reference (where to find the disk image, typically a file name; if empty,
3181 then the disk should be created on import)</li>
3182
3183 <li>Image size (optional unsigned integer indicating the size of the image,
3184 which need not necessarily be the same as the values specified above, since
3185 the image may be compressed or sparse; -1 if not specified)</li>
3186
3187 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3188 presently unsupported and always -1)</li>
3189
3190 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3191 </ol>
3192 </desc>
3193 </attribute>
3194
3195 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3196 <desc> Array of virtual system descriptions. One such description is created
3197 for each virtual system found in the OVF.
3198 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3199 (for export) has been called.
3200 </desc>
3201 </attribute>
3202
3203 <method name="read">
3204 <desc>
3205 Reads an OVF file into the appliance object.
3206
3207 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3208 mere fact that this method returns successfully does not mean that VirtualBox supports all
3209 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3210 </desc>
3211 <param name="file" type="wstring" dir="in">
3212 <desc>
3213 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3214 on whether the appliance is distributed as a set of files or as a single file, respectively).
3215 </desc>
3216 </param>
3217 <param name="aProgress" type="IProgress" dir="return">
3218 <desc></desc>
3219 </param>
3220 </method>
3221
3222 <method name="interpret">
3223 <desc>
3224 Interprets the OVF data that was read when the appliance was constructed. After
3225 calling this method, one can inspect the
3226 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3227 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3228 the appliance.
3229
3230 Calling this method is the second step of importing an appliance into VirtualBox;
3231 see <link to="IAppliance" /> for an overview.
3232
3233 After calling this method, one should call <link to="#getWarnings" /> to find out
3234 if problems were encountered during the processing which might later lead to
3235 errors.
3236 </desc>
3237 </method>
3238
3239 <method name="importMachines">
3240 <desc>
3241 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3242 and other interfaces that match the information contained in the appliance as
3243 closely as possible, as represented by the import instructions in the
3244 <link to="#virtualSystemDescriptions" /> array.
3245
3246 Calling this method is the final step of importing an appliance into VirtualBox;
3247 see <link to="IAppliance" /> for an overview.
3248
3249 Since importing the appliance will most probably involve copying and converting
3250 disk images, which can take a long time, this method operates asynchronously and
3251 returns an IProgress object to allow the caller to monitor the progress.
3252 </desc>
3253
3254 <param name="aProgress" type="IProgress" dir="return">
3255 <desc></desc>
3256 </param>
3257 </method>
3258
3259 <method name="createVFSExplorer">
3260 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3261
3262 <param name="aUri" type="wstring" dir="in">
3263 <desc>The URI describing the file system to use.</desc>
3264 </param>
3265
3266 <param name="aExplorer" type="IVFSExplorer" dir="return">
3267 <desc></desc>
3268 </param>
3269 </method>
3270
3271 <method name="write">
3272 <desc>
3273 Writes the contents of the appliance exports into a new OVF file.
3274
3275 Calling this method is the final step of exporting an appliance from VirtualBox;
3276 see <link to="IAppliance" /> for an overview.
3277
3278 Since exporting the appliance will most probably involve copying and converting
3279 disk images, which can take a long time, this method operates asynchronously and
3280 returns an IProgress object to allow the caller to monitor the progress.
3281 </desc>
3282 <param name="format" type="wstring" dir="in">
3283 <desc>
3284 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3285 future versions of VirtualBox may support additional formats.
3286 </desc>
3287 </param>
3288 <param name="path" type="wstring" dir="in">
3289 <desc>
3290 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3291 on whether the appliance is distributed as a set of files or as a single file, respectively).
3292 </desc>
3293 </param>
3294 <param name="aProgress" type="IProgress" dir="return">
3295 <desc>Progress object to track the operation completion.</desc>
3296 </param>
3297 </method>
3298
3299 <method name="getWarnings">
3300 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3301
3302 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3303 <desc></desc>
3304 </param>
3305 </method>
3306
3307 </interface>
3308
3309 <enum
3310 name="VirtualSystemDescriptionType"
3311 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3312 >
3313 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3314 a configuration value.</desc>
3315
3316 <const name="Ignore" value="1" />
3317 <const name="OS" value="2" />
3318 <const name="Name" value="3" />
3319 <const name="Product" value="4" />
3320 <const name="Vendor" value="5" />
3321 <const name="Version" value="6" />
3322 <const name="ProductUrl" value="7" />
3323 <const name="VendorUrl" value="8" />
3324 <const name="Description" value="9" />
3325 <const name="License" value="10" />
3326 <const name="Miscellaneous" value="11" />
3327 <const name="CPU" value="12" />
3328 <const name="Memory" value="13" />
3329 <const name="HardDiskControllerIDE" value="14" />
3330 <const name="HardDiskControllerSATA" value="15" />
3331 <const name="HardDiskControllerSCSI" value="16" />
3332 <const name="HardDiskImage" value="17" />
3333 <const name="Floppy" value="18" />
3334 <const name="CDROM" value="19" />
3335 <const name="NetworkAdapter" value="20" />
3336 <const name="USBController" value="21" />
3337 <const name="SoundCard" value="22" />
3338
3339 </enum>
3340
3341 <enum
3342 name="VirtualSystemDescriptionValueType"
3343 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3344 >
3345 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3346 type to fetch.</desc>
3347
3348 <const name="Reference" value="1" />
3349 <const name="Original" value="2" />
3350 <const name="Auto" value="3" />
3351 <const name="ExtraConfig" value="4" />
3352
3353 </enum>
3354
3355 <interface
3356 name="IVirtualSystemDescription" extends="$unknown"
3357 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3358 wsmap="managed"
3359 >
3360
3361 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3362 After <link to="IAppliance::interpret" /> has been called, that array contains
3363 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3364 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3365 into VirtualBox.
3366 </desc>
3367
3368 <attribute name="count" type="unsigned long" readonly="yes">
3369 <desc>Return the number of virtual system description entries.</desc>
3370 </attribute>
3371
3372 <method name="getDescription">
3373 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3374 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3375
3376 The list below identifies the value sets that are possible depending on the
3377 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3378 the array item with the same index in aOvfValues[] will contain the original value as contained
3379 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3380 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3381 the aExtraConfigValues[] array item may also be used.
3382
3383 <ul>
3384 <li>
3385 "OS": the guest operating system type. There must be exactly one such array item on import. The
3386 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3387 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3388 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3389 </li>
3390 <li>
3391 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3392 if none is present on import, then an automatic name will be created from the operating system
3393 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3394 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3395 <link to="IMachine" /> name that does not exist yet.
3396 </li>
3397 <li>
3398 "Description": an arbitrary description.
3399 </li>
3400 <li>
3401 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3402 code to display such a license for agreement; the Main API does not enforce any such policy.
3403 </li>
3404 <li>
3405 Miscellaneous: reserved for future use.
3406 </li>
3407 <li>
3408 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3409 </li>
3410 <li>
3411 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3412 is present on import, then VirtualBox will set a meaningful default based on the operating system
3413 type.
3414 </li>
3415 <li>
3416 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3417 has no value in aOvfValues[] or aVBoxValues[].
3418 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3419 type can use to specify which hard disk controller a virtual disk should be connected to.
3420 </li>
3421 <li>
3422 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3423 has no value in aOvfValues[] or aVBoxValues[].
3424 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3425 </li>
3426 <li>
3427 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3428 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3429 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3430 </li>
3431 <li>
3432 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3433 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3434
3435 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3436 a path since the image file should be in the same location as the OVF file itself), whereas the
3437 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3438 hard disk image. This means that on import the image will be copied and converted from the
3439 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3440 On import, the target image will also be registered with VirtualBox.
3441
3442 The matching item in the aExtraConfigValues[] array must contain a string of the following
3443 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3444 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3445 the image to. That number must be the index of an array item with one of the hard disk controller
3446 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3447 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3448 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3449 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3450 </li>
3451 <li>
3452 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3453 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3454 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3455 </li>
3456 <li>
3457 "USBController": a USB controller. There can be at most one such item. If and only if such an
3458 item ispresent, USB support will be enabled for the new virtual machine.
3459 </li>
3460 <li>
3461 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3462 present, sound support will be enabled for the new virtual machine. Note that the virtual
3463 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3464 may be different from the virtual soundcard expected by the appliance.
3465 </li>
3466 </ul>
3467
3468 </desc>
3469
3470 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3471 <desc></desc>
3472 </param>
3473
3474 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3475 <desc></desc>
3476 </param>
3477
3478 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3479 <desc></desc>
3480 </param>
3481
3482 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3483 <desc></desc>
3484 </param>
3485
3486 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3487 <desc></desc>
3488 </param>
3489
3490 </method>
3491
3492 <method name="getDescriptionByType">
3493 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3494 should be returned.</desc>
3495
3496 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3497 <desc></desc>
3498 </param>
3499
3500 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3501 <desc></desc>
3502 </param>
3503
3504 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3505 <desc></desc>
3506 </param>
3507
3508 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3509 <desc></desc>
3510 </param>
3511
3512 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3513 <desc></desc>
3514 </param>
3515
3516 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3517 <desc></desc>
3518 </param>
3519
3520 </method>
3521
3522 <method name="getValuesByType">
3523 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3524 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3525 values.</desc>
3526
3527 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3528 <desc></desc>
3529 </param>
3530
3531 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3532 <desc></desc>
3533 </param>
3534
3535 <param name="aValues" type="wstring" dir="return" safearray="yes">
3536 <desc></desc>
3537 </param>
3538
3539 </method>
3540
3541 <method name="setFinalValues">
3542 <desc>
3543 This method allows the appliance's user to change the configuration for the virtual
3544 system descriptions. For each array item returned from <link to="#getDescription" />,
3545 you must pass in one boolean value and one configuration value.
3546
3547 Each item in the boolean array determines whether the particular configuration item
3548 should be enabled.
3549 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3550 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3551 and SoundCard.
3552
3553 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3554 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3555 the configuration remains unchanged. Please see the documentation for getDescription()
3556 for valid configuration values for the individual array item types. If the
3557 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3558 </desc>
3559
3560 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3561 <desc></desc>
3562 </param>
3563
3564 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3565 <desc></desc>
3566 </param>
3567
3568 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3569 <desc></desc>
3570 </param>
3571 </method>
3572
3573 <method name="addDescription">
3574 <desc>
3575 This method adds an additional description entry to the stack of already
3576 available descriptions for this virtual system. This is handy for writing
3577 values which aren't directly supported by VirtualBox. One example would
3578 be the License type of <link to="VirtualSystemDescriptionType" />.
3579 </desc>
3580
3581 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3582 <desc></desc>
3583 </param>
3584
3585 <param name="aVBoxValue" type="wstring" dir="in">
3586 <desc></desc>
3587 </param>
3588
3589 <param name="aExtraConfigValue" type="wstring" dir="in">
3590 <desc></desc>
3591 </param>
3592 </method>
3593 </interface>
3594
3595
3596 <!--
3597 // IMachine
3598 /////////////////////////////////////////////////////////////////////////
3599 -->
3600
3601 <interface
3602 name="IInternalMachineControl" extends="$unknown"
3603 uuid="6c08103e-b8e6-44fb-bc6c-36067153d4bd"
3604 internal="yes"
3605 wsmap="suppress"
3606 >
3607 <method name="setRemoveSavedState">
3608 <desc>
3609 Updates the flag whether saved state is removed on a machine state
3610 change from Saved to PoweredOff.
3611 </desc>
3612 <param name="aRemove" type="boolean" dir="in"/>
3613 </method>
3614
3615 <method name="updateState">
3616 <desc>
3617 Updates the VM state.
3618 <note>
3619 This operation will also update the settings file with
3620 the correct information about the saved state file
3621 and delete this file from disk when appropriate.
3622 </note>
3623 </desc>
3624 <param name="state" type="MachineState" dir="in"/>
3625 </method>
3626
3627 <method name="getIPCId">
3628 <param name="id" type="wstring" dir="return"/>
3629 </method>
3630
3631 <method name="runUSBDeviceFilters">
3632 <desc>
3633 Asks the server to run USB devices filters of the associated
3634 machine against the given USB device and tell if there is
3635 a match.
3636 <note>
3637 Intended to be used only for remote USB devices. Local
3638 ones don't require to call this method (this is done
3639 implicitly by the Host and USBProxyService).
3640 </note>
3641 </desc>
3642 <param name="device" type="IUSBDevice" dir="in"/>
3643 <param name="matched" type="boolean" dir="out"/>
3644 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3645 </method>
3646
3647 <method name="captureUSBDevice">
3648 <desc>
3649 Requests a capture of the given host USB device.
3650 When the request is completed, the VM process will
3651 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3652 notification.
3653 </desc>
3654 <param name="id" type="uuid" mod="string" dir="in"/>
3655 </method>
3656
3657 <method name="detachUSBDevice">
3658 <desc>
3659 Notification that a VM is going to detach (@a done = @c false) or has
3660 already detached (@a done = @c true) the given USB device.
3661 When the @a done = @c true request is completed, the VM process will
3662 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3663 notification.
3664 <note>
3665 In the @a done = @c true case, the server must run its own filters
3666 and filters of all VMs but this one on the detached device
3667 as if it were just attached to the host computer.
3668 </note>
3669 </desc>
3670 <param name="id" type="uuid" mod="string" dir="in"/>
3671 <param name="done" type="boolean" dir="in"/>
3672 </method>
3673
3674 <method name="autoCaptureUSBDevices">
3675 <desc>
3676 Requests a capture all matching USB devices attached to the host.
3677 When the request is completed, the VM process will
3678 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3679 notification per every captured device.
3680 </desc>
3681 </method>
3682
3683 <method name="detachAllUSBDevices">
3684 <desc>
3685 Notification that a VM that is being powered down. The done
3686 parameter indicates whether which stage of the power down
3687 we're at. When @a done = @c false the VM is announcing its
3688 intentions, while when @a done = @c true the VM is reporting
3689 what it has done.
3690 <note>
3691 In the @a done = @c true case, the server must run its own filters
3692 and filters of all VMs but this one on all detach devices as
3693 if they were just attached to the host computer.
3694 </note>
3695 </desc>
3696 <param name="done" type="boolean" dir="in"/>
3697 </method>
3698
3699 <method name="onSessionEnd">
3700 <desc>
3701 Triggered by the given session object when the session is about
3702 to close normally.
3703 </desc>
3704 <param name="session" type="ISession" dir="in">
3705 <desc>Session that is being closed</desc>
3706 </param>
3707 <param name="progress" type="IProgress" dir="return">
3708 <desc>
3709 Used to wait until the corresponding machine is actually
3710 dissociated from the given session on the server.
3711 Returned only when this session is a direct one.
3712 </desc>
3713 </param>
3714 </method>
3715
3716 <method name="beginSavingState">
3717 <desc>
3718 Called by the VM process to inform the server it wants to
3719 save the current state and stop the VM execution.
3720 </desc>
3721 <param name="progress" type="IProgress" dir="in">
3722 <desc>
3723 Progress object created by the VM process to wait until
3724 the state is saved.
3725 </desc>
3726 </param>
3727 <param name="stateFilePath" type="wstring" dir="out">
3728 <desc>
3729 File path the VM process must save the execution state to.
3730 </desc>
3731 </param>
3732 </method>
3733
3734 <method name="endSavingState">
3735 <desc>
3736 Called by the VM process to inform the server that saving
3737 the state previously requested by #beginSavingState is either
3738 successfully finished or there was a failure.
3739
3740 <result name="VBOX_E_FILE_ERROR">
3741 Settings file not accessible.
3742 </result>
3743 <result name="VBOX_E_XML_ERROR">
3744 Could not parse the settings file.
3745 </result>
3746
3747 </desc>
3748
3749 <param name="success" type="boolean" dir="in">
3750 <desc>@c true to indicate success and @c false otherwise.
3751 </desc>
3752 </param>
3753 </method>
3754
3755 <method name="adoptSavedState">
3756 <desc>
3757 Gets called by IConsole::adoptSavedState.
3758 <result name="VBOX_E_FILE_ERROR">
3759 Invalid saved state file path.
3760 </result>
3761 </desc>
3762 <param name="savedStateFile" type="wstring" dir="in">
3763 <desc>Path to the saved state file to adopt.</desc>
3764 </param>
3765 </method>
3766
3767 <method name="beginTakingSnapshot">
3768 <desc>
3769 Called from the VM process to request from the server to perform the
3770 server-side actions of creating a snapshot (creating differencing images
3771 and the snapshot object).
3772
3773 <result name="VBOX_E_FILE_ERROR">
3774 Settings file not accessible.
3775 </result>
3776 <result name="VBOX_E_XML_ERROR">
3777 Could not parse the settings file.
3778 </result>
3779 </desc>
3780 <param name="initiator" type="IConsole" dir="in">
3781 <desc>The console object that initiated this call.</desc>
3782 </param>
3783 <param name="name" type="wstring" dir="in">
3784 <desc>Snapshot name.</desc>
3785 </param>
3786 <param name="description" type="wstring" dir="in">
3787 <desc>Snapshot description.</desc>
3788 </param>
3789 <param name="consoleProgress" type="IProgress" dir="in">
3790 <desc>
3791 Progress object created by the VM process tracking the
3792 snapshot's progress. This has the following sub-operations:
3793 <ul>
3794 <li>setting up (weight 1);</li>
3795 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3796 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3797 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3798 <li>finishing up (weight 1)</li>
3799 </ul>
3800 </desc>
3801 </param>
3802 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3803 <desc>
3804 Whether this is an online snapshot (i.e. the machine is running).
3805 </desc>
3806 </param>
3807 <param name="stateFilePath" type="wstring" dir="out">
3808 <desc>
3809 File path the VM process must save the execution state to.
3810 </desc>
3811 </param>
3812 </method>
3813
3814 <method name="endTakingSnapshot">
3815 <desc>
3816 Called by the VM process to inform the server that the snapshot
3817 previously requested by #beginTakingSnapshot is either
3818 successfully taken or there was a failure.
3819 </desc>
3820
3821 <param name="success" type="boolean" dir="in">
3822 <desc>@c true to indicate success and @c false otherwise</desc>
3823 </param>
3824 </method>
3825
3826 <method name="discardSnapshot">
3827 <desc>
3828 Gets called by IConsole::discardSnapshot.
3829 <result name="VBOX_E_INVALID_OBJECT_STATE">
3830 Snapshot has more than one child snapshot.
3831 </result>
3832 </desc>
3833 <param name="initiator" type="IConsole" dir="in">
3834 <desc>The console object that initiated this call.</desc>
3835 </param>
3836 <param name="id" type="uuid" mod="string" dir="in">
3837 <desc>UUID of the snapshot to discard.</desc>
3838 </param>
3839 <param name="machineState" type="MachineState" dir="out">
3840 <desc>New machine state after this operation is started.</desc>
3841 </param>
3842 <param name="progress" type="IProgress" dir="return">
3843 <desc>Progress object to track the operation completion.</desc>
3844 </param>
3845 </method>
3846
3847 <method name="discardCurrentState">
3848 <desc>
3849 Gets called by IConsole::discardCurrentState.
3850 <result name="VBOX_E_INVALID_OBJECT_STATE">
3851 Virtual machine does not have any snapshot.
3852 </result>
3853 </desc>
3854 <param name="initiator" type="IConsole" dir="in">
3855 <desc>The console object that initiated this call.</desc>
3856 </param>
3857 <param name="machineState" type="MachineState" dir="out">
3858 <desc>New machine state after this operation is started.</desc>
3859 </param>
3860 <param name="progress" type="IProgress" dir="return">
3861 <desc>Progress object to track the operation completion.</desc>
3862 </param>
3863 </method>
3864
3865 <method name="discardCurrentSnapshotAndState">
3866 <desc>
3867 Gets called by IConsole::discardCurrentSnapshotAndState.
3868 <result name="VBOX_E_INVALID_OBJECT_STATE">
3869 Virtual machine does not have any snapshot.
3870 </result>
3871 </desc>
3872 <param name="initiator" type="IConsole" dir="in">
3873 <desc>The console object that initiated this call.</desc>
3874 </param>
3875 <param name="machineState" type="MachineState" dir="out">
3876 <desc>New machine state after this operation is started.</desc>
3877 </param>
3878 <param name="progress" type="IProgress" dir="return">
3879 <desc>Progress object to track the operation completion.</desc>
3880 </param>
3881 </method>
3882
3883 <method name="pullGuestProperties">
3884 <desc>
3885 Get the list of the guest properties matching a set of patterns along
3886 with their values, time stamps and flags and give responsibility for
3887 managing properties to the console.
3888 </desc>
3889 <param name="name" type="wstring" dir="out" safearray="yes">
3890 <desc>
3891 The names of the properties returned.
3892 </desc>
3893 </param>
3894 <param name="value" type="wstring" dir="out" safearray="yes">
3895 <desc>
3896 The values of the properties returned. The array entries match the
3897 corresponding entries in the @a name array.
3898 </desc>
3899 </param>
3900 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3901 <desc>
3902 The time stamps of the properties returned. The array entries match
3903 the corresponding entries in the @a name array.
3904 </desc>
3905 </param>
3906 <param name="flags" type="wstring" dir="out" safearray="yes">
3907 <desc>
3908 The flags of the properties returned. The array entries match the
3909 corresponding entries in the @a name array.
3910 </desc>
3911 </param>
3912 </method>
3913
3914 <method name="pushGuestProperties">
3915 <desc>
3916 Set the list of the guest properties matching a set of patterns along
3917 with their values, time stamps and flags and return responsibility for
3918 managing properties to IMachine.
3919 </desc>
3920 <param name="name" type="wstring" dir="in" safearray="yes">
3921 <desc>
3922 The names of the properties.
3923 </desc>
3924 </param>
3925 <param name="value" type="wstring" dir="in" safearray="yes">
3926 <desc>
3927 The values of the properties. The array entries match the
3928 corresponding entries in the @a name array.
3929 </desc>
3930 </param>
3931 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3932 <desc>
3933 The time stamps of the properties. The array entries match
3934 the corresponding entries in the @a name array.
3935 </desc>
3936 </param>
3937 <param name="flags" type="wstring" dir="in" safearray="yes">
3938 <desc>
3939 The flags of the properties. The array entries match the
3940 corresponding entries in the @a name array.
3941 </desc>
3942 </param>
3943 </method>
3944 <method name="pushGuestProperty">
3945 <desc>
3946 Update a single guest property in IMachine.
3947 </desc>
3948 <param name="name" type="wstring" dir="in">
3949 <desc>
3950 The name of the property to be updated.
3951 </desc>
3952 </param>
3953 <param name="value" type="wstring" dir="in">
3954 <desc>
3955 The value of the property.
3956 </desc>
3957 </param>
3958 <param name="timestamp" type="unsigned long long" dir="in">
3959 <desc>
3960 The timestamp of the property.
3961 </desc>
3962 </param>
3963 <param name="flags" type="wstring" dir="in">
3964 <desc>
3965 The flags of the property.
3966 </desc>
3967 </param>
3968 </method>
3969
3970 <method name="lockMedia">
3971 <desc>
3972 Locks all media attached to the machine for writing and parents of
3973 attached differencing media (if any) for reading. This operation is
3974 atomic so that if it fails no media is actually locked.
3975
3976 This method is intended to be called when the machine is in Starting or
3977 Restoring state. The locked media will be automatically unlocked when
3978 the machine is powered off or crashed.
3979 </desc>
3980 </method>
3981 </interface>
3982
3983 <interface
3984 name="IBIOSSettings" extends="$unknown"
3985 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3986 wsmap="managed"
3987 >
3988 <desc>
3989 The IBIOSSettings interface represents BIOS settings of the virtual
3990 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3991 </desc>
3992 <attribute name="logoFadeIn" type="boolean">
3993 <desc>Fade in flag for BIOS logo animation.</desc>
3994 </attribute>
3995
3996 <attribute name="logoFadeOut" type="boolean">
3997 <desc>Fade out flag for BIOS logo animation.</desc>
3998 </attribute>
3999
4000 <attribute name="logoDisplayTime" type="unsigned long">
4001 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4002 </attribute>
4003
4004 <attribute name="logoImagePath" type="wstring">
4005 <desc>Local file system path for external BIOS image.</desc>
4006 </attribute>
4007
4008 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4009 <desc>Mode of the BIOS boot device menu.</desc>
4010 </attribute>
4011
4012 <attribute name="ACPIEnabled" type="boolean">
4013 <desc>ACPI support flag.</desc>
4014 </attribute>
4015
4016 <attribute name="IOAPICEnabled" type="boolean">
4017 <desc>
4018 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4019 and support IRQs above 15.
4020 </desc>
4021 </attribute>
4022
4023 <attribute name="timeOffset" type="long long">
4024 <desc>
4025 Offset in milliseconds from the host system time. This allows for
4026 guests running with a different system date/time than the host.
4027 It is equivalent to setting the system date/time in the BIOS except
4028 it is not an absolute value but a relative one. Guest Additions
4029 time synchronization honors this offset.
4030 </desc>
4031 </attribute>
4032
4033 <attribute name="PXEDebugEnabled" type="boolean">
4034 <desc>
4035 PXE debug logging flag. If set, VirtualBox will write extensive
4036 PXE trace information to the release log.
4037 </desc>
4038 </attribute>
4039
4040 </interface>
4041
4042 <interface
4043 name="IMachine" extends="$unknown"
4044 uuid="160b0ccc-c3d6-4c1b-bbe9-39b1a732f833"
4045 wsmap="managed"
4046 >
4047 <desc>
4048 The IMachine interface represents a virtual machine, or guest, created
4049 in VirtualBox.
4050
4051 This interface is used in two contexts. First of all, a collection of
4052 objects implementing this interface is stored in the
4053 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4054 machines that are currently registered with this VirtualBox
4055 installation. Also, once a session has been opened for the given virtual
4056 machine (e.g. the virtual machine is running), the machine object
4057 associated with the open session can be queried from the session object;
4058 see <link to="ISession"/> for details.
4059
4060 The main role of this interface is to expose the settings of the virtual
4061 machine and provide methods to change various aspects of the virtual
4062 machine's configuration. For machine objects stored in the
4063 <link to="IVirtualBox::machines"/> collection, all attributes are
4064 read-only unless explicitly stated otherwise in individual attribute
4065 and method descriptions. In order to change a machine setting, a session
4066 for this machine must be opened using one of
4067 <link to="IVirtualBox::openSession"/>,
4068 <link to="IVirtualBox::openRemoteSession"/> or
4069 <link to="IVirtualBox::openExistingSession"/> methods. After the
4070 session has been successfully opened, a mutable machine object needs to
4071 be queried from the session object and then the desired settings changes
4072 can be applied to the returned object using IMachine attributes and
4073 methods. See the <link to="ISession"/> interface description for more
4074 information about sessions.
4075
4076 Note that IMachine does not provide methods to control virtual machine
4077 execution (such as start the machine, or power it down) -- these methods
4078 are grouped in a separate interface called <link to="IConsole" />.
4079
4080 <see>ISession, IConsole</see>
4081 </desc>
4082
4083 <attribute name="parent" type="IVirtualBox" readonly="yes">
4084 <desc>Associated parent object.</desc>
4085 </attribute>
4086
4087 <attribute name="accessible" type="boolean" readonly="yes">
4088 <desc>
4089 Whether this virtual machine is currently accessible or not.
4090
4091 A machine is always deemed accessible unless it is registered <i>and</i>
4092 its settings file cannot be read or parsed (either because the file itself
4093 is unavailable or has invalid XML contents).
4094
4095 Every time this property is read, the accessibility state of
4096 this machine is re-evaluated. If the returned value is @c false,
4097 the <link to="#accessError"/> property may be used to get the
4098 detailed error information describing the reason of
4099 inaccessibility, including XML error messages.
4100
4101 When the machine is inaccessible, only the following properties
4102 can be used on it:
4103 <ul>
4104 <li><link to="#parent"/></li>
4105 <li><link to="#id"/></li>
4106 <li><link to="#settingsFilePath"/></li>
4107 <li><link to="#accessible"/></li>
4108 <li><link to="#accessError"/></li>
4109 </ul>
4110
4111 An attempt to access any other property or method will return
4112 an error.
4113
4114 The only possible action you can perform on an inaccessible
4115 machine is to unregister it using the
4116 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4117 for the accessibility state once more by querying this
4118 property).
4119
4120 <note>
4121 In the current implementation, once this property returns
4122 @c true, the machine will never become inaccessible
4123 later, even if its settings file cannot be successfully
4124 read/written any more (at least, until the VirtualBox
4125 server is restarted). This limitation may be removed in
4126 future releases.
4127 </note>
4128 </desc>
4129 </attribute>
4130
4131 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4132 <desc>
4133 Error information describing the reason of machine
4134 inaccessibility.
4135
4136 Reading this property is only valid after the last call to
4137 <link to="#accessible"/> returned @c false (i.e. the
4138 machine is currently unaccessible). Otherwise, a @c null
4139 IVirtualBoxErrorInfo object will be returned.
4140 </desc>
4141 </attribute>
4142
4143 <attribute name="name" type="wstring">
4144 <desc>
4145 Name of the virtual machine.
4146
4147 Besides being used for human-readable identification purposes
4148 everywhere in VirtualBox, the virtual machine name is also used
4149 as a name of the machine's settings file and as a name of the
4150 subdirectory this settings file resides in. Thus, every time you
4151 change the value of this property, the settings file will be
4152 renamed once you call <link to="#saveSettings"/> to confirm the
4153 change. The containing subdirectory will be also renamed, but
4154 only if it has exactly the same name as the settings file
4155 itself prior to changing this property (for backward compatibility
4156 with previous API releases). The above implies the following
4157 limitations:
4158 <ul>
4159 <li>The machine name cannot be empty.</li>
4160 <li>The machine name can contain only characters that are valid
4161 file name characters according to the rules of the file
4162 system used to store VirtualBox configuration.</li>
4163 <li>You cannot have two or more machines with the same name
4164 if they use the same subdirectory for storing the machine
4165 settings files.</li>
4166 <li>You cannot change the name of the machine if it is running,
4167 or if any file in the directory containing the settings file
4168 is being used by another running machine or by any other
4169 process in the host operating system at a time when
4170 <link to="#saveSettings"/> is called.
4171 </li>
4172 </ul>
4173 If any of the above limitations are hit, <link to="#saveSettings"/>
4174 will return an appropriate error message explaining the exact
4175 reason and the changes you made to this machine will not be
4176 saved.
4177 <note>
4178 For "legacy" machines created using the
4179 <link to="IVirtualBox::createLegacyMachine"/> call,
4180 the above naming limitations do not apply because the
4181 machine name does not affect the settings file name.
4182 The settings file name remains the same as it was specified
4183 during machine creation and never changes.
4184 </note>
4185 </desc>
4186 </attribute>
4187
4188 <attribute name="description" type="wstring">
4189 <desc>
4190 Description of the virtual machine.
4191
4192 The description attribute can contain any text and is
4193 typically used to describe the hardware and software
4194 configuration of the virtual machine in detail (i.e. network
4195 settings, versions of the installed software and so on).
4196 </desc>
4197 </attribute>
4198
4199 <attribute name="id" type="uuid" mod="string" readonly="yes">
4200 <desc>UUID of the virtual machine.</desc>
4201 </attribute>
4202
4203 <attribute name="OSTypeId" type="wstring">
4204 <desc>
4205 User-defined identifier of the Guest OS type.
4206 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4207 an IGuestOSType object representing details about the given
4208 Guest OS type.
4209 <note>
4210 This value may differ from the value returned by
4211 <link to="IGuest::OSTypeId"/> if Guest Additions are
4212 installed to the guest OS.
4213 </note>
4214 </desc>
4215 </attribute>
4216
4217 <attribute name="HardwareVersion" type="wstring">
4218 <desc>Hardware version identifier. Internal use only for now.</desc>
4219 </attribute>
4220
4221 <attribute name="CPUCount" type="unsigned long">
4222 <desc>Number of virtual CPUs in the VM.</desc>
4223 </attribute>
4224
4225 <attribute name="memorySize" type="unsigned long">
4226 <desc>System memory size in megabytes.</desc>
4227 </attribute>
4228
4229 <attribute name="memoryBalloonSize" type="unsigned long">
4230 <desc>Initial memory balloon size in megabytes.</desc>
4231 </attribute>
4232
4233 <attribute name="statisticsUpdateInterval" type="unsigned long">
4234 <desc>Initial interval to update guest statistics in seconds.</desc>
4235 </attribute>
4236
4237 <attribute name="VRAMSize" type="unsigned long">
4238 <desc>Video memory size in megabytes.</desc>
4239 </attribute>
4240
4241 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4242 <desc>
4243 This setting determines whether VirtualBox allows this machine to make
4244 use of the 3D graphics support available on the host.</desc>
4245 </attribute>
4246
4247 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4248 <desc>
4249 This setting determines whether VirtualBox allows this machine to make
4250 use of the 2D video acceleration support available on the host.</desc>
4251 </attribute>
4252
4253 <attribute name="monitorCount" type="unsigned long">
4254 <desc>
4255 Number of virtual monitors.
4256 <note>
4257 Only effective on Windows XP and later guests with
4258 Guest Additions installed.
4259 </note>
4260 </desc>
4261 </attribute>
4262
4263 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4264 <desc>Object containing all BIOS settings.</desc>
4265 </attribute>
4266
4267 <attribute name="firmwareType" type="FirmwareType">
4268 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4269 bootstrap in this VM.</desc>
4270 </attribute>
4271
4272 <attribute name="HWVirtExEnabled" type="boolean">
4273 <desc>
4274 This setting determines whether VirtualBox will try to make use of
4275 the host CPU's hardware virtualization extensions such as Intel VT-x
4276 and AMD-V. Note that in case such extensions are not available,
4277 they will not be used.
4278 </desc>
4279 </attribute>
4280
4281 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" default="false">
4282 <desc>
4283 This setting determines whether VirtualBox will try to make use of
4284 the nested paging extension of Intel VT-x and AMD-V. Note that in case
4285 such extensions are not available, they will not be used.
4286 </desc>
4287 </attribute>
4288
4289 <attribute name="HWVirtExVPIDEnabled" type="boolean" default="false">
4290 <desc>
4291 This setting determines whether VirtualBox will try to make use of
4292 the VPID extension of Intel VT-x. Note that in case such extensions are
4293 not available, they will not be used.
4294 </desc>
4295 </attribute>
4296
4297 <attribute name="PAEEnabled" type="boolean" default="false">
4298 <desc>
4299 This setting determines whether VirtualBox will expose the Physical Address
4300 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4301 is not available, it will not be reported.
4302 </desc>
4303 </attribute>
4304
4305 <attribute name="snapshotFolder" type="wstring">
4306 <desc>
4307 Full path to the directory used to store snapshot data
4308 (differencing media and saved state files) of this machine.
4309
4310 The initial value of this property is
4311 <tt>&lt;</tt><link to="#settingsFilePath">
4312 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4313 <link to="#id">machine_uuid</link>
4314 <tt>&gt;</tt>.
4315
4316 Currently, it is an error to try to change this property on
4317 a machine that has snapshots (because this would require to
4318 move possibly large files to a different location).
4319 A separate method will be available for this purpose later.
4320
4321 <note>
4322 Setting this property to @c null or to an empty string will restore
4323 the initial value.
4324 </note>
4325 <note>
4326 When setting this property, the specified path can be
4327 absolute (full path) or relative to the directory where the
4328 <link to="#settingsFilePath">machine settings file</link>
4329 is located. When reading this property, a full path is
4330 always returned.
4331 </note>
4332 <note>
4333 The specified path may not exist, it will be created
4334 when necessary.
4335 </note>
4336 </desc>
4337 </attribute>
4338
4339 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4340 <desc>VRDP server object.</desc>
4341 </attribute>
4342
4343 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4344 <desc>Array of media attached to this machine.</desc>
4345 </attribute>
4346
4347 <attribute name="USBController" type="IUSBController" readonly="yes">
4348 <desc>
4349 Associated USB controller object.
4350
4351 <note>
4352 If USB functionality is not available in the given edition of
4353 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4354 </note>
4355 </desc>
4356 </attribute>
4357
4358 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4359 <desc>Associated audio adapter, always present.</desc>
4360 </attribute>
4361
4362 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4363 <desc>Array of storage controllers attached to this machine.</desc>
4364 </attribute>
4365
4366 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4367 <desc>
4368 Full name of the file containing machine settings data.
4369 </desc>
4370 </attribute>
4371
4372 <attribute name="settingsModified" type="boolean" readonly="yes">
4373 <desc>
4374 Whether the settings of this machine have been modified
4375 (but neither yet saved nor discarded).
4376 <note>
4377 Reading this property is only valid on instances returned
4378 by <link to="ISession::machine"/> and on new machines
4379 created by <link to="IVirtualBox::createMachine"/> or opened
4380 by <link to="IVirtualBox::openMachine"/> but not
4381 yet registered, or on unregistered machines after calling
4382 <link to="IVirtualBox::unregisterMachine"/>. For all other
4383 cases, the settings can never be modified.
4384 </note>
4385 <note>
4386 For newly created unregistered machines, the value of this
4387 property is always @c true until <link to="#saveSettings"/>
4388 is called (no matter if any machine settings have been
4389 changed after the creation or not). For opened machines
4390 the value is set to @c false (and then follows to normal rules).
4391 </note>
4392 </desc>
4393 </attribute>
4394
4395 <attribute name="sessionState" type="SessionState" readonly="yes">
4396 <desc>Current session state for this machine.</desc>
4397 </attribute>
4398
4399 <attribute name="sessionType" type="wstring" readonly="yes">
4400 <desc>
4401 Type of the session. If <link to="#sessionState"/> is
4402 SessionSpawning or SessionOpen, this attribute contains the
4403 same value as passed to the
4404 <link to="IVirtualBox::openRemoteSession"/> method in the
4405 @a type parameter. If the session was opened directly using
4406 <link to="IVirtualBox::openSession"/>, or if
4407 <link to="#sessionState"/> is SessionClosed, the value of this
4408 attribute is an empty string.
4409 </desc>
4410 </attribute>
4411
4412 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4413 <desc>
4414 Identifier of the session process. This attribute contains the
4415 platform-dependent identifier of the process that has opened a
4416 direct session for this machine using the
4417 <link to="IVirtualBox::openSession"/> call. The returned value
4418 is only valid if <link to="#sessionState"/> is SessionOpen or
4419 SessionClosing (i.e. a session is currently open or being
4420 closed) by the time this property is read.
4421 </desc>
4422 </attribute>
4423
4424 <attribute name="state" type="MachineState" readonly="yes">
4425 <desc>Current execution state of this machine.</desc>
4426 </attribute>
4427
4428 <attribute name="lastStateChange" type="long long" readonly="yes">
4429 <desc>
4430 Time stamp of the last execution state change,
4431 in milliseconds since 1970-01-01 UTC.
4432 </desc>
4433 </attribute>
4434
4435 <attribute name="stateFilePath" type="wstring" readonly="yes">
4436 <desc>
4437 Full path to the file that stores the execution state of
4438 the machine when it is in the <link to="MachineState_Saved"/> state.
4439 <note>
4440 When the machine is not in the Saved state, this attribute is
4441 an empty string.
4442 </note>
4443 </desc>
4444 </attribute>
4445
4446 <attribute name="logFolder" type="wstring" readonly="yes">
4447 <desc>
4448 Full path to the folder that stores a set of rotated log files
4449 recorded during machine execution. The most recent log file is
4450 named <tt>VBox.log</tt>, the previous log file is
4451 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4452 in the current version).
4453 </desc>
4454 </attribute>
4455
4456 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4457 <desc>
4458 Current snapshot of this machine. This is @c null if the machine
4459 currently has no snapshots. Otherwise, this is always the last snapshot
4460 in the current implementation; see <link to="ISnapshot"/> for details.
4461 </desc>
4462 </attribute>
4463
4464 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4465 <desc>
4466 Number of snapshots taken on this machine. Zero means the
4467 machine doesn't have any snapshots.
4468 </desc>
4469 </attribute>
4470
4471 <attribute name="currentStateModified" type="boolean" readonly="yes">
4472 <desc>
4473 Returns @c true if the current state of the machine is not
4474 identical to the state stored in the current snapshot.
4475
4476 The current state is identical to the current snapshot right
4477 after one of the following calls are made:
4478 <ul>
4479 <li><link to="IConsole::discardCurrentState"/> or
4480 <link to="IConsole::discardCurrentSnapshotAndState"/>
4481 </li>
4482 <li><link to="IConsole::takeSnapshot"/> (issued on a
4483 powered off or saved machine, for which
4484 <link to="#settingsModified"/> returns @c false)
4485 </li>
4486 <li><link to="IMachine::setCurrentSnapshot"/>
4487 </li>
4488 </ul>
4489
4490 The current state remains identical until one of the following
4491 happens:
4492 <ul>
4493 <li>settings of the machine are changed</li>
4494 <li>the saved state is discarded</li>
4495 <li>the current snapshot is discarded</li>
4496 <li>an attempt to execute the machine is made</li>
4497 </ul>
4498
4499 <note>
4500 For machines that don't have snapshots, this property is
4501 always @c false.
4502 </note>
4503 </desc>
4504 </attribute>
4505
4506 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4507 <desc>
4508 Collection of shared folders for this machine (permanent shared
4509 folders). These folders are shared automatically at machine startup
4510 and available only to the guest OS installed within this machine.
4511
4512 New shared folders are added to the collection using
4513 <link to="#createSharedFolder"/>. Existing shared folders can be
4514 removed using <link to="#removeSharedFolder"/>.
4515 </desc>
4516 </attribute>
4517
4518 <attribute name="clipboardMode" type="ClipboardMode">
4519 <desc>
4520 Synchronization mode between the host OS clipboard
4521 and the guest OS clipboard.
4522 </desc>
4523 </attribute>
4524
4525 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4526 <desc>
4527 A comma-separated list of simple glob patterns. Changes to guest
4528 properties whose name matches one of the patterns will generate an
4529 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4530 </desc>
4531 </attribute>
4532
4533 <attribute name="liveMigrationTarget" type="boolean">
4534 <desc>
4535 When set to @a true, the virtual machine becomes a live migration
4536 target. This can only set to @a true when the VM is in the @a
4537 PoweredOff state.
4538
4539 This property is automatically set to @a false when the VM is powered
4540 on.
4541 </desc>
4542 </attribute>
4543
4544 <attribute name="liveMigrationPort" type="unsigned long">
4545 <desc>
4546 The TCP port used for live migration. This can only be set when the
4547 VM is in the @a PoweredOff state.
4548
4549 0 means the port is automatically selected and the source machine will
4550 have to be told where to connected after the destination has been
4551 started.
4552 </desc>
4553 </attribute>
4554
4555 <attribute name="liveMigrationPassword" type="wstring">
4556 <desc>
4557 The password the live migration target will check for.
4558 </desc>
4559 </attribute>
4560
4561 <method name="setBootOrder">
4562 <desc>
4563 Puts the given device to the specified position in
4564 the boot order.
4565
4566 To indicate that no device is associated with the given position,
4567 <link to="DeviceType_Null"/> should be used.
4568
4569 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4570
4571 <result name="E_INVALIDARG">
4572 Boot @a position out of range.
4573 </result>
4574 <result name="E_NOTIMPL">
4575 Booting from USB @a device currently not supported.
4576 </result>
4577
4578 </desc>
4579 <param name="position" type="unsigned long" dir="in">
4580 <desc>
4581 Position in the boot order (@c 1 to the total number of
4582 devices the machine can boot from, as returned by
4583 <link to="ISystemProperties::maxBootPosition"/>).
4584 </desc>
4585 </param>
4586 <param name="device" type="DeviceType" dir="in">
4587 <desc>
4588 The type of the device used to boot at the given position.
4589 </desc>
4590 </param>
4591 </method>
4592
4593 <method name="getBootOrder" const="yes">
4594 <desc>
4595 Returns the device type that occupies the specified
4596 position in the boot order.
4597
4598 @todo [remove?]
4599 If the machine can have more than one device of the returned type
4600 (such as hard disks), then a separate method should be used to
4601 retrieve the individual device that occupies the given position.
4602
4603 If here are no devices at the given position, then
4604 <link to="DeviceType_Null"/> is returned.
4605
4606 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4607
4608 <result name="E_INVALIDARG">
4609 Boot @a position out of range.
4610 </result>
4611
4612 </desc>
4613 <param name="position" type="unsigned long" dir="in">
4614 <desc>
4615 Position in the boot order (@c 1 to the total number of
4616 devices the machine can boot from, as returned by
4617 <link to="ISystemProperties::maxBootPosition"/>).
4618 </desc>
4619 </param>
4620 <param name="device" type="DeviceType" dir="return">
4621 <desc>
4622 Device at the given position.
4623 </desc>
4624 </param>
4625 </method>
4626
4627 <method name="attachDevice">
4628 <desc>
4629 Attaches a device and optionally mounts a medium to the given storage
4630 controller (<link to="IStorageController" />, identified by @a name),
4631 at the indicated port and device.
4632
4633 This method is intended for managing storage devices in general (it works
4634 for both fixed and removable media). For storage devices supporting removable
4635 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4636 for changing the media while the machine is running.
4637
4638 For the IDE bus, the @a controllerPort parameter can be either
4639 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4640 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4641 to specify the master or the slave device, respectively. (In the
4642 default configuration of virtual machines, the secondary master is
4643 used for a CD/DVD drive.)
4644
4645 For an SATA controller, @a controllerPort must be a number ranging
4646 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4647 be a number ranging from @c 0 to @c 15.
4648
4649 For both SCSI and SATA, the @a device parameter is unused and must
4650 be @c 0.
4651
4652 For fixed media such as hard disks, the given medium cannot be NULL. It may
4653 be NULL for removable media such as DVDs and floppies.
4654
4655 After calling this returns successfully, a new instance of
4656 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4657 attachments (<link to="IMachine::mediumAttachments"/>).
4658
4659 The specified device slot must not have another disk attached to it, or
4660 this method will fail.
4661
4662 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4663 information about attaching media.
4664
4665 <note>
4666 You cannot attach a hard disk to a running machine. Also, you cannot
4667 attach a hard disk to a newly created machine until this machine's
4668 settings are saved to disk using <link to="#saveSettings"/>.
4669 </note>
4670 <note>
4671 If the medium is being attached indirectly, a new differencing medium
4672 will implicitly be created for it and attached instead. If the
4673 changes made to the machine settings (including this indirect
4674 attachment) are later cancelled using <link to="#discardSettings"/>,
4675 this implicitly created differencing medium will implicitly
4676 be deleted.
4677 </note>
4678
4679 <result name="E_INVALIDARG">
4680 SATA device, SATA port, IDE port or IDE slot out of range.
4681 </result>
4682 <result name="VBOX_E_INVALID_OBJECT_STATE">
4683 Attempt to attach medium to an unregistered virtual machine.
4684 </result>
4685 <result name="VBOX_E_INVALID_VM_STATE">
4686 Invalid machine state.
4687 </result>
4688 <result name="VBOX_E_OBJECT_IN_USE">
4689 Hard disk already attached to this or another virtual machine.
4690 </result>
4691
4692 </desc>
4693 <param name="name" type="wstring" dir="in">
4694 <desc>Name of the storage controller to attach the device to.</desc>
4695 </param>
4696 <param name="controllerPort" type="long" dir="in">
4697 <desc>Port to attach the device to.</desc>
4698 </param>
4699 <param name="device" type="long" dir="in">
4700 <desc>Device slot in the given port to attach the device to.</desc>
4701 </param>
4702 <param name="type" type="DeviceType" dir="in">
4703 <desc>Device type of the attached device.</desc>
4704 </param>
4705 <param name="id" type="uuid" mod="string" dir="in">
4706 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4707 medium.</desc>
4708 </param>
4709 </method>
4710
4711 <method name="detachDevice">
4712 <desc>
4713 Detaches the device attached to a device slot of the specified bus.
4714
4715 Detaching the device from the virtual machine is deferred. This means
4716 that the medium remains associated with the machine when this method
4717 returns and gets actually de-associated only after a successful
4718 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4719 for more detailed information about attaching media.
4720
4721 <note>
4722 You cannot detach the hard disk from a running machine.
4723 </note>
4724 <note>
4725 Detaching differencing media implicitly created by <link
4726 to="#attachDevice"/> for the indirect attachment using this
4727 method will <b>not</b> implicitly delete them. The
4728 <link to="IMedium::deleteStorage"/> operation should be
4729 explicitly performed by the caller after the medium is successfully
4730 detached and the settings are saved with
4731 <link to="#saveSettings"/>, if it is the desired action.
4732 </note>
4733
4734 <result name="VBOX_E_INVALID_VM_STATE">
4735 Attempt to detach medium from a running virtual machine.
4736 </result>
4737 <result name="VBOX_E_OBJECT_NOT_FOUND">
4738 No medium attached to given slot/bus.
4739 </result>
4740 <result name="VBOX_E_NOT_SUPPORTED">
4741 Hard disk format does not support storage deletion.
4742 </result>
4743
4744 </desc>
4745 <param name="name" type="wstring" dir="in">
4746 <desc>Name of the storage controller to detach the medium from.</desc>
4747 </param>
4748 <param name="controllerPort" type="long" dir="in">
4749 <desc>Port number to detach the medium from.</desc>
4750 </param>
4751 <param name="device" type="long" dir="in">
4752 <desc>Device slot number to detach the medium from.</desc>
4753 </param>
4754 </method>
4755
4756 <method name="mountMedium">
4757 <desc>
4758 Mounts a medium (<link to="IMedium" />, identified
4759 by the given UUID @a id) to the given storage controller
4760 (<link to="IStorageController" />, identified by @a name),
4761 at the indicated port and device. The device must already exist;
4762 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4763
4764 This method is intended only for managing removable media, where the
4765 device is fixed but media is changeable at runtime (such as DVDs
4766 and floppies). It cannot be used for fixed media such as hard disks.
4767
4768 The @a controllerPort and @a device parameters specify the device slot and
4769 have have the same meaning as with <link to="IMachine::attachDevice" />.
4770
4771 The specified device slot can have a medium mounted, which will be
4772 unmounted first. Specifying a NULL medium does just an unmount.
4773
4774 See <link to="IMedium"/> for more detailed information about
4775 attaching media.
4776
4777 <result name="E_INVALIDARG">
4778 SATA device, SATA port, IDE port or IDE slot out of range.
4779 </result>
4780 <result name="VBOX_E_INVALID_OBJECT_STATE">
4781 Attempt to attach medium to an unregistered virtual machine.
4782 </result>
4783 <result name="VBOX_E_INVALID_VM_STATE">
4784 Invalid machine state.
4785 </result>
4786 <result name="VBOX_E_OBJECT_IN_USE">
4787 Medium already attached to this or another virtual machine.
4788 </result>
4789
4790 </desc>
4791 <param name="name" type="wstring" dir="in">
4792 <desc>Name of the storage controller to attach the medium to.</desc>
4793 </param>
4794 <param name="controllerPort" type="long" dir="in">
4795 <desc>Port to attach the medium to.</desc>
4796 </param>
4797 <param name="device" type="long" dir="in">
4798 <desc>Device slot in the given port to attach the medium to.</desc>
4799 </param>
4800 <param name="id" type="uuid" mod="string" dir="in">
4801 <desc>UUID of the medium to attach.</desc>
4802 </param>
4803 </method>
4804
4805 <method name="getMedium" const="yes">
4806 <desc>
4807 Returns the virtual medium attached to a device slot of the specified
4808 bus.
4809
4810 Note that if the medium was indirectly attached by
4811 <link to="#mountMedium"/> to the given device slot then this
4812 method will return not the same object as passed to the
4813 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4814 more detailed information about mounting a medium.
4815
4816 <result name="VBOX_E_OBJECT_NOT_FOUND">
4817 No medium attached to given slot/bus.
4818 </result>
4819
4820 </desc>
4821 <param name="name" type="wstring" dir="in">
4822 <desc>Name of the storage controller the medium is attached to.</desc>
4823 </param>
4824 <param name="controllerPort" type="long" dir="in">
4825 <desc>Port to query.</desc>
4826 </param>
4827 <param name="device" type="long" dir="in">
4828 <desc>Device slot in the given port to query.</desc>
4829 </param>
4830 <param name="medium" type="IMedium" dir="return">
4831 <desc>Attached medium object.</desc>
4832 </param>
4833 </method>
4834
4835 <method name="getMediumAttachmentsOfController" const="yes">
4836 <desc>
4837 Returns an array of medium attachments which are attached to the
4838 the controller with the given name.
4839
4840 <result name="VBOX_E_OBJECT_NOT_FOUND">
4841 A storage controller with given name doesn't exist.
4842 </result>
4843 </desc>
4844 <param name="name" type="wstring" dir="in"/>
4845 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4846 </method>
4847
4848 <method name="getMediumAttachment" const="yes">
4849 <desc>
4850 Returns a medium attachment which corresponds to the controller with
4851 the given name, on the given port and device slot.
4852
4853 <result name="VBOX_E_OBJECT_NOT_FOUND">
4854 No attachment exists for the given controller/port/device combination.
4855 </result>
4856 </desc>
4857 <param name="name" type="wstring" dir="in"/>
4858 <param name="controllerPort" type="long" dir="in"/>
4859 <param name="device" type="long" dir="in"/>
4860 <param name="attachment" type="IMediumAttachment" dir="return"/>
4861 </method>
4862
4863 <method name="getNetworkAdapter" const="yes">
4864 <desc>
4865 Returns the network adapter associated with the given slot.
4866 Slots are numbered sequentially, starting with zero. The total
4867 number of adapters per machine is defined by the
4868 <link to="ISystemProperties::networkAdapterCount"/> property,
4869 so the maximum slot number is one less than that property's value.
4870
4871 <result name="E_INVALIDARG">
4872 Invalid @a slot number.
4873 </result>
4874
4875 </desc>
4876 <param name="slot" type="unsigned long" dir="in"/>
4877 <param name="adapter" type="INetworkAdapter" dir="return"/>
4878 </method>
4879
4880 <method name="addStorageController">
4881 <desc>
4882 Adds a new storage controller (SCSI or SATA controller) to the
4883 machine and returns it as an instance of
4884 <link to="IStorageController" />.
4885
4886 @a name identifies the controller for subsequent calls such as
4887 <link to="#getStorageControllerByName" />,
4888 <link to="#removeStorageController" />,
4889 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4890
4891 After the controller has been added, you can set its exact
4892 type by setting the <link to="IStorageController::controllerType" />.
4893
4894 <result name="VBOX_E_OBJECT_IN_USE">
4895 A storage controller with given name exists already.
4896 </result>
4897 <result name="E_INVALIDARG">
4898 Invalid @a controllerType.
4899 </result>
4900 </desc>
4901 <param name="name" type="wstring" dir="in"/>
4902 <param name="connectionType" type="StorageBus" dir="in"/>
4903 <param name="controller" type="IStorageController" dir="return"/>
4904 </method>
4905
4906 <method name="getStorageControllerByName" const="yes">
4907 <desc>
4908 Returns a storage controller with the given name.
4909
4910 <result name="VBOX_E_OBJECT_NOT_FOUND">
4911 A storage controller with given name doesn't exist.
4912 </result>
4913 </desc>
4914 <param name="name" type="wstring" dir="in"/>
4915 <param name="storageController" type="IStorageController" dir="return"/>
4916 </method>
4917
4918 <method name="removeStorageController">
4919 <desc>
4920 Removes a storage controller from the machine.
4921
4922 <result name="VBOX_E_OBJECT_NOT_FOUND">
4923 A storage controller with given name doesn't exist.
4924 </result>
4925 </desc>
4926 <param name="name" type="wstring" dir="in"/>
4927 </method>
4928
4929 <method name="getSerialPort" const="yes">
4930 <desc>
4931 Returns the serial port associated with the given slot.
4932 Slots are numbered sequentially, starting with zero. The total
4933 number of serial ports per machine is defined by the
4934 <link to="ISystemProperties::serialPortCount"/> property,
4935 so the maximum slot number is one less than that property's value.
4936
4937 <result name="E_INVALIDARG">
4938 Invalid @a slot number.
4939 </result>
4940
4941 </desc>
4942 <param name="slot" type="unsigned long" dir="in"/>
4943 <param name="port" type="ISerialPort" dir="return"/>
4944 </method>
4945
4946 <method name="getParallelPort" const="yes">
4947 <desc>
4948 Returns the parallel port associated with the given slot.
4949 Slots are numbered sequentially, starting with zero. The total
4950 number of parallel ports per machine is defined by the
4951 <link to="ISystemProperties::parallelPortCount"/> property,
4952 so the maximum slot number is one less than that property's value.
4953
4954 <result name="E_INVALIDARG">
4955 Invalid @a slot number.
4956 </result>
4957
4958 </desc>
4959 <param name="slot" type="unsigned long" dir="in"/>
4960 <param name="port" type="IParallelPort" dir="return"/>
4961 </method>
4962
4963 <method name="getExtraDataKeys">
4964 <desc>
4965 Returns an array representing the machine-specific extra data keys
4966 which currently have values defined.
4967 </desc>
4968 <param name="value" type="wstring" dir="return" safearray="yes">
4969 <desc>Array of extra data keys.</desc>
4970 </param>
4971 </method>
4972
4973 <method name="getExtraData">
4974 <desc>
4975 Returns associated machine-specific extra data.
4976
4977 If the requested data @a key does not exist, this function will
4978 succeed and return an empty string in the @a value argument.
4979
4980 <result name="VBOX_E_FILE_ERROR">
4981 Settings file not accessible.
4982 </result>
4983 <result name="VBOX_E_XML_ERROR">
4984 Could not parse the settings file.
4985 </result>
4986
4987 </desc>
4988 <param name="key" type="wstring" dir="in">
4989 <desc>Name of the data key to get.</desc>
4990 </param>
4991 <param name="value" type="wstring" dir="return">
4992 <desc>Value of the requested data key.</desc>
4993 </param>
4994 </method>
4995
4996 <method name="setExtraData">
4997 <desc>
4998 Sets associated machine-specific extra data.
4999
5000 If you pass @c null or an empty string as a key @a value, the given
5001 @a key will be deleted.
5002
5003 <note>
5004 Before performing the actual data change, this method will ask all
5005 registered callbacks using the
5006 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5007 notification for a permission. If one of the callbacks refuses the
5008 new value, the change will not be performed.
5009 </note>
5010 <note>
5011 On success, the
5012 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5013 is called to inform all registered callbacks about a successful data
5014 change.
5015 </note>
5016 <note>
5017 This method can be called outside the machine session and therefore
5018 it's a caller's responsibility to handle possible race conditions
5019 when several clients change the same key at the same time.
5020 </note>
5021
5022 <result name="VBOX_E_FILE_ERROR">
5023 Settings file not accessible.
5024 </result>
5025 <result name="VBOX_E_XML_ERROR">
5026 Could not parse the settings file.
5027 </result>
5028
5029 </desc>
5030 <param name="key" type="wstring" dir="in">
5031 <desc>Name of the data key to set.</desc>
5032 </param>
5033 <param name="value" type="wstring" dir="in">
5034 <desc>Value to assign to the key.</desc>
5035 </param>
5036 </method>
5037
5038 <method name="getHWVirtExProperty" const="yes">
5039 <desc>
5040 Returns the HWVirtEx boolean value of the specified property.
5041
5042 <result name="E_INVALIDARG">
5043 Invalid property.
5044 </result>
5045
5046 </desc>
5047 <param name="property" type="HWVirtExPropertyType" dir="in">
5048 <desc>
5049 Property type to query.
5050 </desc>
5051 </param>
5052 <param name="value" type="boolean" dir="return">
5053 <desc>
5054 Property value.
5055 </desc>
5056 </param>
5057 </method>
5058
5059 <method name="setHWVirtExProperty">
5060 <desc>
5061 Sets the HWVirtEx boolean value of the specified property.
5062
5063 <result name="E_INVALIDARG">
5064 Invalid property.
5065 </result>
5066
5067 </desc>
5068 <param name="property" type="HWVirtExPropertyType" dir="in">
5069 <desc>
5070 Property type to query.
5071 </desc>
5072 </param>
5073 <param name="value" type="boolean" dir="in">
5074 <desc>
5075 Property value.
5076 </desc>
5077 </param>
5078 </method>
5079
5080 <method name="saveSettings">
5081 <desc>
5082 Saves any changes to machine settings made since the session
5083 has been opened or a new machine has been created, or since the
5084 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5085 For registered machines, new settings become visible to all
5086 other VirtualBox clients after successful invocation of this
5087 method.
5088 <note>
5089 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5090 notification event after the configuration has been successfully
5091 saved (only for registered machines).
5092 </note>
5093 <note>
5094 Calling this method is only valid on instances returned
5095 by <link to="ISession::machine"/> and on new machines
5096 created by <link to="IVirtualBox::createMachine"/> but not
5097 yet registered, or on unregistered machines after calling
5098 <link to="IVirtualBox::unregisterMachine"/>.
5099 </note>
5100
5101 <result name="VBOX_E_FILE_ERROR">
5102 Settings file not accessible.
5103 </result>
5104 <result name="VBOX_E_XML_ERROR">
5105 Could not parse the settings file.
5106 </result>
5107 <result name="E_ACCESSDENIED">
5108 Modification request refused.
5109 </result>
5110
5111 </desc>
5112 </method>
5113
5114 <method name="discardSettings">
5115 <desc>
5116 Discards any changes to the machine settings made since the session
5117 has been opened or since the last call to <link to="#saveSettings"/>
5118 or <link to="#discardSettings"/>.
5119 <note>
5120 Calling this method is only valid on instances returned
5121 by <link to="ISession::machine"/> and on new machines
5122 created by <link to="IVirtualBox::createMachine"/> or
5123 opened by <link to="IVirtualBox::openMachine"/> but not
5124 yet registered, or on unregistered machines after calling
5125 <link to="IVirtualBox::unregisterMachine"/>.
5126 </note>
5127
5128 <result name="VBOX_E_INVALID_VM_STATE">
5129 Virtual machine is not mutable.
5130 </result>
5131
5132 </desc>
5133 </method>
5134
5135 <method name="deleteSettings">
5136 <desc>
5137 Deletes the settings file of this machine from disk.
5138 The machine must not be registered in order for this operation
5139 to succeed.
5140 <note>
5141 <link to="#settingsModified"/> will return @c true after this
5142 method successfully returns.
5143 </note>
5144 <note>
5145 Calling this method is only valid on instances returned
5146 by <link to="ISession::machine"/> and on new machines
5147 created by <link to="IVirtualBox::createMachine"/> or
5148 opened by <link to="IVirtualBox::openMachine"/> but not
5149 yet registered, or on unregistered machines after calling
5150 <link to="IVirtualBox::unregisterMachine"/>.
5151 </note>
5152 <note>
5153 The deleted machine settings file can be restored (saved again)
5154 by calling <link to="#saveSettings"/>.
5155 </note>
5156
5157 <result name="VBOX_E_INVALID_VM_STATE">
5158 Cannot delete settings of a registered machine or
5159 machine not mutable.
5160 </result>
5161 <result name="VBOX_E_IPRT_ERROR">
5162 Could not delete the settings file.
5163 </result>
5164
5165 </desc>
5166 </method>
5167
5168 <method name="export">
5169 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5170 steps required to export VirtualBox machines to OVF.
5171 </desc>
5172
5173 <param name="aAppliance" type="IAppliance" dir="in">
5174 <desc>Appliance to export this machine to.</desc>
5175 </param>
5176 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5177 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5178 </param>
5179 </method >
5180
5181 <method name="getSnapshot">
5182 <desc>
5183 Returns a snapshot of this machine with the given UUID.
5184 A @c null UUID can be used to obtain the first snapshot
5185 taken on this machine. This is useful if you want to traverse
5186 the whole tree of snapshots starting from the root.
5187
5188 <result name="VBOX_E_OBJECT_NOT_FOUND">
5189 Virtual machine has no snapshots or snapshot not found.
5190 </result>
5191
5192 </desc>
5193 <param name="id" type="uuid" mod="string" dir="in">
5194 <desc>UUID of the snapshot to get</desc>
5195 </param>
5196 <param name="snapshot" type="ISnapshot" dir="return">
5197 <desc>Snapshot object with the given UUID.</desc>
5198 </param>
5199 </method>
5200
5201 <method name="findSnapshot">
5202 <desc>
5203 Returns a snapshot of this machine with the given name.
5204
5205 <result name="VBOX_E_OBJECT_NOT_FOUND">
5206 Virtual machine has no snapshots or snapshot not found.
5207 </result>
5208
5209 </desc>
5210 <param name="name" type="wstring" dir="in">
5211 <desc>Name of the snapshot to find</desc>
5212 </param>
5213 <param name="snapshot" type="ISnapshot" dir="return">
5214 <desc>Snapshot object with the given name.</desc>
5215 </param>
5216 </method>
5217
5218 <method name="setCurrentSnapshot">
5219 <desc>
5220 Sets the current snapshot of this machine.
5221 <note>
5222 In the current implementation, this operation is not
5223 implemented.
5224 </note>
5225 </desc>
5226 <param name="id" type="uuid" mod="string" dir="in">
5227 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5228 </param>
5229 </method>
5230
5231 <method name="createSharedFolder">
5232 <desc>
5233 Creates a new permanent shared folder by associating the given logical
5234 name with the given host path, adds it to the collection of shared
5235 folders and starts sharing it. Refer to the description of
5236 <link to="ISharedFolder"/> to read more about logical names.
5237
5238 <result name="VBOX_E_OBJECT_IN_USE">
5239 Shared folder already exists.
5240 </result>
5241 <result name="VBOX_E_FILE_ERROR">
5242 Shared folder @a hostPath not accessible.
5243 </result>
5244
5245 </desc>
5246 <param name="name" type="wstring" dir="in">
5247 <desc>Unique logical name of the shared folder.</desc>
5248 </param>
5249 <param name="hostPath" type="wstring" dir="in">
5250 <desc>Full path to the shared folder in the host file system.</desc>
5251 </param>
5252 <param name="writable" type="boolean" dir="in">
5253 <desc>Whether the share is writable or readonly</desc>
5254 </param>
5255 </method>
5256
5257 <method name="removeSharedFolder">
5258 <desc>
5259 Removes the permanent shared folder with the given name previously
5260 created by <link to="#createSharedFolder"/> from the collection of
5261 shared folders and stops sharing it.
5262
5263 <result name="VBOX_E_INVALID_VM_STATE">
5264 Virtual machine is not mutable.
5265 </result>
5266 <result name="VBOX_E_OBJECT_NOT_FOUND">
5267 Shared folder @a name does not exist.
5268 </result>
5269
5270 </desc>
5271 <param name="name" type="wstring" dir="in">
5272 <desc>Logical name of the shared folder to remove.</desc>
5273 </param>
5274 </method>
5275
5276 <method name="canShowConsoleWindow">
5277 <desc>
5278 Returns @c true if the VM console process can activate the
5279 console window and bring it to foreground on the desktop of
5280 the host PC.
5281 <note>
5282 This method will fail if a session for this machine is not
5283 currently open.
5284 </note>
5285
5286 <result name="VBOX_E_INVALID_VM_STATE">
5287 Machine session is not open.
5288 </result>
5289
5290 </desc>
5291 <param name="canShow" type="boolean" dir="return">
5292 <desc>
5293 @c true if the console window can be shown and @c false otherwise.
5294 </desc>
5295 </param>
5296 </method>
5297
5298 <method name="showConsoleWindow">
5299 <desc>
5300 Activates the console window and brings it to foreground on
5301 the desktop of the host PC. Many modern window managers on
5302 many platforms implement some sort of focus stealing
5303 prevention logic, so that it may be impossible to activate
5304 a window without the help of the currently active
5305 application. In this case, this method will return a non-zero
5306 identifier that represents the top-level window of the VM
5307 console process. The caller, if it represents a currently
5308 active process, is responsible to use this identifier (in a
5309 platform-dependent manner) to perform actual window
5310 activation.
5311 <note>
5312 This method will fail if a session for this machine is not
5313 currently open.
5314 </note>
5315
5316 <result name="VBOX_E_INVALID_VM_STATE">
5317 Machine session is not open.
5318 </result>
5319
5320 </desc>
5321 <param name="winId" type="unsigned long long" dir="return">
5322 <desc>
5323 Platform-dependent identifier of the top-level VM console
5324 window, or zero if this method has performed all actions
5325 necessary to implement the <i>show window</i> semantics for
5326 the given platform and/or VirtualBox front-end.
5327 </desc>
5328 </param>
5329 </method>
5330
5331 <method name="getGuestProperty">
5332 <desc>
5333 Reads an entry from the machine's guest property store.
5334
5335 <result name="VBOX_E_INVALID_VM_STATE">
5336 Machine session is not open.
5337 </result>
5338
5339 </desc>
5340 <param name="name" type="wstring" dir="in">
5341 <desc>
5342 The name of the property to read.
5343 </desc>
5344 </param>
5345 <param name="value" type="wstring" dir="out">
5346 <desc>
5347 The value of the property. If the property does not exist then this
5348 will be empty.
5349 </desc>
5350 </param>
5351 <param name="timestamp" type="unsigned long long" dir="out">
5352 <desc>
5353 The time at which the property was last modified, as seen by the
5354 server process.
5355 </desc>
5356 </param>
5357 <param name="flags" type="wstring" dir="out">
5358 <desc>
5359 Additional property parameters, passed as a comma-separated list of
5360 "name=value" type entries.
5361 </desc>
5362 </param>
5363 </method>
5364
5365 <method name="getGuestPropertyValue">
5366 <desc>
5367 Reads a value from the machine's guest property store.
5368
5369 <result name="VBOX_E_INVALID_VM_STATE">
5370 Machine session is not open.
5371 </result>
5372
5373 </desc>
5374 <param name="property" type="wstring" dir="in">
5375 <desc>
5376 The name of the property to read.
5377 </desc>
5378 </param>
5379 <param name="value" type="wstring" dir="return">
5380 <desc>
5381 The value of the property. If the property does not exist then this
5382 will be empty.
5383 </desc>
5384 </param>
5385 </method>
5386
5387 <method name="getGuestPropertyTimestamp">
5388 <desc>
5389 Reads a property timestamp from the machine's guest property store.
5390
5391 <result name="VBOX_E_INVALID_VM_STATE">
5392 Machine session is not open.
5393 </result>
5394
5395 </desc>
5396 <param name="property" type="wstring" dir="in">
5397 <desc>
5398 The name of the property to read.
5399 </desc>
5400 </param>
5401 <param name="value" type="unsigned long long" dir="return">
5402 <desc>
5403 The timestamp. If the property does not exist then this will be
5404 empty.
5405 </desc>
5406 </param>
5407 </method>
5408
5409 <method name="setGuestProperty">
5410 <desc>
5411 Sets, changes or deletes an entry in the machine's guest property
5412 store.
5413
5414 <result name="E_ACCESSDENIED">
5415 Property cannot be changed.
5416 </result>
5417 <result name="E_INVALIDARG">
5418 Invalid @a flags.
5419 </result>
5420 <result name="VBOX_E_INVALID_VM_STATE">
5421 Virtual machine is not mutable or session not open.
5422 </result>
5423 <result name="VBOX_E_INVALID_OBJECT_STATE">
5424 Cannot set transient property when machine not running.
5425 </result>
5426
5427 </desc>
5428 <param name="property" type="wstring" dir="in">
5429 <desc>
5430 The name of the property to set, change or delete.
5431 </desc>
5432 </param>
5433 <param name="value" type="wstring" dir="in">
5434 <desc>
5435 The new value of the property to set, change or delete. If the
5436 property does not yet exist and value is non-empty, it will be
5437 created. If the value is @c null or empty, the property will be
5438 deleted if it exists.
5439 </desc>
5440 </param>
5441 <param name="flags" type="wstring" dir="in">
5442 <desc>
5443 Additional property parameters, passed as a comma-separated list of
5444 "name=value" type entries.
5445 </desc>
5446 </param>
5447 </method>
5448
5449 <method name="setGuestPropertyValue">
5450 <desc>
5451 Sets, changes or deletes a value in the machine's guest property
5452 store. The flags field will be left unchanged or created empty for a
5453 new property.
5454
5455 <result name="E_ACCESSDENIED">
5456 Property cannot be changed.
5457 </result>
5458 <result name="VBOX_E_INVALID_VM_STATE">
5459 Virtual machine is not mutable or session not open.
5460 </result>
5461 <result name="VBOX_E_INVALID_OBJECT_STATE">
5462 Cannot set transient property when machine not running.
5463 </result>
5464 </desc>
5465
5466 <param name="property" type="wstring" dir="in">
5467 <desc>
5468 The name of the property to set, change or delete.
5469 </desc>
5470 </param>
5471 <param name="value" type="wstring" dir="in">
5472 <desc>
5473 The new value of the property to set, change or delete. If the
5474 property does not yet exist and value is non-empty, it will be
5475 created. If the value is @c null or empty, the property will be
5476 deleted if it exists.
5477 </desc>
5478 </param>
5479 </method>
5480
5481 <method name="enumerateGuestProperties">
5482 <desc>
5483 Return a list of the guest properties matching a set of patterns along
5484 with their values, time stamps and flags.
5485 </desc>
5486 <param name="patterns" type="wstring" dir="in">
5487 <desc>
5488 The patterns to match the properties against, separated by '|'
5489 characters. If this is empty or @c null, all properties will match.
5490 </desc>
5491 </param>
5492 <param name="name" type="wstring" dir="out" safearray="yes">
5493 <desc>
5494 The names of the properties returned.
5495 </desc>
5496 </param>
5497 <param name="value" type="wstring" dir="out" safearray="yes">
5498 <desc>
5499 The values of the properties returned. The array entries match the
5500 corresponding entries in the @a name array.
5501 </desc>
5502 </param>
5503 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5504 <desc>
5505 The time stamps of the properties returned. The array entries match
5506 the corresponding entries in the @a name array.
5507 </desc>
5508 </param>
5509 <param name="flags" type="wstring" dir="out" safearray="yes">
5510 <desc>
5511 The flags of the properties returned. The array entries match the
5512 corresponding entries in the @a name array.
5513 </desc>
5514 </param>
5515 </method>
5516</interface>
5517
5518 <!--
5519 // IConsole
5520 /////////////////////////////////////////////////////////////////////////
5521 -->
5522
5523 <interface
5524 name="IConsoleCallback" extends="$unknown"
5525 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5526 wsmap="suppress"
5527 >
5528
5529 <desc>
5530 This interface is used by a client of the Main API that need to
5531 be notified of events. For example, a graphical user interface
5532 can use this to learn about machine state changes so they can
5533 update the list of virtual machines without having to rely
5534 on polling.
5535
5536 Whenever relevant events occur in VirtualBox, the callbacks in
5537 objects of this interface are called. In order for this to be
5538 useful, a client needs to create its own subclass that implements
5539 this interface in which the methods for the relevant callbacks
5540 are overridden. An instance of this subclass interface can then
5541 be passed to <link to="IConsole::registerCallback" />.
5542 </desc>
5543
5544 <method name="onMousePointerShapeChange">
5545 <desc>
5546 Notification when the guest mouse pointer shape has
5547 changed. The new shape data is given.
5548 </desc>
5549 <param name="visible" type="boolean" dir="in">
5550 <desc>
5551 Flag whether the pointer is visible.
5552 </desc>
5553 </param>
5554 <param name="alpha" type="boolean" dir="in">
5555 <desc>
5556 Flag whether the pointer has an alpha channel.
5557 </desc>
5558 </param>
5559 <param name="xHot" type="unsigned long" dir="in">
5560 <desc>
5561 The pointer hot spot x coordinate.
5562 </desc>
5563 </param>
5564 <param name="yHot" type="unsigned long" dir="in">
5565 <desc>
5566 The pointer hot spot y coordinate.
5567 </desc>
5568 </param>
5569 <param name="width" type="unsigned long" dir="in">
5570 <desc>
5571 Width of the pointer shape in pixels.
5572 </desc>
5573 </param>
5574 <param name="height" type="unsigned long" dir="in">
5575 <desc>
5576 Height of the pointer shape in pixels.
5577 </desc>
5578 </param>
5579 <param name="shape" type="octet" mod="ptr" dir="in">
5580 <desc>
5581 Address of the shape buffer.
5582
5583 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5584 followed by a 32-bpp XOR (color) mask.
5585
5586 For pointers without alpha channel the XOR mask pixels are 32
5587 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5588 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5589
5590 An AND mask is used for pointers with alpha channel, so if the
5591 callback does not support alpha, the pointer could be
5592 displayed as a normal color pointer.
5593
5594 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5595 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5596 height</tt>. The padding bits at the end of each scanline are
5597 undefined.
5598
5599 The XOR mask follows the AND mask on the next 4-byte aligned
5600 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5601 Bytes in the gap between the AND and the XOR mask are undefined.
5602 The XOR mask scanlines have no gap between them and the size of
5603 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5604
5605 <note>
5606 If @a shape is 0, only the pointer visibility is changed.
5607 </note>
5608 </desc>
5609 </param>
5610 </method>
5611
5612 <method name="onMouseCapabilityChange">
5613 <desc>
5614 Notification when the mouse capabilities reported by the
5615 guest have changed. The new capabilities are passed.
5616 </desc>
5617 <param name="supportsAbsolute" type="boolean" dir="in"/>
5618 <param name="needsHostCursor" type="boolean" dir="in"/>
5619 </method>
5620
5621 <method name="onKeyboardLedsChange">
5622 <desc>
5623 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5624 to alter the state of the keyboard LEDs.
5625 </desc>
5626 <param name="numLock" type="boolean" dir="in"/>
5627 <param name="capsLock" type="boolean" dir="in"/>
5628 <param name="scrollLock" type="boolean" dir="in"/>
5629 </method>
5630
5631 <method name="onStateChange">
5632 <desc>
5633 Notification when the execution state of the machine has changed.
5634 The new state will be given.
5635 </desc>
5636 <param name="state" type="MachineState" dir="in"/>
5637 </method>
5638
5639 <method name="onAdditionsStateChange">
5640 <desc>
5641 Notification when a Guest Additions property changes.
5642 Interested callees should query IGuest attributes to
5643 find out what has changed.
5644 </desc>
5645 </method>
5646
5647 <method name="onNetworkAdapterChange">
5648 <desc>
5649 Notification when a property of one of the
5650 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5651 changes. Interested callees should use INetworkAdapter methods and
5652 attributes to find out what has changed.
5653 </desc>
5654 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5655 <desc>Network adapter that is subject to change.</desc>
5656 </param>
5657 </method>
5658
5659 <method name="onSerialPortChange">
5660 <desc>
5661 Notification when a property of one of the
5662 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5663 Interested callees should use ISerialPort methods and attributes
5664 to find out what has changed.
5665 </desc>
5666 <param name="serialPort" type="ISerialPort" dir="in">
5667 <desc>Serial port that is subject to change.</desc>
5668 </param>
5669 </method>
5670
5671 <method name="onParallelPortChange">
5672 <desc>
5673 Notification when a property of one of the
5674 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5675 changes. Interested callees should use ISerialPort methods and
5676 attributes to find out what has changed.
5677 </desc>
5678 <param name="parallelPort" type="IParallelPort" dir="in">
5679 <desc>Parallel port that is subject to change.</desc>
5680 </param>
5681 </method>
5682
5683 <method name="onStorageControllerChange">
5684 <desc>
5685 Notification when a property of one of the
5686 virtual <link to="IMachine::storageControllers">storage controllers</link>
5687 changes. Interested callees should query the corresponding collections
5688 to find out what has changed.
5689 </desc>
5690 </method>
5691
5692 <method name="onMediumChange">
5693 <desc>
5694 Notification when a
5695 <link to="IMachine::mediumAttachments">medium attachment</link>
5696 changes.
5697 </desc>
5698 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5699 <desc>Medium attachment that is subject to change.</desc>
5700 </param>
5701 </method>
5702
5703 <method name="onVRDPServerChange">
5704 <desc>
5705 Notification when a property of the
5706 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5707 Interested callees should use IVRDPServer methods and attributes to
5708 find out what has changed.
5709 </desc>
5710 </method>
5711
5712 <method name="onRemoteDisplayInfoChange">
5713 <desc>
5714 Notification when the status of the VRDP server changes. Interested callees
5715 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5716 attributes to find out what is the current status.
5717 </desc>
5718 </method>
5719
5720 <method name="onUSBControllerChange">
5721 <desc>
5722 Notification when a property of the virtual
5723 <link to="IMachine::USBController">USB controller</link> changes.
5724 Interested callees should use IUSBController methods and attributes to
5725 find out what has changed.
5726 </desc>
5727 </method>
5728
5729 <method name="onUSBDeviceStateChange">
5730 <desc>
5731 Notification when a USB device is attached to or detached from
5732 the virtual USB controller.
5733
5734 This notification is sent as a result of the indirect
5735 request to attach the device because it matches one of the
5736 machine USB filters, or as a result of the direct request
5737 issued by <link to="IConsole::attachUSBDevice"/> or
5738 <link to="IConsole::detachUSBDevice"/>.
5739
5740 This notification is sent in case of both a succeeded and a
5741 failed request completion. When the request succeeds, the
5742 @a error parameter is @c null, and the given device has been
5743 already added to (when @a attached is @c true) or removed from
5744 (when @a attached is @c false) the collection represented by
5745 <link to="IConsole::USBDevices"/>. On failure, the collection
5746 doesn't change and the @a error parameter represents the error
5747 message describing the failure.
5748
5749 </desc>
5750 <param name="device" type="IUSBDevice" dir="in">
5751 <desc>Device that is subject to state change.</desc>
5752 </param>
5753 <param name="attached" type="boolean" dir="in">
5754 <desc>
5755 @c true if the device was attached and @c false otherwise.
5756 </desc>
5757 </param>
5758 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5759 <desc>
5760 @c null on success or an error message object on failure.
5761 </desc>
5762 </param>
5763 </method>
5764
5765 <method name="onSharedFolderChange">
5766 <desc>
5767 Notification when a shared folder is added or removed.
5768 The @a scope argument defines one of three scopes:
5769 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5770 (<link to="Scope_Global">Global</link>),
5771 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5772 the machine (<link to="Scope_Machine">Machine</link>) or <link
5773 to="IConsole::sharedFolders">transient shared folders</link> of the
5774 machine (<link to="Scope_Session">Session</link>). Interested callees
5775 should use query the corresponding collections to find out what has
5776 changed.
5777 </desc>
5778 <param name="scope" type="Scope" dir="in">
5779 <desc>Scope of the notification.</desc>
5780 </param>
5781 </method>
5782
5783 <method name="onRuntimeError">
5784 <desc>
5785 Notification when an error happens during the virtual
5786 machine execution.
5787
5788 There are three kinds of runtime errors:
5789 <ul>
5790 <li><i>fatal</i></li>
5791 <li><i>non-fatal with retry</i></li>
5792 <li><i>non-fatal warnings</i></li>
5793 </ul>
5794
5795 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5796 to @c true. In case of fatal errors, the virtual machine
5797 execution is always paused before calling this notification, and
5798 the notification handler is supposed either to immediately save
5799 the virtual machine state using <link to="IConsole::saveState"/>
5800 or power it off using <link to="IConsole::powerDown"/>.
5801 Resuming the execution can lead to unpredictable results.
5802
5803 <b>Non-fatal</b> errors and warnings are indicated by the
5804 @a fatal parameter set to @c false. If the virtual machine
5805 is in the Paused state by the time the error notification is
5806 received, it means that the user can <i>try to resume</i> the machine
5807 execution after attempting to solve the problem that caused the
5808 error. In this case, the notification handler is supposed
5809 to show an appropriate message to the user (depending on the
5810 value of the @a id parameter) that offers several actions such
5811 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5812 wants to retry, the notification handler should continue
5813 the machine execution using the <link to="IConsole::resume"/>
5814 call. If the machine execution is not Paused during this
5815 notification, then it means this notification is a <i>warning</i>
5816 (for example, about a fatal condition that can happen very soon);
5817 no immediate action is required from the user, the machine
5818 continues its normal execution.
5819
5820 Note that in either case the notification handler
5821 <b>must not</b> perform any action directly on a thread
5822 where this notification is called. Everything it is allowed to
5823 do is to post a message to another thread that will then talk
5824 to the user and take the corresponding action.
5825
5826 Currently, the following error identifiers are known:
5827 <ul>
5828 <li><tt>"HostMemoryLow"</tt></li>
5829 <li><tt>"HostAudioNotResponding"</tt></li>
5830 <li><tt>"VDIStorageFull"</tt></li>
5831 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5832 </ul>
5833
5834 <note>
5835 This notification is not designed to be implemented by
5836 more than one callback at a time. If you have multiple
5837 IConsoleCallback instances registered on the given
5838 IConsole object, make sure you simply do nothing but
5839 return @c S_OK from all but one of them that does actual
5840 user notification and performs necessary actions.
5841 </note>
5842
5843 </desc>
5844 <param name="fatal" type="boolean" dir="in">
5845 <desc>Whether the error is fatal or not</desc>
5846 </param>
5847 <param name="id" type="wstring" dir="in">
5848 <desc>Error identifier</desc>
5849 </param>
5850 <param name="message" type="wstring" dir="in">
5851 <desc>Optional error message</desc>
5852 </param>
5853 </method>
5854
5855 <method name="onCanShowWindow">
5856 <desc>
5857 Notification when a call to
5858 <link to="IMachine::canShowConsoleWindow"/> is made by a
5859 front-end to check if a subsequent call to
5860 <link to="IMachine::showConsoleWindow"/> can succeed.
5861
5862 The callee should give an answer appropriate to the current
5863 machine state in the @a canShow argument. This answer must
5864 remain valid at least until the next
5865 <link to="IConsole::state">machine state</link> change.
5866
5867 <note>
5868 This notification is not designed to be implemented by
5869 more than one callback at a time. If you have multiple
5870 IConsoleCallback instances registered on the given
5871 IConsole object, make sure you simply do nothing but
5872 return @c true and @c S_OK from all but one of them that
5873 actually manages console window activation.
5874 </note>
5875 </desc>
5876 <param name="canShow" type="boolean" dir="return">
5877 <desc>
5878 @c true if the console window can be shown and @c false otherwise.
5879 </desc>
5880 </param>
5881 </method>
5882
5883 <method name="onShowWindow">
5884 <desc>
5885 Notification when a call to
5886 <link to="IMachine::showConsoleWindow"/>
5887 requests the console window to be activated and brought to
5888 foreground on the desktop of the host PC.
5889
5890 This notification should cause the VM console process to
5891 perform the requested action as described above. If it is
5892 impossible to do it at a time of this notification, this
5893 method should return a failure.
5894
5895 Note that many modern window managers on many platforms
5896 implement some sort of focus stealing prevention logic, so
5897 that it may be impossible to activate a window without the
5898 help of the currently active application (which is supposedly
5899 an initiator of this notification). In this case, this method
5900 must return a non-zero identifier that represents the
5901 top-level window of the VM console process. The caller, if it
5902 represents a currently active process, is responsible to use
5903 this identifier (in a platform-dependent manner) to perform
5904 actual window activation.
5905
5906 This method must set @a winId to zero if it has performed all
5907 actions necessary to complete the request and the console
5908 window is now active and in foreground, to indicate that no
5909 further action is required on the caller's side.
5910
5911 <note>
5912 This notification is not designed to be implemented by
5913 more than one callback at a time. If you have multiple
5914 IConsoleCallback instances registered on the given
5915 IConsole object, make sure you simply do nothing but
5916 return @c S_OK from all but one of them that actually
5917 manages console window activation.
5918 </note>
5919 </desc>
5920 <param name="winId" type="unsigned long long" dir="return">
5921 <desc>
5922 Platform-dependent identifier of the top-level VM console
5923 window, or zero if this method has performed all actions
5924 necessary to implement the <i>show window</i> semantics for
5925 the given platform and/or this VirtualBox front-end.
5926 </desc>
5927 </param>
5928 </method>
5929
5930 </interface>
5931
5932 <interface
5933 name="IRemoteDisplayInfo" extends="$unknown"
5934 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5935 wsmap="struct"
5936 >
5937 <desc>
5938 Contains information about the remote display (VRDP) capabilities and status.
5939 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5940 </desc>
5941
5942 <attribute name="active" type="boolean" readonly="yes">
5943 <desc>
5944 Whether the remote display connection is active.
5945 </desc>
5946 </attribute>
5947
5948 <attribute name="port" type="long" readonly="yes">
5949 <desc>
5950 VRDP server port number. If this property is equal to <tt>0</tt>, then
5951 the VRDP server failed to start, usually because there are no free TCP
5952 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5953 server has not yet been started.
5954 </desc>
5955 </attribute>
5956
5957 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5958 <desc>
5959 How many times a client connected.
5960 </desc>
5961 </attribute>
5962
5963 <attribute name="beginTime" type="long long" readonly="yes">
5964 <desc>
5965 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5966 </desc>
5967 </attribute>
5968
5969 <attribute name="endTime" type="long long" readonly="yes">
5970 <desc>
5971 When the last connection was terminated or the current time, if
5972 connection is still active, in milliseconds since 1970-01-01 UTC.
5973 </desc>
5974 </attribute>
5975
5976 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5977 <desc>
5978 How many bytes were sent in last or current, if still active, connection.
5979 </desc>
5980 </attribute>
5981
5982 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5983 <desc>
5984 How many bytes were sent in all connections.
5985 </desc>
5986 </attribute>
5987
5988 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5989 <desc>
5990 How many bytes were received in last or current, if still active, connection.
5991 </desc>
5992 </attribute>
5993
5994 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5995 <desc>
5996 How many bytes were received in all connections.
5997 </desc>
5998 </attribute>
5999
6000 <attribute name="user" type="wstring" readonly="yes">
6001 <desc>
6002 Login user name supplied by the client.
6003 </desc>
6004 </attribute>
6005
6006 <attribute name="domain" type="wstring" readonly="yes">
6007 <desc>
6008 Login domain name supplied by the client.
6009 </desc>
6010 </attribute>
6011
6012 <attribute name="clientName" type="wstring" readonly="yes">
6013 <desc>
6014 The client name supplied by the client.
6015 </desc>
6016 </attribute>
6017
6018 <attribute name="clientIP" type="wstring" readonly="yes">
6019 <desc>
6020 The IP address of the client.
6021 </desc>
6022 </attribute>
6023
6024 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6025 <desc>
6026 The client software version number.
6027 </desc>
6028 </attribute>
6029
6030 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6031 <desc>
6032 Public key exchange method used when connection was established.
6033 Values: 0 - RDP4 public key exchange scheme.
6034 1 - X509 certificates were sent to client.
6035 </desc>
6036 </attribute>
6037
6038 </interface>
6039
6040 <interface
6041 name="IConsole" extends="$unknown"
6042 uuid="c47486e1-3d99-4212-b1c5-86451978999d"
6043 wsmap="managed"
6044 >
6045 <desc>
6046 The IConsole interface represents an interface to control virtual
6047 machine execution.
6048
6049 The console object that implements the IConsole interface is obtained
6050 from a session object after the session for the given machine has been
6051 opened using one of <link to="IVirtualBox::openSession"/>,
6052 <link to="IVirtualBox::openRemoteSession"/> or
6053 <link to="IVirtualBox::openExistingSession"/> methods.
6054
6055 Methods of the IConsole interface allow the caller to query the current
6056 virtual machine execution state, pause the machine or power it down, save
6057 the machine state or take a snapshot, attach and detach removable media
6058 and so on.
6059
6060 <see>ISession</see>
6061 </desc>
6062
6063 <attribute name="machine" type="IMachine" readonly="yes">
6064 <desc>
6065 Machine object this console is sessioned with.
6066 <note>
6067 This is a convenience property, it has the same value as
6068 <link to="ISession::machine"/> of the corresponding session
6069 object.
6070 </note>
6071 </desc>
6072 </attribute>
6073
6074 <attribute name="state" type="MachineState" readonly="yes">
6075 <desc>
6076 Current execution state of the machine.
6077 <note>
6078 This property always returns the same value as the corresponding
6079 property of the IMachine object this console is sessioned with.
6080 For the process that owns (executes) the VM, this is the
6081 preferable way of querying the VM state, because no IPC
6082 calls are made.
6083 </note>
6084 </desc>
6085 </attribute>
6086
6087 <attribute name="guest" type="IGuest" readonly="yes">
6088 <desc>Guest object.</desc>
6089 </attribute>
6090
6091 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6092 <desc>
6093 Virtual keyboard object.
6094 <note>
6095 If the machine is not running, any attempt to use
6096 the returned object will result in an error.
6097 </note>
6098 </desc>
6099 </attribute>
6100
6101 <attribute name="mouse" type="IMouse" readonly="yes">
6102 <desc>
6103 Virtual mouse object.
6104 <note>
6105 If the machine is not running, any attempt to use
6106 the returned object will result in an error.
6107 </note>
6108 </desc>
6109 </attribute>
6110
6111 <attribute name="display" type="IDisplay" readonly="yes">
6112 <desc>Virtual display object.
6113 <note>
6114 If the machine is not running, any attempt to use
6115 the returned object will result in an error.
6116 </note>
6117 </desc>
6118 </attribute>
6119
6120 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6121 <desc>Debugging interface.</desc>
6122 </attribute>
6123
6124 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6125 <desc>
6126 Collection of USB devices currently attached to the virtual
6127 USB controller.
6128 <note>
6129 The collection is empty if the machine is not running.
6130 </note>
6131 </desc>
6132 </attribute>
6133
6134 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6135 <desc>
6136 List of USB devices currently attached to the remote VRDP client.
6137 Once a new device is physically attached to the remote host computer,
6138 it appears in this list and remains there until detached.
6139 </desc>
6140 </attribute>
6141
6142 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6143 <desc>
6144 Collection of shared folders for the current session. These folders
6145 are called transient shared folders because they are available to the
6146 guest OS running inside the associated virtual machine only for the
6147 duration of the session (as opposed to
6148 <link to="IMachine::sharedFolders"/> which represent permanent shared
6149 folders). When the session is closed (e.g. the machine is powered down),
6150 these folders are automatically discarded.
6151
6152 New shared folders are added to the collection using
6153 <link to="#createSharedFolder"/>. Existing shared folders can be
6154 removed using <link to="#removeSharedFolder"/>.
6155 </desc>
6156 </attribute>
6157
6158 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6159 <desc>
6160 Interface that provides information on Remote Display (VRDP) connection.
6161 </desc>
6162 </attribute>
6163
6164 <method name="powerUp">
6165 <desc>
6166 Starts the virtual machine execution using the current machine
6167 state (that is, its current execution state, current settings and
6168 current hard disks).
6169
6170 If the machine is powered off or aborted, the execution will
6171 start from the beginning (as if the real hardware were just
6172 powered on).
6173
6174 If the machine is in the <link to="MachineState_Saved"/> state,
6175 it will continue its execution the point where the state has
6176 been saved.
6177
6178 <note>
6179 Unless you are trying to write a new VirtualBox front-end that
6180 performs direct machine execution (like the VirtualBox or VBoxSDL
6181 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6182 session opened by <link to="IVirtualBox::openSession"/> and use this
6183 session only to change virtual machine settings. If you simply want to
6184 start virtual machine execution using one of the existing front-ends
6185 (for example the VirtualBox GUI or headless server), simply use
6186 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6187 power up the machine automatically for you.
6188 </note>
6189
6190 <see>#saveState</see>
6191 <result name="VBOX_E_INVALID_VM_STATE">
6192 Virtual machine already running.
6193 </result>
6194 <result name="VBOX_E_HOST_ERROR">
6195 Host interface does not exist or name not set.
6196 </result>
6197 <result name="VBOX_E_FILE_ERROR">
6198 Invalid saved state file.
6199 </result>
6200 </desc>
6201 <param name="progress" type="IProgress" dir="return">
6202 <desc>Progress object to track the operation completion.</desc>
6203 </param>
6204 </method>
6205
6206 <method name="powerUpPaused">
6207 <desc>
6208 Identical to powerUp except that the VM will enter the
6209 <link to="MachineState_Paused"/> state, instead of
6210 <link to="MachineState_Running"/>.
6211
6212 <see>#powerUp</see>
6213 <result name="VBOX_E_INVALID_VM_STATE">
6214 Virtual machine already running.
6215 </result>
6216 <result name="VBOX_E_HOST_ERROR">
6217 Host interface does not exist or name not set.
6218 </result>
6219 <result name="VBOX_E_FILE_ERROR">
6220 Invalid saved state file.
6221 </result>
6222 </desc>
6223 <param name="progress" type="IProgress" dir="return">
6224 <desc>Progress object to track the operation completion.</desc>
6225 </param>
6226 </method>
6227
6228 <method name="powerDown">
6229 <desc>
6230 Initiates the power down procedure to stop the virtual machine
6231 execution.
6232
6233 The completion of the power down procedure is tracked using the returned
6234 IProgress object. After the operation is complete, the machine will go
6235 to the PoweredOff state.
6236 <result name="VBOX_E_INVALID_VM_STATE">
6237 Virtual machine must be Running, Paused or Stuck to be powered down.
6238 </result>
6239 </desc>
6240 <param name="progress" type="IProgress" dir="return">
6241 <desc>Progress object to track the operation completion.</desc>
6242 </param>
6243 </method>
6244
6245 <method name="reset">
6246 <desc>Resets the virtual machine.
6247 <result name="VBOX_E_INVALID_VM_STATE">
6248 Virtual machine not in Running state.
6249 </result>
6250 <result name="VBOX_E_VM_ERROR">
6251 Virtual machine error in reset operation.
6252 </result>
6253 </desc>
6254 </method>
6255
6256 <method name="pause">
6257 <desc>Pauses the virtual machine execution.
6258 <result name="VBOX_E_INVALID_VM_STATE">
6259 Virtual machine not in Running state.
6260 </result>
6261 <result name="VBOX_E_VM_ERROR">
6262 Virtual machine error in suspend operation.
6263 </result>
6264 </desc>
6265 </method>
6266
6267 <method name="resume">
6268 <desc>Resumes the virtual machine execution.
6269 <result name="VBOX_E_INVALID_VM_STATE">
6270 Virtual machine not in Paused state.
6271 </result>
6272 <result name="VBOX_E_VM_ERROR">
6273 Virtual machine error in resume operation.
6274 </result>
6275 </desc>
6276 </method>
6277
6278 <method name="powerButton">
6279 <desc>Sends the ACPI power button event to the guest.
6280 <result name="VBOX_E_INVALID_VM_STATE">
6281 Virtual machine not in Running state.
6282 </result>
6283 <result name="VBOX_E_PDM_ERROR">
6284 Controlled power off failed.
6285 </result>
6286 </desc>
6287 </method>
6288
6289 <method name="sleepButton">
6290 <desc>Sends the ACPI sleep button event to the guest.
6291 <result name="VBOX_E_INVALID_VM_STATE">
6292 Virtual machine not in Running state.
6293 </result>
6294 <result name="VBOX_E_PDM_ERROR">
6295 Sending sleep button event failed.
6296 </result>
6297 </desc>
6298 </method>
6299
6300 <method name="getPowerButtonHandled">
6301 <desc>Checks if the last power button event was handled by guest.
6302 <result name="VBOX_E_PDM_ERROR">
6303 Checking if the event was handled by the guest OS failed.
6304 </result>
6305 </desc>
6306 <param name="handled" type="boolean" dir="return"/>
6307 </method>
6308
6309 <method name="getGuestEnteredACPIMode">
6310 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6311 G1 (sleeping). If this method returns @c false, the guest will
6312 most likely not respond to external ACPI events.
6313 <result name="VBOX_E_INVALID_VM_STATE">
6314 Virtual machine not in Running state.
6315 </result>
6316 </desc>
6317 <param name="entered" type="boolean" dir="return"/>
6318 </method>
6319
6320 <method name="saveState">
6321 <desc>
6322 Saves the current execution state of a running virtual machine
6323 and stops its execution.
6324
6325 After this operation completes, the machine will go to the
6326 Saved state. Next time it is powered up, this state will
6327 be restored and the machine will continue its execution from
6328 the place where it was saved.
6329
6330 This operation differs from taking a snapshot to the effect
6331 that it doesn't create new differencing media. Also, once
6332 the machine is powered up from the state saved using this method,
6333 the saved state is deleted, so it will be impossible to return
6334 to this state later.
6335
6336 <note>
6337 On success, this method implicitly calls
6338 <link to="IMachine::saveSettings"/> to save all current machine
6339 settings (including runtime changes to the DVD medium, etc.).
6340 Together with the impossibility to change any VM settings when it is
6341 in the Saved state, this guarantees adequate hardware
6342 configuration of the machine when it is restored from the saved
6343 state file.
6344 </note>
6345
6346 <note>
6347 The machine must be in the Running or Paused state, otherwise
6348 the operation will fail.
6349 </note>
6350 <result name="VBOX_E_INVALID_VM_STATE">
6351 Virtual machine state neither Running nor Paused.
6352 </result>
6353 <result name="VBOX_E_FILE_ERROR">
6354 Failed to create directory for saved state file.
6355 </result>
6356
6357 <see><link to="#takeSnapshot"/></see>
6358 </desc>
6359 <param name="progress" type="IProgress" dir="return">
6360 <desc>Progress object to track the operation completion.</desc>
6361 </param>
6362 </method>
6363
6364 <method name="adoptSavedState">
6365 <desc>
6366 Associates the given saved state file to the virtual machine.
6367
6368 On success, the machine will go to the Saved state. Next time it is
6369 powered up, it will be restored from the adopted saved state and
6370 continue execution from the place where the saved state file was
6371 created.
6372
6373 The specified saved state file path may be absolute or relative to the
6374 folder the VM normally saves the state to (usually,
6375 <link to="IMachine::snapshotFolder"/>).
6376
6377 <note>
6378 It's a caller's responsibility to make sure the given saved state
6379 file is compatible with the settings of this virtual machine that
6380 represent its virtual hardware (memory size, hard disk configuration
6381 etc.). If there is a mismatch, the behavior of the virtual machine
6382 is undefined.
6383 </note>
6384 <result name="VBOX_E_INVALID_VM_STATE">
6385 Virtual machine state neither PoweredOff nor Aborted.
6386 </result>
6387 </desc>
6388 <param name="savedStateFile" type="wstring" dir="in">
6389 <desc>Path to the saved state file to adopt.</desc>
6390 </param>
6391 </method>
6392
6393 <method name="forgetSavedState">
6394 <desc>
6395 Forgets the saved state of the virtual machine previously created
6396 by <link to="#saveState"/>. Next time the machine is powered up, a
6397 clean boot will occur. If @a remove is @c true the saved state file
6398 is deleted.
6399 <note>
6400 This operation is equivalent to resetting or powering off
6401 the machine without doing a proper shutdown in the guest OS.
6402 </note>
6403 <result name="VBOX_E_INVALID_VM_STATE">
6404 Virtual machine not in state Saved.
6405 </result>
6406 </desc>
6407 <param name="remove" type="boolean" dir="in">
6408 <desc>If @c true remove the saved state file.</desc>
6409 </param>
6410 </method>
6411
6412 <method name="getDeviceActivity">
6413 <desc>
6414 Gets the current activity type of a given device or device group.
6415 <result name="E_INVALIDARG">
6416 Invalid device type.
6417 </result>
6418 </desc>
6419 <param name="type" type="DeviceType" dir="in"/>
6420 <param name="activity" type="DeviceActivity" dir="return"/>
6421 </method>
6422
6423 <method name="attachUSBDevice">
6424 <desc>
6425 Attaches a host USB device with the given UUID to the
6426 USB controller of the virtual machine.
6427
6428 The device needs to be in one of the following states:
6429 <link to="USBDeviceState_Busy"/>,
6430 <link to="USBDeviceState_Available"/> or
6431 <link to="USBDeviceState_Held"/>,
6432 otherwise an error is immediately returned.
6433
6434 When the device state is
6435 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6436 be returned if the host computer refuses to release it for some reason.
6437
6438 <see>IUSBController::deviceFilters, USBDeviceState</see>
6439 <result name="VBOX_E_INVALID_VM_STATE">
6440 Virtual machine state neither Running nor Paused.
6441 </result>
6442 <result name="VBOX_E_PDM_ERROR">
6443 Virtual machine does not have a USB controller.
6444 </result>
6445 </desc>
6446 <param name="id" type="uuid" mod="string" dir="in">
6447 <desc>UUID of the host USB device to attach.</desc>
6448 </param>
6449 </method>
6450
6451 <method name="detachUSBDevice">
6452 <desc>
6453 Detaches an USB device with the given UUID from the USB controller
6454 of the virtual machine.
6455
6456 After this method succeeds, the VirtualBox server re-initiates
6457 all USB filters as if the device were just physically attached
6458 to the host, but filters of this machine are ignored to avoid
6459 a possible automatic re-attachment.
6460
6461 <see>IUSBController::deviceFilters, USBDeviceState</see>
6462
6463 <result name="VBOX_E_PDM_ERROR">
6464 Virtual machine does not have a USB controller.
6465 </result>
6466 <result name="E_INVALIDARG">
6467 USB device not attached to this virtual machine.
6468 </result>
6469 </desc>
6470 <param name="id" type="uuid" mod="string" dir="in">
6471 <desc>UUID of the USB device to detach.</desc>
6472 </param>
6473 <param name="device" type="IUSBDevice" dir="return">
6474 <desc>Detached USB device.</desc>
6475 </param>
6476 </method>
6477
6478 <method name="findUSBDeviceByAddress">
6479 <desc>
6480 Searches for a USB device with the given host address.
6481
6482 <result name="VBOX_E_OBJECT_NOT_FOUND">
6483 Given @c name does not correspond to any USB device.
6484 </result>
6485
6486 <see>IUSBDevice::address</see>
6487 </desc>
6488 <param name="name" type="wstring" dir="in">
6489 <desc>
6490 Address of the USB device (as assigned by the host) to
6491 search for.
6492 </desc>
6493 </param>
6494 <param name="device" type="IUSBDevice" dir="return">
6495 <desc>Found USB device object.</desc>
6496 </param>
6497 </method>
6498
6499 <method name="findUSBDeviceById">
6500 <desc>
6501 Searches for a USB device with the given UUID.
6502
6503 <result name="VBOX_E_OBJECT_NOT_FOUND">
6504 Given @c id does not correspond to any USB device.
6505 </result>
6506
6507 <see>IUSBDevice::id</see>
6508 </desc>
6509 <param name="id" type="uuid" mod="string" dir="in">
6510 <desc>UUID of the USB device to search for.</desc>
6511 </param>
6512 <param name="device" type="IUSBDevice" dir="return">
6513 <desc>Found USB device object.</desc>
6514 </param>
6515 </method>
6516
6517 <method name="createSharedFolder">
6518 <desc>
6519 Creates a transient new shared folder by associating the given logical
6520 name with the given host path, adds it to the collection of shared
6521 folders and starts sharing it. Refer to the description of
6522 <link to="ISharedFolder"/> to read more about logical names.
6523
6524 <result name="VBOX_E_INVALID_VM_STATE">
6525 Virtual machine in Saved state or currently changing state.
6526 </result>
6527 <result name="VBOX_E_FILE_ERROR">
6528 Shared folder already exists or not accessible.
6529 </result>
6530 </desc>
6531 <param name="name" type="wstring" dir="in">
6532 <desc>Unique logical name of the shared folder.</desc>
6533 </param>
6534 <param name="hostPath" type="wstring" dir="in">
6535 <desc>Full path to the shared folder in the host file system.</desc>
6536 </param>
6537 <param name="writable" type="boolean" dir="in">
6538 <desc>Whether the share is writable or readonly</desc>
6539 </param>
6540 </method>
6541
6542 <method name="removeSharedFolder">
6543 <desc>
6544 Removes a transient shared folder with the given name previously
6545 created by <link to="#createSharedFolder"/> from the collection of
6546 shared folders and stops sharing it.
6547 <result name="VBOX_E_INVALID_VM_STATE">
6548 Virtual machine in Saved state or currently changing state.
6549 </result>
6550 <result name="VBOX_E_FILE_ERROR">
6551 Shared folder does not exists.
6552 </result>
6553 </desc>
6554 <param name="name" type="wstring" dir="in">
6555 <desc>Logical name of the shared folder to remove.</desc>
6556 </param>
6557 </method>
6558
6559 <method name="takeSnapshot">
6560 <desc>
6561 Saves the current execution state
6562 and all settings of the machine and creates differencing images
6563 for all normal (non-independent) media.
6564 See <link to="ISnapshot" /> for an introduction to snapshots.
6565
6566 This method can be called for a PoweredOff, Saved (see
6567 <link to="#saveState"/>), Running or
6568 Paused virtual machine. When the machine is PoweredOff, an
6569 offline snapshot is created. When the machine is Running a live
6570 snapshot is created, and an online snapshot is is created when Paused.
6571
6572 The taken snapshot is always based on the
6573 <link to="IMachine::currentSnapshot">current snapshot</link>
6574 of the associated virtual machine and becomes a new current snapshot.
6575
6576 <note>
6577 This method implicitly calls <link to="IMachine::saveSettings"/> to
6578 save all current machine settings before taking an offline snapshot.
6579 </note>
6580
6581 <result name="VBOX_E_INVALID_VM_STATE">
6582 Virtual machine currently changing state.
6583 </result>
6584 </desc>
6585 <param name="name" type="wstring" dir="in">
6586 <desc>Short name for the snapshot.</desc>
6587 </param>
6588 <param name="description" type="wstring" dir="in">
6589 <desc>Optional description of the snapshot.</desc>
6590 </param>
6591 <param name="progress" type="IProgress" dir="return">
6592 <desc>Progress object to track the operation completion.</desc>
6593 </param>
6594 </method>
6595
6596 <method name="discardSnapshot">
6597 <desc>
6598 Starts discarding the specified snapshot asynchronously.
6599 See <link to="ISnapshot" /> for an introduction to snapshots.
6600
6601 The execution state
6602 and settings of the associated machine stored in the snapshot
6603 will be deleted. The contents of all differencing media of
6604 this snapshot will be merged with the contents of their
6605 dependent child media to keep the disks valid (in other
6606 words, all changes represented by media being discarded
6607 will be propagated to their child medium). After that, this
6608 snapshot's differencing medium will be deleted. The parent
6609 of this snapshot will become a new parent for all its child
6610 snapshots.
6611
6612 If the discarded snapshot is the current one, its parent
6613 snapshot will become a new current snapshot. The current machine
6614 state is not directly affected in this case, except that
6615 currently attached differencing media based on media
6616 of the discarded snapshot will be also merged as described
6617 above.
6618
6619 If the discarded snapshot is the first one (the root snapshot)
6620 and it has exactly one child snapshot, this child snapshot will
6621 become the first snapshot after discarding. If there are no
6622 children at all (i.e. the first snapshot is the only snapshot of
6623 the machine), both the current and the first snapshot of the
6624 machine will be set to @c null. In all other cases, the first
6625 snapshot cannot be discarded.
6626
6627 You cannot discard the snapshot if it
6628 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6629 media that have differencing media based on them. Snapshots of
6630 such kind can be discarded only when every normal medium has either
6631 no children at all or exactly one child. In the former case, the normal
6632 medium simply becomes unused (i.e. not attached to any VM). In the
6633 latter case, it receives all the changes stored in the child medium,
6634 and then it replaces the child medium in the configuration of the
6635 corresponding snapshot or machine.
6636
6637 Also, you cannot discard the snapshot if it stores media
6638 (of any type) having differencing child media that belong
6639 to other machines. Such snapshots can be only discarded after
6640 you discard all snapshots of other machines containing "foreign"
6641 child disks, or detach these "foreign" child disks from machines
6642 they are attached to.
6643
6644 One particular example of the snapshot storing normal media
6645 is the first snapshot of a virtual machine that had normal media
6646 attached when taking the snapshot. Be careful when
6647 discarding such snapshots because this implicitly commits
6648 changes (made since the snapshot being discarded has been taken)
6649 to normal media (as described above), which may be not what
6650 you want.
6651
6652 The virtual machine is put to
6653 the <link to="MachineState_Discarding">Discarding</link> state until
6654 the discard operation is completed.
6655
6656 <note>
6657 The machine must not be running, otherwise the operation
6658 will fail.
6659 </note>
6660
6661 <note>
6662 Child media of all normal media of the discarded snapshot
6663 must be accessible (see <link to="IMedium::state"/>) for this
6664 operation to succeed. In particular, this means that all virtual
6665 machines, whose media are directly or indirectly based on the
6666 media of discarded snapshot, must be powered off.
6667 </note>
6668 <note>
6669 Merging medium contents can be very time and disk space
6670 consuming, if these disks are big in size and have many
6671 children. However, if the snapshot being discarded is the last
6672 (head) snapshot on the branch, the operation will be rather
6673 quick.
6674 </note>
6675 <note>
6676 Note that discarding the current snapshot
6677 will implicitly call <link to="IMachine::saveSettings"/> to
6678 make all current machine settings permanent.
6679 </note>
6680 <result name="VBOX_E_INVALID_VM_STATE">
6681 Virtual machine is running.
6682 </result>
6683 </desc>
6684 <param name="id" type="uuid" mod="string" dir="in">
6685 <desc>UUID of the snapshot to discard.</desc>
6686 </param>
6687 <param name="progress" type="IProgress" dir="return">
6688 <desc>Progress object to track the operation completion.</desc>
6689 </param>
6690 </method>
6691
6692 <method name="discardCurrentState">
6693 <desc>
6694 Starts resetting the machine's current state to the state contained
6695 in the current snapshot, asynchronously. All current settings of the
6696 machine will be reset and changes stored in differencing media
6697 will be lost.
6698 See <link to="ISnapshot" /> for an introduction to snapshots.
6699
6700 After this operation is successfully completed, new empty differencing
6701 media are created for all normal media of the machine.
6702
6703 If the current snapshot of the machine is an online snapshot, the
6704 machine will go to the <link to="MachineState_Saved"> saved
6705 state</link>, so that the next time it is powered on, the execution
6706 state will be restored from the current snapshot.
6707
6708 <note>
6709 The machine must not be running, otherwise the operation will fail.
6710 </note>
6711
6712 <note>
6713 If the machine state is <link to="MachineState_Saved">Saved</link>
6714 prior to this operation, the saved state file will be implicitly
6715 discarded (as if <link to="IConsole::forgetSavedState"/> were
6716 called).
6717 </note>
6718
6719 <result name="VBOX_E_INVALID_VM_STATE">
6720 Virtual machine is running.
6721 </result>
6722 </desc>
6723 <param name="progress" type="IProgress" dir="return">
6724 <desc>Progress object to track the operation completion.</desc>
6725 </param>
6726 </method>
6727
6728 <method name="discardCurrentSnapshotAndState">
6729 <desc>
6730
6731 This method is equivalent to
6732 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6733 (currentSnapshot.id(), progress) followed by
6734 <link to="IConsole::discardCurrentState"/>.
6735
6736 As a result, the machine will be fully restored from the
6737 snapshot preceding the current snapshot, while both the current
6738 snapshot and the current machine state will be discarded.
6739
6740 If the current snapshot is the first snapshot of the machine (i.e. it
6741 has the only snapshot), the current machine state will be
6742 discarded <b>before</b> discarding the snapshot. In other words, the
6743 machine will be restored from its last snapshot, before discarding
6744 it. This differs from performing a single
6745 <link to="IConsole::discardSnapshot"/> call (note that no
6746 <link to="IConsole::discardCurrentState"/> will be possible after it)
6747 to the effect that the latter will preserve the current state instead of
6748 discarding it.
6749
6750 Unless explicitly mentioned otherwise, all remarks and
6751 limitations of the above two methods also apply to this method.
6752
6753 <note>
6754 The machine must not be running, otherwise the operation
6755 will fail.
6756 </note>
6757
6758 <note>
6759 If the machine state is <link to="MachineState_Saved">Saved</link>
6760 prior to this operation, the saved state file will be implicitly
6761 discarded (as if <link to="#forgetSavedState"/> were
6762 called).
6763 </note>
6764
6765 <note>
6766 This method is more efficient than calling both of the above
6767 methods separately: it requires less IPC calls and provides
6768 a single progress object.
6769 </note>
6770
6771 <result name="VBOX_E_INVALID_VM_STATE">
6772 Virtual machine is running.
6773 </result>
6774 </desc>
6775 <param name="progress" type="IProgress" dir="return">
6776 <desc>Progress object to track the operation completion.</desc>
6777 </param>
6778 </method>
6779
6780 <method name="migrate">
6781 <desc>
6782 Migrate the VM to a different host machine.
6783
6784 TODO explain the details.
6785
6786 <result name="VBOX_E_INVALID_VM_STATE">
6787 Virtual machine not running or paused.
6788 </result>
6789 </desc>
6790 <param name="hostname" type="wstring" dir="in">
6791 <desc>The name or IP of the host to migrate to.</desc>
6792 </param>
6793 <param name="tcpport" type="unsigned long" dir="in">
6794 <desc>The TCP port to connect to (1..65535).</desc>
6795 </param>
6796 <param name="password" type="wstring" dir="in">
6797 <desc>The password.</desc>
6798 </param>
6799 <param name="progress" type="IProgress" dir="return">
6800 <desc>Progress object to track the operation completion.</desc>
6801 </param>
6802 </method>
6803
6804 <method name="registerCallback">
6805 <desc>
6806 Registers a new console callback on this instance. The methods of the
6807 callback interface will be called by this instance when the appropriate
6808 event occurs.
6809 </desc>
6810 <param name="callback" type="IConsoleCallback" dir="in"/>
6811 </method>
6812
6813 <method name="unregisterCallback">
6814 <desc>
6815 Unregisters the console callback previously registered using
6816 <link to="#registerCallback"/>.
6817 <result name="E_INVALIDARG">
6818 Given @a callback handler is not registered.
6819 </result>
6820 </desc>
6821 <param name="callback" type="IConsoleCallback" dir="in"/>
6822 </method>
6823 </interface>
6824
6825 <!--
6826 // IHost
6827 /////////////////////////////////////////////////////////////////////////
6828 -->
6829
6830 <enum
6831 name="HostNetworkInterfaceMediumType"
6832 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6833 >
6834 <desc>
6835 Type of encapsulation. Ethernet encapsulation includes both wired and
6836 wireless Ethernet connections.
6837 <see>IHostNetworkInterface</see>
6838 </desc>
6839
6840 <const name="Unknown" value="0">
6841 <desc>
6842 The type of interface cannot be determined.
6843 </desc>
6844 </const>
6845 <const name="Ethernet" value="1">
6846 <desc>
6847 Ethernet frame encapsulation.
6848 </desc>
6849 </const>
6850 <const name="PPP" value="2">
6851 <desc>
6852 Point-to-point protocol encapsulation.
6853 </desc>
6854 </const>
6855 <const name="SLIP" value="3">
6856 <desc>
6857 Serial line IP encapsulation.
6858 </desc>
6859 </const>
6860 </enum>
6861
6862 <enum
6863 name="HostNetworkInterfaceStatus"
6864 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6865 >
6866 <desc>
6867 Current status of the interface.
6868 <see>IHostNetworkInterface</see>
6869 </desc>
6870
6871 <const name="Unknown" value="0">
6872 <desc>
6873 The state of interface cannot be determined.
6874 </desc>
6875 </const>
6876 <const name="Up" value="1">
6877 <desc>
6878 The interface is fully operational.
6879 </desc>
6880 </const>
6881 <const name="Down" value="2">
6882 <desc>
6883 The interface is not functioning.
6884 </desc>
6885 </const>
6886 </enum>
6887
6888 <enum
6889 name="HostNetworkInterfaceType"
6890 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6891 >
6892 <desc>
6893 Network interface type.
6894 </desc>
6895 <const name="Bridged" value="1"/>
6896 <const name="HostOnly" value="2"/>
6897 </enum>
6898
6899 <interface
6900 name="IHostNetworkInterface" extends="$unknown"
6901 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6902 wsmap="managed"
6903 >
6904 <desc>
6905 Represents one of host's network interfaces. IP V6 address and network
6906 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6907 separated by colons.
6908 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6909 </desc>
6910 <attribute name="name" type="wstring" readonly="yes">
6911 <desc>Returns the host network interface name.</desc>
6912 </attribute>
6913
6914 <attribute name="id" type="uuid" mod="string" readonly="yes">
6915 <desc>Returns the interface UUID.</desc>
6916 </attribute>
6917
6918 <attribute name="networkName" type="wstring" readonly="yes">
6919 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6920 </attribute>
6921
6922 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6923 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6924 </attribute>
6925
6926 <attribute name="IPAddress" type="wstring" readonly="yes">
6927 <desc>Returns the IP V4 address of the interface.</desc>
6928 </attribute>
6929
6930 <attribute name="networkMask" type="wstring" readonly="yes">
6931 <desc>Returns the network mask of the interface.</desc>
6932 </attribute>
6933
6934 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6935 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6936 </attribute>
6937
6938 <attribute name="IPV6Address" type="wstring" readonly="yes">
6939 <desc>Returns the IP V6 address of the interface.</desc>
6940 </attribute>
6941
6942 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6943 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6944 </attribute>
6945
6946 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6947 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6948 </attribute>
6949
6950 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6951 <desc>Type of protocol encapsulation used.</desc>
6952 </attribute>
6953
6954 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6955 <desc>Status of the interface.</desc>
6956 </attribute>
6957
6958 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6959 <desc>specifies the host interface type.</desc>
6960 </attribute>
6961
6962 <method name="enableStaticIpConfig">
6963 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6964 <param name="IPAddress" type="wstring" dir="in">
6965 <desc>
6966 IP address.
6967 </desc>
6968 </param>
6969 <param name="networkMask" type="wstring" dir="in">
6970 <desc>
6971 network mask.
6972 </desc>
6973 </param>
6974 </method>
6975
6976 <method name="enableStaticIpConfigV6">
6977 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6978 <param name="IPV6Address" type="wstring" dir="in">
6979 <desc>
6980 IP address.
6981 </desc>
6982 </param>
6983 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6984 <desc>
6985 network mask.
6986 </desc>
6987 </param>
6988 </method>
6989
6990 <method name="enableDynamicIpConfig">
6991 <desc>enables the dynamic IP configuration.</desc>
6992 </method>
6993
6994 <method name="dhcpRediscover">
6995 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6996 </method>
6997
6998 </interface>
6999
7000 <interface
7001 name="IHost" extends="$unknown"
7002 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
7003 wsmap="managed"
7004 >
7005 <desc>
7006 The IHost interface represents the physical machine that this VirtualBox
7007 installation runs on.
7008
7009 An object implementing this interface is returned by the
7010 <link to="IVirtualBox::host" /> attribute. This interface contains
7011 read-only information about the host's physical hardware (such as what
7012 processors and disks are available, what the host operating system is,
7013 and so on) and also allows for manipulating some of the host's hardware,
7014 such as global USB device filters and host interface networking.
7015
7016 </desc>
7017 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7018 <desc>List of DVD drives available on the host.</desc>
7019 </attribute>
7020
7021 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7022 <desc>List of floppy drives available on the host.</desc>
7023 </attribute>
7024
7025 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7026 <desc>
7027 List of USB devices currently attached to the host.
7028 Once a new device is physically attached to the host computer,
7029 it appears in this list and remains there until detached.
7030
7031 <note>
7032 If USB functionality is not available in the given edition of
7033 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7034 </note>
7035 </desc>
7036 </attribute>
7037
7038 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7039 <desc>
7040 List of USB device filters in action.
7041 When a new device is physically attached to the host computer,
7042 filters from this list are applied to it (in order they are stored
7043 in the list). The first matched filter will determine the
7044 <link to="IHostUSBDeviceFilter::action">action</link>
7045 performed on the device.
7046
7047 Unless the device is ignored by these filters, filters of all
7048 currently running virtual machines
7049 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7050
7051 <note>
7052 If USB functionality is not available in the given edition of
7053 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7054 </note>
7055
7056 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7057 </desc>
7058 </attribute>
7059
7060 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7061 <desc>List of host network interfaces currently defined on the host.</desc>
7062 </attribute>
7063
7064 <attribute name="processorCount" type="unsigned long" readonly="yes">
7065 <desc>Number of (logical) CPUs installed in the host system.</desc>
7066 </attribute>
7067
7068 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7069 <desc>Number of (logical) CPUs online in the host system.</desc>
7070 </attribute>
7071
7072 <method name="getProcessorSpeed">
7073 <desc>Query the (approximate) maximum speed of a specified host CPU in
7074 Megahertz.
7075 </desc>
7076 <param name="cpuId" type="unsigned long" dir="in">
7077 <desc>
7078 Identifier of the CPU.
7079 </desc>
7080 </param>
7081 <param name="speed" type="unsigned long" dir="return">
7082 <desc>
7083 Speed value. 0 is returned if value is not known or @a cpuId is
7084 invalid.
7085 </desc>
7086 </param>
7087 </method>
7088
7089 <method name="getProcessorFeature">
7090 <desc>Query whether a CPU feature is supported or not.</desc>
7091 <param name="feature" type="ProcessorFeature" dir="in">
7092 <desc>
7093 CPU Feature identifier.
7094 </desc>
7095 </param>
7096 <param name="supported" type="boolean" dir="return">
7097 <desc>
7098 Feature is supported or not.
7099 </desc>
7100 </param>
7101 </method>
7102
7103 <method name="getProcessorDescription">
7104 <desc>Query the model string of a specified host CPU.
7105 </desc>
7106 <param name="cpuId" type="unsigned long" dir="in">
7107 <desc>
7108 Identifier of the CPU.
7109 </desc>
7110 </param>
7111 <param name="description" type="wstring" dir="return">
7112 <desc>
7113 Model string. An empty string is returned if value is not known or
7114 @a cpuId is invalid.
7115 </desc>
7116 </param>
7117 </method>
7118
7119 <attribute name="memorySize" type="unsigned long" readonly="yes">
7120 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7121 </attribute>
7122
7123 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7124 <desc>Available system memory in the host system.</desc>
7125 </attribute>
7126
7127 <attribute name="operatingSystem" type="wstring" readonly="yes">
7128 <desc>Name of the host system's operating system.</desc>
7129 </attribute>
7130
7131 <attribute name="OSVersion" type="wstring" readonly="yes">
7132 <desc>Host operating system's version string.</desc>
7133 </attribute>
7134
7135 <attribute name="UTCTime" type="long long" readonly="yes">
7136 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7137 </attribute>
7138
7139 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7140 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7141 </attribute>
7142
7143 <method name="createHostOnlyNetworkInterface">
7144 <desc>
7145 Creates a new adapter for Host Only Networking.
7146 <result name="E_INVALIDARG">
7147 Host network interface @a name already exists.
7148 </result>
7149 </desc>
7150 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7151 <desc>
7152 Created host interface object.
7153 </desc>
7154 </param>
7155 <param name="progress" type="IProgress" dir="return">
7156 <desc>
7157 Progress object to track the operation completion.
7158 </desc>
7159 </param>
7160 </method>
7161
7162 <method name="removeHostOnlyNetworkInterface">
7163 <desc>
7164 Removes the given Host Only Networking interface.
7165 <result name="VBOX_E_OBJECT_NOT_FOUND">
7166 No host network interface matching @a id found.
7167 </result>
7168 </desc>
7169 <param name="id" type="uuid" mod="string" dir="in">
7170 <desc>
7171 Adapter GUID.
7172 </desc>
7173 </param>
7174 <param name="progress" type="IProgress" dir="return">
7175 <desc>
7176 Progress object to track the operation completion.
7177 </desc>
7178 </param>
7179 </method>
7180
7181 <method name="createUSBDeviceFilter">
7182 <desc>
7183 Creates a new USB device filter. All attributes except
7184 the filter name are set to empty (any match),
7185 <i>active</i> is @c false (the filter is not active).
7186
7187 The created filter can be added to the list of filters using
7188 <link to="#insertUSBDeviceFilter"/>.
7189
7190 <see>#USBDeviceFilters</see>
7191 </desc>
7192 <param name="name" type="wstring" dir="in">
7193 <desc>
7194 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7195 for more info.
7196 </desc>
7197 </param>
7198 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7199 <desc>Created filter object.</desc>
7200 </param>
7201 </method>
7202
7203 <method name="insertUSBDeviceFilter">
7204 <desc>
7205 Inserts the given USB device to the specified position
7206 in the list of filters.
7207
7208 Positions are numbered starting from @c 0. If the specified
7209 position is equal to or greater than the number of elements in
7210 the list, the filter is added at the end of the collection.
7211
7212 <note>
7213 Duplicates are not allowed, so an attempt to insert a
7214 filter already in the list is an error.
7215 </note>
7216 <note>
7217 If USB functionality is not available in the given edition of
7218 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7219 </note>
7220
7221 <see>#USBDeviceFilters</see>
7222
7223 <result name="VBOX_E_INVALID_OBJECT_STATE">
7224 USB device filter is not created within this VirtualBox instance.
7225 </result>
7226 <result name="E_INVALIDARG">
7227 USB device filter already in list.
7228 </result>
7229
7230 </desc>
7231 <param name="position" type="unsigned long" dir="in">
7232 <desc>Position to insert the filter to.</desc>
7233 </param>
7234 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7235 <desc>USB device filter to insert.</desc>
7236 </param>
7237 </method>
7238
7239 <method name="removeUSBDeviceFilter">
7240 <desc>
7241 Removes a USB device filter from the specified position in the
7242 list of filters.
7243
7244 Positions are numbered starting from @c 0. Specifying a
7245 position equal to or greater than the number of elements in
7246 the list will produce an error.
7247
7248 <note>
7249 If USB functionality is not available in the given edition of
7250 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7251 </note>
7252
7253 <see>#USBDeviceFilters</see>
7254
7255 <result name="E_INVALIDARG">
7256 USB device filter list empty or invalid @a position.
7257 </result>
7258
7259 </desc>
7260 <param name="position" type="unsigned long" dir="in">
7261 <desc>Position to remove the filter from.</desc>
7262 </param>
7263 </method>
7264
7265 <method name="findHostDVDDrive">
7266 <desc>
7267 Searches for a host DVD drive with the given @c name.
7268
7269 <result name="VBOX_E_OBJECT_NOT_FOUND">
7270 Given @c name does not correspond to any host drive.
7271 </result>
7272
7273 </desc>
7274 <param name="name" type="wstring" dir="in">
7275 <desc>Name of the host drive to search for</desc>
7276 </param>
7277 <param name="drive" type="IMedium" dir="return">
7278 <desc>Found host drive object</desc>
7279 </param>
7280 </method>
7281
7282 <method name="findHostFloppyDrive">
7283 <desc>
7284 Searches for a host floppy drive with the given @c name.
7285
7286 <result name="VBOX_E_OBJECT_NOT_FOUND">
7287 Given @c name does not correspond to any host floppy drive.
7288 </result>
7289
7290 </desc>
7291 <param name="name" type="wstring" dir="in">
7292 <desc>Name of the host floppy drive to search for</desc>
7293 </param>
7294 <param name="drive" type="IMedium" dir="return">
7295 <desc>Found host floppy drive object</desc>
7296 </param>
7297 </method>
7298
7299 <method name="findHostNetworkInterfaceByName">
7300 <desc>
7301 Searches through all host network interfaces for an interface with
7302 the given @c name.
7303 <note>
7304 The method returns an error if the given @c name does not
7305 correspond to any host network interface.
7306 </note>
7307 </desc>
7308 <param name="name" type="wstring" dir="in">
7309 <desc>Name of the host network interface to search for.</desc>
7310 </param>
7311 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7312 <desc>Found host network interface object.</desc>
7313 </param>
7314 </method>
7315 <method name="findHostNetworkInterfaceById">
7316 <desc>
7317 Searches through all host network interfaces for an interface with
7318 the given GUID.
7319 <note>
7320 The method returns an error if the given GUID does not
7321 correspond to any host network interface.
7322 </note>
7323 </desc>
7324 <param name="id" type="uuid" mod="string" dir="in">
7325 <desc>GUID of the host network interface to search for.</desc>
7326 </param>
7327 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7328 <desc>Found host network interface object.</desc>
7329 </param>
7330 </method>
7331 <method name="findHostNetworkInterfacesOfType">
7332 <desc>
7333 Searches through all host network interfaces and returns a list of interfaces of the specified type
7334 </desc>
7335 <param name="type" type="HostNetworkInterfaceType" dir="in">
7336 <desc>type of the host network interfaces to search for.</desc>
7337 </param>
7338 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7339 <desc>Found host network interface objects.</desc>
7340 </param>
7341 </method>
7342
7343 <method name="findUSBDeviceById">
7344 <desc>
7345 Searches for a USB device with the given UUID.
7346
7347 <result name="VBOX_E_OBJECT_NOT_FOUND">
7348 Given @c id does not correspond to any USB device.
7349 </result>
7350
7351 <see>IHostUSBDevice::id</see>
7352 </desc>
7353 <param name="id" type="uuid" mod="string" dir="in">
7354 <desc>UUID of the USB device to search for.</desc>
7355 </param>
7356 <param name="device" type="IHostUSBDevice" dir="return">
7357 <desc>Found USB device object.</desc>
7358 </param>
7359 </method>
7360
7361 <method name="findUSBDeviceByAddress">
7362 <desc>
7363 Searches for a USB device with the given host address.
7364
7365 <result name="VBOX_E_OBJECT_NOT_FOUND">
7366 Given @c name does not correspond to any USB device.
7367 </result>
7368
7369 <see>IHostUSBDevice::address</see>
7370 </desc>
7371 <param name="name" type="wstring" dir="in">
7372 <desc>
7373 Address of the USB device (as assigned by the host) to
7374 search for.
7375 </desc>
7376 </param>
7377 <param name="device" type="IHostUSBDevice" dir="return">
7378 <desc>Found USB device object.</desc>
7379 </param>
7380 </method>
7381
7382 </interface>
7383
7384 <!--
7385 // ISystemProperties
7386 /////////////////////////////////////////////////////////////////////////
7387 -->
7388
7389 <interface
7390 name="ISystemProperties"
7391 extends="$unknown"
7392 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7393 wsmap="managed"
7394 >
7395 <desc>
7396 The ISystemProperties interface represents global properties of the given
7397 VirtualBox installation.
7398
7399 These properties define limits and default values for various attributes
7400 and parameters. Most of the properties are read-only, but some can be
7401 changed by a user.
7402 </desc>
7403
7404 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7405 <desc>Minimum guest system memory in Megabytes.</desc>
7406 </attribute>
7407
7408 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7409 <desc>Maximum guest system memory in Megabytes.</desc>
7410 </attribute>
7411
7412 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7413 <desc>Minimum guest video memory in Megabytes.</desc>
7414 </attribute>
7415
7416 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7417 <desc>Maximum guest video memory in Megabytes.</desc>
7418 </attribute>
7419
7420 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7421 <desc>Minimum CPU count.</desc>
7422 </attribute>
7423
7424 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7425 <desc>Maximum CPU count.</desc>
7426 </attribute>
7427
7428 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7429 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7430 </attribute>
7431
7432 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7433 <desc>
7434 Number of network adapters associated with every
7435 <link to="IMachine"/> instance.
7436 </desc>
7437 </attribute>
7438
7439 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7440 <desc>
7441 Number of serial ports associated with every
7442 <link to="IMachine"/> instance.
7443 </desc>
7444 </attribute>
7445
7446 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7447 <desc>
7448 Number of parallel ports associated with every
7449 <link to="IMachine"/> instance.
7450 </desc>
7451 </attribute>
7452
7453 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7454 <desc>
7455 Maximum device position in the boot order. This value corresponds
7456 to the total number of devices a machine can boot from, to make it
7457 possible to include all possible devices to the boot list.
7458 <see><link to="IMachine::setBootOrder"/></see>
7459 </desc>
7460 </attribute>
7461
7462 <attribute name="defaultMachineFolder" type="wstring">
7463 <desc>
7464 Full path to the default directory used to create new or open
7465 existing machines when a settings file name contains no
7466 path.
7467
7468 The initial value of this property is
7469 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7470 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7471
7472 <note>
7473 Setting this property to @c null or an empty string will restore the
7474 initial value.
7475 </note>
7476 <note>
7477 When settings this property, the specified path can be
7478 absolute (full path) or relative
7479 to the <link to="IVirtualBox::homeFolder">
7480 VirtualBox home directory</link>.
7481 When reading this property, a full path is
7482 always returned.
7483 </note>
7484 <note>
7485 The specified path may not exist, it will be created
7486 when necessary.
7487 </note>
7488
7489 <see>
7490 <link to="IVirtualBox::createMachine"/>,
7491 <link to="IVirtualBox::openMachine"/>
7492 </see>
7493 </desc>
7494 </attribute>
7495
7496 <attribute name="defaultHardDiskFolder" type="wstring">
7497 <desc>
7498 Full path to the default directory used to create new or open existing
7499 virtual disks.
7500
7501 This path is used when the storage unit of a hard disk is a regular file
7502 in the host's file system and only a file name that contains no path is
7503 given.
7504
7505 The initial value of this property is
7506 <tt>&lt;</tt>
7507 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7508 <tt>&gt;/HardDisks</tt>.
7509
7510 <note>
7511 Setting this property to @c null or empty string will restore the
7512 initial value.
7513 </note>
7514 <note>
7515 When settings this property, the specified path can be relative
7516 to the
7517 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7518 absolute. When reading this property, a full path is
7519 always returned.
7520 </note>
7521 <note>
7522 The specified path may not exist, it will be created
7523 when necessary.
7524 </note>
7525
7526 <see>
7527 IMedium,
7528 <link to="IVirtualBox::createHardDisk"/>,
7529 <link to="IVirtualBox::openHardDisk"/>,
7530 <link to="IMedium::location"/>
7531 </see>
7532 </desc>
7533 </attribute>
7534
7535 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7536 <desc>
7537 List of all medium storage formats supported by this VirtualBox
7538 installation.
7539
7540 Keep in mind that the medium format identifier
7541 (<link to="IMediumFormat::id"/>) used in other API calls like
7542 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7543 medium format is a case-insensitive string. This means that, for
7544 example, all of the following strings:
7545 <pre>
7546 "VDI"
7547 "vdi"
7548 "VdI"</pre>
7549 refer to the same medium format.
7550
7551 Note that the virtual medium framework is backend-based, therefore
7552 the list of supported formats depends on what backends are currently
7553 installed.
7554
7555 <see>
7556 <link to="IMediumFormat"/>,
7557 </see>
7558 </desc>
7559 </attribute>
7560
7561 <attribute name="defaultHardDiskFormat" type="wstring">
7562 <desc>
7563 Identifier of the default medium format used by VirtualBox.
7564
7565 The medium format set by this attribute is used by VirtualBox
7566 when the medium format was not specified explicitly. One example is
7567 <link to="IVirtualBox::createHardDisk"/> with the empty
7568 format argument. A more complex example is implicit creation of
7569 differencing media when taking a snapshot of a virtual machine:
7570 this operation will try to use a format of the parent medium first
7571 and if this format does not support differencing media the default
7572 format specified by this argument will be used.
7573
7574 The list of supported medium formats may be obtained by the
7575 <link to="#mediaFormats"/> call. Note that the default medium
7576 format must have a capability to create differencing media;
7577 otherwise operations that create media implicitly may fail
7578 unexpectedly.
7579
7580 The initial value of this property is <tt>"VDI"</tt> in the current
7581 version of the VirtualBox product, but may change in the future.
7582
7583 <note>
7584 Setting this property to @c null or empty string will restore the
7585 initial value.
7586 </note>
7587
7588 <see>
7589 <link to="#mediaFormats"/>,
7590 <link to="IMediumFormat::id"/>,
7591 <link to="IVirtualBox::createHardDisk"/>
7592 </see>
7593 </desc>
7594 </attribute>
7595
7596 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7597 <desc>
7598 Library that provides authentication for VRDP clients. The library
7599 is used if a virtual machine's authentication type is set to "external"
7600 in the VM RemoteDisplay configuration.
7601
7602 The system library extension (".DLL" or ".so") must be omitted.
7603 A full path can be specified; if not, then the library must reside on the
7604 system's default library path.
7605
7606 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7607 of that name in one of the default VirtualBox library directories.
7608
7609 For details about VirtualBox authentication libraries and how to implement
7610 them, please refer to the VirtualBox manual.
7611
7612 <note>
7613 Setting this property to @c null or empty string will restore the
7614 initial value.
7615 </note>
7616 </desc>
7617 </attribute>
7618
7619 <attribute name="webServiceAuthLibrary" type="wstring">
7620 <desc>
7621 Library that provides authentication for webservice clients. The library
7622 is used if a virtual machine's authentication type is set to "external"
7623 in the VM RemoteDisplay configuration and will be called from
7624 within the <link to="IWebsessionManager::logon" /> implementation.
7625
7626 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7627 there is no per-VM setting for this, as the webservice is a global
7628 resource (if it is running). Only for this setting (for the webservice),
7629 setting this value to a literal <tt>"null"</tt> string disables authentication,
7630 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7631 no matter what user name and password are supplied.
7632
7633 The initial value of this property is <tt>"VRDPAuth"</tt>,
7634 meaning that the webservice will use the same authentication
7635 library that is used by default for VBoxVRDP (again, see
7636 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7637 The format and calling convention of authentication libraries
7638 is the same for the webservice as it is for VBoxVRDP.
7639
7640 <note>
7641 Setting this property to @c null or empty string will restore the
7642 initial value.
7643 </note>
7644 </desc>
7645 </attribute>
7646
7647 <attribute name="LogHistoryCount" type="unsigned long">
7648 <desc>
7649 This value specifies how many old release log files are kept.
7650 </desc>
7651 </attribute>
7652
7653 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7654 <desc>This value hold the default audio driver for the current
7655 system.</desc>
7656 </attribute>
7657
7658 <method name="getMaxDevicesPerPortForStorageBus">
7659 <desc>Returns the maximum number of devices which can be attached to a port
7660 for the given storage bus.</desc>
7661
7662 <param name="bus" type="StorageBus" dir="in">
7663 <desc>The storage bus type to get the value for.</desc>
7664 </param>
7665
7666 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7667 <desc>The maximum number of devices which can eb attached to the port for the given
7668 storage bus.</desc>
7669 </param>
7670 </method>
7671
7672 <method name="getMinPortCountForStorageBus">
7673 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7674
7675 <param name="bus" type="StorageBus" dir="in">
7676 <desc>The storage bus type to get the value for.</desc>
7677 </param>
7678
7679 <param name="minPortCount" type="unsigned long" dir="return">
7680 <desc>The minimum number of ports for the given storage bus.</desc>
7681 </param>
7682 </method>
7683
7684 <method name="getMaxPortCountForStorageBus">
7685 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7686
7687 <param name="bus" type="StorageBus" dir="in">
7688 <desc>The storage bus type to get the value for.</desc>
7689 </param>
7690
7691 <param name="maxPortCount" type="unsigned long" dir="return">
7692 <desc>The maximum number of ports for the given storage bus.</desc>
7693 </param>
7694 </method>
7695
7696 <method name="getMaxInstancesOfStorageBus">
7697 <desc>Returns the maximum number of storage bus instances which
7698 can be configured for each VM. This corresponds to the number of
7699 storage controllers one can have.</desc>
7700
7701 <param name="bus" type="StorageBus" dir="in">
7702 <desc>The storage bus type to get the value for.</desc>
7703 </param>
7704
7705 <param name="maxInstances" type="unsigned long" dir="return">
7706 <desc>The maximum number of instances for the given storage bus.</desc>
7707 </param>
7708 </method>
7709 </interface>
7710
7711 <!--
7712 // IGuest
7713 /////////////////////////////////////////////////////////////////////////
7714 -->
7715
7716 <interface
7717 name="IGuestOSType" extends="$unknown"
7718 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7719 wsmap="struct"
7720 >
7721 <desc>
7722 </desc>
7723
7724 <attribute name="familyId" type="wstring" readonly="yes">
7725 <desc>Guest OS family identifier string.</desc>
7726 </attribute>
7727
7728 <attribute name="familyDescription" type="wstring" readonly="yes">
7729 <desc>Human readable description of the guest OS family.</desc>
7730 </attribute>
7731
7732 <attribute name="id" type="wstring" readonly="yes">
7733 <desc>Guest OS identifier string.</desc>
7734 </attribute>
7735
7736 <attribute name="description" type="wstring" readonly="yes">
7737 <desc>Human readable description of the guest OS.</desc>
7738 </attribute>
7739
7740 <attribute name="is64Bit" type="boolean" readonly="yes">
7741 <desc>Returns @c true if the given OS is 64-bit</desc>
7742 </attribute>
7743
7744 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7745 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7746 </attribute>
7747
7748 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7749 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7750 </attribute>
7751
7752 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7753 <desc>Recommended RAM size in Megabytes.</desc>
7754 </attribute>
7755
7756 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7757 <desc>Recommended video RAM size in Megabytes.</desc>
7758 </attribute>
7759
7760 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7761 <desc>Recommended hard disk size in Megabytes.</desc>
7762 </attribute>
7763
7764 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7765 <desc>Returns recommended network adapter for this OS type.</desc>
7766 </attribute>
7767 </interface>
7768
7769 <interface
7770 name="IGuest" extends="$unknown"
7771 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7772 wsmap="managed"
7773 >
7774 <desc>
7775 The IGuest interface represents information about the operating system
7776 running inside the virtual machine. Used in
7777 <link to="IConsole::guest"/>.
7778
7779 IGuest provides information about the guest operating system, whether
7780 Guest Additions are installed and other OS-specific virtual machine
7781 properties.
7782 </desc>
7783
7784 <attribute name="OSTypeId" type="wstring" readonly="yes">
7785 <desc>
7786 Identifier of the Guest OS type as reported by the Guest
7787 Additions.
7788 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7789 an IGuestOSType object representing details about the given
7790 Guest OS type.
7791 <note>
7792 If Guest Additions are not installed, this value will be
7793 the same as <link to="IMachine::OSTypeId"/>.
7794 </note>
7795 </desc>
7796 </attribute>
7797
7798 <attribute name="additionsActive" type="boolean" readonly="yes">
7799 <desc>
7800 Flag whether the Guest Additions are installed and active
7801 in which case their version will be returned by the
7802 <link to="#additionsVersion"/> property.
7803 </desc>
7804 </attribute>
7805
7806 <attribute name="additionsVersion" type="wstring" readonly="yes">
7807 <desc>
7808 Version of the Guest Additions (3 decimal numbers separated
7809 by dots) or empty when the Additions are not installed. The
7810 Additions may also report a version but yet not be active as
7811 the version might be refused by VirtualBox (incompatible) or
7812 other failures occurred.
7813 </desc>
7814 </attribute>
7815
7816 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7817 <desc>
7818 Flag whether seamless guest display rendering (seamless desktop
7819 integration) is supported.
7820 </desc>
7821 </attribute>
7822
7823 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7824 <desc>
7825 Flag whether the guest is in graphics mode. If it is not, then
7826 seamless rendering will not work, resize hints are not immediately
7827 acted on and guest display resizes are probably not initiated by
7828 the guest additions.
7829 </desc>
7830 </attribute>
7831
7832 <attribute name="memoryBalloonSize" type="unsigned long">
7833 <desc>Guest system memory balloon size in megabytes.</desc>
7834 </attribute>
7835
7836 <attribute name="statisticsUpdateInterval" type="unsigned long">
7837 <desc>Interval to update guest statistics in seconds.</desc>
7838 </attribute>
7839
7840 <method name="setCredentials">
7841 <desc>
7842 Store login credentials that can be queried by guest operating
7843 systems with Additions installed. The credentials are transient
7844 to the session and the guest may also choose to erase them. Note
7845 that the caller cannot determine whether the guest operating system
7846 has queried or made use of the credentials.
7847
7848 <result name="VBOX_E_VM_ERROR">
7849 VMM device is not available.
7850 </result>
7851
7852 </desc>
7853 <param name="userName" type="wstring" dir="in">
7854 <desc>User name string, can be empty</desc>
7855 </param>
7856 <param name="password" type="wstring" dir="in">
7857 <desc>Password string, can be empty</desc>
7858 </param>
7859 <param name="domain" type="wstring" dir="in">
7860 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7861 </param>
7862 <param name="allowInteractiveLogon" type="boolean" dir="in">
7863 <desc>
7864 Flag whether the guest should alternatively allow the user to
7865 interactively specify different credentials. This flag might
7866 not be supported by all versions of the Additions.
7867 </desc>
7868 </param>
7869 </method>
7870
7871 <method name="getStatistic">
7872 <desc>
7873 Query specified guest statistics as reported by the VirtualBox Additions.
7874 </desc>
7875 <param name="cpuId" type="unsigned long" dir="in">
7876 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7877 </param>
7878 <param name="statistic" type="GuestStatisticType" dir="in">
7879 <desc>Statistic type.</desc>
7880 </param>
7881 <param name="statVal" type="unsigned long" dir="return">
7882 <desc>Statistics value</desc>
7883 </param>
7884 </method>
7885
7886 </interface>
7887
7888
7889 <!--
7890 // IProgress
7891 /////////////////////////////////////////////////////////////////////////
7892 -->
7893
7894 <interface
7895 name="IProgress" extends="$unknown"
7896 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7897 wsmap="managed"
7898 >
7899 <desc>
7900 The IProgress interface is used to track and control
7901 asynchronous tasks within VirtualBox.
7902
7903 An instance of this is returned every time VirtualBox starts
7904 an asynchronous task (in other words, a separate thread) which
7905 continues to run after a method call returns. For example,
7906 <link to="IConsole::saveState" />, which saves the state of
7907 a running virtual machine, can take a long time to complete.
7908 To be able to display a progress bar, a user interface such as
7909 the VirtualBox graphical user interface can use the IProgress
7910 object returned by that method.
7911
7912 Note that IProgress is a "read-only" interface in the sense
7913 that only the VirtualBox internals behind the Main API can
7914 create and manipulate progress objects, whereas client code
7915 can only use the IProgress object to monitor a task's
7916 progress and, if <link to="#cancelable" /> is @c true,
7917 cancel the task by calling <link to="#cancel" />.
7918
7919 A task represented by IProgress consists of either one or
7920 several sub-operations that run sequentially, one by one (see
7921 <link to="#operation" /> and <link to="#operationCount" />).
7922 Every operation is identified by a number (starting from 0)
7923 and has a separate description.
7924
7925 You can find the individual percentage of completion of the current
7926 operation in <link to="#operationPercent" /> and the
7927 percentage of completion of the task as a whole
7928 in <link to="#percent" />.
7929
7930 Similarly, you can wait for the completion of a particular
7931 operation via <link to="#waitForOperationCompletion" /> or
7932 for the completion of the whole task via
7933 <link to="#waitForCompletion" />.
7934 </desc>
7935
7936 <attribute name="id" type="uuid" mod="string" readonly="yes">
7937 <desc>ID of the task.</desc>
7938 </attribute>
7939
7940 <attribute name="description" type="wstring" readonly="yes">
7941 <desc>Description of the task.</desc>
7942 </attribute>
7943
7944 <attribute name="initiator" type="$unknown" readonly="yes">
7945 <desc>Initiator of the task.</desc>
7946 </attribute>
7947
7948 <attribute name="cancelable" type="boolean" readonly="yes">
7949 <desc>Whether the task can be interrupted.</desc>
7950 </attribute>
7951
7952 <attribute name="percent" type="unsigned long" readonly="yes">
7953 <desc>
7954 Current progress value of the task as a whole, in percent.
7955 This value depends on how many operations are already complete.
7956 Returns 100 if <link to="#completed" /> is @c true.
7957 </desc>
7958 </attribute>
7959
7960 <attribute name="timeRemaining" type="long" readonly="yes">
7961 <desc>
7962 Estimated remaining time until the task completes, in
7963 seconds. Returns 0 once the task has completed; returns -1
7964 if the remaining time cannot be computed, in particular if
7965 the current progress is 0.
7966
7967 Even if a value is returned, the estimate will be unreliable
7968 for low progress values. It will become more reliable as the
7969 task progresses; it is not recommended to display an ETA
7970 before at least 20% of a task have completed.
7971 </desc>
7972 </attribute>
7973
7974 <attribute name="completed" type="boolean" readonly="yes">
7975 <desc>Whether the task has been completed.</desc>
7976 </attribute>
7977
7978 <attribute name="canceled" type="boolean" readonly="yes">
7979 <desc>Whether the task has been canceled.</desc>
7980 </attribute>
7981
7982 <attribute name="resultCode" type="long" readonly="yes">
7983 <desc>
7984 Result code of the progress task.
7985 Valid only if <link to="#completed"/> is @c true.
7986 </desc>
7987 </attribute>
7988
7989 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7990 <desc>
7991 Extended information about the unsuccessful result of the
7992 progress operation. May be @c null if no extended information
7993 is available.
7994 Valid only if <link to="#completed"/> is @c true and
7995 <link to="#resultCode"/> indicates a failure.
7996 </desc>
7997 </attribute>
7998
7999 <attribute name="operationCount" type="unsigned long" readonly="yes">
8000 <desc>
8001 Number of sub-operations this task is divided into.
8002 Every task consists of at least one suboperation.
8003 </desc>
8004 </attribute>
8005
8006 <attribute name="operation" type="unsigned long" readonly="yes">
8007 <desc>Number of the sub-operation being currently executed.</desc>
8008 </attribute>
8009
8010 <attribute name="operationDescription" type="wstring" readonly="yes">
8011 <desc>
8012 Description of the sub-operation being currently executed.
8013 </desc>
8014 </attribute>
8015
8016 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8017 <desc>Progress value of the current sub-operation only, in percent.</desc>
8018 </attribute>
8019
8020 <method name="setCurrentOperationProgress">
8021 <desc>Internal method, not to be called externally.</desc>
8022 <param name="percent" type="unsigned long" dir="in" />
8023 </method>
8024 <method name="setNextOperation">
8025 <desc>Internal method, not to be called externally.</desc>
8026 <param name="nextOperationDescription" type="wstring" dir="in" />
8027 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8028 </method>
8029
8030 <method name="waitForCompletion">
8031 <desc>
8032 Waits until the task is done (including all sub-operations)
8033 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8034
8035 <result name="VBOX_E_IPRT_ERROR">
8036 Failed to wait for task completion.
8037 </result>
8038 </desc>
8039
8040 <param name="timeout" type="long" dir="in">
8041 <desc>
8042 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8043 </desc>
8044 </param>
8045 </method>
8046
8047 <method name="waitForOperationCompletion">
8048 <desc>
8049 Waits until the given operation is done with a given timeout in
8050 milliseconds; specify -1 for an indefinite wait.
8051
8052 <result name="VBOX_E_IPRT_ERROR">
8053 Failed to wait for operation completion.
8054 </result>
8055
8056 </desc>
8057 <param name="operation" type="unsigned long" dir="in">
8058 <desc>
8059 Number of the operation to wait for.
8060 Must be less than <link to="#operationCount"/>.
8061 </desc>
8062 </param>
8063 <param name="timeout" type="long" dir="in">
8064 <desc>
8065 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8066 </desc>
8067 </param>
8068 </method>
8069
8070 <method name="cancel">
8071 <desc>
8072 Cancels the task.
8073 <note>
8074 If <link to="#cancelable"/> is @c false, then this method will fail.
8075 </note>
8076
8077 <result name="VBOX_E_INVALID_OBJECT_STATE">
8078 Operation cannot be canceled.
8079 </result>
8080
8081 </desc>
8082 </method>
8083
8084 </interface>
8085
8086
8087 <!--
8088 // ISnapshot
8089 /////////////////////////////////////////////////////////////////////////
8090 -->
8091
8092 <interface
8093 name="ISnapshot" extends="$unknown"
8094 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8095 wsmap="managed"
8096 >
8097 <desc>
8098 The ISnapshot interface represents a snapshot of the virtual
8099 machine.
8100
8101 Together with the differencing media that are created
8102 when a snapshot is taken, a machine can be brought back to
8103 the exact state it was in when the snapshot was taken.
8104
8105 The ISnapshot interface has no methods, only attributes; snapshots
8106 are controlled through methods of the <link to="IConsole" /> interface
8107 which also manage the media associated with the snapshot.
8108 The following operations exist:
8109
8110 <ul>
8111 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8112 by creating new, empty differencing images for the machine's
8113 media and saving the VM settings and (if the VM is running)
8114 the current VM state in the snapshot.
8115
8116 The differencing images will then receive all data written to
8117 the machine's media, while their parent (base) images
8118 remain unmodified after the snapshot has been taken (see
8119 <link to="IMedium" /> for details about differencing images).
8120 This simplifies restoring a machine to the state of a snapshot:
8121 only the differencing images need to be deleted.
8122
8123 The current machine state is not changed by taking a snapshot.
8124 If the machine is running, it will resume execution after the
8125 snapshot has been taken.
8126 </li>
8127
8128 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8129 a previous snapshot. This resets the machine's state to that of
8130 the previous snapshot by deleting the differencing image of each
8131 of the machine's media and setting the machine's settings
8132 and state to the state that was saved in the snapshot (if any).
8133
8134 This destroys the machine's current state.
8135 </li>
8136
8137 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8138 without affecting the current machine state.
8139
8140 This does not change the machine, but instead frees the resources
8141 allocated when the snapshot was taken: the settings and machine state
8142 is deleted (if any), and the snapshot's differencing image for each
8143 of the machine's media gets merged with its parent image.
8144
8145 Neither the current machine state nor other snapshots are affected
8146 by this operation, except that parent disk images will be modified
8147 to contain the disk data associated with the snapshot being deleted.
8148 </li>
8149
8150 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8151 this completely reverts the virtual machine to the state it was in
8152 before the current snapshot has been taken. Effectively, this goes
8153 back to the state before the current snapshot, which might be
8154 an earlier snapshot.
8155
8156 The current state, as well as the current snapshot, are lost.
8157 </li>
8158 </ul>
8159
8160 Each snapshot contains the settings of the virtual machine (hardware
8161 configuration etc.). In addition, if the machine was running when the
8162 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8163 the current VM state is saved in the snapshot (similarly to what happens
8164 when a VM's state is saved). The snapshot is then said to
8165 be <i>online</i> because when restoring it, the VM will be running.
8166
8167 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8168 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8169
8170 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8171 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8172 it then contains a so-called "zero execution state", representing a
8173 machine that is powered off.
8174
8175 <h3>Snapshot branches and the "current" snapshot</h3>
8176
8177 Snapshots can be chained, whereby every next snapshot is based on the
8178 previous one. This chaining is related to medium branching
8179 (see the <link to="IMedium"/> description) in that every time
8180 a new snapshot is created, a new differencing medium is implicitly
8181 created for all normal media attached to the machine.
8182
8183 Each virtual machine has a "current snapshot", identified by
8184 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8185 to the last snapshot in the chain. In a future version of VirtualBox,
8186 it will be possible to reset a machine's current state to that of an
8187 earlier snapshot without discarding the current state so that it will be
8188 possible to create alternative snapshot paths in a snapshot tree.
8189
8190 In the current implementation, multiple snapshot branches within one
8191 virtual machine are not allowed. Every machine has a single branch,
8192 and <link to="IConsole::takeSnapshot"/> operation adds a new
8193 snapshot to the top of that branch.
8194 </desc>
8195
8196 <attribute name="id" type="uuid" mod="string" readonly="yes">
8197 <desc>UUID of the snapshot.</desc>
8198 </attribute>
8199
8200 <attribute name="name" type="wstring">
8201 <desc>Short name of the snapshot.</desc>
8202 </attribute>
8203
8204 <attribute name="description" type="wstring">
8205 <desc>Optional description of the snapshot.</desc>
8206 </attribute>
8207
8208 <attribute name="timeStamp" type="long long" readonly="yes">
8209 <desc>
8210 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8211 </desc>
8212 </attribute>
8213
8214 <attribute name="online" type="boolean" readonly="yes">
8215 <desc>
8216 @c true if this snapshot is an online snapshot and @c false otherwise.
8217
8218 When this attribute is @c true, the
8219 <link to="IMachine::stateFilePath"/> attribute of the
8220 <link to="#machine"/> object associated with this snapshot
8221 will point to the saved state file. Otherwise, it will be
8222 an empty string.
8223 </desc>
8224 </attribute>
8225
8226 <attribute name="machine" type="IMachine" readonly="yes">
8227 <desc>
8228 Virtual machine this snapshot is taken on. This object
8229 stores all settings the machine had when taking this snapshot.
8230 <note>
8231 The returned machine object is immutable, i.e. no
8232 any settings can be changed.
8233 </note>
8234 </desc>
8235 </attribute>
8236
8237 <attribute name="parent" type="ISnapshot" readonly="yes">
8238 <desc>
8239 Parent snapshot (a snapshot this one is based on), or
8240 @c null if the snapshot has no parent.
8241 </desc>
8242 </attribute>
8243
8244 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8245 <desc>
8246 Child snapshots (all snapshots having this one as a parent).
8247 <note>
8248 In the current implementation, there can be only one
8249 child snapshot, or no children at all, meaning this is the
8250 last (head) snapshot.
8251 </note>
8252 </desc>
8253 </attribute>
8254
8255 </interface>
8256
8257
8258 <!--
8259 // IMedium
8260 /////////////////////////////////////////////////////////////////////////
8261 -->
8262
8263 <enum
8264 name="MediumState"
8265 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8266 >
8267 <desc>
8268 Virtual medium state.
8269 <see>IMedium</see>
8270 </desc>
8271
8272 <const name="NotCreated" value="0">
8273 <desc>
8274 Associated medium storage does not exist (either was not created yet or
8275 was deleted).
8276 </desc>
8277 </const>
8278 <const name="Created" value="1">
8279 <desc>
8280 Associated storage exists and accessible.
8281 </desc>
8282 </const>
8283 <const name="LockedRead" value="2">
8284 <desc>
8285 Medium is locked for reading, no data modification is possible.
8286 </desc>
8287 </const>
8288 <const name="LockedWrite" value="3">
8289 <desc>
8290 Medium is locked for writing, no concurrent data reading or modification
8291 is possible.
8292 </desc>
8293 </const>
8294 <const name="Inaccessible" value="4">
8295 <desc>
8296 Associated medium storage is not accessible.
8297 </desc>
8298 </const>
8299 <const name="Creating" value="5">
8300 <desc>
8301 Associated medium storage is being created.
8302 </desc>
8303 </const>
8304 <const name="Deleting" value="6">
8305 <desc>
8306 Associated medium storage is being deleted.
8307 </desc>
8308 </const>
8309 </enum>
8310
8311 <enum
8312 name="MediumType"
8313 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8314 >
8315 <desc>
8316 Virtual medium type.
8317 <see>IMedium</see>
8318 </desc>
8319
8320 <const name="Normal" value="0">
8321 <desc>
8322 Normal medium (attached directly or indirectly, preserved
8323 when taking snapshots).
8324 </desc>
8325 </const>
8326 <const name="Immutable" value="1">
8327 <desc>
8328 Immutable medium (attached indirectly, changes are wiped out
8329 after powering off the virtual machine).
8330 </desc>
8331 </const>
8332 <const name="Writethrough" value="2">
8333 <desc>
8334 Write through medium (attached directly, ignored when
8335 taking snapshots).
8336 </desc>
8337 </const>
8338 </enum>
8339
8340 <enum
8341 name="MediumVariant"
8342 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8343 >
8344 <desc>
8345 Virtual medium image variant. More than one flag may be set.
8346 <see>IMedium</see>
8347 </desc>
8348
8349 <const name="Standard" value="0">
8350 <desc>
8351 No particular variant requested, results in using the backend default.
8352 </desc>
8353 </const>
8354 <const name="VmdkSplit2G" value="0x01">
8355 <desc>
8356 VMDK image split in chunks of less than 2GByte.
8357 </desc>
8358 </const>
8359 <const name="VmdkStreamOptimized" value="0x04">
8360 <desc>
8361 VMDK streamOptimized image. Special import/export format which is
8362 read-only/append-only.
8363 </desc>
8364 </const>
8365 <const name="VmdkESX" value="0x08">
8366 <desc>
8367 VMDK format variant used on ESX products.
8368 </desc>
8369 </const>
8370 <const name="Fixed" value="0x10000">
8371 <desc>
8372 Fixed image. Only allowed for base images.
8373 </desc>
8374 </const>
8375 <const name="Diff" value="0x20000">
8376 <desc>
8377 Fixed image. Only allowed for base images.
8378 </desc>
8379 </const>
8380 </enum>
8381
8382 <interface
8383 name="IMediumAttachment" extends="$unknown"
8384 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8385 wsmap="struct"
8386 >
8387 <desc>
8388 The IMediumAttachment interface represents the attachment
8389 of a storage medium to a virtual machine. Each machine contains
8390 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8391
8392 Each medium attachment specifies a storage controller as well as a port
8393 and device number. Fixed media (hard disks) will always also specify
8394 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8395 image or images that represent the virtual hard disk. For removeable media,
8396 the IMedia instance is optional; it can be NULL if no media is mounted (see
8397 <link to="IMachine::mountMedium" />).
8398 </desc>
8399
8400 <attribute name="medium" type="IMedium" readonly="yes">
8401 <desc>Medium object associated with this attachment; it
8402 can be NULL for removable devices.</desc>
8403 </attribute>
8404
8405 <attribute name="controller" type="wstring" readonly="yes">
8406 <desc>Name of the storage controller of this attachment; this
8407 refers to one of the controllers in <link to="IMachine::storageControllers" />
8408 by name.</desc>
8409 </attribute>
8410
8411 <attribute name="port" type="long" readonly="yes">
8412 <desc>Port number of this attachment.</desc>
8413 </attribute>
8414
8415 <attribute name="device" type="long" readonly="yes">
8416 <desc>Device slot number of this attachment.</desc>
8417 </attribute>
8418
8419 <attribute name="type" type="DeviceType" readonly="yes">
8420 <desc>Device type of this attachment.</desc>
8421 </attribute>
8422
8423 <attribute name="passthrough" type="boolean" readonly="no">
8424 <desc>Pass I/O requests through to a device on the host.</desc>
8425 </attribute>
8426
8427 </interface>
8428
8429 <interface
8430 name="IMedium" extends="$unknown"
8431 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8432 wsmap="managed"
8433 >
8434 <desc>
8435 The IMedium interface represents virtual storage for a machine's
8436 hard disks, CD/DVD or floppy drives. It will typically represent
8437 a disk image on the host, for example a VDI or VMDK file representing
8438 a virtual hard disk, or an ISO or RAW file representing virtual
8439 removable media, but can also point to a network location (e.g.
8440 for iSCSI targets).
8441
8442 Instances of IMedium are connected to virtual machines by way of
8443 medium attachments (see <link to="IMediumAttachment" />), which link
8444 the storage medium to a particular device slot of a storage controller
8445 of the virtual machine.
8446 In the VirtualBox API, virtual storage is therefore always represented
8447 by the following chain of object links:
8448
8449 <ul>
8450 <li><link to="IMachine::storageControllers"/> contains an array of
8451 storage controllers (IDE, SATA, SCSI or a floppy controller;
8452 these are instances of <link to="IStorageController"/>).</li>
8453 <li><link to="IMachine::mediumAttachments"/> contains an array of
8454 medium attachments (instances of <link to="IMediumAttachment"/>),
8455 each containing the name of a storage controller from the above
8456 array, a port/device specification, and an instance of
8457 IMedium representing the medium storage (image file). For removable
8458 media, the storage medium is optional; a medium attachment with no
8459 medium represents a CD/DVD or floppy drive with no medium inserted.
8460 By contrast, hard disk attachments will always have an IMedium
8461 object attached.</li>
8462 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8463 computer or a network resource) that holds actual data. The location of
8464 the storage unit is represented by the <link to="#location"/> attribute.
8465 The value of this attribute is medium type dependent.</li>
8466 </ul>
8467
8468 Existing media are opened using the following methods, depending on the
8469 media type:
8470 <ul>
8471 <li><link to="IVirtualBox::openHardDisk"/></li>
8472 <li><link to="IVirtualBox::openDVDImage"/></li>
8473 <li><link to="IVirtualBox::openFloppyImage"/></li>
8474 </ul>
8475
8476 New hard disk media can be created with the VirtualBox API using the
8477 <link to="IVirtualBox::createHardDisk"/> method.
8478
8479 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8480 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8481 type in a regular file.
8482
8483 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8484 drive; in that case the <link to="#id" /> attribute contains the UUID of
8485 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8486
8487 <h3>Known media</h3>
8488
8489 When an existing medium is opened for the first time, it is automatically
8490 remembered by the given VirtualBox installation or, in other words, becomes
8491 a <i>known medium</i>. Known media are stored in the media
8492 registry transparently maintained by VirtualBox and stored in settings
8493 files so that this registry is preserved when VirtualBox is not running.
8494
8495 Newly created virtual media are remembered only when the associated
8496 storage unit is actually created.
8497
8498 All known media can be enumerated using
8499 <link to="IVirtualBox::hardDisks"/>,
8500 <link to="IVirtualBox::DVDImages"/> and
8501 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8502 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8503 and similar methods or by location using
8504 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8505
8506 Only known media can be attached to virtual machines.
8507
8508 Removing known media from the media registry is performed when the given
8509 medium is closed using the <link to="#close"/> method or when its
8510 associated storage unit is deleted.
8511
8512 <h3>Accessibility checks</h3>
8513
8514 The given medium (with the created storage unit) is considered to be
8515 <i>accessible</i> when its storage unit can be read. In that case, the
8516 <link to="#state"/> attribute has a value of "Created".
8517 When the storage unit cannot be read (for example, because it is located on
8518 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8519 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8520 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8521 obtained by reading the <link to="#lastAccessError"/> attribute.
8522
8523 A new accessibility check is performed each time the <link to="#state"/>
8524 attribute is read. This check may take long time (several seconds or even
8525 minutes, depending on the storage unit location and format), and will
8526 block the calling thread until finished. For this reason, it is recommended
8527 to never read this attribute on the main UI thread to avoid making the UI
8528 unresponsive.
8529
8530 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8531 created for the first time), all known media are in the
8532 <link to="MediumState_Inaccessible"/> state but the value of the <link
8533 to="#lastAccessError"/> attribute is an empty string because no actual
8534 accessibility check is made on startup. This is done to make the
8535 VirtualBox object ready for serving requests as
8536 fast as possible and let the end-user application decide if it needs to
8537 check media accessibility right away or not.
8538
8539 <h3>Hard disk types</h3>
8540
8541 There are three types of hard disk images (see <link to="MediumType" />):
8542 "normal", "immutable" and "writethrough", represented by the
8543 <link to="#type"/> attribute. The type of the hard disk defines how the
8544 hard disk is attached to a virtual machine and what happens when a
8545 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8546 attached hard disk is taken.
8547
8548 All hard disks can be also divided in two groups: <i>base</i> hard
8549 disks and <i>differencing</i> hard disks. A base hard disk contains all
8550 sectors of the hard disk data in its own storage and therefore can be
8551 used independently. On the contrary, a differencing hard disk is a
8552 "delta" to some other disk and contains only those sectors which differ
8553 from that other disk, which is then called a <i>parent</i>. The differencing
8554 hard disk is said to be <i>linked to</i> that parent.
8555 The parent may be itself a differencing image, thus forming a chain of
8556 linked hard disks. The last element in that chain
8557 must always be a base medium. Note that several differencing
8558 hard disks may be linked to the same parent hard disk.
8559
8560 Differencing hard disks can be distinguished from base hard disks by
8561 querying the <link to="#parent"/> attribute: base hard disks do not have
8562 parents they would depend on, so the value of this attribute is always
8563 @c null for them. Using this attribute, it is possible to walk up
8564 the hard disk tree (from the child hard disk to its parent). It is also
8565 possible to walk down the tree using the <link to="#children"/>
8566 attribute.
8567
8568 Note that the type of all differencing hard disks is
8569 <link to="MediumType_Normal" />; all other values are
8570 meaningless for them. Base hard disks may be of any type.
8571
8572 <h3>Creating hard disks</h3>
8573
8574 New base hard disks are created using
8575 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8576 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8577 disks are usually implicitly created by VirtualBox when needed but may
8578 also be created explicitly using <link to="#createDiffStorage"/>.
8579
8580 After the hard disk is successfully created (including the storage unit)
8581 or opened, it becomes a known hard disk (remembered in the internal media
8582 registry). Known hard disks can be attached to a virtual machine, accessed
8583 through <link to="IVirtualBox::getHardDisk"/> and
8584 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8585 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8586
8587 The following methods, besides <link to="IMedium::close"/>,
8588 automatically remove the hard disk from the media registry:
8589 <ul>
8590 <li><link to="#deleteStorage"/></li>
8591 <li><link to="#mergeTo"/></li>
8592 </ul>
8593
8594 If the storage unit of the hard disk is a regular file in the host's
8595 file system then the rules stated in the description of the
8596 <link to="IMedium::location"/> attribute apply when setting its value. In
8597 addition, a plain file name without any path may be given, in which case
8598 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8599 folder</link> will be prepended to it.
8600
8601 <h4>Automatic composition of the file name part</h4>
8602
8603 Another extension to the <link to="IMedium::location"/> attribute is that
8604 there is a possibility to cause VirtualBox to compose a unique value for
8605 the file name part of the location using the UUID of the hard disk. This
8606 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8607 e.g. before the storage unit is created, and works as follows. You set the
8608 value of the <link to="IMedium::location"/> attribute to a location
8609 specification which only contains the path specification but not the file
8610 name part and ends with either a forward slash or a backslash character.
8611 In response, VirtualBox will generate a new UUID for the hard disk and
8612 compose the file name using the following pattern:
8613 <pre>
8614 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8615 </pre>
8616 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8617 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8618 is the default extension for the storage format of this hard disk. After
8619 that, you may call any of the methods that create a new hard disk storage
8620 unit and they will use the generated UUID and file name.
8621
8622 <h3>Attaching Hard Disks</h3>
8623
8624 Hard disks are attached to virtual machines using the
8625 <link to="IMachine::attachDevice"/> method and detached using the
8626 <link to="IMachine::detachDevice"/> method. Depending on their
8627 <link to="#type"/>, hard disks are attached either
8628 <i>directly</i> or <i>indirectly</i>.
8629
8630 When a hard disk is being attached directly, it is associated with the
8631 virtual machine and used for hard disk operations when the machine is
8632 running. When a hard disk is being attached indirectly, a new differencing
8633 hard disk linked to it is implicitly created and this differencing hard
8634 disk is associated with the machine and used for hard disk operations.
8635 This also means that if <link to="IMachine::attachDevice"/> performs
8636 a direct attachment then the same hard disk will be returned in response
8637 to the subsequent <link to="IMachine::getMedium"/> call; however if
8638 an indirect attachment is performed then
8639 <link to="IMachine::getMedium"/> will return the implicitly created
8640 differencing hard disk, not the original one passed to <link
8641 to="IMachine::attachDevice"/>. In detail:
8642
8643 <ul>
8644 <li><b>Normal base</b> hard disks that do not have children (i.e.
8645 differencing hard disks linked to them) and that are not already
8646 attached to virtual machines in snapshots are attached <b>directly</b>.
8647 Otherwise, they are attached <b>indirectly</b> because having
8648 dependent children or being part of the snapshot makes it impossible
8649 to modify hard disk contents without breaking the integrity of the
8650 dependent party. The <link to="#readOnly"/> attribute allows to
8651 quickly determine the kind of the attachment for the given hard
8652 disk. Note that if a normal base hard disk is to be indirectly
8653 attached to a virtual machine with snapshots then a special
8654 procedure called <i>smart attachment</i> is performed (see below).</li>
8655 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8656 they are attached <b>directly</b> if they do not have children and are
8657 not attached to virtual machines in snapshots, and <b>indirectly</b>
8658 otherwise. Note that the smart attachment procedure is never performed
8659 for differencing hard disks.</li>
8660 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8661 they are designed to be non-writable. If an immutable hard disk is
8662 attached to a virtual machine with snapshots then a special
8663 procedure called smart attachment is performed (see below).</li>
8664 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8665 also as designed. This also means that writethrough hard disks cannot
8666 have other hard disks linked to them at all.</li>
8667 </ul>
8668
8669 Note that the same hard disk, regardless of its type, may be attached to
8670 more than one virtual machine at a time. In this case, the machine that is
8671 started first gains exclusive access to the hard disk and attempts to
8672 start other machines having this hard disk attached will fail until the
8673 first machine is powered down.
8674
8675 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8676 that the given hard disk remains associated with the given machine after a
8677 successful <link to="IMachine::detachDevice"/> call until
8678 <link to="IMachine::saveSettings"/> is called to save all changes to
8679 machine settings to disk. This deferring is necessary to guarantee that
8680 the hard disk configuration may be restored at any time by a call to
8681 <link to="IMachine::discardSettings"/> before the settings
8682 are saved (committed).
8683
8684 Note that if <link to="IMachine::discardSettings"/> is called after
8685 indirectly attaching some hard disks to the machine but before a call to
8686 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8687 all differencing hard disks implicitly created by
8688 <link to="IMachine::attachDevice"/> for these indirect attachments.
8689 Such implicitly created hard disks will also be immediately deleted when
8690 detached explicitly using the <link to="IMachine::detachDevice"/>
8691 call if it is made before <link to="IMachine::saveSettings"/>. This
8692 implicit deletion is safe because newly created differencing hard
8693 disks do not contain any user data.
8694
8695 However, keep in mind that detaching differencing hard disks that were
8696 implicitly created by <link to="IMachine::attachDevice"/>
8697 before the last <link to="IMachine::saveSettings"/> call will
8698 <b>not</b> implicitly delete them as they may already contain some data
8699 (for example, as a result of virtual machine execution). If these hard
8700 disks are no more necessary, the caller can always delete them explicitly
8701 using <link to="#deleteStorage"/> after they are actually de-associated
8702 from this machine by the <link to="IMachine::saveSettings"/> call.
8703
8704 <h3>Smart Attachment</h3>
8705
8706 When normal base or immutable hard disks are indirectly attached to a
8707 virtual machine then some additional steps are performed to make sure the
8708 virtual machine will have the most recent "view" of the hard disk being
8709 attached. These steps include walking through the machine's snapshots
8710 starting from the current one and going through ancestors up to the first
8711 snapshot. Hard disks attached to the virtual machine in all
8712 of the encountered snapshots are checked whether they are descendants of
8713 the given normal base or immutable hard disk. The first found child (which
8714 is the differencing hard disk) will be used instead of the normal base or
8715 immutable hard disk as a parent for creating a new differencing hard disk
8716 that will be actually attached to the machine. And only if no descendants
8717 are found or if the virtual machine does not have any snapshots then the
8718 normal base or immutable hard disk will be used itself as a parent for
8719 this differencing hard disk.
8720
8721 It is easier to explain what smart attachment does using the
8722 following example:
8723 <pre>
8724BEFORE attaching B.vdi: AFTER attaching B.vdi:
8725
8726Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8727 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8728 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8729 Snapshot 4 (none) Snapshot 4 (none)
8730 CurState (none) CurState (D3->D2.vdi)
8731
8732 NOT
8733 ...
8734 CurState (D3->B.vdi)
8735 </pre>
8736 The first column is the virtual machine configuration before the base hard
8737 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8738 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8739 mean that the hard disk that is actually attached to the machine is a
8740 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8741 another hard disk, <tt>B.vdi</tt>.
8742
8743 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8744 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8745 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8746 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8747 it cannot be attached directly and needs an indirect attachment (i.e.
8748 implicit creation of a new differencing hard disk). Due to the smart
8749 attachment procedure, the new differencing hard disk
8750 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8751 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8752 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8753 machine.
8754
8755 Note that if there is more than one descendant hard disk of the given base
8756 hard disk found in a snapshot, and there is an exact device, channel and
8757 bus match, then this exact match will be used. Otherwise, the youngest
8758 descendant will be picked up.
8759
8760 There is one more important aspect of the smart attachment procedure which
8761 is not related to snapshots at all. Before walking through the snapshots
8762 as described above, the backup copy of the current list of hard disk
8763 attachment is searched for descendants. This backup copy is created when
8764 the hard disk configuration is changed for the first time after the last
8765 <link to="IMachine::saveSettings"/> call and used by
8766 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8767 changes. When such a descendant is found in this backup copy, it will be
8768 simply re-attached back, without creating a new differencing hard disk for
8769 it. This optimization is necessary to make it possible to re-attach the
8770 base or immutable hard disk to a different bus, channel or device slot
8771 without losing the contents of the differencing hard disk actually
8772 attached to the machine in place of it.
8773 </desc>
8774
8775 <attribute name="id" type="uuid" mod="string" readonly="yes">
8776 <desc>
8777 UUID of the medium. For a newly created medium, this value is a randomly
8778 generated UUID.
8779
8780 <note>
8781 For media in one of MediumState_NotCreated, MediumState_Creating or
8782 MediumState_Deleting states, the value of this property is undefined
8783 and will most likely be an empty UUID.
8784 </note>
8785 </desc>
8786 </attribute>
8787
8788 <attribute name="description" type="wstring">
8789 <desc>
8790 Optional description of the medium. For a newly created medium the value
8791 of this attribute is an empty string.
8792
8793 Medium types that don't support this attribute will return E_NOTIMPL in
8794 attempt to get or set this attribute's value.
8795
8796 <note>
8797 For some storage types, reading this attribute may return an outdated
8798 (last known) value when <link to="#state"/> is <link
8799 to="MediumState_Inaccessible"/> or <link
8800 to="MediumState_LockedWrite"/> because the value of this attribute is
8801 stored within the storage unit itself. Also note that changing the
8802 attribute value is not possible in such case, as well as when the
8803 medium is the <link to="MediumState_LockedRead"/> state.
8804 </note>
8805 </desc>
8806 </attribute>
8807
8808 <attribute name="state" type="MediumState" readonly="yes">
8809 <desc>
8810 Current medium state. Inspect <link to="MediumState"/> values for details.
8811
8812 Reading this attribute may take a long time because an accessibility
8813 check of the storage unit is performed each time the attribute is read.
8814 This check may cause a significant delay if the storage unit of the
8815 given medium is, for example, a file located on a network share which is
8816 not currently accessible due to connectivity problems -- the call will
8817 not return until a timeout interval defined by the host OS for this
8818 operation expires.
8819
8820 If the last known state of the medium is <link to="MediumState_Created"/>
8821 and the accessibility check fails then the state would be set to
8822 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8823 may be used to get more details about the failure. If the state of the
8824 medium is <link to="MediumState_LockedRead"/> or
8825 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8826 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8827 accessibility check in this case.
8828
8829 Note that not all medium states are applicable to all medium types.
8830 </desc>
8831 </attribute>
8832
8833 <attribute name="location" type="wstring">
8834 <desc>
8835 Location of the storage unit holding medium data.
8836
8837 The format of the location string is medium type specific. For medium
8838 types using regular files in a host's file system, the location
8839 string is the full file name.
8840
8841 Some medium types may support changing the storage unit location by
8842 simply changing the value of this property. If this operation is not
8843 supported, the implementation will return E_NOTIMPL in attempt to set
8844 this attribute's value.
8845
8846 When setting a value of the location attribute which is a regular file
8847 in the host's file system, the given file name may be either relative to
8848 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8849 absolute. Note that if the given location specification does not contain
8850 the file extension part then a proper default extension will be
8851 automatically appended by the implementation depending on the medium type.
8852 </desc>
8853 </attribute>
8854
8855 <attribute name="name" type="wstring" readonly="yes">
8856 <desc>
8857 Name of the storage unit holding medium data.
8858
8859 The returned string is a short version of the <link to="#location"/>
8860 attribute that is suitable for representing the medium in situations
8861 where the full location specification is too long (such as lists
8862 and comboboxes in GUI frontends). This string is also used by frontends
8863 to sort the media list alphabetically when needed.
8864
8865 For example, for locations that are regular files in the host's file
8866 system, the value of this attribute is just the file name (+ extension),
8867 without the path specification.
8868
8869 Note that as opposed to the <link to="#location"/> attribute, the name
8870 attribute will not necessary be unique for a list of media of the
8871 given type and format.
8872 </desc>
8873 </attribute>
8874
8875 <attribute name="hostDrive" type="boolean" readonly="yes">
8876 <desc>True if this corresponds to a drive on the host.</desc>
8877 </attribute>
8878
8879 <attribute name="size" type="unsigned long long" readonly="yes">
8880 <desc>
8881 Physical size of the storage unit used to hold medium data (in bytes).
8882
8883 <note>
8884 For media whose <link to="#state"/> is <link
8885 to="MediumState_Inaccessible"/>, the value of this property is the
8886 last known size. For <link to="MediumState_NotCreated"/> media,
8887 the returned value is zero.
8888 </note>
8889 </desc>
8890 </attribute>
8891
8892 <attribute name="format" type="wstring" readonly="yes">
8893 <desc>
8894 Storage format of this medium.
8895
8896 The value of this attribute is a string that specifies a backend used to
8897 store hard disk data. The storage format is defined when you create a
8898 new hard disk or automatically detected when you open an existing hard
8899 disk medium, and cannot be changed later.
8900
8901 The list of all storage formats supported by this VirtualBox
8902 installation can be obtained using
8903 <link to="ISystemProperties::mediumFormats"/>.
8904 </desc>
8905 </attribute>
8906
8907 <attribute name="type" type="MediumType">
8908 <desc>
8909 Type (role) of this hard disk.
8910
8911 The following constraints apply when changing the value of this
8912 attribute:
8913 <ul>
8914 <li>If a hard disk is attached to a virtual machine (either in the
8915 current state or in one of the snapshots), its type cannot be
8916 changed.
8917 </li>
8918 <li>As long as the hard disk has children, its type cannot be set
8919 to <link to="MediumType_Writethrough"/>.
8920 </li>
8921 <li>The type of all differencing hard disks is
8922 <link to="MediumType_Normal"/> and cannot be changed.
8923 </li>
8924 </ul>
8925
8926 The type of a newly created or opened hard disk is set to
8927 <link to="MediumType_Normal"/>.
8928 </desc>
8929 </attribute>
8930
8931 <attribute name="parent" type="IMedium" readonly="yes">
8932 <desc>
8933 Parent of this hard disk (a hard disk this hard disk is directly based
8934 on).
8935
8936 Only differencing hard disks have parents. For base (non-differencing)
8937 hard disks, @c null is returned.
8938 </desc>
8939 </attribute>
8940
8941 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8942 <desc>
8943 Children of this hard disk (all differencing hard disks directly based
8944 on this hard disk). A @c null array is returned if this hard disk
8945 does not have any children.
8946 </desc>
8947 </attribute>
8948
8949 <attribute name="base" type="IMedium" readonly="yes">
8950 <desc>
8951 Base medium of this medium.
8952
8953 If this is a differencing medium, its base hard disk is the medium
8954 the given hard disk branch starts from. For all other types of hard
8955 disks, this property returns the hard disk object itself (i.e. the same
8956 object this property is read on).
8957 </desc>
8958 </attribute>
8959
8960 <attribute name="readOnly" type="boolean" readonly="yes">
8961 <desc>
8962 Returns @c true if this hard disk is read-only and @c false otherwise.
8963
8964 A hard disk is considered to be read-only when its contents cannot be
8965 modified without breaking the integrity of other parties that depend on
8966 this hard disk such as its child hard disks or snapshots of virtual
8967 machines where this hard disk is attached to these machines. If there
8968 are no children and no such snapshots then there is no dependency and
8969 the hard disk is not read-only.
8970
8971 The value of this attribute can be used to determine the kind of the
8972 attachment that will take place when attaching this hard disk to a
8973 virtual machine. If the value is @c false then the hard disk will
8974 be attached directly. If the value is @c true then the hard disk
8975 will be attached indirectly by creating a new differencing child hard
8976 disk for that. See the interface description for more information.
8977
8978 Note that all <link to="MediumType_Immutable">Immutable</link> hard
8979 disks are always read-only while all
8980 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
8981 always not.
8982
8983 <note>
8984 The read-only condition represented by this attribute is related to
8985 the hard disk type and usage, not to the current
8986 <link to="IMedium::state">medium state</link> and not to the read-only
8987 state of the storage unit.
8988 </note>
8989 </desc>
8990 </attribute>
8991
8992 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8993 <desc>
8994 Logical size of this hard disk (in megabytes), as reported to the
8995 guest OS running inside the virtual machine this disk is
8996 attached to. The logical size is defined when the hard disk is created
8997 and cannot be changed later.
8998
8999 <note>
9000 Reading this property on a differencing hard disk will return the size
9001 of its <link to="#base"/> medium.
9002 </note>
9003 <note>
9004 For hard disks whose state is <link to="#state"/> is <link
9005 to="MediumState_Inaccessible"/>, the value of this property is the
9006 last known logical size. For <link to="MediumaState_NotCreated"/> hard
9007 disks, the returned value is zero.
9008 </note>
9009 </desc>
9010 </attribute>
9011
9012 <attribute name="autoReset" type="boolean">
9013 <desc>
9014 Whether this differencing hard disk will be automatically reset each
9015 time a virtual machine it is attached to is powered up.
9016
9017 See <link to="#reset()"/> for more information about resetting
9018 differencing hard disks.
9019
9020 <note>
9021 Reading this property on a base (non-differencing) hard disk will
9022 always @c false. Changing the value of this property in this
9023 case is not supported.
9024 </note>
9025
9026 <result name="VBOX_E_NOT_SUPPORTED">
9027 This is not a differencing hard disk (when changing the attribute
9028 value).
9029 </result>
9030 </desc>
9031 </attribute>
9032
9033 <attribute name="lastAccessError" type="wstring" readonly="yes">
9034 <desc>
9035 Text message that represents the result of the last accessibility
9036 check.
9037
9038 Accessibility checks are performed each time the <link to="#state"/>
9039 attribute is read. An empty string is returned if the last
9040 accessibility check was successful. A non-empty string indicates a
9041 failure and should normally describe a reason of the failure (for
9042 example, a file read error).
9043 </desc>
9044 </attribute>
9045
9046 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9047 <desc>
9048 Array of UUIDs of all machines this medium is attached to.
9049
9050 A @c null array is returned if this medium is not attached to any
9051 machine or to any machine's snapshot.
9052
9053 <note>
9054 The returned array will include a machine even if this medium is not
9055 attached to that machine in the current state but attached to it in
9056 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9057 details.
9058 </note>
9059 </desc>
9060 </attribute>
9061
9062 <method name="getSnapshotIds">
9063 <desc>
9064 Returns an array of UUIDs of all snapshots of the given machine where
9065 this medium is attached to.
9066
9067 If the medium is attached to the machine in the current state, then the
9068 first element in the array will always be the ID of the queried machine
9069 (i.e. the value equal to the @c machineId argument), followed by
9070 snapshot IDs (if any).
9071
9072 If the medium is not attached to the machine in the current state, then
9073 the array will contain only snapshot IDs.
9074
9075 The returned array may be @c null if this medium is not attached
9076 to the given machine at all, neither in the current state nor in one of
9077 the snapshots.
9078 </desc>
9079 <param name="machineId" type="uuid" mod="string" dir="in">
9080 <desc>
9081 UUID of the machine to query.
9082 </desc>
9083 </param>
9084 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9085 <desc>
9086 Array of snapshot UUIDs of the given machine using this medium.
9087 </desc>
9088 </param>
9089 </method>
9090
9091 <method name="lockRead">
9092 <desc>
9093 Locks this medium for reading.
9094
9095 The read lock is shared: many clients can simultaneously lock the
9096 same medium for reading unless it is already locked for writing (see
9097 <link to="#lockWrite"/>) in which case an error is returned.
9098
9099 When the medium is locked for reading, it cannot be modified
9100 from within VirtualBox. This means that any method that changes
9101 the properties of this medium or contents of the storage unit
9102 will return an error (unless explicitly stated otherwise) and
9103 that an attempt to start a virtual machine that wants to modify
9104 the medium will also fail.
9105
9106 When the virtual machine is started up, it locks for reading all
9107 media it uses in read-only mode. If some medium cannot be locked
9108 for reading, the startup procedure will fail.
9109
9110 The medium locked for reading must be unlocked using the <link
9111 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9112 can be nested and must be followed by the same number of paired
9113 <link to="#unlockRead"/> calls.
9114
9115 This method sets the medium state to <link
9116 to="MediumState_LockedRead" /> on success. The state prior to
9117 this call must be <link to="MediumState_Created" />,
9118 <link to="MediumState_Inaccessible" /> or
9119 <link to="MediumState_LockedRead" />.
9120 As you can see, an inaccessible medium can be locked too. This is
9121 not an error; this method performs a logical lock that prevents
9122 modifications of this medium through the VirtualBox API, not a
9123 physical lock of the underlying storage unit.
9124
9125 This method returns the current state of the medium
9126 <b>before</b> the operation.
9127
9128 <result name="VBOX_E_INVALID_OBJECT_STATE">
9129 Invalid medium state (e.g. not created, locked, inaccessible,
9130 creating, deleting).
9131 </result>
9132
9133 </desc>
9134 <param name="state" type="MediumState" dir="return">
9135 <desc>
9136 State of the medium after the operation.
9137 </desc>
9138 </param>
9139 </method>
9140
9141 <method name="unlockRead">
9142 <desc>
9143 Cancels the read lock previously set by <link to="#lockRead"/>.
9144
9145 For both, success and failure, this method returns the current state
9146 of the medium <b>after</b> the operation.
9147
9148 See <link to="#lockRead"/> for more details.
9149
9150 <result name="VBOX_E_INVALID_OBJECT_STATE">
9151 Medium not locked for reading.
9152 </result>
9153
9154 </desc>
9155 <param name="state" type="MediumState" dir="return">
9156 <desc>
9157 State of the medium after the operation.
9158 </desc>
9159 </param>
9160 </method>
9161
9162 <method name="lockWrite">
9163 <desc>
9164 Locks this medium for writing.
9165
9166 The write lock, as opposed to <link to="#lockRead"/>, is
9167 exclusive: there may be only one client holding a write lock
9168 and there may be no read locks while the write lock is held.
9169
9170 When the medium is locked for writing, it cannot be modified
9171 from within VirtualBox and it is not guaranteed that the values
9172 of its properties are up-to-date. Any method that changes the
9173 properties of this medium or contents of the storage unit will
9174 return an error (unless explicitly stated otherwise) and an
9175 attempt to start a virtual machine wanting to modify or to
9176 read the medium will fail.
9177
9178 When the virtual machine is started up, it locks for writing all
9179 media it uses to write data to. If any medium could not be locked
9180 for writing, the startup procedure will fail.
9181
9182 The medium locked for writing must be unlocked using the <link
9183 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9184 can <b>not</b> be nested and must be followed by a<link
9185 to="#unlockWrite"/> call before the next lockWrite call.
9186
9187 This method sets the medium state to <link to="MediumState_LockedWrite" />
9188 on success. The state prior to this call must be <link to="MediumState_Created"/>
9189 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9190 medium can be locked too. This is not an error; this method
9191 performs a logical lock preventing modifications of this
9192 medium through the VirtualBox API, not a physical lock of the
9193 underlying storage unit.
9194
9195 For both, success and failure, this method returns the current
9196 state of the medium <b>before</b> the operation.
9197
9198 <result name="VBOX_E_INVALID_OBJECT_STATE">
9199 Invalid medium state (e.g. not created, locked, inaccessible,
9200 creating, deleting).
9201 </result>
9202
9203 </desc>
9204 <param name="state" type="MediumState" dir="return">
9205 <desc>
9206 State of the medium after the operation.
9207 </desc>
9208 </param>
9209 </method>
9210
9211 <method name="unlockWrite">
9212 <desc>
9213 Cancels the write lock previously set by <link to="#lockWrite"/>.
9214
9215 For both, success and failure, this method returns the current
9216 state of the medium <b>after</b> the operation.
9217
9218 See <link to="#lockWrite"/> for more details.
9219
9220 <result name="VBOX_E_INVALID_OBJECT_STATE">
9221 Medium not locked for writing.
9222 </result>
9223
9224 </desc>
9225 <param name="state" type="MediumState" dir="return">
9226 <desc>
9227 State of the medium after the operation.
9228 </desc>
9229 </param>
9230 </method>
9231
9232 <method name="close">
9233 <desc>
9234 Closes this medium.
9235
9236 The medium must not be attached to any known virtual machine
9237 and must not have any known child media, otherwise the
9238 operation will fail.
9239
9240 When the medium is successfully closed, it gets removed from
9241 the list of remembered media, but its storage unit is not
9242 deleted. In particular, this means that this medium can be
9243 later opened again using the <link
9244 to="IVirtualBox::openHardDisk"/> call.
9245
9246 Note that after this method successfully returns, the given medium
9247 object becomes uninitialized. This means that any attempt
9248 to call any of its methods or attributes will fail with the
9249 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9250
9251 <result name="VBOX_E_INVALID_OBJECT_STATE">
9252 Invalid medium state (other than not created, created or
9253 inaccessible).
9254 </result>
9255 <result name="VBOX_E_OBJECT_IN_USE">
9256 Medium attached to virtual machine.
9257 </result>
9258 <result name="VBOX_E_FILE_ERROR">
9259 Settings file not accessible.
9260 </result>
9261 <result name="VBOX_E_XML_ERROR">
9262 Could not parse the settings file.
9263 </result>
9264
9265 </desc>
9266 </method>
9267
9268 <!-- storage methods -->
9269
9270 <method name="getProperty">
9271 <desc>
9272 Returns the value of the custom hard disk property with the given name.
9273
9274 The list of all properties supported by the given hard disk format can
9275 be obtained with <link to="IMediumFormat::describeProperties"/>.
9276
9277 Note that if this method returns an empty string in @a value, the
9278 requested property is supported but currently not assigned any value.
9279
9280 <result name="VBOX_E_OBJECT_NOT_FOUND">
9281 Requested property does not exist (not supported by the format).
9282 </result>
9283 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9284 </desc>
9285 <param name="name" type="wstring" dir="in">
9286 <desc>Name of the property to get.</desc>
9287 </param>
9288 <param name="value" type="wstring" dir="return">
9289 <desc>Current property value.</desc>
9290 </param>
9291 </method>
9292
9293 <method name="setProperty">
9294 <desc>
9295 Sets the value of the custom hard disk property with the given name.
9296
9297 The list of all properties supported by the given hard disk format can
9298 be obtained with <link to="IMediumFormat::describeProperties"/>.
9299
9300 Note that setting the property value to @c null or an empty string is
9301 equivalent to deleting the existing value. A default value (if it is
9302 defined for this property) will be used by the format backend in this
9303 case.
9304
9305 <result name="VBOX_E_OBJECT_NOT_FOUND">
9306 Requested property does not exist (not supported by the format).
9307 </result>
9308 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9309 </desc>
9310 <param name="name" type="wstring" dir="in">
9311 <desc>Name of the property to set.</desc>
9312 </param>
9313 <param name="value" type="wstring" dir="in">
9314 <desc>Property value to set.</desc>
9315 </param>
9316 </method>
9317
9318 <method name="getProperties">
9319 <desc>
9320 Returns values for a group of properties in one call.
9321
9322 The names of the properties to get are specified using the @a names
9323 argument which is a list of comma-separated property names or
9324 an empty string if all properties are to be returned. Note that currently
9325 the value of this argument is ignored and the method always returns all
9326 existing properties.
9327
9328 The list of all properties supported by the given hard disk format can
9329 be obtained with <link to="IMediumFormat::describeProperties"/>.
9330
9331 The method returns two arrays, the array of property names corresponding
9332 to the @a names argument and the current values of these properties.
9333 Both arrays have the same number of elements with each elemend at the
9334 given index in the first array corresponds to an element at the same
9335 index in the second array.
9336
9337 Note that for properties that do not have assigned values,
9338 an empty string is returned at the appropriate index in the
9339 @a returnValues array.
9340
9341 </desc>
9342 <param name="names" type="wstring" dir="in">
9343 <desc>
9344 Names of properties to get.
9345 </desc>
9346 </param>
9347 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9348 <desc>Names of returned properties.</desc>
9349 </param>
9350 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9351 <desc>Values of returned properties.</desc>
9352 </param>
9353 </method>
9354
9355 <method name="setProperties">
9356 <desc>
9357 Sets values for a group of properties in one call.
9358
9359 The names of the properties to set are passed in the @a names
9360 array along with the new values for them in the @a values array. Both
9361 arrays have the same number of elements with each elemend at the given
9362 index in the first array corresponding to an element at the same index
9363 in the second array.
9364
9365 If there is at least one property name in @a names that is not valid,
9366 the method will fail before changing the values of any other properties
9367 from the @a names array.
9368
9369 Using this method over <link to="#setProperty"/> is preferred if you
9370 need to set several properties at once since it will result into less
9371 IPC calls.
9372
9373 The list of all properties supported by the given hard disk format can
9374 be obtained with <link to="IMediumFormat::describeProperties"/>.
9375
9376 Note that setting the property value to @c null or an empty string is
9377 equivalent to deleting the existing value. A default value (if it is
9378 defined for this property) will be used by the format backend in this
9379 case.
9380 </desc>
9381 <param name="names" type="wstring" safearray="yes" dir="in">
9382 <desc>Names of properties to set.</desc>
9383 </param>
9384 <param name="values" type="wstring" safearray="yes" dir="in">
9385 <desc>Values of properties to set.</desc>
9386 </param>
9387 </method>
9388
9389 <!-- storage methods -->
9390
9391 <method name="createBaseStorage">
9392 <desc>
9393 Starts creating a hard disk storage unit (fixed/dynamic, according
9394 to the variant flags) in in the background. The previous storage unit
9395 created for this object, if any, must first be deleted using
9396 <link to="#deleteStorage"/>, otherwise the operation will fail.
9397
9398 Before the operation starts, the hard disk is placed in
9399 <link to="MediumState_Creating"/> state. If the create operation
9400 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9401 state.
9402
9403 After the returned progress object reports that the operation has
9404 successfully completed, the medium state will be set to <link
9405 to="MediumState_Created"/>, the hard disk will be remembered by this
9406 VirtualBox installation and may be attached to virtual machines.
9407
9408 <result name="VBOX_E_NOT_SUPPORTED">
9409 The variant of storage creation operation is not supported. See <link
9410 to="IMediumFormat::capabilities"/>.
9411 </result>
9412 </desc>
9413 <param name="logicalSize" type="unsigned long long" dir="in">
9414 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9415 </param>
9416 <param name="variant" type="MediumVariant" dir="in">
9417 <desc>Exact image variant which should be created.</desc>
9418 </param>
9419 <param name="progress" type="IProgress" dir="return">
9420 <desc>Progress object to track the operation completion.</desc>
9421 </param>
9422 </method>
9423
9424 <method name="deleteStorage">
9425 <desc>
9426 Starts deleting the storage unit of this hard disk.
9427
9428 The hard disk must not be attached to any known virtual machine and must
9429 not have any known child hard disks, otherwise the operation will fail.
9430 It will also fail if there is no storage unit to delete or if deletion
9431 is already in progress, or if the hard disk is being in use (locked for
9432 read or for write) or inaccessible. Therefore, the only valid state for
9433 this operation to succeed is <link to="MediumState_Created"/>.
9434
9435 Before the operation starts, the hard disk is placed to
9436 <link to="MediumState_Deleting"/> state and gets removed from the list
9437 of remembered hard disks (media registry). If the delete operation
9438 fails, the medium will be remembered again and placed back to
9439 <link to="MediumState_Created"/> state.
9440
9441 After the returned progress object reports that the operation is
9442 complete, the medium state will be set to
9443 <link to="MediumState_NotCreated"/> and you will be able to use one of
9444 the storage creation methods to create it again.
9445
9446 <see>#close()</see>
9447
9448 <result name="VBOX_E_OBJECT_IN_USE">
9449 Hard disk is attached to a virtual machine.
9450 </result>
9451 <result name="VBOX_E_NOT_SUPPORTED">
9452 Storage deletion is not allowed because neither of storage creation
9453 operations are supported. See
9454 <link to="IMediumFormat::capabilities"/>.
9455 </result>
9456
9457 <note>
9458 If the deletion operation fails, it is not guaranteed that the storage
9459 unit still exists. You may check the <link to="IMedium::state"/> value
9460 to answer this question.
9461 </note>
9462 </desc>
9463 <param name="progress" type="IProgress" dir="return">
9464 <desc>Progress object to track the operation completion.</desc>
9465 </param>
9466 </method>
9467
9468 <!-- diff methods -->
9469
9470 <method name="createDiffStorage">
9471 <desc>
9472 Starts creating an empty differencing storage unit based on this hard
9473 disk in the format and at the location defined by the @a target
9474 argument.
9475
9476 The target hard disk must be in <link to="MediumState_NotCreated"/>
9477 state (i.e. must not have an existing storage unit). Upon successful
9478 completion, this operation will set the type of the target hard disk to
9479 <link to="MediumType_Normal"/> and create a storage unit necessary to
9480 represent the differencing hard disk data in the given format (according
9481 to the storage format of the target object).
9482
9483 After the returned progress object reports that the operation is
9484 successfully complete, the target hard disk gets remembered by this
9485 VirtualBox installation and may be attached to virtual machines.
9486
9487 <note>
9488 The hard disk will be set to <link to="MediumState_LockedRead"/>
9489 state for the duration of this operation.
9490 </note>
9491 <result name="VBOX_E_OBJECT_IN_USE">
9492 Hard disk not in @c NotCreated state.
9493 </result>
9494 </desc>
9495 <param name="target" type="IMedium" dir="in">
9496 <desc>Target hard disk.</desc>
9497 </param>
9498 <param name="variant" type="MediumVariant" dir="in">
9499 <desc>Exact image variant which should be created.</desc>
9500 </param>
9501 <param name="progress" type="IProgress" dir="return">
9502 <desc>Progress object to track the operation completion.</desc>
9503 </param>
9504 </method>
9505
9506 <method name="mergeTo">
9507 <desc>
9508 Starts merging the contents of this hard disk and all intermediate
9509 differencing hard disks in the chain to the given target hard disk.
9510
9511 The target hard disk must be either a descendant of this hard disk or
9512 its ancestor (otherwise this method will immediately return a failure).
9513 It follows that there are two logical directions of the merge operation:
9514 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9515 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9516 chain:
9517
9518 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9519
9520 Here, calling this method on the <tt>Base</tt> hard disk object with
9521 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9522 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9523 merge. Note that in both cases the contents of the resulting hard disk
9524 will be the same, the only difference is the hard disk object that takes
9525 the result of the merge operation. In case of the forward merge in the
9526 above example, the result will be written to <tt>Diff_2</tt>; in case of
9527 the backward merge, the result will be written to <tt>Base</tt>. In
9528 other words, the result of the operation is always stored in the target
9529 hard disk.
9530
9531 Upon successful operation completion, the storage units of all hard
9532 disks in the chain between this (source) hard disk and the target hard
9533 disk, including the source hard disk itself, will be automatically
9534 deleted and the relevant hard disk objects (including this hard disk)
9535 will become uninitialized. This means that any attempt to call any of
9536 their methods or attributes will fail with the
9537 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9538 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9539 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9540 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9541 disk itself since it will no longer be based on any other hard disk.
9542
9543 Considering the above, all of the following conditions must be met in
9544 order for the merge operation to succeed:
9545 <ul>
9546 <li>
9547 Neither this (source) hard disk nor any intermediate
9548 differencing hard disk in the chain between it and the target
9549 hard disk is attached to any virtual machine.
9550 </li>
9551 <li>
9552 Neither the source hard disk nor the target hard disk is an
9553 <link to="MediumType_Immutable"/> hard disk.
9554 </li>
9555 <li>
9556 The part of the hard disk tree from the source hard disk to the
9557 target hard disk is a linear chain, i.e. all hard disks in this
9558 chain have exactly one child which is the next hard disk in this
9559 chain. The only exception from this rule is the target hard disk in
9560 the forward merge operation; it is allowed to have any number of
9561 child hard disks because the merge operation will hot change its
9562 logical contents (as it is seen by the guest OS or by children).
9563 </li>
9564 <li>
9565 None of the involved hard disks are in
9566 <link to="MediumState_LockedRead"/> or
9567 <link to="MediumState_LockedWrite"/> state.
9568 </li>
9569 </ul>
9570
9571 <note>
9572 This (source) hard disk and all intermediates will be placed to <link
9573 to="MediumState_Deleting"/> state and the target hard disk will be
9574 placed to <link to="MediumState_LockedWrite"/> state and for the
9575 duration of this operation.
9576 </note>
9577 </desc>
9578 <param name="targetId" type="uuid" mod="string" dir="in">
9579 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9580 </param>
9581 <param name="progress" type="IProgress" dir="return">
9582 <desc>Progress object to track the operation completion.</desc>
9583 </param>
9584 </method>
9585
9586 <!-- clone method -->
9587
9588 <method name="cloneTo">
9589 <desc>
9590 Starts creating a clone of this hard disk in the format and at the
9591 location defined by the @a target argument.
9592
9593 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9594 state (i.e. must not have an existing storage unit) or in
9595 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9596 big enough to hold the data or else the copy will be partial). Upon
9597 successful completion, the cloned hard disk will contain exactly the
9598 same sector data as the hard disk being cloned, except that in the
9599 first case a new UUID for the clone will be randomly generated, and in
9600 the second case the UUID will remain unchanged.
9601
9602 The @a parent argument defines which hard disk will be the parent
9603 of the clone. Passing a @c null reference indicates that the clone will
9604 be a base image, i.e. completely independent. It is possible to specify
9605 an arbitrary hard disk for this parameter, including the parent of the
9606 hard disk which is being cloned. Even cloning to a child of the source
9607 hard disk is possible. Note that when cloning to an existing image, the
9608 @a parent irgument is ignored.
9609
9610 After the returned progress object reports that the operation is
9611 successfully complete, the target hard disk gets remembered by this
9612 VirtualBox installation and may be attached to virtual machines.
9613
9614 <note>
9615 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9616 state for the duration of this operation.
9617 </note>
9618 <result name="E_NOTIMPL">
9619 The specified cloning variant is not supported at the moment.
9620 </result>
9621 </desc>
9622 <param name="target" type="IMedium" dir="in">
9623 <desc>Target hard disk.</desc>
9624 </param>
9625 <param name="variant" type="MediumVariant" dir="in">
9626 <desc>Exact image variant which should be created.</desc>
9627 </param>
9628 <param name="parent" type="IMedium" dir="in">
9629 <desc>Parent of the cloned hard disk.</desc>
9630 </param>
9631 <param name="progress" type="IProgress" dir="return">
9632 <desc>Progress object to track the operation completion.</desc>
9633 </param>
9634 </method>
9635
9636 <!-- other methods -->
9637
9638 <method name="compact">
9639 <desc>
9640 Starts compacting of this hard disk. This means that the disk is
9641 transformed into a possibly more compact storage representation.
9642 This potentially creates temporary images, which can require a
9643 substantial amount of additional disk space.
9644
9645 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9646 state and all its parent hard disks (if any) will be placed to
9647 <link to="MediumState_LockedRead"/> state for the duration of this
9648 operation.
9649
9650 Please note that the results can be either returned straight away,
9651 or later as the result of the background operation via the object
9652 returned via the @a progress parameter.
9653
9654 <result name="VBOX_E_NOT_SUPPORTED">
9655 Hard disk format does not support compacting (but potentially
9656 needs it).
9657 </result>
9658 </desc>
9659 <param name="progress" type="IProgress" dir="return">
9660 <desc>Progress object to track the operation completion.</desc>
9661 </param>
9662 </method>
9663
9664 <method name="reset">
9665 <desc>
9666 Starts erasing the contents of this differencing hard disk.
9667
9668 This operation will reset the differencing hard disk to its initial
9669 state when it does not contain any sector data and any read operation is
9670 redirected to its parent hard disk.
9671
9672 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9673 for the duration of this operation.
9674
9675 <result name="VBOX_E_NOT_SUPPORTED">
9676 This is not a differencing hard disk.
9677 </result>
9678 <result name="VBOX_E_INVALID_OBJECT_STATE">
9679 Hard disk is not in <link to="MediumState_Created"/> or
9680 <link to="MediumState_Inaccessible"/> state.
9681 </result>
9682 </desc>
9683 <param name="progress" type="IProgress" dir="return">
9684 <desc>Progress object to track the operation completion.</desc>
9685 </param>
9686 </method>
9687
9688 </interface>
9689
9690
9691 <!--
9692 // IMediumFormat
9693 /////////////////////////////////////////////////////////////////////////
9694 -->
9695
9696 <enum
9697 name="DataType"
9698 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9699 >
9700 <const name="Int32" value="0"/>
9701 <const name="Int8" value="1"/>
9702 <const name="String" value="2"/>
9703 </enum>
9704
9705 <enum
9706 name="DataFlags"
9707 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9708 >
9709 <const name="None" value="0x00"/>
9710 <const name="Mandatory" value="0x01"/>
9711 <const name="Expert" value="0x02"/>
9712 <const name="Array" value="0x04"/>
9713 <const name="FlagMask" value="0x07"/>
9714 </enum>
9715
9716 <enum
9717 name="MediumFormatCapabilities"
9718 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9719 >
9720 <desc>
9721 Hard disk format capability flags.
9722 </desc>
9723
9724 <const name="Uuid" value="0x01">
9725 <desc>
9726 Supports UUIDs as expected by VirtualBox code.
9727 </desc>
9728 </const>
9729
9730 <const name="CreateFixed" value="0x02">
9731 <desc>
9732 Supports creating fixed size images, allocating all space instantly.
9733 </desc>
9734 </const>
9735
9736 <const name="CreateDynamic" value="0x04">
9737 <desc>
9738 Supports creating dynamically growing images, allocating space on
9739 demand.
9740 </desc>
9741 </const>
9742
9743 <const name="CreateSplit2G" value="0x08">
9744 <desc>
9745 Supports creating images split in chunks of a bit less than 2 GBytes.
9746 </desc>
9747 </const>
9748
9749 <const name="Differencing" value="0x10">
9750 <desc>
9751 Supports being used as a format for differencing media (see <link
9752 to="IMedium::createDiffStorage"/>).
9753 </desc>
9754 </const>
9755
9756 <const name="Asynchronous" value="0x20">
9757 <desc>
9758 Supports asynchronous I/O operations for at least some configurations.
9759 </desc>
9760 </const>
9761
9762 <const name="File" value="0x40">
9763 <desc>
9764 The format backend operates on files (the <link to="IMedium::location"/>
9765 attribute of the medium specifies a file used to store medium
9766 data; for a list of supported file extensions see
9767 <link to="IMediumFormat::fileExtensions"/>).
9768 </desc>
9769 </const>
9770
9771 <const name="Properties" value="0x80">
9772 <desc>
9773 The format backend uses the property interface to configure the storage
9774 location and properties (the <link to="IMediumFormat::describeProperties"/>
9775 method is used to get access to properties supported by the given medium format).
9776 </desc>
9777 </const>
9778
9779 <const name="CapabilityMask" value="0xFF"/>
9780 </enum>
9781
9782 <interface
9783 name="IMediumFormat" extends="$unknown"
9784 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9785 wsmap="managed"
9786 >
9787 <desc>
9788 The IMediumFormat interface represents a medium format.
9789
9790 Each medium format has an associated backend which is used to handle
9791 media stored in this format. This interface provides information
9792 about the properties of the associated backend.
9793
9794 Each medium format is identified by a string represented by the
9795 <link to="#id"/> attribute. This string is used in calls like
9796 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9797 format.
9798
9799 The list of all supported medium formats can be obtained using
9800 <link to="ISystemProperties::mediaFormats"/>.
9801
9802 <see>IMedium</see>
9803 </desc>
9804
9805 <attribute name="id" type="wstring" readonly="yes">
9806 <desc>
9807 Identifier of this format.
9808
9809 The format identifier is a non-@c null non-empty ASCII string. Note that
9810 this string is case-insensitive. This means that, for example, all of
9811 the following strings:
9812 <pre>
9813 "VDI"
9814 "vdi"
9815 "VdI"</pre>
9816 refer to the same medium format.
9817
9818 This string is used in methods of other interfaces where it is necessary
9819 to specify a medium format, such as
9820 <link to="IVirtualBox::createHardDisk"/>.
9821 </desc>
9822 </attribute>
9823
9824 <attribute name="name" type="wstring" readonly="yes">
9825 <desc>
9826 Human readable description of this format.
9827
9828 Mainly for use in file open dialogs.
9829 </desc>
9830 </attribute>
9831
9832 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9833 <desc>
9834 Array of strings containing the supported file extensions.
9835
9836 The first extension in the array is the extension preferred by the
9837 backend. It is recommended to use this extension when specifying a
9838 location of the storage unit for a new medium.
9839
9840 Note that some backends do not work on files, so this array may be
9841 empty.
9842
9843 <see>IMediumFormat::capabilities</see>
9844 </desc>
9845 </attribute>
9846
9847 <attribute name="capabilities" type="unsigned long" readonly="yes">
9848 <desc>
9849 Capabilities of the format as a set of bit flags.
9850
9851 For the meaning of individual capability flags see
9852 <link to="MediumFormatCapabilities"/>.
9853 </desc>
9854 </attribute>
9855
9856 <method name="describeProperties">
9857 <desc>
9858 Returns several arrays describing the properties supported by this
9859 format.
9860
9861 An element with the given index in each array describes one
9862 property. Thus, the number of elements in each returned array is the
9863 same and corresponds to the number of supported properties.
9864
9865 The returned arrays are filled in only if the
9866 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9867 All arguments must be non-@c null.
9868
9869 <see>DataType</see>
9870 <see>DataFlags</see>
9871 </desc>
9872
9873 <param name="names" type="wstring" safearray="yes" dir="out">
9874 <desc>Array of property names.</desc>
9875 </param>
9876 <param name="description" type="wstring" safearray="yes" dir="out">
9877 <desc>Array of property descriptions.</desc>
9878 </param>
9879 <param name="types" type="DataType" safearray="yes" dir="out">
9880 <desc>Array of property types.</desc>
9881 </param>
9882 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9883 <desc>Array of property flags.</desc>
9884 </param>
9885 <param name="defaults" type="wstring" safearray="yes" dir="out">
9886 <desc>Array of default property values.</desc>
9887 </param>
9888 </method>
9889
9890 </interface>
9891
9892
9893 <!--
9894 // IKeyboard
9895 /////////////////////////////////////////////////////////////////////////
9896 -->
9897
9898 <interface
9899 name="IKeyboard" extends="$unknown"
9900 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9901 wsmap="managed"
9902 >
9903 <desc>
9904 The IKeyboard interface represents the virtual machine's keyboard. Used
9905 in <link to="IConsole::keyboard"/>.
9906
9907 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9908 to the virtual machine.
9909
9910 </desc>
9911 <method name="putScancode">
9912 <desc>Sends a scancode to the keyboard.
9913
9914 <result name="VBOX_E_IPRT_ERROR">
9915 Could not send scan code to virtual keyboard.
9916 </result>
9917
9918 </desc>
9919 <param name="scancode" type="long" dir="in"/>
9920 </method>
9921
9922 <method name="putScancodes">
9923 <desc>Sends an array of scancodes to the keyboard.
9924
9925 <result name="VBOX_E_IPRT_ERROR">
9926 Could not send all scan codes to virtual keyboard.
9927 </result>
9928
9929 </desc>
9930 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9931 <param name="codesStored" type="unsigned long" dir="return"/>
9932 </method>
9933
9934 <method name="putCAD">
9935 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9936 function is nothing special, it is just a convenience function
9937 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9938
9939 <result name="VBOX_E_IPRT_ERROR">
9940 Could not send all scan codes to virtual keyboard.
9941 </result>
9942
9943 </desc>
9944 </method>
9945
9946 </interface>
9947
9948
9949 <!--
9950 // IMouse
9951 /////////////////////////////////////////////////////////////////////////
9952 -->
9953
9954 <enum
9955 name="MouseButtonState"
9956 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
9957 >
9958 <desc>
9959 Mouse button state.
9960 </desc>
9961
9962 <const name="LeftButton" value="0x01"/>
9963 <const name="RightButton" value="0x02"/>
9964 <const name="MiddleButton" value="0x04"/>
9965 <const name="WheelUp" value="0x08"/>
9966 <const name="WheelDown" value="0x10"/>
9967 <const name="XButton1" value="0x20"/>
9968 <const name="XButton2" value="0x40"/>
9969 <const name="MouseStateMask" value="0x7F"/>
9970 </enum>
9971
9972 <interface
9973 name="IMouse" extends="$unknown"
9974 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
9975 wsmap="managed"
9976 >
9977 <desc>
9978 The IMouse interface represents the virtual machine's mouse. Used in
9979 <link to="IConsole::mouse"/>.
9980
9981 Through this interface, the virtual machine's virtual mouse can be
9982 controlled.
9983 </desc>
9984
9985 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9986 <desc>
9987 Whether the guest OS supports absolute mouse pointer positioning
9988 or not.
9989 <note>
9990 VirtualBox Guest Tools need to be installed to the guest OS
9991 in order to enable absolute mouse positioning support.
9992 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9993 callback to be instantly informed about changes of this attribute
9994 during virtual machine execution.
9995 </note>
9996 <see><link to="#putMouseEventAbsolute"/></see>
9997 </desc>
9998 </attribute>
9999
10000 <method name="putMouseEvent">
10001 <desc>
10002 Initiates a mouse event using relative pointer movements
10003 along x and y axis.
10004
10005 <result name="E_ACCESSDENIED">
10006 Console not powered up.
10007 </result>
10008 <result name="VBOX_E_IPRT_ERROR">
10009 Could not send mouse event to virtual mouse.
10010 </result>
10011
10012 </desc>
10013
10014 <param name="dx" type="long" dir="in">
10015 <desc>
10016 Amount of pixels the mouse should move to the right.
10017 Negative values move the mouse to the left.
10018 </desc>
10019 </param>
10020 <param name="dy" type="long" dir="in">
10021 <desc>
10022 Amount of pixels the mouse should move downwards.
10023 Negative values move the mouse upwards.
10024 </desc>
10025 </param>
10026 <param name="dz" type="long" dir="in">
10027 <desc>
10028 Amount of mouse wheel moves.
10029 Positive values describe clockwise wheel rotations,
10030 negative values describe counterclockwise rotations.
10031 </desc>
10032 </param>
10033 <param name="dw" type="long" dir="in">
10034 <desc>
10035 Amount of horizontal mouse wheel moves.
10036 Positive values describe a movement to the left,
10037 negative values describe a movement to the right.
10038 </desc>
10039 </param>
10040 <param name="buttonState" type="long" dir="in">
10041 <desc>
10042 The current state of mouse buttons. Every bit represents
10043 a mouse button as follows:
10044 <table>
10045 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10046 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10047 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10048 </table>
10049 A value of <tt>1</tt> means the corresponding button is pressed.
10050 otherwise it is released.
10051 </desc>
10052 </param>
10053 </method>
10054
10055 <method name="putMouseEventAbsolute">
10056 <desc>
10057 Positions the mouse pointer using absolute x and y coordinates.
10058 These coordinates are expressed in pixels and
10059 start from <tt>[1,1]</tt> which corresponds to the top left
10060 corner of the virtual display.
10061
10062 <result name="E_ACCESSDENIED">
10063 Console not powered up.
10064 </result>
10065 <result name="VBOX_E_IPRT_ERROR">
10066 Could not send mouse event to virtual mouse.
10067 </result>
10068
10069 <note>
10070 This method will have effect only if absolute mouse
10071 positioning is supported by the guest OS.
10072 </note>
10073
10074 <see><link to="#absoluteSupported"/></see>
10075 </desc>
10076
10077 <param name="x" type="long" dir="in">
10078 <desc>
10079 X coordinate of the pointer in pixels, starting from @c 1.
10080 </desc>
10081 </param>
10082 <param name="y" type="long" dir="in">
10083 <desc>
10084 Y coordinate of the pointer in pixels, starting from @c 1.
10085 </desc>
10086 </param>
10087 <param name="dz" type="long" dir="in">
10088 <desc>
10089 Amount of mouse wheel moves.
10090 Positive values describe clockwise wheel rotations,
10091 negative values describe counterclockwise rotations.
10092 </desc>
10093 </param>
10094 <param name="dw" type="long" dir="in">
10095 <desc>
10096 Amount of horizontal mouse wheel moves.
10097 Positive values describe a movement to the left,
10098 negative values describe a movement to the right.
10099 </desc>
10100 </param>
10101 <param name="buttonState" type="long" dir="in">
10102 <desc>
10103 The current state of mouse buttons. Every bit represents
10104 a mouse button as follows:
10105 <table>
10106 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10107 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10108 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10109 </table>
10110 A value of @c 1 means the corresponding button is pressed.
10111 otherwise it is released.
10112 </desc>
10113 </param>
10114 </method>
10115
10116 </interface>
10117
10118 <!--
10119 // IDisplay
10120 /////////////////////////////////////////////////////////////////////////
10121 -->
10122
10123 <enum
10124 name="FramebufferPixelFormat"
10125 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10126 >
10127 <desc>
10128 Format of the video memory buffer. Constants represented by this enum can
10129 be used to test for particular values of <link
10130 to="IFramebuffer::pixelFormat"/>. See also <link
10131 to="IFramebuffer::requestResize"/>.
10132
10133 See also www.fourcc.org for more information about FOURCC pixel formats.
10134 </desc>
10135
10136 <const name="Opaque" value="0">
10137 <desc>
10138 Unknown buffer format (the user may not assume any particular format of
10139 the buffer).
10140 </desc>
10141 </const>
10142 <const name="FOURCC_RGB" value="0x32424752">
10143 <desc>
10144 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10145 bit layout).
10146 </desc>
10147 </const>
10148 </enum>
10149
10150 <interface
10151 name="IFramebuffer" extends="$unknown"
10152 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10153 wsmap="suppress"
10154 >
10155 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10156 <desc>Address of the start byte of the frame buffer.</desc>
10157 </attribute>
10158
10159 <attribute name="width" type="unsigned long" readonly="yes">
10160 <desc>Frame buffer width, in pixels.</desc>
10161 </attribute>
10162
10163 <attribute name="height" type="unsigned long" readonly="yes">
10164 <desc>Frame buffer height, in pixels.</desc>
10165 </attribute>
10166
10167 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10168 <desc>
10169 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10170 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10171 are: 8, 15, 16, 24 and 32.
10172 </desc>
10173 </attribute>
10174
10175 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10176 <desc>
10177 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10178 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10179 size of the scan line must be aligned to 32 bits.
10180 </desc>
10181 </attribute>
10182
10183 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10184 <desc>
10185 Frame buffer pixel format. It's either one of the values defined by <link
10186 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10187 <note>
10188 This attribute must never return <link
10189 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10190 <link to="#address"/> points to must be always known.
10191 </note>
10192 </desc>
10193 </attribute>
10194
10195 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10196 <desc>
10197 Defines whether this frame buffer uses the virtual video card's memory
10198 buffer (guest VRAM) directly or not. See <link
10199 to="IFramebuffer::requestResize"/> for more information.
10200 </desc>
10201 </attribute>
10202
10203 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10204 <desc>
10205 Hint from the frame buffer about how much of the standard
10206 screen height it wants to use for itself. This information is
10207 exposed to the guest through the VESA BIOS and VMMDev interface
10208 so that it can use it for determining its video mode table. It
10209 is not guaranteed that the guest respects the value.
10210 </desc>
10211 </attribute>
10212
10213 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10214 <desc>
10215 An alpha-blended overlay which is superposed over the frame buffer.
10216 The initial purpose is to allow the display of icons providing
10217 information about the VM state, including disk activity, in front
10218 ends which do not have other means of doing that. The overlay is
10219 designed to controlled exclusively by IDisplay. It has no locking
10220 of its own, and any changes made to it are not guaranteed to be
10221 visible until the affected portion of IFramebuffer is updated. The
10222 overlay can be created lazily the first time it is requested. This
10223 attribute can also return @c null to signal that the overlay is not
10224 implemented.
10225 </desc>
10226 </attribute>
10227
10228 <attribute name="winId" type="unsigned long long" readonly="yes">
10229 <desc>
10230 Platform-dependent identifier of the window where context of this
10231 frame buffer is drawn, or zero if there's no such window.
10232 </desc>
10233 </attribute>
10234
10235 <method name="lock">
10236 <desc>
10237 Locks the frame buffer.
10238 Gets called by the IDisplay object where this frame buffer is
10239 bound to.
10240 </desc>
10241 </method>
10242
10243 <method name="unlock">
10244 <desc>
10245 Unlocks the frame buffer.
10246 Gets called by the IDisplay object where this frame buffer is
10247 bound to.
10248 </desc>
10249 </method>
10250
10251 <method name="notifyUpdate">
10252 <desc>
10253 Informs about an update.
10254 Gets called by the display object where this buffer is
10255 registered.
10256 </desc>
10257 <param name="x" type="unsigned long" dir="in"/>
10258 <param name="y" type="unsigned long" dir="in"/>
10259 <param name="width" type="unsigned long" dir="in"/>
10260 <param name="height" type="unsigned long" dir="in"/>
10261 </method>
10262
10263 <method name="requestResize">
10264 <desc>
10265 Requests a size and pixel format change.
10266
10267 There are two modes of working with the video buffer of the virtual
10268 machine. The <i>indirect</i> mode implies that the IFramebuffer
10269 implementation allocates a memory buffer for the requested display mode
10270 and provides it to the virtual machine. In <i>direct</i> mode, the
10271 IFramebuffer implementation uses the memory buffer allocated and owned
10272 by the virtual machine. This buffer represents the video memory of the
10273 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10274 usually faster because the implementation gets a raw pointer to the
10275 guest VRAM buffer which it can directly use for visualizing the contents
10276 of the virtual display, as opposed to the indirect mode where the
10277 contents of guest VRAM are copied to the memory buffer provided by
10278 the implementation every time a display update occurs.
10279
10280 It is important to note that the direct mode is really fast only when
10281 the implementation uses the given guest VRAM buffer directly, for
10282 example, by blitting it to the window representing the virtual machine's
10283 display, which saves at least one copy operation comparing to the
10284 indirect mode. However, using the guest VRAM buffer directly is not
10285 always possible: the format and the color depth of this buffer may be
10286 not supported by the target window, or it may be unknown (opaque) as in
10287 case of text or non-linear multi-plane VGA video modes. In this case,
10288 the indirect mode (that is always available) should be used as a
10289 fallback: when the guest VRAM contents are copied to the
10290 implementation-provided memory buffer, color and format conversion is
10291 done automatically by the underlying code.
10292
10293 The @a pixelFormat parameter defines whether the direct mode is
10294 available or not. If @a pixelFormat is <link
10295 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10296 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10297 @a bytesPerLine parameters must be ignored and the implementation must use
10298 the indirect mode (where it provides its own buffer in one of the
10299 supported formats). In all other cases, @a pixelFormat together with
10300 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10301 buffer pointed to by the @a VRAM parameter and the implementation is
10302 free to choose which mode to use. To indicate that this frame buffer uses
10303 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10304 attribute must return @c true and <link to="#address"/> must
10305 return exactly the same address that is passed in the @a VRAM parameter
10306 of this method; otherwise it is assumed that the indirect strategy is
10307 chosen.
10308
10309 The @a width and @a height parameters represent the size of the
10310 requested display mode in both modes. In case of indirect mode, the
10311 provided memory buffer should be big enough to store data of the given
10312 display mode. In case of direct mode, it is guaranteed that the given
10313 @a VRAM buffer contains enough space to represent the display mode of the
10314 given size. Note that this frame buffer's <link to="#width"/> and <link
10315 to="#height"/> attributes must return exactly the same values as
10316 passed to this method after the resize is completed (see below).
10317
10318 The @a finished output parameter determines if the implementation has
10319 finished resizing the frame buffer or not. If, for some reason, the
10320 resize cannot be finished immediately during this call, @a finished
10321 must be set to @c false, and the implementation must call
10322 <link to="IDisplay::resizeCompleted"/> after it has returned from
10323 this method as soon as possible. If @a finished is @c false, the
10324 machine will not call any frame buffer methods until
10325 <link to="IDisplay::resizeCompleted"/> is called.
10326
10327 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10328 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10329 this frame buffer must return exactly the same values as specified in the
10330 parameters of this method, after the resize is completed. If the
10331 indirect mode is chosen, these attributes must return values describing
10332 the format of the implementation's own memory buffer <link
10333 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10334 value must always correlate with <link to="#pixelFormat"/>. Note that
10335 the <link to="#pixelFormat"/> attribute must never return <link
10336 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10337
10338 <note>
10339 This method is called by the IDisplay object under the
10340 <link to="#lock"/> provided by this IFramebuffer
10341 implementation. If this method returns @c false in @a finished, then
10342 this lock is not released until
10343 <link to="IDisplay::resizeCompleted"/> is called.
10344 </note>
10345 </desc>
10346 <param name="screenId" type="unsigned long" dir="in">
10347 <desc>
10348 Logical screen number. Must be used in the corresponding call to
10349 <link to="IDisplay::resizeCompleted"/> if this call is made.
10350 </desc>
10351 </param>
10352 <param name="pixelFormat" type="unsigned long" dir="in">
10353 <desc>
10354 Pixel format of the memory buffer pointed to by @a VRAM.
10355 See also <link to="FramebufferPixelFormat"/>.
10356 </desc>
10357 </param>
10358 <param name="VRAM" type="octet" mod="ptr" dir="in">
10359 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10360 </param>
10361 <param name="bitsPerPixel" type="unsigned long" dir="in">
10362 <desc>Color depth, bits per pixel.</desc>
10363 </param>
10364 <param name="bytesPerLine" type="unsigned long" dir="in">
10365 <desc>Size of one scan line, in bytes.</desc>
10366 </param>
10367 <param name="width" type="unsigned long" dir="in">
10368 <desc>Width of the guest display, in pixels.</desc>
10369 </param>
10370 <param name="height" type="unsigned long" dir="in">
10371 <desc>Height of the guest display, in pixels.</desc>
10372 </param>
10373 <param name="finished" type="boolean" dir="return">
10374 <desc>
10375 Can the VM start using the new frame buffer immediately
10376 after this method returns or it should wait for
10377 <link to="IDisplay::resizeCompleted"/>.
10378 </desc>
10379 </param>
10380 </method>
10381
10382 <method name="videoModeSupported">
10383 <desc>
10384 Returns whether the frame buffer implementation is willing to
10385 support a given video mode. In case it is not able to render
10386 the video mode (or for some reason not willing), it should
10387 return @c false. Usually this method is called when the guest
10388 asks the VMM device whether a given video mode is supported
10389 so the information returned is directly exposed to the guest.
10390 It is important that this method returns very quickly.
10391 </desc>
10392 <param name="width" type="unsigned long" dir="in"/>
10393 <param name="height" type="unsigned long" dir="in"/>
10394 <param name="bpp" type="unsigned long" dir="in"/>
10395 <param name="supported" type="boolean" dir="return"/>
10396 </method>
10397
10398 <method name="getVisibleRegion">
10399 <desc>
10400 Returns the visible region of this frame buffer.
10401
10402 If the @a rectangles parameter is @c null then the value of the
10403 @a count parameter is ignored and the number of elements necessary to
10404 describe the current visible region is returned in @a countCopied.
10405
10406 If @a rectangles is not @c null but @a count is less
10407 than the required number of elements to store region data, the method
10408 will report a failure. If @a count is equal or greater than the
10409 required number of elements, then the actual number of elements copied
10410 to the provided array will be returned in @a countCopied.
10411
10412 <note>
10413 The address of the provided array must be in the process space of
10414 this IFramebuffer object.
10415 </note>
10416 <note>
10417 Method not yet implemented.
10418 </note>
10419 </desc>
10420 <param name="rectangles" type="octet" mod="ptr" dir="in">
10421 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10422 </param>
10423 <param name="count" type="unsigned long" dir="in">
10424 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10425 </param>
10426 <param name="countCopied" type="unsigned long" dir="return">
10427 <desc>Number of elements copied to the @a rectangles array.</desc>
10428 </param>
10429 </method>
10430
10431 <method name="setVisibleRegion">
10432 <desc>
10433 Suggests a new visible region to this frame buffer. This region
10434 represents the area of the VM display which is a union of regions of
10435 all top-level windows of the guest operating system running inside the
10436 VM (if the Guest Additions for this system support this
10437 functionality). This information may be used by the frontends to
10438 implement the seamless desktop integration feature.
10439
10440 <note>
10441 The address of the provided array must be in the process space of
10442 this IFramebuffer object.
10443 </note>
10444 <note>
10445 The IFramebuffer implementation must make a copy of the provided
10446 array of rectangles.
10447 </note>
10448 <note>
10449 Method not yet implemented.
10450 </note>
10451 </desc>
10452 <param name="rectangles" type="octet" mod="ptr" dir="in">
10453 <desc>Pointer to the @c RTRECT array.</desc>
10454 </param>
10455 <param name="count" type="unsigned long" dir="in">
10456 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10457 </param>
10458 </method>
10459
10460 <method name="processVHWACommand">
10461 <desc>
10462 Posts a Video HW Acceleration Command to the frame buffer for processing.
10463 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10464 are posted from quest to the host to be processed by the host hardware.
10465
10466 <note>
10467 The address of the provided command must be in the process space of
10468 this IFramebuffer object.
10469 </note>
10470 </desc>
10471
10472 <param name="command" type="octet" mod="ptr" dir="in">
10473 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10474 </param>
10475 </method>
10476
10477 </interface>
10478
10479 <interface
10480 name="IFramebufferOverlay" extends="IFramebuffer"
10481 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10482 wsmap="suppress"
10483 >
10484 <desc>
10485 The IFramebufferOverlay interface represents an alpha blended overlay
10486 for displaying status icons above an IFramebuffer. It is always created
10487 not visible, so that it must be explicitly shown. It only covers a
10488 portion of the IFramebuffer, determined by its width, height and
10489 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10490 that order) format, and may be written to directly. Do re-read the
10491 width though, after setting it, as it may be adjusted (increased) to
10492 make it more suitable for the front end.
10493 </desc>
10494 <attribute name="x" type="unsigned long" readonly="yes">
10495 <desc>X position of the overlay, relative to the frame buffer.</desc>
10496 </attribute>
10497
10498 <attribute name="y" type="unsigned long" readonly="yes">
10499 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10500 </attribute>
10501
10502 <attribute name="visible" type="boolean" readonly="no">
10503 <desc>
10504 Whether the overlay is currently visible.
10505 </desc>
10506 </attribute>
10507
10508 <attribute name="alpha" type="unsigned long" readonly="no">
10509 <desc>
10510 The global alpha value for the overlay. This may or may not be
10511 supported by a given front end.
10512 </desc>
10513 </attribute>
10514
10515 <method name="move">
10516 <desc>
10517 Changes the overlay's position relative to the IFramebuffer.
10518 </desc>
10519 <param name="x" type="unsigned long" dir="in"/>
10520 <param name="y" type="unsigned long" dir="in"/>
10521 </method>
10522
10523 </interface>
10524
10525 <interface
10526 name="IDisplay" extends="$unknown"
10527 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10528 wsmap="managed"
10529 >
10530 <desc>
10531 The IDisplay interface represents the virtual machine's display.
10532
10533 The object implementing this interface is contained in each
10534 <link to="IConsole::display"/> attribute and represents the visual
10535 output of the virtual machine.
10536
10537 The virtual display supports pluggable output targets represented by the
10538 IFramebuffer interface. Examples of the output target are a window on
10539 the host computer or an RDP session's display on a remote computer.
10540 </desc>
10541 <attribute name="width" type="unsigned long" readonly="yes">
10542 <desc>Current display width.</desc>
10543 </attribute>
10544
10545 <attribute name="height" type="unsigned long" readonly="yes">
10546 <desc>Current display height.</desc>
10547 </attribute>
10548
10549 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10550 <desc>
10551 Current guest display color depth. Note that this may differ
10552 from <link to="IFramebuffer::bitsPerPixel"/>.
10553 </desc>
10554 </attribute>
10555
10556 <method name="setFramebuffer">
10557 <desc>
10558 Sets the framebuffer for given screen.
10559 </desc>
10560 <param name="screenId" type="unsigned long" dir="in"/>
10561 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10562 </method>
10563
10564 <method name="getFramebuffer">
10565 <desc>
10566 Queries the framebuffer for given screen.
10567 </desc>
10568 <param name="screenId" type="unsigned long" dir="in"/>
10569 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10570 <param name="xOrigin" type="long" dir="out"/>
10571 <param name="yOrigin" type="long" dir="out"/>
10572 </method>
10573
10574 <method name="setVideoModeHint">
10575 <desc>
10576 Asks VirtualBox to request the given video mode from
10577 the guest. This is just a hint and it cannot be guaranteed
10578 that the requested resolution will be used. Guest Additions
10579 are required for the request to be seen by guests. The caller
10580 should issue the request and wait for a resolution change and
10581 after a timeout retry.
10582
10583 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10584 parameters means that the corresponding values should be taken from the
10585 current video mode (i.e. left unchanged).
10586
10587 If the guest OS supports multi-monitor configuration then the @a display
10588 parameter specifies the number of the guest display to send the hint to:
10589 @c 0 is the primary display, @c 1 is the first secondary and
10590 so on. If the multi-monitor configuration is not supported, @a display
10591 must be @c 0.
10592
10593 <result name="E_INVALIDARG">
10594 The @a display is not associated with any monitor.
10595 </result>
10596
10597 </desc>
10598 <param name="width" type="unsigned long" dir="in"/>
10599 <param name="height" type="unsigned long" dir="in"/>
10600 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10601 <param name="display" type="unsigned long" dir="in"/>
10602 </method>
10603
10604 <method name="setSeamlessMode">
10605 <desc>
10606 Enables or disables seamless guest display rendering (seamless desktop
10607 integration) mode.
10608 <note>
10609 Calling this method has no effect if <link
10610 to="IGuest::supportsSeamless"/> returns @c false.
10611 </note>
10612 </desc>
10613 <param name="enabled" type="boolean" dir="in"/>
10614 </method>
10615
10616 <method name="takeScreenShot">
10617 <desc>
10618 Takes a screen shot of the requested size and copies it to the
10619 32-bpp buffer allocated by the caller and pointed to by @a address.
10620
10621 <note>This API can be used only by the COM/XPCOM C++ API as it
10622 requires pointer support. Use <link to="#takeScreenShotSlow" />
10623 with other language bindings.
10624 </note>
10625
10626 <result name="E_NOTIMPL">
10627 Feature not implemented.
10628 </result>
10629 <result name="VBOX_E_IPRT_ERROR">
10630 Could not take a screenshot.
10631 </result>
10632
10633 </desc>
10634 <param name="address" type="octet" mod="ptr" dir="in"/>
10635 <param name="width" type="unsigned long" dir="in"/>
10636 <param name="height" type="unsigned long" dir="in"/>
10637 </method>
10638
10639 <method name="takeScreenShotSlow">
10640 <desc>
10641 Takes a guest screen shot of the requested size and returns it as
10642 an array of bytes in uncompressed 32-bit ARGB format.
10643 This API is slow, but could be the only option to get guest screenshot
10644 for scriptable languages not allowed to manipulate with addresses
10645 directly.
10646
10647 <result name="E_NOTIMPL">
10648 Feature not implemented.
10649 </result>
10650 <result name="VBOX_E_IPRT_ERROR">
10651 Could not take a screenshot.
10652 </result>
10653 </desc>
10654 <param name="width" type="unsigned long" dir="in">
10655 <desc>
10656 Desired image width.
10657 </desc>
10658 </param>
10659 <param name="height" type="unsigned long" dir="in">
10660 <desc>
10661 Desired image height.
10662 </desc>
10663 </param>
10664 <param name="screenData" type="octet" dir="return" safearray="yes">
10665 <desc>
10666 Array with resulting screen data.
10667 </desc>
10668 </param>
10669 </method>
10670
10671 <method name="drawToScreen">
10672 <desc>
10673 Draws a 32-bpp image of the specified size from the given buffer
10674 to the given point on the VM display.
10675
10676 <result name="E_NOTIMPL">
10677 Feature not implemented.
10678 </result>
10679 <result name="VBOX_E_IPRT_ERROR">
10680 Could not draw to screen.
10681 </result>
10682
10683 </desc>
10684 <param name="address" type="octet" mod="ptr" dir="in"/>
10685 <param name="x" type="unsigned long" dir="in"/>
10686 <param name="y" type="unsigned long" dir="in"/>
10687 <param name="width" type="unsigned long" dir="in"/>
10688 <param name="height" type="unsigned long" dir="in"/>
10689 </method>
10690
10691 <method name="invalidateAndUpdate">
10692 <desc>
10693 Does a full invalidation of the VM display and instructs the VM
10694 to update it.
10695
10696 <result name="VBOX_E_IPRT_ERROR">
10697 Could not invalidate and update screen.
10698 </result>
10699
10700 </desc>
10701 </method>
10702
10703 <method name="resizeCompleted">
10704 <desc>
10705 Signals that a framebuffer has completed the resize operation.
10706
10707 <result name="VBOX_E_NOT_SUPPORTED">
10708 Operation only valid for external frame buffers.
10709 </result>
10710
10711 </desc>
10712 <param name="screenId" type="unsigned long" dir="in"/>
10713 </method>
10714
10715 <method name="updateCompleted">
10716 <desc>
10717 Signals that a framebuffer has completed the update operation.
10718
10719 <result name="VBOX_E_NOT_SUPPORTED">
10720 Operation only valid for external frame buffers.
10721 </result>
10722
10723 </desc>
10724 </method>
10725
10726 <method name="completeVHWACommand">
10727 <desc>
10728 Signals that the Video HW Acceleration command has completed.
10729 </desc>
10730
10731 <param name="command" type="octet" mod="ptr" dir="in">
10732 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10733 </param>
10734 </method>
10735
10736 </interface>
10737
10738 <!--
10739 // INetworkAdapter
10740 /////////////////////////////////////////////////////////////////////////
10741 -->
10742
10743 <enum
10744 name="NetworkAttachmentType"
10745 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10746 >
10747 <desc>
10748 Network attachment type.
10749 </desc>
10750
10751 <const name="Null" value="0">
10752 <desc>Null value, also means "not attached".</desc>
10753 </const>
10754 <const name="NAT" value="1"/>
10755 <const name="Bridged" value="2"/>
10756 <const name="Internal" value="3"/>
10757 <const name="HostOnly" value="4"/>
10758 </enum>
10759
10760 <enum
10761 name="NetworkAdapterType"
10762 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10763 >
10764 <desc>
10765 Network adapter type.
10766 </desc>
10767
10768 <const name="Null" value="0">
10769 <desc>Null value (never used by the API).</desc>
10770 </const>
10771 <const name="Am79C970A" value="1">
10772 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10773 </const>
10774 <const name="Am79C973" value="2">
10775 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10776 </const>
10777 <const name="I82540EM" value="3">
10778 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10779 </const>
10780 <const name="I82543GC" value="4">
10781 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10782 </const>
10783 <const name="I82545EM" value="5">
10784 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10785 </const>
10786 <const name="Virtio" value="6">
10787 <desc>Virtio network device.</desc>
10788 </const>
10789 </enum>
10790
10791 <interface
10792 name="INetworkAdapter" extends="$unknown"
10793 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10794 wsmap="managed"
10795 >
10796 <desc>
10797 Represents a virtual network adapter that is attached to a virtual machine.
10798 Each virtual machine has a fixed number of network adapter slots with one
10799 instance of this attached to each of them. Call
10800 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10801 is attached to a given slot in a given machine.
10802
10803 Each network adapter can be in one of five attachment modes, which are
10804 represented by the <link to="NetworkAttachmentType" /> enumeration;
10805 see the <link to="#attachmentType" /> attribute.
10806 </desc>
10807
10808 <attribute name="adapterType" type="NetworkAdapterType">
10809 <desc>
10810 Type of the virtual network adapter. Depending on this value,
10811 VirtualBox will provide a different virtual network hardware
10812 to the guest.
10813 </desc>
10814 </attribute>
10815
10816 <attribute name="slot" type="unsigned long" readonly="yes">
10817 <desc>
10818 Slot number this adapter is plugged into. Corresponds to
10819 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10820 to obtain this instance.
10821 </desc>
10822 </attribute>
10823
10824 <attribute name="enabled" type="boolean">
10825 <desc>
10826 Flag whether the network adapter is present in the
10827 guest system. If disabled, the virtual guest hardware will
10828 not contain this network adapter. Can only be changed when
10829 the VM is not running.
10830 </desc>
10831 </attribute>
10832
10833 <attribute name="MACAddress" type="wstring">
10834 <desc>
10835 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10836 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10837 </desc>
10838 </attribute>
10839
10840 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10841
10842 <attribute name="hostInterface" type="wstring">
10843 <desc>
10844 Name of the host network interface the VM is attached to.
10845 </desc>
10846 </attribute>
10847
10848 <attribute name="internalNetwork" type="wstring">
10849 <desc>
10850 Name of the internal network the VM is attached to.
10851 </desc>
10852 </attribute>
10853
10854 <attribute name="NATNetwork" type="wstring">
10855 <desc>
10856 Name of the NAT network the VM is attached to.
10857 </desc>
10858 </attribute>
10859
10860 <attribute name="cableConnected" type="boolean">
10861 <desc>
10862 Flag whether the adapter reports the cable as connected or not.
10863 It can be used to report offline situations to a VM.
10864 </desc>
10865 </attribute>
10866
10867 <attribute name="lineSpeed" type="unsigned long">
10868 <desc>
10869 Line speed reported by custom drivers, in units of 1 kbps.
10870 </desc>
10871 </attribute>
10872
10873 <attribute name="traceEnabled" type="boolean">
10874 <desc>
10875 Flag whether network traffic from/to the network card should be traced.
10876 Can only be toggled when the VM is turned off.
10877 </desc>
10878 </attribute>
10879
10880 <attribute name="traceFile" type="wstring">
10881 <desc>
10882 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10883 will be used.
10884 </desc>
10885 </attribute>
10886
10887 <method name="attachToNAT">
10888 <desc>
10889 Attach the network adapter to the Network Address Translation (NAT) interface.
10890 </desc>
10891 </method>
10892
10893 <method name="attachToBridgedInterface">
10894 <desc>
10895 Attach the network adapter to a bridged host interface.
10896 </desc>
10897 </method>
10898
10899 <method name="attachToInternalNetwork">
10900 <desc>
10901 Attach the network adapter to an internal network.
10902 </desc>
10903 </method>
10904
10905 <method name="attachToHostOnlyInterface">
10906 <desc>
10907 Attach the network adapter to the host-only network.
10908 </desc>
10909 </method>
10910
10911 <method name="detach">
10912 <desc>
10913 Detach the network adapter
10914 </desc>
10915 </method>
10916 </interface>
10917
10918
10919 <!--
10920 // ISerialPort
10921 /////////////////////////////////////////////////////////////////////////
10922 -->
10923
10924 <enum
10925 name="PortMode"
10926 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10927 >
10928 <desc>
10929 The PortMode enumeration represents possible communication modes for
10930 the virtual serial port device.
10931 </desc>
10932
10933 <const name="Disconnected" value="0">
10934 <desc>Virtual device is not attached to any real host device.</desc>
10935 </const>
10936 <const name="HostPipe" value="1">
10937 <desc>Virtual device is attached to a host pipe.</desc>
10938 </const>
10939 <const name="HostDevice" value="2">
10940 <desc>Virtual device is attached to a host device.</desc>
10941 </const>
10942 <const name="RawFile" value="3">
10943 <desc>Virtual device is attached to a raw file.</desc>
10944 </const>
10945 </enum>
10946
10947 <interface
10948 name="ISerialPort" extends="$unknown"
10949 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10950 wsmap="managed"
10951 >
10952
10953 <desc>
10954 The ISerialPort interface represents the virtual serial port device.
10955
10956 The virtual serial port device acts like an ordinary serial port
10957 inside the virtual machine. This device communicates to the real
10958 serial port hardware in one of two modes: host pipe or host device.
10959
10960 In host pipe mode, the #path attribute specifies the path to the pipe on
10961 the host computer that represents a serial port. The #server attribute
10962 determines if this pipe is created by the virtual machine process at
10963 machine startup or it must already exist before starting machine
10964 execution.
10965
10966 In host device mode, the #path attribute specifies the name of the
10967 serial port device on the host computer.
10968
10969 There is also a third communication mode: the disconnected mode. In this
10970 mode, the guest OS running inside the virtual machine will be able to
10971 detect the serial port, but all port write operations will be discarded
10972 and all port read operations will return no data.
10973
10974 <see>IMachine::getSerialPort</see>
10975 </desc>
10976
10977 <attribute name="slot" type="unsigned long" readonly="yes">
10978 <desc>
10979 Slot number this serial port is plugged into. Corresponds to
10980 the value you pass to <link to="IMachine::getSerialPort"/>
10981 to obtain this instance.
10982 </desc>
10983 </attribute>
10984
10985 <attribute name="enabled" type="boolean">
10986 <desc>
10987 Flag whether the serial port is enabled. If disabled,
10988 the serial port will not be reported to the guest OS.
10989 </desc>
10990 </attribute>
10991
10992 <attribute name="IOBase" type="unsigned long">
10993 <desc>Base I/O address of the serial port.</desc>
10994 </attribute>
10995
10996 <attribute name="IRQ" type="unsigned long">
10997 <desc>IRQ number of the serial port.</desc>
10998 </attribute>
10999
11000 <attribute name="hostMode" type="PortMode">
11001 <desc>
11002 How is this port connected to the host.
11003 <note>
11004 Changing this attribute may fail if the conditions for
11005 <link to="#path"/> are not met.
11006 </note>
11007 </desc>
11008 </attribute>
11009
11010 <attribute name="server" type="boolean">
11011 <desc>
11012 Flag whether this serial port acts as a server (creates a new pipe on
11013 the host) or as a client (uses the existing pipe). This attribute is
11014 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11015 </desc>
11016 </attribute>
11017
11018 <attribute name="path" type="wstring">
11019 <desc>
11020 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11021 PortMode_HostPipe, or the host serial device name when
11022 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11023 cases, setting a @c null or empty string as the attribute's value
11024 is an error. Otherwise, the value of this property is ignored.
11025 </desc>
11026 </attribute>
11027
11028 </interface>
11029
11030 <!--
11031 // IParallelPort
11032 /////////////////////////////////////////////////////////////////////////
11033 -->
11034
11035 <interface
11036 name="IParallelPort" extends="$unknown"
11037 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11038 wsmap="managed"
11039 >
11040
11041 <desc>
11042 The IParallelPort interface represents the virtual parallel port device.
11043
11044 The virtual parallel port device acts like an ordinary parallel port
11045 inside the virtual machine. This device communicates to the real
11046 parallel port hardware using the name of the parallel device on the host
11047 computer specified in the #path attribute.
11048
11049 Each virtual parallel port device is assigned a base I/O address and an
11050 IRQ number that will be reported to the guest operating system and used
11051 to operate the given parallel port from within the virtual machine.
11052
11053 <see>IMachine::getParallelPort</see>
11054 </desc>
11055
11056 <attribute name="slot" type="unsigned long" readonly="yes">
11057 <desc>
11058 Slot number this parallel port is plugged into. Corresponds to
11059 the value you pass to <link to="IMachine::getParallelPort"/>
11060 to obtain this instance.
11061 </desc>
11062 </attribute>
11063
11064 <attribute name="enabled" type="boolean">
11065 <desc>
11066 Flag whether the parallel port is enabled. If disabled,
11067 the parallel port will not be reported to the guest OS.
11068 </desc>
11069 </attribute>
11070
11071 <attribute name="IOBase" type="unsigned long">
11072 <desc>Base I/O address of the parallel port.</desc>
11073 </attribute>
11074
11075 <attribute name="IRQ" type="unsigned long">
11076 <desc>IRQ number of the parallel port.</desc>
11077 </attribute>
11078
11079 <attribute name="path" type="wstring">
11080 <desc>
11081 Host parallel device name. If this parallel port is enabled, setting a
11082 @c null or an empty string as this attribute's value will result into
11083 an error.
11084 </desc>
11085 </attribute>
11086
11087 </interface>
11088
11089
11090 <!--
11091 // IMachineDebugger
11092 /////////////////////////////////////////////////////////////////////////
11093 -->
11094
11095 <interface
11096 name="IMachineDebugger" extends="$unknown"
11097 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11098 wsmap="suppress"
11099 >
11100 <method name="resetStats">
11101 <desc>
11102 Reset VM statistics.
11103 </desc>
11104 <param name="pattern" type="wstring" dir="in">
11105 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11106 </param>
11107 </method>
11108
11109 <method name="dumpStats">
11110 <desc>
11111 Dumps VM statistics.
11112 </desc>
11113 <param name="pattern" type="wstring" dir="in">
11114 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11115 </param>
11116 </method>
11117
11118 <method name="getStats">
11119 <desc>
11120 Get the VM statistics in a XMLish format.
11121 </desc>
11122 <param name="pattern" type="wstring" dir="in">
11123 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11124 </param>
11125 <param name="withDescriptions" type="boolean" dir="in">
11126 <desc>Whether to include the descriptions.</desc>
11127 </param>
11128 <param name="stats" type="wstring" dir="out">
11129 <desc>The XML document containing the statistics.</desc>
11130 </param>
11131 </method>
11132
11133 <method name="injectNMI">
11134 <desc>
11135 Inject an NMI into a running VT-x/AMD-V VM.
11136 </desc>
11137 </method>
11138
11139 <attribute name="singlestep" type="boolean">
11140 <desc>Switch for enabling singlestepping.</desc>
11141 </attribute>
11142
11143 <attribute name="recompileUser" type="boolean">
11144 <desc>Switch for forcing code recompilation for user mode code.</desc>
11145 </attribute>
11146
11147 <attribute name="recompileSupervisor" type="boolean">
11148 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11149 </attribute>
11150
11151 <attribute name="PATMEnabled" type="boolean">
11152 <desc>Switch for enabling and disabling the PATM component.</desc>
11153 </attribute>
11154
11155 <attribute name="CSAMEnabled" type="boolean">
11156 <desc>Switch for enabling and disabling the CSAM component.</desc>
11157 </attribute>
11158
11159 <attribute name="logEnabled" type="boolean">
11160 <desc>Switch for enabling and disabling logging.</desc>
11161 </attribute>
11162
11163 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11164 <desc>
11165 Flag indicating whether the VM is currently making use of CPU hardware
11166 virtualization extensions.
11167 </desc>
11168 </attribute>
11169
11170 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11171 <desc>
11172 Flag indicating whether the VM is currently making use of the nested paging
11173 CPU hardware virtualization extension.
11174 </desc>
11175 </attribute>
11176
11177 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11178 <desc>
11179 Flag indicating whether the VM is currently making use of the VPID
11180 VT-x extension.
11181 </desc>
11182 </attribute>
11183
11184 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11185 <desc>
11186 Flag indicating whether the VM is currently making use of the Physical
11187 Address Extension CPU feature.
11188 </desc>
11189 </attribute>
11190
11191 <attribute name="virtualTimeRate" type="unsigned long">
11192 <desc>
11193 The rate at which the virtual time runs expressed as a percentage.
11194 The accepted range is 2% to 20000%.
11195 </desc>
11196 </attribute>
11197
11198 <!-- @todo method for setting log flags, groups and destination! -->
11199
11200 <attribute name="VM" type="unsigned long long" readonly="yes">
11201 <desc>
11202 Gets the VM handle. This is only for internal use while
11203 we carve the details of this interface.
11204 </desc>
11205 </attribute>
11206
11207 </interface>
11208
11209 <!--
11210 // IUSBController
11211 /////////////////////////////////////////////////////////////////////////
11212 -->
11213
11214 <interface
11215 name="IUSBController" extends="$unknown"
11216 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11217 wsmap="managed"
11218 >
11219 <attribute name="enabled" type="boolean">
11220 <desc>
11221 Flag whether the USB controller is present in the
11222 guest system. If disabled, the virtual guest hardware will
11223 not contain any USB controller. Can only be changed when
11224 the VM is powered off.
11225 </desc>
11226 </attribute>
11227
11228 <attribute name="enabledEhci" type="boolean">
11229 <desc>
11230 Flag whether the USB EHCI controller is present in the
11231 guest system. If disabled, the virtual guest hardware will
11232 not contain a USB EHCI controller. Can only be changed when
11233 the VM is powered off.
11234 </desc>
11235 </attribute>
11236
11237 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11238 <desc>
11239 USB standard version which the controller implements.
11240 This is a BCD which means that the major version is in the
11241 high byte and minor version is in the low byte.
11242 </desc>
11243 </attribute>
11244
11245 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11246 <desc>
11247 List of USB device filters associated with the machine.
11248
11249 If the machine is currently running, these filters are activated
11250 every time a new (supported) USB device is attached to the host
11251 computer that was not ignored by global filters
11252 (<link to="IHost::USBDeviceFilters"/>).
11253
11254 These filters are also activated when the machine is powered up.
11255 They are run against a list of all currently available USB
11256 devices (in states
11257 <link to="USBDeviceState_Available"/>,
11258 <link to="USBDeviceState_Busy"/>,
11259 <link to="USBDeviceState_Held"/>) that were not previously
11260 ignored by global filters.
11261
11262 If at least one filter matches the USB device in question, this
11263 device is automatically captured (attached to) the virtual USB
11264 controller of this machine.
11265
11266 <see>IUSBDeviceFilter, ::IUSBController</see>
11267 </desc>
11268 </attribute>
11269
11270 <method name="createDeviceFilter">
11271 <desc>
11272 Creates a new USB device filter. All attributes except
11273 the filter name are set to empty (any match),
11274 <i>active</i> is @c false (the filter is not active).
11275
11276 The created filter can then be added to the list of filters using
11277 <link to="#insertDeviceFilter"/>.
11278
11279 <result name="VBOX_E_INVALID_VM_STATE">
11280 The virtual machine is not mutable.
11281 </result>
11282
11283 <see>#deviceFilters</see>
11284 </desc>
11285 <param name="name" type="wstring" dir="in">
11286 <desc>
11287 Filter name. See <link to="IUSBDeviceFilter::name"/>
11288 for more info.
11289 </desc>
11290 </param>
11291 <param name="filter" type="IUSBDeviceFilter" dir="return">
11292 <desc>Created filter object.</desc>
11293 </param>
11294 </method>
11295
11296 <method name="insertDeviceFilter">
11297 <desc>
11298 Inserts the given USB device to the specified position
11299 in the list of filters.
11300
11301 Positions are numbered starting from <tt>0</tt>. If the specified
11302 position is equal to or greater than the number of elements in
11303 the list, the filter is added to the end of the collection.
11304
11305 <note>
11306 Duplicates are not allowed, so an attempt to insert a
11307 filter that is already in the collection, will return an
11308 error.
11309 </note>
11310
11311 <result name="VBOX_E_INVALID_VM_STATE">
11312 Virtual machine is not mutable.
11313 </result>
11314 <result name="E_INVALIDARG">
11315 USB device filter not created within this VirtualBox instance.
11316 </result>
11317 <result name="VBOX_E_INVALID_OBJECT_STATE">
11318 USB device filter already in list.
11319 </result>
11320
11321 <see>#deviceFilters</see>
11322 </desc>
11323 <param name="position" type="unsigned long" dir="in">
11324 <desc>Position to insert the filter to.</desc>
11325 </param>
11326 <param name="filter" type="IUSBDeviceFilter" dir="in">
11327 <desc>USB device filter to insert.</desc>
11328 </param>
11329 </method>
11330
11331 <method name="removeDeviceFilter">
11332 <desc>
11333 Removes a USB device filter from the specified position in the
11334 list of filters.
11335
11336 Positions are numbered starting from <tt>0</tt>. Specifying a
11337 position equal to or greater than the number of elements in
11338 the list will produce an error.
11339
11340 <see>#deviceFilters</see>
11341
11342 <result name="VBOX_E_INVALID_VM_STATE">
11343 Virtual machine is not mutable.
11344 </result>
11345 <result name="E_INVALIDARG">
11346 USB device filter list empty or invalid @a position.
11347 </result>
11348
11349 </desc>
11350 <param name="position" type="unsigned long" dir="in">
11351 <desc>Position to remove the filter from.</desc>
11352 </param>
11353 <param name="filter" type="IUSBDeviceFilter" dir="return">
11354 <desc>Removed USB device filter.</desc>
11355 </param>
11356 </method>
11357
11358 </interface>
11359
11360
11361 <!--
11362 // IUSBDevice
11363 /////////////////////////////////////////////////////////////////////////
11364 -->
11365
11366 <interface
11367 name="IUSBDevice" extends="$unknown"
11368 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11369 wsmap="managed"
11370 >
11371 <desc>
11372 The IUSBDevice interface represents a virtual USB device attached to the
11373 virtual machine.
11374
11375 A collection of objects implementing this interface is stored in the
11376 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11377 attached to a running virtual machine's USB controller.
11378 </desc>
11379
11380 <attribute name="id" type="uuid" mod="string" readonly="yes">
11381 <desc>
11382 Unique USB device ID. This ID is built from #vendorId,
11383 #productId, #revision and #serialNumber.
11384 </desc>
11385 </attribute>
11386
11387 <attribute name="vendorId" type="unsigned short" readonly="yes">
11388 <desc>Vendor ID.</desc>
11389 </attribute>
11390
11391 <attribute name="productId" type="unsigned short" readonly="yes">
11392 <desc>Product ID.</desc>
11393 </attribute>
11394
11395 <attribute name="revision" type="unsigned short" readonly="yes">
11396 <desc>
11397 Product revision number. This is a packed BCD represented as
11398 unsigned short. The high byte is the integer part and the low
11399 byte is the decimal.
11400 </desc>
11401 </attribute>
11402
11403 <attribute name="manufacturer" type="wstring" readonly="yes">
11404 <desc>Manufacturer string.</desc>
11405 </attribute>
11406
11407 <attribute name="product" type="wstring" readonly="yes">
11408 <desc>Product string.</desc>
11409 </attribute>
11410
11411 <attribute name="serialNumber" type="wstring" readonly="yes">
11412 <desc>Serial number string.</desc>
11413 </attribute>
11414
11415 <attribute name="address" type="wstring" readonly="yes">
11416 <desc>Host specific address of the device.</desc>
11417 </attribute>
11418
11419 <attribute name="port" type="unsigned short" readonly="yes">
11420 <desc>
11421 Host USB port number the device is physically
11422 connected to.
11423 </desc>
11424 </attribute>
11425
11426 <attribute name="version" type="unsigned short" readonly="yes">
11427 <desc>
11428 The major USB version of the device - 1 or 2.
11429 </desc>
11430 </attribute>
11431
11432 <attribute name="portVersion" type="unsigned short" readonly="yes">
11433 <desc>
11434 The major USB version of the host USB port the device is
11435 physically connected to - 1 or 2. For devices not connected to
11436 anything this will have the same value as the version attribute.
11437 </desc>
11438 </attribute>
11439
11440 <attribute name="remote" type="boolean" readonly="yes">
11441 <desc>
11442 Whether the device is physically connected to a remote VRDP
11443 client or to a local host machine.
11444 </desc>
11445 </attribute>
11446
11447 </interface>
11448
11449
11450 <!--
11451 // IUSBDeviceFilter
11452 /////////////////////////////////////////////////////////////////////////
11453 -->
11454
11455 <interface
11456 name="IUSBDeviceFilter" extends="$unknown"
11457 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11458 wsmap="managed"
11459 >
11460 <desc>
11461 The IUSBDeviceFilter interface represents an USB device filter used
11462 to perform actions on a group of USB devices.
11463
11464 This type of filters is used by running virtual machines to
11465 automatically capture selected USB devices once they are physically
11466 attached to the host computer.
11467
11468 A USB device is matched to the given device filter if and only if all
11469 attributes of the device match the corresponding attributes of the
11470 filter (that is, attributes are joined together using the logical AND
11471 operation). On the other hand, all together, filters in the list of
11472 filters carry the semantics of the logical OR operation. So if it is
11473 desirable to create a match like "this vendor id OR this product id",
11474 one needs to create two filters and specify "any match" (see below)
11475 for unused attributes.
11476
11477 All filter attributes used for matching are strings. Each string
11478 is an expression representing a set of values of the corresponding
11479 device attribute, that will match the given filter. Currently, the
11480 following filtering expressions are supported:
11481
11482 <ul>
11483 <li><i>Interval filters</i>. Used to specify valid intervals for
11484 integer device attributes (Vendor ID, Product ID and Revision).
11485 The format of the string is:
11486
11487 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11488
11489 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11490 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11491 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11492 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11493 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11494 possible integer is assumed.
11495 </li>
11496 <li><i>Boolean filters</i>. Used to specify acceptable values for
11497 boolean device attributes. The format of the string is:
11498
11499 <tt>true|false|yes|no|0|1</tt>
11500
11501 </li>
11502 <li><i>Exact match</i>. Used to specify a single value for the given
11503 device attribute. Any string that doesn't start with <tt>int:</tt>
11504 represents the exact match. String device attributes are compared to
11505 this string including case of symbols. Integer attributes are first
11506 converted to a string (see individual filter attributes) and then
11507 compared ignoring case.
11508
11509 </li>
11510 <li><i>Any match</i>. Any value of the corresponding device attribute
11511 will match the given filter. An empty or @c null string is
11512 used to construct this type of filtering expressions.
11513
11514 </li>
11515 </ul>
11516
11517 <note>
11518 On the Windows host platform, interval filters are not currently
11519 available. Also all string filter attributes
11520 (<link to="#manufacturer"/>, <link to="#product"/>,
11521 <link to="#serialNumber"/>) are ignored, so they behave as
11522 <i>any match</i> no matter what string expression is specified.
11523 </note>
11524
11525 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11526 </desc>
11527
11528 <attribute name="name" type="wstring">
11529 <desc>
11530 Visible name for this filter.
11531 This name is used to visually distinguish one filter from another,
11532 so it can neither be @c null nor an empty string.
11533 </desc>
11534 </attribute>
11535
11536 <attribute name="active" type="boolean">
11537 <desc>Whether this filter active or has been temporarily disabled.</desc>
11538 </attribute>
11539
11540 <attribute name="vendorId" type="wstring">
11541 <desc>
11542 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11543 The string representation for the <i>exact matching</i>
11544 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11545 (including leading zeroes).
11546 </desc>
11547 </attribute>
11548
11549 <attribute name="productId" type="wstring">
11550 <desc>
11551 <link to="IUSBDevice::productId">Product ID</link> filter.
11552 The string representation for the <i>exact matching</i>
11553 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11554 (including leading zeroes).
11555 </desc>
11556 </attribute>
11557
11558 <attribute name="revision" type="wstring">
11559 <desc>
11560 <link to="IUSBDevice::productId">Product revision number</link>
11561 filter. The string representation for the <i>exact matching</i>
11562 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11563 of the integer part of the revision, and <tt>F</tt> is the
11564 decimal digit of its fractional part (including leading and
11565 trailing zeros).
11566 Note that for interval filters, it's best to use the hexadecimal
11567 form, because the revision is stored as a 16 bit packed BCD value;
11568 so the expression <tt>int:0x0100-0x0199</tt> will match any
11569 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11570 </desc>
11571 </attribute>
11572
11573 <attribute name="manufacturer" type="wstring">
11574 <desc>
11575 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11576 </desc>
11577 </attribute>
11578
11579 <attribute name="product" type="wstring">
11580 <desc>
11581 <link to="IUSBDevice::product">Product</link> filter.
11582 </desc>
11583 </attribute>
11584
11585 <attribute name="serialNumber" type="wstring">
11586 <desc>
11587 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11588 </desc>
11589 </attribute>
11590
11591 <attribute name="port" type="wstring">
11592 <desc>
11593 <link to="IUSBDevice::port">Host USB port</link> filter.
11594 </desc>
11595 </attribute>
11596
11597 <attribute name="remote" type="wstring">
11598 <desc>
11599 <link to="IUSBDevice::remote">Remote state</link> filter.
11600 <note>
11601 This filter makes sense only for machine USB filters,
11602 i.e. it is ignored by IHostUSBDeviceFilter objects.
11603 </note>
11604 </desc>
11605 </attribute>
11606
11607 <attribute name="maskedInterfaces" type="unsigned long">
11608 <desc>
11609 This is an advanced option for hiding one or more USB interfaces
11610 from the guest. The value is a bit mask where the bits that are set
11611 means the corresponding USB interface should be hidden, masked off
11612 if you like.
11613 This feature only works on Linux hosts.
11614 </desc>
11615 </attribute>
11616
11617 </interface>
11618
11619
11620 <!--
11621 // IHostUSBDevice
11622 /////////////////////////////////////////////////////////////////////////
11623 -->
11624
11625 <enum
11626 name="USBDeviceState"
11627 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11628 >
11629 <desc>
11630 USB device state. This enumeration represents all possible states
11631 of the USB device physically attached to the host computer regarding
11632 its state on the host computer and availability to guest computers
11633 (all currently running virtual machines).
11634
11635 Once a supported USB device is attached to the host, global USB
11636 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11637 either ignore the device, or put it to USBDeviceState_Held state, or do
11638 nothing. Unless the device is ignored by global filters, filters of all
11639 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11640 activated that can put it to USBDeviceState_Captured state.
11641
11642 If the device was ignored by global filters, or didn't match
11643 any filters at all (including guest ones), it is handled by the host
11644 in a normal way. In this case, the device state is determined by
11645 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11646 or USBDeviceState_Available, depending on the current device usage.
11647
11648 Besides auto-capturing based on filters, the device can be manually
11649 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11650 state is USBDeviceState_Busy, USBDeviceState_Available or
11651 USBDeviceState_Held.
11652
11653 <note>
11654 Due to differences in USB stack implementations in Linux and Win32,
11655 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11656 only to the Linux version of the product. This also means that (<link
11657 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11658 device state is USBDeviceState_Held.
11659 </note>
11660
11661 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11662 </desc>
11663
11664 <const name="NotSupported" value="0">
11665 <desc>
11666 Not supported by the VirtualBox server, not available to guests.
11667 </desc>
11668 </const>
11669 <const name="Unavailable" value="1">
11670 <desc>
11671 Being used by the host computer exclusively,
11672 not available to guests.
11673 </desc>
11674 </const>
11675 <const name="Busy" value="2">
11676 <desc>
11677 Being used by the host computer, potentially available to guests.
11678 </desc>
11679 </const>
11680 <const name="Available" value="3">
11681 <desc>
11682 Not used by the host computer, available to guests (the host computer
11683 can also start using the device at any time).
11684 </desc>
11685 </const>
11686 <const name="Held" value="4">
11687 <desc>
11688 Held by the VirtualBox server (ignored by the host computer),
11689 available to guests.
11690 </desc>
11691 </const>
11692 <const name="Captured" value="5">
11693 <desc>
11694 Captured by one of the guest computers, not available
11695 to anybody else.
11696 </desc>
11697 </const>
11698 </enum>
11699
11700 <interface
11701 name="IHostUSBDevice" extends="IUSBDevice"
11702 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11703 wsmap="managed"
11704 >
11705 <desc>
11706 The IHostUSBDevice interface represents a physical USB device attached
11707 to the host computer.
11708
11709 Besides properties inherited from IUSBDevice, this interface adds the
11710 <link to="#state"/> property that holds the current state of the USB
11711 device.
11712
11713 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11714 </desc>
11715
11716 <attribute name="state" type="USBDeviceState" readonly="yes">
11717 <desc>
11718 Current state of the device.
11719 </desc>
11720 </attribute>
11721
11722 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11723
11724 </interface>
11725
11726
11727 <!--
11728 // IHostUSBDeviceFilter
11729 /////////////////////////////////////////////////////////////////////////
11730 -->
11731
11732 <enum
11733 name="USBDeviceFilterAction"
11734 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11735 >
11736 <desc>
11737 Actions for host USB device filters.
11738 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11739 </desc>
11740
11741 <const name="Null" value="0">
11742 <desc>Null value (never used by the API).</desc>
11743 </const>
11744 <const name="Ignore" value="1">
11745 <desc>Ignore the matched USB device.</desc>
11746 </const>
11747 <const name="Hold" value="2">
11748 <desc>Hold the matched USB device.</desc>
11749 </const>
11750 </enum>
11751
11752 <interface
11753 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11754 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11755 wsmap="managed"
11756 >
11757 <desc>
11758 The IHostUSBDeviceFilter interface represents a global filter for a
11759 physical USB device used by the host computer. Used indirectly in
11760 <link to="IHost::USBDeviceFilters"/>.
11761
11762 Using filters of this type, the host computer determines the initial
11763 state of the USB device after it is physically attached to the
11764 host's USB controller.
11765
11766 <note>
11767 The <link to="#remote"/> attribute is ignored by this type of
11768 filters, because it makes sense only for
11769 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11770 </note>
11771
11772 <see>IHost::USBDeviceFilters</see>
11773 </desc>
11774
11775 <attribute name="action" type="USBDeviceFilterAction">
11776 <desc>
11777 Action performed by the host when an attached USB device
11778 matches this filter.
11779 </desc>
11780 </attribute>
11781
11782 </interface>
11783
11784 <!--
11785 // IAudioAdapter
11786 /////////////////////////////////////////////////////////////////////////
11787 -->
11788
11789 <enum
11790 name="AudioDriverType"
11791 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11792 >
11793 <desc>
11794 Host audio driver type.
11795 </desc>
11796
11797 <const name="Null" value="0">
11798 <desc>Null value, also means "dummy audio driver".</desc>
11799 </const>
11800 <const name="WinMM" value="1">
11801 <desc>Windows multimedia (Windows hosts only).</desc>
11802 </const>
11803 <const name="OSS" value="2">
11804 <desc>Open Sound System (Linux hosts only).</desc>
11805 </const>
11806 <const name="ALSA" value="3">
11807 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11808 </const>
11809 <const name="DirectSound" value="4">
11810 <desc>DirectSound (Windows hosts only).</desc>
11811 </const>
11812 <const name="CoreAudio" value="5">
11813 <desc>CoreAudio (Mac hosts only).</desc>
11814 </const>
11815 <const name="MMPM" value="6">
11816 <desc>Reserved for historical reasons.</desc>
11817 </const>
11818 <const name="Pulse" value="7">
11819 <desc>PulseAudio (Linux hosts only).</desc>
11820 </const>
11821 <const name="SolAudio" value="8">
11822 <desc>Solaris audio (Solaris hosts only).</desc>
11823 </const>
11824 </enum>
11825
11826 <enum
11827 name="AudioControllerType"
11828 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11829 >
11830 <desc>
11831 Virtual audio controller type.
11832 </desc>
11833
11834 <const name="AC97" value="0"/>
11835 <const name="SB16" value="1"/>
11836 </enum>
11837
11838 <interface
11839 name="IAudioAdapter" extends="$unknown"
11840 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11841 wsmap="managed"
11842 >
11843 <desc>
11844 The IAudioAdapter interface represents the virtual audio adapter of
11845 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11846 </desc>
11847 <attribute name="enabled" type="boolean">
11848 <desc>
11849 Flag whether the audio adapter is present in the
11850 guest system. If disabled, the virtual guest hardware will
11851 not contain any audio adapter. Can only be changed when
11852 the VM is not running.
11853 </desc>
11854 </attribute>
11855 <attribute name="audioController" type="AudioControllerType">
11856 <desc>
11857 The audio hardware we emulate.
11858 </desc>
11859 </attribute>
11860 <attribute name="audioDriver" type="AudioDriverType">
11861 <desc>
11862 Audio driver the adapter is connected to. This setting
11863 can only be changed when the VM is not running.
11864 </desc>
11865 </attribute>
11866 </interface>
11867
11868 <!--
11869 // IVRDPServer
11870 /////////////////////////////////////////////////////////////////////////
11871 -->
11872
11873 <enum
11874 name="VRDPAuthType"
11875 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11876 >
11877 <desc>
11878 VRDP authentication type.
11879 </desc>
11880
11881 <const name="Null" value="0">
11882 <desc>Null value, also means "no authentication".</desc>
11883 </const>
11884 <const name="External" value="1"/>
11885 <const name="Guest" value="2"/>
11886 </enum>
11887
11888 <interface
11889 name="IVRDPServer" extends="$unknown"
11890 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11891 wsmap="managed"
11892 >
11893 <attribute name="enabled" type="boolean">
11894 <desc>VRDP server status.</desc>
11895 </attribute>
11896
11897 <attribute name="ports" type="wstring">
11898 <desc>
11899 VRDP server port numbers.
11900 <note>
11901 This is a string of comma separated TCP port numbers or port number ranges.
11902 The server will try to bind to one of ports from the list. Example
11903 <tt>3000,3010-3012,3015</tt>
11904 </note>
11905 </desc>
11906 </attribute>
11907
11908 <attribute name="netAddress" type="wstring">
11909 <desc>VRDP server address.</desc>
11910 </attribute>
11911
11912 <attribute name="authType" type="VRDPAuthType">
11913 <desc>VRDP authentication method.</desc>
11914 </attribute>
11915
11916 <attribute name="authTimeout" type="unsigned long">
11917 <desc>Timeout for guest authentication. Milliseconds.</desc>
11918 </attribute>
11919
11920 <attribute name="allowMultiConnection" type="boolean">
11921 <desc>
11922 Flag whether multiple simultaneous connections to the VM are permitted.
11923 Note that this will be replaced by a more powerful mechanism in the future.
11924 </desc>
11925 </attribute>
11926
11927 <attribute name="reuseSingleConnection" type="boolean">
11928 <desc>
11929 Flag whether the existing connection must be dropped and a new connection
11930 must be established by the VRDP server, when a new client connects in single
11931 connection mode.
11932 </desc>
11933 </attribute>
11934
11935 </interface>
11936
11937
11938 <!--
11939 // ISharedFolder
11940 /////////////////////////////////////////////////////////////////////////
11941 -->
11942
11943 <interface
11944 name="ISharedFolder" extends="$unknown"
11945 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11946 wsmap="struct"
11947 >
11948 <desc>
11949 The ISharedFolder interface represents a folder in the host computer's
11950 file system accessible from the guest OS running inside a virtual
11951 machine using an associated logical name.
11952
11953 There are three types of shared folders:
11954 <ul>
11955 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11956 folders available to all virtual machines.</li>
11957 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11958 VM-specific shared folders available to the given virtual machine at
11959 startup.</li>
11960 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11961 VM-specific shared folders created in the session context (for
11962 example, when the virtual machine is running) and automatically
11963 discarded when the session is closed (the VM is powered off).</li>
11964 </ul>
11965
11966 Logical names of shared folders must be unique within the given scope
11967 (global, permanent or transient). However, they do not need to be unique
11968 across scopes. In this case, the definition of the shared folder in a
11969 more specific scope takes precedence over definitions in all other
11970 scopes. The order of precedence is (more specific to more general):
11971 <ol>
11972 <li>Transient definitions</li>
11973 <li>Permanent definitions</li>
11974 <li>Global definitions</li>
11975 </ol>
11976
11977 For example, if MyMachine has a shared folder named
11978 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11979 transient shared folder named <tt>C_DRIVE</tt> (that points
11980 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11981 of <tt>C_DRIVE</tt> in the guest OS so
11982 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11983 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11984 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11985 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11986 to <tt>C:\\</tt> if it still exists.
11987
11988 Note that permanent and transient shared folders of different machines
11989 are in different name spaces, so they don't overlap and don't need to
11990 have unique logical names.
11991
11992 <note>
11993 Global shared folders are not implemented in the current version of the
11994 product.
11995 </note>
11996 </desc>
11997
11998 <attribute name="name" type="wstring" readonly="yes">
11999 <desc>Logical name of the shared folder.</desc>
12000 </attribute>
12001
12002 <attribute name="hostPath" type="wstring" readonly="yes">
12003 <desc>Full path to the shared folder in the host file system.</desc>
12004 </attribute>
12005
12006 <attribute name="accessible" type="boolean" readonly="yes">
12007 <desc>
12008 Whether the folder defined by the host path is currently
12009 accessible or not.
12010 For example, the folder can be unaccessible if it is placed
12011 on the network share that is not available by the time
12012 this property is read.
12013 </desc>
12014 </attribute>
12015
12016 <attribute name="writable" type="boolean" readonly="yes">
12017 <desc>
12018 Whether the folder defined by the host path is writable or
12019 not.
12020 </desc>
12021 </attribute>
12022
12023 <attribute name="lastAccessError" type="wstring" readonly="yes">
12024 <desc>
12025 Text message that represents the result of the last accessibility
12026 check.
12027
12028 Accessibility checks are performed each time the <link to="#accessible"/>
12029 attribute is read. An empty string is returned if the last
12030 accessibility check was successful. A non-empty string indicates a
12031 failure and should normally describe a reason of the failure (for
12032 example, a file read error).
12033 </desc>
12034 </attribute>
12035
12036 </interface>
12037
12038 <!--
12039 // ISession
12040 /////////////////////////////////////////////////////////////////////////
12041 -->
12042
12043 <interface
12044 name="IInternalSessionControl" extends="$unknown"
12045 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12046 internal="yes"
12047 wsmap="suppress"
12048 >
12049 <method name="getPID">
12050 <desc>PID of the process that has created this Session object.
12051 </desc>
12052 <param name="pid" type="unsigned long" dir="return"/>
12053 </method>
12054
12055 <method name="getRemoteConsole">
12056 <desc>
12057 Returns the console object suitable for remote control.
12058
12059 <result name="VBOX_E_INVALID_VM_STATE">
12060 Session state prevents operation.
12061 </result>
12062 <result name="VBOX_E_INVALID_OBJECT_STATE">
12063 Session type prevents operation.
12064 </result>
12065
12066 </desc>
12067 <param name="console" type="IConsole" dir="return"/>
12068 </method>
12069
12070 <method name="assignMachine">
12071 <desc>
12072 Assigns the machine object associated with this direct-type
12073 session or informs the session that it will be a remote one
12074 (if @a machine == @c null).
12075
12076 <result name="VBOX_E_INVALID_VM_STATE">
12077 Session state prevents operation.
12078 </result>
12079 <result name="VBOX_E_INVALID_OBJECT_STATE">
12080 Session type prevents operation.
12081 </result>
12082
12083 </desc>
12084 <param name="machine" type="IMachine" dir="in"/>
12085 </method>
12086
12087 <method name="assignRemoteMachine">
12088 <desc>
12089 Assigns the machine and the (remote) console object associated with
12090 this remote-type session.
12091
12092 <result name="VBOX_E_INVALID_VM_STATE">
12093 Session state prevents operation.
12094 </result>
12095
12096 </desc>
12097 <param name="machine" type="IMachine" dir="in"/>
12098 <param name="console" type="IConsole" dir="in"/>
12099 </method>
12100
12101 <method name="updateMachineState">
12102 <desc>
12103 Updates the machine state in the VM process.
12104 Must be called only in certain cases
12105 (see the method implementation).
12106
12107 <result name="VBOX_E_INVALID_VM_STATE">
12108 Session state prevents operation.
12109 </result>
12110 <result name="VBOX_E_INVALID_OBJECT_STATE">
12111 Session type prevents operation.
12112 </result>
12113
12114 </desc>
12115 <param name="aMachineState" type="MachineState" dir="in"/>
12116 </method>
12117
12118 <method name="uninitialize">
12119 <desc>
12120 Uninitializes (closes) this session. Used by VirtualBox to close
12121 the corresponding remote session when the direct session dies
12122 or gets closed.
12123
12124 <result name="VBOX_E_INVALID_VM_STATE">
12125 Session state prevents operation.
12126 </result>
12127
12128 </desc>
12129 </method>
12130
12131 <method name="onNetworkAdapterChange">
12132 <desc>
12133 Triggered when settings of a network adapter of the
12134 associated virtual machine have changed.
12135
12136 <result name="VBOX_E_INVALID_VM_STATE">
12137 Session state prevents operation.
12138 </result>
12139 <result name="VBOX_E_INVALID_OBJECT_STATE">
12140 Session type prevents operation.
12141 </result>
12142
12143 </desc>
12144 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12145 <param name="changeAdapter" type="boolean" dir="in"/>
12146 </method>
12147
12148 <method name="onSerialPortChange">
12149 <desc>
12150 Triggered when settings of a serial port of the
12151 associated virtual machine have changed.
12152
12153 <result name="VBOX_E_INVALID_VM_STATE">
12154 Session state prevents operation.
12155 </result>
12156 <result name="VBOX_E_INVALID_OBJECT_STATE">
12157 Session type prevents operation.
12158 </result>
12159
12160 </desc>
12161 <param name="serialPort" type="ISerialPort" dir="in"/>
12162 </method>
12163
12164 <method name="onParallelPortChange">
12165 <desc>
12166 Triggered when settings of a parallel port of the
12167 associated virtual machine have changed.
12168
12169 <result name="VBOX_E_INVALID_VM_STATE">
12170 Session state prevents operation.
12171 </result>
12172 <result name="VBOX_E_INVALID_OBJECT_STATE">
12173 Session type prevents operation.
12174 </result>
12175
12176 </desc>
12177 <param name="parallelPort" type="IParallelPort" dir="in"/>
12178 </method>
12179
12180 <method name="onStorageControllerChange">
12181 <desc>
12182 Triggered when settings of a storage controller of the
12183 associated virtual machine have changed.
12184
12185 <result name="VBOX_E_INVALID_VM_STATE">
12186 Session state prevents operation.
12187 </result>
12188 <result name="VBOX_E_INVALID_OBJECT_STATE">
12189 Session type prevents operation.
12190 </result>
12191
12192 </desc>
12193 </method>
12194
12195 <method name="onMediumChange">
12196 <desc>
12197 Triggered when attached media of the
12198 associated virtual machine have changed.
12199
12200 <result name="VBOX_E_INVALID_VM_STATE">
12201 Session state prevents operation.
12202 </result>
12203 <result name="VBOX_E_INVALID_OBJECT_STATE">
12204 Session type prevents operation.
12205 </result>
12206
12207 </desc>
12208
12209 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12210 </method>
12211
12212 <method name="onVRDPServerChange">
12213 <desc>
12214 Triggered when settings of the VRDP server object of the
12215 associated virtual machine have changed.
12216
12217 <result name="VBOX_E_INVALID_VM_STATE">
12218 Session state prevents operation.
12219 </result>
12220 <result name="VBOX_E_INVALID_OBJECT_STATE">
12221 Session type prevents operation.
12222 </result>
12223
12224 </desc>
12225 </method>
12226
12227 <method name="onUSBControllerChange">
12228 <desc>
12229 Triggered when settings of the USB controller object of the
12230 associated virtual machine have changed.
12231
12232 <result name="VBOX_E_INVALID_VM_STATE">
12233 Session state prevents operation.
12234 </result>
12235 <result name="VBOX_E_INVALID_OBJECT_STATE">
12236 Session type prevents operation.
12237 </result>
12238
12239 </desc>
12240 </method>
12241
12242 <method name="onSharedFolderChange">
12243 <desc>
12244 Triggered when a permanent (global or machine) shared folder has been
12245 created or removed.
12246 <note>
12247 We don't pass shared folder parameters in this notification because
12248 the order in which parallel notifications are delivered is not defined,
12249 therefore it could happen that these parameters were outdated by the
12250 time of processing this notification.
12251 </note>
12252
12253 <result name="VBOX_E_INVALID_VM_STATE">
12254 Session state prevents operation.
12255 </result>
12256 <result name="VBOX_E_INVALID_OBJECT_STATE">
12257 Session type prevents operation.
12258 </result>
12259
12260 </desc>
12261 <param name="global" type="boolean" dir="in"/>
12262 </method>
12263
12264 <method name="onUSBDeviceAttach">
12265 <desc>
12266 Triggered when a request to capture a USB device (as a result
12267 of matched USB filters or direct call to
12268 <link to="IConsole::attachUSBDevice"/>) has completed.
12269 A @c null @a error object means success, otherwise it
12270 describes a failure.
12271
12272 <result name="VBOX_E_INVALID_VM_STATE">
12273 Session state prevents operation.
12274 </result>
12275 <result name="VBOX_E_INVALID_OBJECT_STATE">
12276 Session type prevents operation.
12277 </result>
12278
12279 </desc>
12280 <param name="device" type="IUSBDevice" dir="in"/>
12281 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12282 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12283 </method>
12284
12285 <method name="onUSBDeviceDetach">
12286 <desc>
12287 Triggered when a request to release the USB device (as a result
12288 of machine termination or direct call to
12289 <link to="IConsole::detachUSBDevice"/>) has completed.
12290 A @c null @a error object means success, otherwise it
12291 describes a failure.
12292
12293 <result name="VBOX_E_INVALID_VM_STATE">
12294 Session state prevents operation.
12295 </result>
12296 <result name="VBOX_E_INVALID_OBJECT_STATE">
12297 Session type prevents operation.
12298 </result>
12299
12300 </desc>
12301 <param name="id" type="uuid" mod="string" dir="in"/>
12302 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12303 </method>
12304
12305 <method name="onShowWindow">
12306 <desc>
12307 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12308 <link to="IMachine::showConsoleWindow"/> in order to notify
12309 console callbacks
12310 <link to="IConsoleCallback::onCanShowWindow"/>
12311 and <link to="IConsoleCallback::onShowWindow"/>.
12312
12313 <result name="VBOX_E_INVALID_OBJECT_STATE">
12314 Session type prevents operation.
12315 </result>
12316
12317 </desc>
12318 <param name="check" type="boolean" dir="in"/>
12319 <param name="canShow" type="boolean" dir="out"/>
12320 <param name="winId" type="unsigned long long" dir="out"/>
12321 </method>
12322
12323 <method name="accessGuestProperty">
12324 <desc>
12325 Called by <link to="IMachine::getGuestProperty"/> and by
12326 <link to="IMachine::setGuestProperty"/> in order to read and
12327 modify guest properties.
12328
12329 <result name="VBOX_E_INVALID_VM_STATE">
12330 Machine session is not open.
12331 </result>
12332 <result name="VBOX_E_INVALID_OBJECT_STATE">
12333 Session type is not direct.
12334 </result>
12335
12336 </desc>
12337 <param name="name" type="wstring" dir="in"/>
12338 <param name="value" type="wstring" dir="in"/>
12339 <param name="flags" type="wstring" dir="in"/>
12340 <param name="isSetter" type="boolean" dir="in"/>
12341 <param name="retValue" type="wstring" dir="out"/>
12342 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12343 <param name="retFlags" type="wstring" dir="out"/>
12344 </method>
12345
12346 <method name="enumerateGuestProperties">
12347 <desc>
12348 Return a list of the guest properties matching a set of patterns along
12349 with their values, time stamps and flags.
12350
12351 <result name="VBOX_E_INVALID_VM_STATE">
12352 Machine session is not open.
12353 </result>
12354 <result name="VBOX_E_INVALID_OBJECT_STATE">
12355 Session type is not direct.
12356 </result>
12357
12358 </desc>
12359 <param name="patterns" type="wstring" dir="in">
12360 <desc>
12361 The patterns to match the properties against as a comma-separated
12362 string. If this is empty, all properties currently set will be
12363 returned.
12364 </desc>
12365 </param>
12366 <param name="key" type="wstring" dir="out" safearray="yes">
12367 <desc>
12368 The key names of the properties returned.
12369 </desc>
12370 </param>
12371 <param name="value" type="wstring" dir="out" safearray="yes">
12372 <desc>
12373 The values of the properties returned. The array entries match the
12374 corresponding entries in the @a key array.
12375 </desc>
12376 </param>
12377 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12378 <desc>
12379 The time stamps of the properties returned. The array entries match
12380 the corresponding entries in the @a key array.
12381 </desc>
12382 </param>
12383 <param name="flags" type="wstring" dir="out" safearray="yes">
12384 <desc>
12385 The flags of the properties returned. The array entries match the
12386 corresponding entries in the @a key array.
12387 </desc>
12388 </param>
12389 </method>
12390
12391 </interface>
12392
12393 <interface
12394 name="ISession" extends="$dispatched"
12395 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12396 wsmap="managed"
12397 >
12398 <desc>
12399 The ISession interface represents a serialization primitive for virtual
12400 machines.
12401
12402 With VirtualBox, every time one wishes to manipulate a virtual machine
12403 (e.g. change its settings or start execution), a session object is
12404 required. Such an object must be passed to one of the session methods
12405 that open the given session, which then initiates the machine manipulation.
12406
12407 A session serves several purposes: it identifies to the inter-process VirtualBox
12408 code which process is currently working with the virtual machine, and it ensures
12409 that there are no incompatible requests from several processes for the
12410 same virtual machine. Session objects can therefore be thought of as mutex
12411 semaphores that lock virtual machines to prevent conflicting accesses from
12412 several processes.
12413
12414 How sessions objects are used depends on whether you use the Main API
12415 via COM or via the webservice:
12416
12417 <ul>
12418 <li>When using the COM API directly, an object of the Session class from the
12419 VirtualBox type library needs to be created. In regular COM C++ client code,
12420 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12421 This object will then act as a local session object in further calls to open
12422 a session.
12423 </li>
12424
12425 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12426 one session object automatically when <link to="IWebsessionManager::logon" />
12427 is called. A managed object reference to that session object can be retrieved by
12428 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12429 reference can then be used to open sessions.
12430 </li>
12431 </ul>
12432
12433 Sessions are mainly used in two variations:
12434
12435 <ul>
12436 <li>
12437 To start a virtual machine in a separate process, one would call
12438 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12439 object as its first parameter. This session then identifies the caller
12440 and lets him control the started machine (for example, pause machine
12441 execution or power it down) as well as be notified about machine
12442 execution state changes.
12443 </li>
12444
12445 <li>To alter machine settings, or to start machine execution within the
12446 current process, one needs to open a direct session for the machine first by
12447 calling <link to="IVirtualBox::openSession"/>. While a direct session
12448 is open within one process, no any other process may open another direct
12449 session for the same machine. This prevents the machine from being changed
12450 by other processes while it is running or while the machine is being configured.
12451 </li>
12452 </ul>
12453
12454 One also can attach to an existing direct session already opened by
12455 another process (for example, in order to send a control request to the
12456 virtual machine such as the pause or the reset request). This is done by
12457 calling <link to="IVirtualBox::openExistingSession"/>.
12458
12459 <note>
12460 Unless you are trying to write a new VirtualBox front-end that
12461 performs direct machine execution (like the VirtualBox or VBoxSDL
12462 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12463 session opened by <link to="IVirtualBox::openSession"/> and use this
12464 session only to change virtual machine settings. If you simply want to
12465 start virtual machine execution using one of the existing front-ends
12466 (for example the VirtualBox GUI or headless server), simply use
12467 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12468 will power up the machine automatically for you.
12469 </note>
12470 </desc>
12471
12472 <attribute name="state" type="SessionState" readonly="yes">
12473 <desc>Current state of this session.</desc>
12474 </attribute>
12475
12476 <attribute name="type" type="SessionType" readonly="yes">
12477 <desc>
12478 Type of this session. The value of this attribute is valid only
12479 if the session is currently open (i.e. its #state is
12480 SessionType_SessionOpen), otherwise an error will be returned.
12481 </desc>
12482 </attribute>
12483
12484 <attribute name="machine" type="IMachine" readonly="yes">
12485 <desc>Machine object associated with this session.</desc>
12486 </attribute>
12487
12488 <attribute name="console" type="IConsole" readonly="yes">
12489 <desc>Console object associated with this session.</desc>
12490 </attribute>
12491
12492 <method name="close">
12493 <desc>
12494 Closes a session that was previously opened.
12495
12496 It is recommended that every time an "open session" method (such as
12497 <link to="IVirtualBox::openRemoteSession" /> or
12498 <link to="IVirtualBox::openSession" />) has been called to
12499 manipulate a virtual machine, the caller invoke
12500 ISession::close() when it's done doing so. Since sessions are
12501 serialization primitives much like ordinary mutexes, they are
12502 best used the same way: for each "open" call, there should be
12503 a matching "close" call, even when errors occur.
12504
12505 Otherwise, if a direct session for a machine opened with
12506 <link to="IVirtualBox::openSession"/> is not explicitly closed
12507 when the application terminates, the state of the machine will
12508 be set to <link to="MachineState_Aborted" /> on the server.
12509
12510 Generally, it is recommended to close all open sessions explicitly
12511 before terminating the application (regardless of the reason for
12512 the termination).
12513
12514 <note>
12515 Do not expect the session state (<link to="ISession::state" />
12516 to return to "Closed" immediately after you invoke
12517 ISession::close(), particularly if you have started a remote
12518 session to execute the VM in a new process. The session state will
12519 automatically return to "Closed" once the VM is no longer executing,
12520 which can of course take a very long time.
12521 </note>
12522
12523 <result name="E_UNEXPECTED">
12524 Session is not open.
12525 </result>
12526
12527 </desc>
12528 </method>
12529
12530 </interface>
12531
12532 <!--
12533 // IStorageController
12534 /////////////////////////////////////////////////////////////////////////
12535 -->
12536
12537 <enum
12538 name="StorageBus"
12539 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12540 >
12541 <desc>
12542 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12543 see <link to="IStorageController::bus" />.
12544 </desc>
12545 <const name="Null" value="0">
12546 <desc>@c null value. Never used by the API.</desc>
12547 </const>
12548 <const name="IDE" value="1"/>
12549 <const name="SATA" value="2"/>
12550 <const name="SCSI" value="3"/>
12551 <const name="Floppy" value="4"/>
12552 </enum>
12553
12554 <enum
12555 name="StorageControllerType"
12556 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12557 >
12558 <desc>
12559 The exact variant of storage controller hardware presented
12560 to the guest; see <link to="IStorageController::controllerType" />.
12561 </desc>
12562
12563 <const name="Null" value="0">
12564 <desc>@c null value. Never used by the API.</desc>
12565 </const>
12566 <const name="LsiLogic" value="1">
12567 <desc>A SCSI controller of the LsiLogic variant.</desc>
12568 </const>
12569 <const name="BusLogic" value="2">
12570 <desc>A SCSI controller of the BusLogic variant.</desc>
12571 </const>
12572 <const name="IntelAhci" value="3">
12573 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12574 </const>
12575 <const name="PIIX3" value="4">
12576 <desc>An IDE controller of the PIIX3 variant.</desc>
12577 </const>
12578 <const name="PIIX4" value="5">
12579 <desc>An IDE controller of the PIIX4 variant.</desc>
12580 </const>
12581 <const name="ICH6" value="6">
12582 <desc>An IDE controller of the ICH6 variant.</desc>
12583 </const>
12584 <const name="I82078" value="7">
12585 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12586 </const>
12587 </enum>
12588
12589 <interface
12590 name="IStorageController" extends="$unknown"
12591 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12592 wsmap="managed"
12593 >
12594 <desc>
12595 Represents a storage controller that is attached to a virtual machine
12596 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12597 attached to storage controllers in a real computer, virtual media
12598 (represented by <link to="IMedium" />) are attached to virtual
12599 storage controllers, represented by this interface.
12600
12601 As opposed to physical hardware, VirtualBox has a very generic concept
12602 of a storage controller, and for purposes of the Main API, all virtual
12603 storage is attached to virtual machines via instances of this interface.
12604 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12605 and Floppy (see <link to="#bus" />). Depending on which of these four is
12606 used, certain sub-types may be available and can be selected in
12607 <link to="#controllerType" />.
12608
12609 Depending on these settings, the guest operating system might see
12610 significantly different virtual hardware.
12611 </desc>
12612
12613 <attribute name="name" type="wstring" readonly="yes">
12614 <desc>
12615 Name of the storage controller, as originally specified with
12616 <link to="IMachine::addStorageController" />. This then uniquely
12617 identifies this controller with other method calls such as
12618 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12619 </desc>
12620 </attribute>
12621
12622 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12623 <desc>
12624 Maximum number of devices which can be attached to one port.
12625 </desc>
12626 </attribute>
12627
12628 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12629 <desc>
12630 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12631 </desc>
12632 </attribute>
12633
12634 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12635 <desc>
12636 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12637 </desc>
12638 </attribute>
12639
12640 <attribute name="instance" type="unsigned long">
12641 <desc>
12642 The instance number of the device in the running VM.
12643 </desc>
12644 </attribute>
12645
12646 <attribute name="portCount" type="unsigned long">
12647 <desc>
12648 The number of currently usable ports on the controller.
12649 The minimum and maximum number of ports for one controller are
12650 stored in <link to="IStorageController::minPortCount"/>
12651 and <link to="IStorageController::maxPortCount"/>.
12652 </desc>
12653 </attribute>
12654
12655 <attribute name="bus" type="StorageBus" readonly="yes">
12656 <desc>
12657 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12658 </desc>
12659 </attribute>
12660
12661 <attribute name="controllerType" type="StorageControllerType">
12662 <desc>
12663 The exact variant of storage controller hardware presented
12664 to the guest.
12665 Depending on this value, VirtualBox will provide a different
12666 virtual storage controller hardware to the guest.
12667 For SATA and floppy controllers, only one variant is available,
12668 but for IDE and SCSI, there are several.
12669
12670 For SCSI controllers, the default type is LsiLogic.
12671 </desc>
12672 </attribute>
12673
12674 <method name="GetIDEEmulationPort">
12675 <desc>
12676 Gets the corresponding port number which is emulated as an IDE device.
12677 Works only with SATA controllers.
12678
12679 <result name="E_INVALIDARG">
12680 The @a devicePosition is not in the range 0 to 3.
12681 </result>
12682 <result name="E_NOTIMPL">
12683 The storage controller type is not SATAIntelAhci.
12684 </result>
12685
12686 </desc>
12687 <param name="devicePosition" type="long" dir="in"/>
12688 <param name="portNumber" type="long" dir="return"/>
12689 </method>
12690
12691 <method name="SetIDEEmulationPort">
12692 <desc>
12693 Sets the port number which is emulated as an IDE device.
12694 Works only with SATA controllers.
12695
12696 <result name="E_INVALIDARG">
12697 The @a devicePosition is not in the range 0 to 3 or the
12698 @a portNumber is not in the range 0 to 29.
12699 </result>
12700 <result name="E_NOTIMPL">
12701 The storage controller type is not SATAIntelAhci.
12702 </result>
12703
12704 </desc>
12705 <param name="devicePosition" type="long" dir="in"/>
12706 <param name="portNumber" type="long" dir="in"/>
12707 </method>
12708
12709 </interface>
12710
12711<if target="wsdl">
12712
12713 <!--
12714 // IManagedObjectRef
12715 /////////////////////////////////////////////////////////////////////////
12716 -->
12717
12718 <interface
12719 name="IManagedObjectRef" extends="$unknown"
12720 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12721 internal="yes"
12722 wsmap="managed"
12723 wscpp="hardcoded"
12724 >
12725 <desc>
12726 Managed object reference.
12727
12728 Only within the webservice, a managed object reference (which is really
12729 an opaque number) allows a webservice client to address an object
12730 that lives in the address space of the webservice server.
12731
12732 Behind each managed object reference, there is a COM object that lives
12733 in the webservice server's address space. The COM object is not freed
12734 until the managed object reference is released, either by an explicit
12735 call to <link to="IManagedObjectRef::release" /> or by logging off from
12736 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12737 all objects created during the webservice session.
12738
12739 Whenever a method call of the VirtualBox API returns a COM object, the
12740 webservice representation of that method will instead return a
12741 managed object reference, which can then be used to invoke methods
12742 on that object.
12743 </desc>
12744
12745 <method name="getInterfaceName">
12746 <desc>
12747 Returns the name of the interface that this managed object represents,
12748 for example, "IMachine", as a string.
12749 </desc>
12750 <param name="return" type="wstring" dir="return"/>
12751 </method>
12752
12753 <method name="release">
12754 <desc>
12755 Releases this managed object reference and frees the resources that
12756 were allocated for it in the webservice server process. After calling
12757 this method, the identifier of the reference can no longer be used.
12758 </desc>
12759 </method>
12760
12761 </interface>
12762
12763 <!--
12764 // IWebsessionManager
12765 /////////////////////////////////////////////////////////////////////////
12766 -->
12767
12768 <interface
12769 name="IWebsessionManager" extends="$unknown"
12770 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12771 internal="yes"
12772 wsmap="global"
12773 wscpp="hardcoded"
12774 >
12775 <desc>
12776 Websession manager. This provides essential services
12777 to webservice clients.
12778 </desc>
12779 <method name="logon">
12780 <desc>
12781 Logs a new client onto the webservice and returns a managed object reference to
12782 the IVirtualBox instance, which the client can then use as a basis to further
12783 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12784 interface, in one way or the other.
12785 </desc>
12786 <param name="username" type="wstring" dir="in"/>
12787 <param name="password" type="wstring" dir="in"/>
12788 <param name="return" type="IVirtualBox" dir="return"/>
12789 </method>
12790
12791 <method name="getSessionObject">
12792 <desc>
12793 Returns a managed object reference to the internal ISession object that was created
12794 for this web service session when the client logged on.
12795
12796 <see>ISession</see>
12797 </desc>
12798 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12799 <param name="return" type="ISession" dir="return"/>
12800 </method>
12801
12802 <method name="logoff">
12803 <desc>
12804 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12805 and destroys all resources associated with the session (most importantly, all
12806 managed objects created in the server while the session was active).
12807 </desc>
12808 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12809 </method>
12810
12811 </interface>
12812
12813</if>
12814
12815 <!--
12816 // IPerformanceCollector & friends
12817 /////////////////////////////////////////////////////////////////////////
12818 -->
12819
12820 <interface
12821 name="IPerformanceMetric" extends="$unknown"
12822 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12823 >
12824 <desc>
12825 The IPerformanceMetric interface represents parameters of the given
12826 performance metric.
12827 </desc>
12828
12829 <attribute name="metricName" type="wstring" readonly="yes">
12830 <desc>
12831 Name of the metric.
12832 </desc>
12833 </attribute>
12834
12835 <attribute name="object" type="$unknown" readonly="yes">
12836 <desc>
12837 Object this metric belongs to.
12838 </desc>
12839 </attribute>
12840
12841 <attribute name="description" type="wstring" readonly="yes">
12842 <desc>
12843 Textual description of the metric.
12844 </desc>
12845 </attribute>
12846
12847 <attribute name="period" type="unsigned long" readonly="yes">
12848 <desc>
12849 Time interval between samples, measured in seconds.
12850 </desc>
12851 </attribute>
12852
12853 <attribute name="count" type="unsigned long" readonly="yes">
12854 <desc>
12855 Number of recent samples retained by the performance collector for this
12856 metric.
12857
12858 When the collected sample count exceeds this number, older samples
12859 are discarded.
12860 </desc>
12861 </attribute>
12862
12863 <attribute name="unit" type="wstring" readonly="yes">
12864 <desc>
12865 Unit of measurement.
12866 </desc>
12867 </attribute>
12868
12869 <attribute name="minimumValue" type="long" readonly="yes">
12870 <desc>
12871 Minimum possible value of this metric.
12872 </desc>
12873 </attribute>
12874
12875 <attribute name="maximumValue" type="long" readonly="yes">
12876 <desc>
12877 Maximum possible value of this metric.
12878 </desc>
12879 </attribute>
12880 </interface>
12881
12882 <interface
12883 name="IPerformanceCollector" extends="$unknown"
12884 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12885 wsmap="managed"
12886 >
12887 <desc>
12888 The IPerformanceCollector interface represents a service that collects and
12889 stores performance metrics data.
12890
12891 Performance metrics are associated with objects of interfaces like IHost and
12892 IMachine. Each object has a distinct set of performance metrics.
12893 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12894
12895 Metric data is collected at the specified intervals and is retained
12896 internally. The interval and the number of retained samples can be set
12897 with <link to="IPerformanceCollector::setupMetrics" />.
12898
12899 Metrics are organized hierarchically, with each level separated by a
12900 slash (/) character. Generally, the scheme for metric names is like this:
12901
12902 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12903
12904 "Category/Metric" together form the base metric name. A base metric is the
12905 smallest unit for which a sampling interval and the number of retained
12906 samples can be set. Only base metrics can be enabled and disabled. All
12907 sub-metrics are collected when their base metric is collected.
12908 Collected values for any set of sub-metrics can be queried with
12909 <link to="IPerformanceCollector::queryMetricsData" />.
12910
12911 For example "CPU/Load/User:avg"
12912 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12913 "average" aggregate. An aggregate function is computed over all retained
12914 data. Valid aggregate functions are:
12915
12916 <ul>
12917 <li>avg -- average</li>
12918 <li>min -- minimum</li>
12919 <li>max -- maximum</li>
12920 </ul>
12921
12922 When setting up
12923 metric parameters, querying metric data, enabling or disabling metrics
12924 wildcards can be used in metric names to specify a subset of metrics. For
12925 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12926 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12927 values without aggregates <tt>*:</tt> can be used.
12928
12929 The valid names for base metrics are:
12930
12931 <ul>
12932 <li>CPU/Load</li>
12933 <li>CPU/MHz</li>
12934 <li>RAM/Usage</li>
12935 </ul>
12936
12937 The general sequence for collecting and retrieving the metrics is:
12938 <ul>
12939 <li>
12940 Obtain an instance of IPerformanceCollector with
12941 <link to="IVirtualBox::performanceCollector" />
12942 </li>
12943 <li>
12944 Allocate and populate an array with references to objects the metrics
12945 will be collected for. Use references to IHost and IMachine objects.
12946 </li>
12947 <li>
12948 Allocate and populate an array with base metric names the data will be
12949 collected for.
12950 </li>
12951 <li>
12952 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12953 metric data will be collected and stored.
12954 </li>
12955 <li>
12956 Wait for the data to get collected.
12957 </li>
12958 <li>
12959 Allocate and populate an array with references to objects the metric
12960 values will be queried for. You can re-use the object array used for
12961 setting base metrics.
12962 </li>
12963 <li>
12964 Allocate and populate an array with metric names the data will be
12965 collected for. Note that metric names differ from base metric names.
12966 </li>
12967 <li>
12968 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12969 have been collected so far are returned. Note that the values are still
12970 retained internally and data collection continues.
12971 </li>
12972 </ul>
12973
12974 For an example of usage refer to the following files in VirtualBox SDK:
12975 <ul>
12976 <li>
12977 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12978 </li>
12979 <li>
12980 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12981 </li>
12982 </ul>
12983 </desc>
12984
12985 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12986 <desc>
12987 Array of unique names of metrics.
12988
12989 This array represents all metrics supported by the performance
12990 collector. Individual objects do not necessarily support all of them.
12991 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12992 list of supported metrics for a particular object.
12993 </desc>
12994 </attribute>
12995
12996 <method name="getMetrics">
12997 <desc>
12998 Returns parameters of specified metrics for a set of objects.
12999 <note>
13000 @c Null metrics array means all metrics. @c Null object array means
13001 all existing objects.
13002 </note>
13003 </desc>
13004 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13005 <desc>
13006 Metric name filter. Currently, only a comma-separated list of metrics
13007 is supported.
13008 </desc>
13009 </param>
13010 <param name="objects" type="$unknown" dir="in" safearray="yes">
13011 <desc>
13012 Set of objects to return metric parameters for.
13013 </desc>
13014 </param>
13015 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13016 <desc>
13017 Array of returned metric parameters.
13018 </desc>
13019 </param>
13020 </method>
13021
13022 <method name="setupMetrics">
13023 <desc>
13024 Sets parameters of specified base metrics for a set of objects. Returns
13025 an array of <link to="IPerformanceMetric" /> describing the metrics have
13026 been affected.
13027 <note>
13028 @c Null or empty metric name array means all metrics. @c Null or empty
13029 object array means all existing objects. If metric name array contains
13030 a single element and object array contains many, the single metric
13031 name array element is applied to each object array element to form
13032 metric/object pairs.
13033 </note>
13034 </desc>
13035 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13036 <desc>
13037 Metric name filter. Comma-separated list of metrics with wildcard
13038 support.
13039 </desc>
13040 </param>
13041 <param name="objects" type="$unknown" dir="in" safearray="yes">
13042 <desc>
13043 Set of objects to setup metric parameters for.
13044 </desc>
13045 </param>
13046 <param name="period" type="unsigned long" dir="in">
13047 <desc>
13048 Time interval in seconds between two consecutive samples of performance
13049 data.
13050 </desc>
13051 </param>
13052 <param name="count" type="unsigned long" dir="in">
13053 <desc>
13054 Number of samples to retain in performance data history. Older samples
13055 get discarded.
13056 </desc>
13057 </param>
13058 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13059 <desc>
13060 Array of metrics that have been modified by the call to this method.
13061 </desc>
13062 </param>
13063 </method>
13064
13065 <method name="enableMetrics">
13066 <desc>
13067 Turns on collecting specified base metrics. Returns an array of
13068 <link to="IPerformanceMetric" /> describing the metrics have been
13069 affected.
13070 <note>
13071 @c Null or empty metric name array means all metrics. @c Null or empty
13072 object array means all existing objects. If metric name array contains
13073 a single element and object array contains many, the single metric
13074 name array element is applied to each object array element to form
13075 metric/object pairs.
13076 </note>
13077 </desc>
13078 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13079 <desc>
13080 Metric name filter. Comma-separated list of metrics with wildcard
13081 support.
13082 </desc>
13083 </param>
13084 <param name="objects" type="$unknown" dir="in" safearray="yes">
13085 <desc>
13086 Set of objects to enable metrics for.
13087 </desc>
13088 </param>
13089 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13090 <desc>
13091 Array of metrics that have been modified by the call to this method.
13092 </desc>
13093 </param>
13094 </method>
13095
13096 <method name="disableMetrics">
13097 <desc>
13098 Turns off collecting specified base metrics. Returns an array of
13099 <link to="IPerformanceMetric" /> describing the metrics have been
13100 affected.
13101 <note>
13102 @c Null or empty metric name array means all metrics. @c Null or empty
13103 object array means all existing objects. If metric name array contains
13104 a single element and object array contains many, the single metric
13105 name array element is applied to each object array element to form
13106 metric/object pairs.
13107 </note>
13108 </desc>
13109 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13110 <desc>
13111 Metric name filter. Comma-separated list of metrics with wildcard
13112 support.
13113 </desc>
13114 </param>
13115 <param name="objects" type="$unknown" dir="in" safearray="yes">
13116 <desc>
13117 Set of objects to disable metrics for.
13118 </desc>
13119 </param>
13120 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13121 <desc>
13122 Array of metrics that have been modified by the call to this method.
13123 </desc>
13124 </param>
13125 </method>
13126
13127 <method name="queryMetricsData">
13128 <desc>
13129 Queries collected metrics data for a set of objects.
13130
13131 The data itself and related metric information are returned in seven
13132 parallel and one flattened array of arrays. Elements of
13133 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13134 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13135 the same index describe one set of values corresponding to a single
13136 metric.
13137
13138 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13139 start and length of a sub-array is indicated by
13140 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13141 value for metric <tt>metricNames[i]</tt> is at
13142 <tt>returnData[returnIndices[i]]</tt>.
13143
13144 <note>
13145 @c Null or empty metric name array means all metrics. @c Null or empty
13146 object array means all existing objects. If metric name array contains
13147 a single element and object array contains many, the single metric
13148 name array element is applied to each object array element to form
13149 metric/object pairs.
13150 </note>
13151 <note>
13152 Data collection continues behind the scenes after call to
13153 @c queryMetricsData. The return data can be seen as the snapshot of
13154 the current state at the time of @c queryMetricsData call. The
13155 internally kept metric values are not cleared by the call. This makes
13156 possible querying different subsets of metrics or aggregates with
13157 subsequent calls. If periodic querying is needed it is highly
13158 suggested to query the values with @c interval*count period to avoid
13159 confusion. This way a completely new set of data values will be
13160 provided by each query.
13161 </note>
13162 </desc>
13163 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13164 <desc>
13165 Metric name filter. Comma-separated list of metrics with wildcard
13166 support.
13167 </desc>
13168 </param>
13169 <param name="objects" type="$unknown" dir="in" safearray="yes">
13170 <desc>
13171 Set of objects to query metrics for.
13172 </desc>
13173 </param>
13174 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13175 <desc>
13176 Names of metrics returned in @c returnData.
13177 </desc>
13178 </param>
13179 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13180 <desc>
13181 Objects associated with metrics returned in @c returnData.
13182 </desc>
13183 </param>
13184 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13185 <desc>
13186 Units of measurement for each returned metric.
13187 </desc>
13188 </param>
13189 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13190 <desc>
13191 Divisor that should be applied to return values in order to get
13192 floating point values. For example:
13193 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13194 will retrieve the floating point value of i-th sample of the first
13195 metric.
13196 </desc>
13197 </param>
13198 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13199 <desc>
13200 Sequence numbers of the first elements of value sequences of particular metrics
13201 returned in @c returnData. For aggregate metrics it is the sequence number of
13202 the sample the aggregate started calculation from.
13203 </desc>
13204 </param>
13205 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13206 <desc>
13207 Indices of the first elements of value sequences of particular metrics
13208 returned in @c returnData.
13209 </desc>
13210 </param>
13211 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13212 <desc>
13213 Lengths of value sequences of particular metrics.
13214 </desc>
13215 </param>
13216 <param name="returnData" type="long" dir="return" safearray="yes">
13217 <desc>
13218 Flattened array of all metric data containing sequences of values for
13219 each metric.
13220 </desc>
13221 </param>
13222 </method>
13223
13224 </interface>
13225
13226 <module name="VBoxSVC" context="LocalServer">
13227 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13228 namespace="virtualbox.org">
13229 <interface name="IVirtualBox" default="yes"/>
13230 </class>
13231 </module>
13232
13233 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13234 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13235 namespace="virtualbox.org">
13236 <interface name="ISession" default="yes"/>
13237 </class>
13238 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13239 namespace="virtualbox.org">
13240 <interface name="ILocalOwner" default="yes"/>
13241 <interface name="IVirtualBoxCallback"/>
13242 <interface name="IConsoleCallback"/>
13243 </class>
13244 </module>
13245
13246</library>
13247
13248</idl>
13249
13250<!-- vim: set shiftwidth=2 tabstop=2 expandtab: -->
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette