VirtualBox

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

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

Dropped obsolet HWVirtEx properties.

  • Property svn:eol-style set to native
File size: 488.2 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. Note that in case such extensions are not available,
773 they will not be used.
774 </desc>
775 </const>
776 <const name="Exclusive" value="2">
777 <desc>
778 Exclusive use of the VT extensions boolean property. When enabled VirtualBox assumes it can acquire full and exclusive access
779 to the VT-x or AMD-V feature of the host. To share these with other hypervisors you must disable this property.
780 </desc>
781 </const>
782 <const name="VPIDEnabled" value="3">
783 <desc>
784 VT-x VPID boolean property. Note that in case this extension is not available,
785 it will not be used.
786 </desc>
787 </const>
788 <const name="NestedPagingEnabled" value="4">
789 <desc>
790 Nested Paging boolean property. Note that in case this extension is not available,
791 it will not be used.
792 </desc>
793 </const>
794 </enum>
795
796 <enum
797 name="SessionType"
798 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
799 >
800 <desc>
801 Session type. This enumeration represents possible values of the
802 <link to="ISession::type"/> attribute.
803 </desc>
804
805 <const name="Null" value="0">
806 <desc>Null value (never used by the API).</desc>
807 </const>
808 <const name="Direct" value="1">
809 <desc>
810 Direct session
811 (opened by <link to="IVirtualBox::openSession"/>)
812 </desc>
813 </const>
814 <const name="Remote" value="2">
815 <desc>
816 Remote session
817 (opened by <link to="IVirtualBox::openRemoteSession"/>)
818 </desc>
819 </const>
820 <const name="Existing" value="3">
821 <desc>
822 Existing session
823 (opened by <link to="IVirtualBox::openExistingSession"/>)
824 </desc>
825 </const>
826 </enum>
827
828 <enum
829 name="DeviceType"
830 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
831 >
832 <desc>
833 Device type.
834 </desc>
835 <const name="Null" value="0">
836 <desc>
837 Null value, may also mean "no device" (not allowed for
838 <link to="IConsole::getDeviceActivity"/>).
839 </desc>
840 </const>
841 <const name="Floppy" value="1">
842 <desc>Floppy device.</desc>
843 </const>
844 <const name="DVD" value="2">
845 <desc>CD/DVD-ROM device.</desc>
846 </const>
847 <const name="HardDisk" value="3">
848 <desc>Hard disk device.</desc>
849 </const>
850 <const name="Network" value="4">
851 <desc>Network device.</desc>
852 </const>
853 <const name="USB" value="5">
854 <desc>USB device.</desc>
855 </const>
856 <const name="SharedFolder" value="6">
857 <desc>Shared folder device.</desc>
858 </const>
859 </enum>
860
861 <enum
862 name="DeviceActivity"
863 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
864 >
865 <desc>
866 Device activity for <link to="IConsole::getDeviceActivity"/>.
867 </desc>
868
869 <const name="Null" value="0"/>
870 <const name="Idle" value="1"/>
871 <const name="Reading" value="2"/>
872 <const name="Writing" value="3"/>
873 </enum>
874
875 <enum
876 name="ClipboardMode"
877 uuid="33364716-4008-4701-8f14-be0fa3d62950"
878 >
879 <desc>
880 Host-Guest clipboard interchange mode.
881 </desc>
882
883 <const name="Disabled" value="0"/>
884 <const name="HostToGuest" value="1"/>
885 <const name="GuestToHost" value="2"/>
886 <const name="Bidirectional" value="3"/>
887 </enum>
888
889 <enum
890 name="Scope"
891 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
892 >
893 <desc>
894 Scope of the operation.
895
896 A generic enumeration used in various methods to define the action or
897 argument scope.
898 </desc>
899
900 <const name="Global" value="0"/>
901 <const name="Machine" value="1"/>
902 <const name="Session" value="2"/>
903 </enum>
904
905 <enum
906 name="GuestStatisticType"
907 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
908 >
909 <desc>
910 Statistics type for <link to="IGuest::getStatistic"/>.
911 </desc>
912
913 <const name="CPULoad_Idle" value="0">
914 <desc>
915 Idle CPU load (0-100%) for last interval.
916 </desc>
917 </const>
918 <const name="CPULoad_Kernel" value="1">
919 <desc>
920 Kernel CPU load (0-100%) for last interval.
921 </desc>
922 </const>
923 <const name="CPULoad_User" value="2">
924 <desc>
925 User CPU load (0-100%) for last interval.
926 </desc>
927 </const>
928 <const name="Threads" value="3">
929 <desc>
930 Total number of threads in the system.
931 </desc>
932 </const>
933 <const name="Processes" value="4">
934 <desc>
935 Total number of processes in the system.
936 </desc>
937 </const>
938 <const name="Handles" value="5">
939 <desc>
940 Total number of handles in the system.
941 </desc>
942 </const>
943 <const name="MemoryLoad" value="6">
944 <desc>
945 Memory load (0-100%).
946 </desc>
947 </const>
948 <const name="PhysMemTotal" value="7">
949 <desc>
950 Total physical memory in megabytes.
951 </desc>
952 </const>
953 <const name="PhysMemAvailable" value="8">
954 <desc>
955 Free physical memory in megabytes.
956 </desc>
957 </const>
958 <const name="PhysMemBalloon" value="9">
959 <desc>
960 Ballooned physical memory in megabytes.
961 </desc>
962 </const>
963 <const name="MemCommitTotal" value="10">
964 <desc>
965 Total amount of memory in the committed state in megabytes.
966 </desc>
967 </const>
968 <const name="MemKernelTotal" value="11">
969 <desc>
970 Total amount of memory used by the guest OS's kernel in megabytes.
971 </desc>
972 </const>
973 <const name="MemKernelPaged" value="12">
974 <desc>
975 Total amount of paged memory used by the guest OS's kernel in megabytes.
976 </desc>
977 </const>
978 <const name="MemKernelNonpaged" value="13">
979 <desc>
980 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
981 </desc>
982 </const>
983 <const name="MemSystemCache" value="14">
984 <desc>
985 Total amount of memory used by the guest OS's system cache in megabytes.
986 </desc>
987 </const>
988 <const name="PageFileSize" value="15">
989 <desc>
990 Pagefile size in megabytes.
991 </desc>
992 </const>
993 <const name="SampleNumber" value="16">
994 <desc>
995 Statistics sample number
996 </desc>
997 </const>
998 <const name="MaxVal" value="17"/>
999 </enum>
1000
1001 <enum
1002 name="BIOSBootMenuMode"
1003 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1004 >
1005 <desc>
1006 BIOS boot menu mode.
1007 </desc>
1008
1009 <const name="Disabled" value="0"/>
1010 <const name="MenuOnly" value="1"/>
1011 <const name="MessageAndMenu" value="2"/>
1012 </enum>
1013
1014 <enum
1015 name="ProcessorFeature"
1016 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1017 >
1018 <desc>
1019 CPU features.
1020 </desc>
1021
1022 <const name="HWVirtEx" value="0"/>
1023 <const name="PAE" value="1"/>
1024 <const name="LongMode" value="2"/>
1025 <const name="NestedPaging" value="3"/>
1026 </enum>
1027
1028 <enum
1029 name="FirmwareType"
1030 uuid="7ceea938-8b49-41e2-bb47-667219c0d586"
1031 >
1032 <desc>
1033 Firmware type.
1034 </desc>
1035 <const name="BIOS" value="1">
1036 <desc>BIOS Firmware.</desc>
1037 </const>
1038 <const name="EFI" value="2">
1039 <desc>Efi firmware.</desc>
1040 </const>
1041 </enum>
1042
1043 <!--
1044 // IVirtualBoxErrorInfo
1045 /////////////////////////////////////////////////////////////////////////
1046 -->
1047
1048 <interface
1049 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1050 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1051 supportsErrorInfo="no"
1052 wsmap="managed"
1053 >
1054 <desc>
1055 The IVirtualBoxErrorInfo interface represents extended error information.
1056
1057 Extended error information can be set by VirtualBox components after
1058 unsuccessful or partially successful method invocation. This information
1059 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1060 and then shown to the client in addition to the plain 32-bit result code.
1061
1062 In MS COM, this interface extends the IErrorInfo interface,
1063 in XPCOM, it extends the nsIException interface. In both cases,
1064 it provides a set of common attributes to retrieve error
1065 information.
1066
1067 Sometimes invocation of some component's method may involve methods of
1068 other components that may also fail (independently of this method's
1069 failure), or a series of non-fatal errors may precede a fatal error that
1070 causes method failure. In cases like that, it may be desirable to preserve
1071 information about all errors happened during method invocation and deliver
1072 it to the caller. The <link to="#next"/> attribute is intended
1073 specifically for this purpose and allows to represent a chain of errors
1074 through a single IVirtualBoxErrorInfo object set after method invocation.
1075
1076 Note that errors are stored to a chain in the reverse order, i.e. the
1077 initial error object you query right after method invocation is the last
1078 error set by the callee, the object it points to in the @a next attribute
1079 is the previous error and so on, up to the first error (which is the last
1080 in the chain).
1081 </desc>
1082
1083 <attribute name="resultCode" type="long" readonly="yes">
1084 <desc>
1085 Result code of the error.
1086 Usually, it will be the same as the result code returned
1087 by the method that provided this error information, but not
1088 always. For example, on Win32, CoCreateInstance() will most
1089 likely return E_NOINTERFACE upon unsuccessful component
1090 instantiation attempt, but not the value the component factory
1091 returned. Value is typed 'long', not 'result',
1092 to make interface usable from scripting languages.
1093 <note>
1094 In MS COM, there is no equivalent.
1095 In XPCOM, it is the same as nsIException::result.
1096 </note>
1097 </desc>
1098 </attribute>
1099
1100 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1101 <desc>
1102 UUID of the interface that defined the error.
1103 <note>
1104 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1105 data type.
1106 In XPCOM, there is no equivalent.
1107 </note>
1108 </desc>
1109 </attribute>
1110
1111 <attribute name="component" type="wstring" readonly="yes">
1112 <desc>
1113 Name of the component that generated the error.
1114 <note>
1115 In MS COM, it is the same as IErrorInfo::GetSource.
1116 In XPCOM, there is no equivalent.
1117 </note>
1118 </desc>
1119 </attribute>
1120
1121 <attribute name="text" type="wstring" readonly="yes">
1122 <desc>
1123 Text description of the error.
1124 <note>
1125 In MS COM, it is the same as IErrorInfo::GetDescription.
1126 In XPCOM, it is the same as nsIException::message.
1127 </note>
1128 </desc>
1129 </attribute>
1130
1131 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1132 <desc>
1133 Next error object if there is any, or @c null otherwise.
1134 <note>
1135 In MS COM, there is no equivalent.
1136 In XPCOM, it is the same as nsIException::inner.
1137 </note>
1138 </desc>
1139 </attribute>
1140
1141 </interface>
1142
1143 <interface
1144 name="ILocalOwner" extends="$dispatched"
1145 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1146 >
1147 <desc>
1148 The ILocalOwner interface allows to register local objects
1149 (created without COM calls, but with new()).
1150 Once registered, calls to methods of such objects can be made
1151 from remote COM processes.
1152 The main usecase is the event callback implementation where
1153 API clients provide callback objects.
1154 </desc>
1155 <method name="setLocalObject">
1156 <desc>
1157 Set local object.
1158 </desc>
1159 <param name="object" type="$unknown" dir="in">
1160 <desc>Local object to forward requests to.
1161 If null, clears currently set local object.</desc>
1162 </param>
1163 </method>
1164 </interface>
1165
1166 <!--
1167 // IVirtualBox
1168 /////////////////////////////////////////////////////////////////////////
1169 -->
1170
1171 <interface
1172 name="IVirtualBoxCallback" extends="$unknown"
1173 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1174 wsmap="suppress"
1175 >
1176
1177 <method name="onMachineStateChange">
1178 <desc>
1179 The execution state of the given machine has changed.
1180 <see>IMachine::state</see>
1181 </desc>
1182 <param name="machineId" type="uuid" mod="string" dir="in">
1183 <desc>ID of the machine this event relates to.</desc>
1184 </param>
1185 <param name="state" type="MachineState" dir="in">
1186 <desc>New execution state.</desc>
1187 </param>
1188 </method>
1189
1190 <method name="onMachineDataChange">
1191 <desc>
1192 Any of the settings of the given machine has changed.
1193 </desc>
1194 <param name="machineId" type="uuid" mod="string" dir="in">
1195 <desc>ID of the machine this event relates to.</desc>
1196 </param>
1197 </method>
1198
1199 <method name="onExtraDataCanChange">
1200 <desc>
1201 Notification when someone tries to change extra data for
1202 either the given machine or (if @c null) global extra data.
1203 This gives the chance to veto against changes.
1204 </desc>
1205 <param name="machineId" type="uuid" mod="string" dir="in">
1206 <desc>
1207 ID of the machine this event relates to
1208 (@c null ID for global extra data change requests).
1209 </desc>
1210 </param>
1211 <param name="key" type="wstring" dir="in">
1212 <desc>
1213 Extra data key for the attempted write.
1214 </desc>
1215 </param>
1216 <param name="value" type="wstring" dir="in">
1217 <desc>
1218 Extra data value for the given key.
1219 </desc>
1220 </param>
1221 <param name="error" type="wstring" dir="out">
1222 <desc>
1223 Optional error message describing the reason of the
1224 veto (ignored if this notification returns @c true).
1225 </desc>
1226 </param>
1227 <param name="allowChange" type="boolean" dir="return">
1228 <desc>
1229 Flag to indicate whether the callee agrees (@c true)
1230 or vetoes against the change (@c false).
1231 </desc>
1232 </param>
1233 </method>
1234
1235 <method name="onExtraDataChange">
1236 <desc>
1237 Notification when machine specific or global extra data
1238 has changed.
1239 </desc>
1240 <param name="machineId" type="uuid" mod="string" dir="in">
1241 <desc>
1242 ID of the machine this event relates to.
1243 Null for global extra data changes.
1244 </desc>
1245 </param>
1246 <param name="key" type="wstring" dir="in">
1247 <desc>
1248 Extra data key that has changed.
1249 </desc>
1250 </param>
1251 <param name="value" type="wstring" dir="in">
1252 <desc>
1253 Extra data value for the given key.
1254 </desc>
1255 </param>
1256 </method>
1257
1258 <method name="onMediumRegistered">
1259 <desc>
1260 The given medium was registered or unregistered
1261 within this VirtualBox installation.
1262
1263 The @a mediumType parameter describes what type of
1264 medium the specified @a mediumId refers to. Possible
1265 values are:
1266
1267 <ul>
1268 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1269 that, if registered, can be obtained using the
1270 <link to="IVirtualBox::getHardDisk"/> call.</li>
1271 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1272 that, if registered, can be obtained using the
1273 <link to="IVirtualBox::getDVDImage"/> call.</li>
1274 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1275 that, if registered, can be obtained using the
1276 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1277 </ul>
1278
1279 Note that if this is a deregistration notification,
1280 there is no way to access the object representing the
1281 unregistered medium. It is supposed that the
1282 application will do required cleanup based on the
1283 @a mediumId value.
1284 </desc>
1285 <param name="mediumId" type="uuid" mod="string" dir="in">
1286 <desc>ID of the medium this event relates to.</desc>
1287 </param>
1288 <param name="mediumType" type="DeviceType" dir="in">
1289 <desc>Type of the medium this event relates to.</desc>
1290 </param>
1291 <param name="registered" type="boolean" dir="in">
1292 <desc>
1293 If @c true, the medium was registered, otherwise it was
1294 unregistered.
1295 </desc>
1296 </param>
1297 </method>
1298
1299 <method name="onMachineRegistered">
1300 <desc>
1301 The given machine was registered or unregistered
1302 within this VirtualBox installation.
1303 </desc>
1304 <param name="machineId" type="uuid" mod="string" dir="in">
1305 <desc>ID of the machine this event relates to.</desc>
1306 </param>
1307 <param name="registered" type="boolean" dir="in">
1308 <desc>
1309 If @c true, the machine was registered, otherwise it was
1310 unregistered.
1311 </desc>
1312 </param>
1313 </method>
1314
1315 <method name="onSessionStateChange">
1316 <desc>
1317 The state of the session for the given machine was changed.
1318 <see>IMachine::sessionState</see>
1319 </desc>
1320 <param name="machineId" type="uuid" mod="string" dir="in">
1321 <desc>ID of the machine this event relates to.</desc>
1322 </param>
1323 <param name="state" type="SessionState" dir="in">
1324 <desc>New session state.</desc>
1325 </param>
1326 </method>
1327
1328 <method name="onSnapshotTaken">
1329 <desc>
1330 A new snapshot of the machine has been taken.
1331 <see>ISnapshot</see>
1332 </desc>
1333 <param name="machineId" type="uuid" mod="string" dir="in">
1334 <desc>ID of the machine this event relates to.</desc>
1335 </param>
1336 <param name="snapshotId" type="uuid" mod="string" dir="in">
1337 <desc>ID of the new snapshot.</desc>
1338 </param>
1339 </method>
1340
1341 <method name="onSnapshotDiscarded">
1342 <desc>
1343 Snapshot of the given machine has been discarded.
1344
1345 <note>
1346 This notification is delivered <b>after</b> the snapshot
1347 object has been uninitialized on the server (so that any
1348 attempt to call its methods will return an error).
1349 </note>
1350
1351 <see>ISnapshot</see>
1352 </desc>
1353 <param name="machineId" type="uuid" mod="string" dir="in">
1354 <desc>ID of the machine this event relates to.</desc>
1355 </param>
1356 <param name="snapshotId" type="uuid" mod="string" dir="in">
1357 <desc>
1358 ID of the discarded snapshot. @c null means the current machine
1359 state has been discarded (restored from the current snapshot).
1360 </desc>
1361 </param>
1362 </method>
1363
1364 <method name="onSnapshotChange">
1365 <desc>
1366 Snapshot properties (name and/or description) have been changed.
1367 <see>ISnapshot</see>
1368 </desc>
1369 <param name="machineId" type="uuid" mod="string" dir="in">
1370 <desc>ID of the machine this event relates to.</desc>
1371 </param>
1372 <param name="snapshotId" type="uuid" mod="string" dir="in">
1373 <desc>ID of the changed snapshot.</desc>
1374 </param>
1375 </method>
1376
1377 <method name="onGuestPropertyChange">
1378 <desc>
1379 Notification when a guest property has changed.
1380 </desc>
1381 <param name="machineId" type="uuid" mod="string" dir="in">
1382 <desc>
1383 ID of the machine this event relates to.
1384 </desc>
1385 </param>
1386 <param name="name" type="wstring" dir="in">
1387 <desc>
1388 The name of the property that has changed.
1389 </desc>
1390 </param>
1391 <param name="value" type="wstring" dir="in">
1392 <desc>
1393 The new property value.
1394 </desc>
1395 </param>
1396 <param name="flags" type="wstring" dir="in">
1397 <desc>
1398 The new property flags.
1399 </desc>
1400 </param>
1401 </method>
1402
1403 </interface>
1404
1405 <interface
1406 name="IDHCPServer" extends="$unknown"
1407 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1408 wsmap="managed"
1409 >
1410 <desc>
1411 The IDHCPServer interface represents the vbox dhcp server configuration.
1412
1413 To enumerate all the dhcp servers on the host, use the
1414 <link to="IVirtualBox::DHCPServers"/> attribute.
1415 </desc>
1416
1417 <attribute name="enabled" type="boolean">
1418 <desc>
1419 specifies if the dhcp server is enabled
1420 </desc>
1421 </attribute>
1422
1423 <attribute name="IPAddress" type="wstring" readonly="yes">
1424 <desc>
1425 specifies server IP
1426 </desc>
1427 </attribute>
1428
1429 <attribute name="networkMask" type="wstring" readonly="yes">
1430 <desc>
1431 specifies server network mask
1432 </desc>
1433 </attribute>
1434
1435 <attribute name="networkName" type="wstring" readonly="yes">
1436 <desc>
1437 specifies internal network name the server is used for
1438 </desc>
1439 </attribute>
1440
1441 <attribute name="lowerIP" type="wstring" readonly="yes">
1442 <desc>
1443 specifies from IP adrres in server address range
1444 </desc>
1445 </attribute>
1446
1447 <attribute name="upperIP" type="wstring" readonly="yes">
1448 <desc>
1449 specifies to IP adrres in server address range
1450 </desc>
1451 </attribute>
1452
1453 <method name="setConfiguration">
1454 <desc>
1455 configures the server
1456 <result name="E_INVALIDARG">
1457 invalid configuration supplied
1458 </result>
1459 </desc>
1460 <param name="IPAddress" type="wstring" dir="in">
1461 <desc>
1462 server IP address
1463 </desc>
1464 </param>
1465 <param name="networkMask" type="wstring" dir="in">
1466 <desc>
1467 server network mask
1468 </desc>
1469 </param>
1470 <param name="FromIPAddress" type="wstring" dir="in">
1471 <desc>
1472 server From IP address for address range
1473 </desc>
1474 </param>
1475 <param name="ToIPAddress" type="wstring" dir="in">
1476 <desc>
1477 server To IP address for address range
1478 </desc>
1479 </param>
1480 </method>
1481
1482 <method name="start">
1483 <desc>
1484 Starts DHCP server process.
1485 <result name="E_FAIL">
1486 Failed to start the process.
1487 </result>
1488 </desc>
1489 <param name="networkName" type="wstring" dir="in">
1490 <desc>
1491 Name of internal network DHCP server should attach to.
1492 </desc>
1493 </param>
1494 <param name="trunkName" type="wstring" dir="in">
1495 <desc>
1496 Name of internal network trunk.
1497 </desc>
1498 </param>
1499 <param name="trunkType" type="wstring" dir="in">
1500 <desc>
1501 Type of internal network trunk.
1502 </desc>
1503 </param>
1504 </method>
1505
1506 <method name="stop">
1507 <desc>
1508 Stops DHCP server process.
1509 <result name="E_FAIL">
1510 Failed to stop the process.
1511 </result>
1512 </desc>
1513 </method>
1514 </interface>
1515
1516 <interface
1517 name="IVirtualBox" extends="$dispatched"
1518 uuid="c1b8d85d-8f44-4314-94fc-072332bdf852"
1519 wsmap="managed"
1520 >
1521 <desc>
1522 The IVirtualBox interface represents the main interface exposed by the
1523 product that provides virtual machine management.
1524
1525 An instance of IVirtualBox is required for the product to do anything
1526 useful. Even though the interface does not expose this, internally,
1527 IVirtualBox is implemented as a singleton and actually lives in the
1528 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1529 IVirtualBox can track the state of all virtual machines on a particular
1530 host, regardless of which frontend started them.
1531
1532 To enumerate all the virtual machines on the host, use the
1533 <link to="IVirtualBox::machines"/> attribute.
1534 </desc>
1535
1536 <attribute name="version" type="wstring" readonly="yes">
1537 <desc>
1538 A string representing the version number of the product. The
1539 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1540 last number represents the build number and will frequently change.
1541 </desc>
1542 </attribute>
1543
1544 <attribute name="revision" type="unsigned long" readonly="yes">
1545 <desc>
1546 The internal build revision number of the product.
1547 </desc>
1548 </attribute>
1549
1550 <attribute name="packageType" type="wstring" readonly="yes">
1551 <desc>
1552 A string representing the package type of this product. The
1553 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1554 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1555 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1556 this.
1557 </desc>
1558 </attribute>
1559
1560 <attribute name="homeFolder" type="wstring" readonly="yes">
1561 <desc>
1562 Full path to the directory where the global settings file,
1563 <tt>VirtualBox.xml</tt>, is stored.
1564
1565 In this version of VirtualBox, the value of this property is
1566 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1567 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1568 as determined by the host OS), and cannot be changed.
1569
1570 This path is also used as the base to resolve relative paths in
1571 places where relative paths are allowed (unless otherwise
1572 expressly indicated).
1573 </desc>
1574 </attribute>
1575
1576 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1577 <desc>
1578 Full name of the global settings file.
1579 The value of this property corresponds to the value of
1580 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1581 </desc>
1582 </attribute>
1583
1584 <attribute name="host" type="IHost" readonly="yes">
1585 <desc>Associated host object.</desc>
1586 </attribute>
1587
1588 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1589 <desc>Associated system information object.</desc>
1590 </attribute>
1591
1592 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1593 <desc>
1594 Array of machine objects registered within this VirtualBox instance.
1595 </desc>
1596 </attribute>
1597
1598 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1599 <desc>
1600 Array of medium objects known to this VirtualBox installation.
1601
1602 This array contains only base media. All differencing
1603 media of the given base medium can be enumerated using
1604 <link to="IMedium::children"/>.
1605 </desc>
1606 </attribute>
1607
1608 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1609 <desc>
1610 Array of CD/DVD image objects registered with this VirtualBox instance.
1611 </desc>
1612 </attribute>
1613
1614 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1615 <desc>
1616 Array of floppy image objects registered with this VirtualBox instance.
1617 </desc>
1618 </attribute>
1619
1620 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1621
1622 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1623
1624 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1625 <desc>
1626 Collection of global shared folders. Global shared folders are
1627 available to all virtual machines.
1628
1629 New shared folders are added to the collection using
1630 <link to="#createSharedFolder"/>. Existing shared folders can be
1631 removed using <link to="#removeSharedFolder"/>.
1632
1633 <note>
1634 In the current version of the product, global shared folders are not
1635 implemented and therefore this collection is always empty.
1636 </note>
1637 </desc>
1638 </attribute>
1639
1640 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1641 <desc>
1642 Associated performance collector object.
1643 </desc>
1644 </attribute>
1645
1646 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1647 <desc>
1648 dhcp server settings.
1649 </desc>
1650 </attribute>
1651
1652 <method name="createMachine">
1653 <desc>
1654 Creates a new virtual machine.
1655
1656 The new machine is created unregistered, with the initial configuration
1657 set according to the specified guest OS type. A typical sequence of
1658 actions to create a new virtual machine is as follows:
1659
1660 <ol>
1661 <li>
1662 Call this method to have a new machine created. The returned machine
1663 object will be "mutable" allowing to change any machine property.
1664 </li>
1665
1666 <li>
1667 Configure the machine using the appropriate attributes and methods.
1668 </li>
1669
1670 <li>
1671 Call <link to="IMachine::saveSettings" /> to write the settings
1672 to the machine's XML settings file. The configuration of the newly
1673 created machine will not be saved to disk until this method is
1674 called.
1675 </li>
1676
1677 <li>
1678 Call <link to="#registerMachine" /> to add the machine to the list
1679 of machines known to VirtualBox.
1680 </li>
1681 </ol>
1682
1683 You should specify valid name for the newly created machine when calling
1684 this method. See the <link to="IMachine::name"/> attribute description
1685 for more details about the machine name.
1686
1687 The specified guest OS type identifier must match an ID of one of known
1688 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1689 array.
1690
1691 Every machine has a <i>settings file</i> that is used to store
1692 the machine configuration. This file is stored in a directory called the
1693 <i>machine settings subfolder</i>. Both the settings subfolder and file
1694 will have a name that corresponds to the name of the virtual machine.
1695 You can specify where to create the machine setting subfolder using the
1696 @a baseFolder argument. The base folder can be absolute (full path) or
1697 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1698 directory</link>.
1699
1700 If @a baseFolder is a @c null or empty string (which is recommended), the
1701 <link to="ISystemProperties::defaultMachineFolder">default machine
1702 settings folder</link> will be used as a base folder for the created
1703 machine. Otherwise the given base folder will be used. In either case,
1704 the full path to the resulting settings file has the following
1705 structure:
1706 <pre>
1707 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1708 </pre>
1709
1710 Note that if the resulting settings file already exists, this method
1711 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1712
1713 Optionally, you may specify an UUID of to assign to the created machine.
1714 However, this is not recommended and you should normally pass an empty
1715 (@c null) UUID to this method so that a new UUID will be automatically
1716 generated for every created machine. You can use UUID
1717 00000000-0000-0000-0000-000000000000 as @c null value.
1718
1719 <note>
1720 There is no way to change the name of the settings file or
1721 subfolder of the created machine directly.
1722 </note>
1723
1724 <result name="VBOX_E_OBJECT_NOT_FOUND">
1725 @a osTypeId is invalid.
1726 </result>
1727 <result name="VBOX_E_FILE_ERROR">
1728 Resulting settings file name is invalid or the settings file already
1729 exists or could not be created due to an I/O error.
1730 </result>
1731 <result name="E_INVALIDARG">
1732 @a name is empty or @c null.
1733 </result>
1734 </desc>
1735
1736 <param name="name" type="wstring" dir="in">
1737 <desc>Machine name.</desc>
1738 </param>
1739 <param name="osTypeId" type="wstring" dir="in">
1740 <desc>Guest OS Type ID.</desc>
1741 </param>
1742 <param name="baseFolder" type="wstring" dir="in">
1743 <desc>Base machine folder (optional).</desc>
1744 </param>
1745 <param name="id" type="uuid" mod="string" dir="in">
1746 <desc>Machine UUID (optional).</desc>
1747 </param>
1748 <param name="machine" type="IMachine" dir="return">
1749 <desc>Created machine object.</desc>
1750 </param>
1751 </method>
1752
1753 <method name="createLegacyMachine">
1754 <desc>
1755 Creates a new virtual machine in "legacy" mode, using the specified
1756 settings file to store machine settings.
1757
1758 As opposed to machines created by <link to="#createMachine"/>,
1759 the settings file of the machine created in "legacy" mode is not
1760 automatically renamed when the machine name is changed -- it will always
1761 remain the same as specified in this method call.
1762
1763 The specified settings file name can be absolute (full path) or relative
1764 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1765 directory</link>. If the file name doesn't contain an extension, the
1766 default extension (.xml) will be appended.
1767
1768 Note that the configuration of the newly created machine is not
1769 saved to disk (and therefore no settings file is created)
1770 until <link to="IMachine::saveSettings"/> is called. If the
1771 specified settings file already exists, this method
1772 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1773
1774 See <link to="#createMachine"/> for more information.
1775
1776 @deprecated This method may be removed later. Use <link
1777 to="IVirtualBox::createMachine"/> instead.
1778
1779 <note>
1780 There is no way to change the name of the settings file
1781 of the machine created in "legacy" mode.
1782 </note>
1783
1784 <result name="VBOX_E_OBJECT_NOT_FOUND">
1785 @a osTypeId is invalid.
1786 </result>
1787 <result name="VBOX_E_FILE_ERROR">
1788 @a settingsFile is invalid or the settings file already exists or
1789 could not be created due to an I/O error.
1790 </result>
1791 <result name="E_INVALIDARG">
1792 @a name or @a settingsFile is empty or @c null.
1793 </result>
1794 </desc>
1795
1796 <param name="name" type="wstring" dir="in">
1797 <desc>Machine name.</desc>
1798 </param>
1799 <param name="osTypeId" type="wstring" dir="in">
1800 <desc>Machine OS Type ID.</desc>
1801 </param>
1802 <param name="settingsFile" type="wstring" dir="in">
1803 <desc>Name of the machine settings file.</desc>
1804 </param>
1805 <param name="id" type="uuid" mod="string" dir="in">
1806 <desc>Machine UUID (optional).</desc>
1807 </param>
1808 <param name="machine" type="IMachine" dir="return">
1809 <desc>Created machine object.</desc>
1810 </param>
1811 </method>
1812
1813 <method name="openMachine">
1814 <desc>
1815 Opens a virtual machine from the existing settings file.
1816 The opened machine remains unregistered until you call
1817 <link to="#registerMachine"/>.
1818
1819 The specified settings file name can be absolute
1820 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1821 VirtualBox home directory</link>. This file must exist
1822 and must be a valid machine settings file whose contents
1823 will be used to construct the machine object.
1824
1825 @deprecated Will be removed soon.
1826 <result name="VBOX_E_FILE_ERROR">
1827 Settings file name invalid, not found or sharing violation.
1828 </result>
1829 </desc>
1830 <param name="settingsFile" type="wstring" dir="in">
1831 <desc>
1832 Name of the machine settings file.
1833 </desc>
1834 </param>
1835 <param name="machine" type="IMachine" dir="return">
1836 <desc>Opened machine object.</desc>
1837 </param>
1838 <note>
1839 <link to="IMachine::settingsModified"/> will return
1840 @c false for the created machine, until any of machine settings
1841 are changed.
1842 </note>
1843 </method>
1844
1845 <method name="registerMachine">
1846 <desc>
1847
1848 Registers the machine previously created using
1849 <link to="#createMachine"/> or opened using
1850 <link to="#openMachine"/> within this VirtualBox installation. After
1851 successful method invocation, the
1852 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1853 to all registered callbacks.
1854
1855 <note>
1856 This method implicitly calls <link to="IMachine::saveSettings"/>
1857 to save all current machine settings before registering it.
1858 </note>
1859
1860 <result name="VBOX_E_OBJECT_NOT_FOUND">
1861 No matching virtual machine found.
1862 </result>
1863 <result name="VBOX_E_INVALID_OBJECT_STATE">
1864 Virtual machine was not created within this VirtualBox instance.
1865 </result>
1866
1867 </desc>
1868 <param name="machine" type="IMachine" dir="in"/>
1869 </method>
1870
1871 <method name="getMachine">
1872 <desc>
1873 Attempts to find a virtual machine given its UUID.
1874 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1875 instead.
1876
1877 <result name="VBOX_E_OBJECT_NOT_FOUND">
1878 Could not find registered machine matching @a id.
1879 </result>
1880
1881 </desc>
1882 <param name="id" type="uuid" mod="string" dir="in"/>
1883 <param name="machine" type="IMachine" dir="return"/>
1884 </method>
1885
1886 <method name="findMachine">
1887 <desc>
1888 Attempts to find a virtual machine given its name.
1889 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1890 instead.
1891
1892 <result name="VBOX_E_OBJECT_NOT_FOUND">
1893 Could not find registered machine matching @a name.
1894 </result>
1895
1896 </desc>
1897 <param name="name" type="wstring" dir="in"/>
1898 <param name="machine" type="IMachine" dir="return"/>
1899 </method>
1900
1901 <method name="unregisterMachine">
1902 <desc>
1903
1904 Unregisters the machine previously registered using
1905 <link to="#registerMachine"/>. After successful method invocation, the
1906 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
1907 to all registered callbacks.
1908
1909 <note>
1910 The specified machine must not be in the Saved state, have an open
1911 (or a spawning) direct session associated with it, have snapshots or
1912 have hard disks attached.
1913 </note>
1914
1915 <note>
1916 This method implicitly calls <link to="IMachine::saveSettings"/> to
1917 save all current machine settings before unregistering it.
1918 </note>
1919
1920 <note>
1921 If the given machine is inaccessible (see
1922 <link to="IMachine::accessible"/>), it will be unregistered and
1923 fully uninitialized right afterwards. As a result, the returned
1924 machine object will be unusable and an attempt to call
1925 <b>any</b> method will return the "Object not ready" error.
1926 </note>
1927
1928 <result name="VBOX_E_OBJECT_NOT_FOUND">
1929 Could not find registered machine matching @a id.
1930 </result>
1931 <result name="VBOX_E_INVALID_VM_STATE">
1932 Machine is in Saved state.
1933 </result>
1934 <result name="VBOX_E_INVALID_OBJECT_STATE">
1935 Machine has snapshot or open session or hard disk attached.
1936 </result>
1937
1938 </desc>
1939 <param name="id" type="uuid" mod="string" dir="in">
1940 <desc>UUID of the machine to unregister.</desc>
1941 </param>
1942 <param name="machine" type="IMachine" dir="return">
1943 <desc>Unregistered machine object.</desc>
1944 </param>
1945 </method>
1946
1947 <method name="createAppliance">
1948 <desc>
1949 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1950 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1951 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1952 </desc>
1953 <param name="appliance" type="IAppliance" dir="return">
1954 <desc>New appliance.</desc>
1955 </param>
1956 </method>
1957
1958 <method name="createHardDisk">
1959 <desc>
1960 Creates a new base medium object that will use the given storage
1961 format and location for medium data.
1962
1963 Note that the actual storage unit is not created by this method. In
1964 order to do it, and before you are able to attach the created medium
1965 to virtual machines, you must call one of the following methods to
1966 allocate a format-specific storage unit at the specified location:
1967 <ul>
1968 <li><link to="IMedium::createBaseStorage"/></li>
1969 <li><link to="IMedium::createDiffStorage"/></li>
1970 </ul>
1971
1972 Some medium attributes, such as <link to="IMedium::id"/>, may
1973 remain uninitialized until the medium storage unit is successfully
1974 created by one of the above methods.
1975
1976 After the storage unit is successfully created, the medium gets
1977 remembered by this VirtualBox installation and will be accessible
1978 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
1979 methods. Remembered base medium are also returned as part of
1980 the <link to="#hardDisks"/> array. See IMedium for more details.
1981
1982 The list of all storage formats supported by this VirtualBox
1983 installation can be obtained using
1984 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1985 attribute is empty or @c null then the default storage format
1986 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1987 be used for creating a storage unit of the medium.
1988
1989 Note that the format of the location string is storage format specific.
1990 See <link to="IMedium::location"/>, IMedium and
1991 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1992
1993 <result name="VBOX_E_OBJECT_NOT_FOUND">
1994 @a format identifier is invalid. See
1995 <link to="ISystemProperties::mediumFormats"/>.
1996 </result>
1997 <result name="VBOX_E_FILE_ERROR">
1998 @a location is a not valid file name (for file-based formats only).
1999 </result>
2000 </desc>
2001 <param name="format" type="wstring" dir="in">
2002 <desc>
2003 Identifier of the storage format to use for the new medium.
2004 </desc>
2005 </param>
2006 <param name="location" type="wstring" dir="in">
2007 <desc>
2008 Location of the storage unit for the new medium.
2009 </desc>
2010 </param>
2011 <param name="medium" type="IMedium" dir="return">
2012 <desc>Created medium object.</desc>
2013 </param>
2014 </method>
2015
2016 <method name="openHardDisk">
2017 <desc>
2018 Opens a medium from an existing location, optionally replacing
2019 the image UUID and/or parent UUID.
2020
2021 After the medium is successfully opened by this method, it gets
2022 remembered by (known to) this VirtualBox installation and will be
2023 accessible through <link to="#getHardDisk"/> and
2024 <link to="#findHardDisk"/> methods. Remembered base media
2025 are also returned as part of the <link to="#hardDisks"/> array and can
2026 be attached to virtual machines. See IMedium for more details.
2027
2028 If a differencing medium is to be opened by this method, the
2029 operation will succeed only if its parent medium and all ancestors,
2030 if any, are already known to this VirtualBox installation (for example,
2031 were opened by this method before).
2032
2033 This method tries to guess the storage format of the specified medium
2034 by reading medium data at the specified location.
2035
2036 If @a write is ReadWrite (which it should be), the image is opened for
2037 read/write access and must have according permissions, as VirtualBox
2038 may actually write status information into the disk's metadata sections.
2039
2040 Note that write access is required for all typical image usage in VirtualBox,
2041 since VirtualBox may need to write metadata such as a UUID into the image.
2042 The only exception is opening a source image temporarily for copying and
2043 cloning when the image will quickly be closed again.
2044
2045 Note that the format of the location string is storage format specific.
2046 See <link to="IMedium::location"/>, IMedium and
2047 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2048
2049 <result name="VBOX_E_FILE_ERROR">
2050 Invalid medium storage file location or could not find the medium
2051 at the specified location.
2052 </result>
2053 <result name="VBOX_E_IPRT_ERROR">
2054 Could not get medium storage format.
2055 </result>
2056 <result name="E_INVALIDARG">
2057 Invalid medium storage format.
2058 </result>
2059
2060 </desc>
2061 <param name="location" type="wstring" dir="in">
2062 <desc>
2063 Location of the storage unit that contains medium data in one of
2064 the supported storage formats.
2065 </desc>
2066 </param>
2067 <param name="accessMode" type="AccessMode" dir="in">
2068 <desc>
2069 Determines whether to open the image in read/write or read-only mode.
2070 </desc>
2071 </param>
2072 <param name="setImageId" type="boolean" dir="in">
2073 <desc>
2074 Select whether a new image UUID is set or not.
2075 </desc>
2076 </param>
2077 <param name="imageId" type="uuid" mod="string" dir="in">
2078 <desc>
2079 New UUID for the image. If an empty string is passed, then a new
2080 UUID is automatically created. Specifying a zero UUIDs is not valid.
2081 </desc>
2082 </param>
2083 <param name="setParentId" type="boolean" dir="in">
2084 <desc>
2085 Select whether a new parent UUID is set or not.
2086 </desc>
2087 </param>
2088 <param name="parentId" type="uuid" mod="string" dir="in">
2089 <desc>
2090 New parent UUID for the image. If an empty string is passed, then a
2091 new UUID is automatically created, provided @a setParentId is
2092 @c true. A zero UUID is valid.
2093 </desc>
2094 </param>
2095 <param name="medium" type="IMedium" dir="return">
2096 <desc>Opened medium object.</desc>
2097 </param>
2098 </method>
2099
2100 <method name="getHardDisk" const="yes">
2101 <desc>
2102 Returns a medium with the given UUID.
2103
2104 The medium with the given UUID must be known to this VirtualBox
2105 installation, i.e. it must be previously created by
2106 <link to="#createHardDisk"/> or opened by <link
2107 to="#openHardDisk"/>, or attached to some known virtual machine.
2108
2109 <result name="VBOX_E_OBJECT_NOT_FOUND">
2110 No medium object matching @a id found.
2111 </result>
2112
2113 </desc>
2114 <param name="id" type="uuid" mod="string" dir="in">
2115 <desc>UUID of the medium to look for.</desc>
2116 </param>
2117 <param name="medium" type="IMedium" dir="return">
2118 <desc>Found medium object.</desc>
2119 </param>
2120 </method>
2121
2122 <method name="findHardDisk">
2123 <desc>
2124 Returns a medium that uses the given location to store medium data.
2125
2126 The given medium must be known to this VirtualBox installation, i.e.
2127 it must be previously created by
2128 <link to="#createHardDisk"/> or opened by <link
2129 to="#openHardDisk"/>, or attached to some known virtual machine.
2130
2131 The search is done by comparing the value of the @a location argument to
2132 the <link to="IMedium::location"/> attribute of each known medium.
2133
2134 For locations represented by file names in the host's file system, the
2135 requested location can be a path relative to the
2136 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2137 only a file name without any path is given, the
2138 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2139 folder</link> will be prepended to the file name before searching. Note
2140 that on case sensitive file systems, a case sensitive comparison is
2141 performed, otherwise the case of symbols in the file path is ignored.
2142
2143 <result name="VBOX_E_OBJECT_NOT_FOUND">
2144 No medium object matching @a location found.
2145 </result>
2146
2147 </desc>
2148 <param name="location" type="wstring" dir="in">
2149 <desc>Location string to search for.</desc>
2150 </param>
2151 <param name="medium" type="IMedium" dir="return">
2152 <desc>Found medium object.</desc>
2153 </param>
2154 </method>
2155
2156 <method name="openDVDImage">
2157 <desc>
2158 Opens a CD/DVD image contained in the specified file of the supported
2159 format and assigns it the given UUID.
2160
2161 After the image is successfully opened by this method, it gets
2162 remembered by (known to) this VirtualBox installation and will be
2163 accessible through <link to="#getDVDImage"/> and
2164 <link to="#findDVDImage"/> methods. Remembered images are also
2165 returned as part of the <link to="#DVDImages"/> array and can be mounted
2166 to virtual machines. See IMedium for more details.
2167
2168 See <link to="IMedium::location"/> to get more details about the format
2169 of the location string.
2170
2171 <note>
2172 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2173 </note>
2174
2175 <result name="VBOX_E_FILE_ERROR">
2176 Invalid CD/DVD image file location or could not find the CD/DVD
2177 image at the specified location.
2178 </result>
2179 <result name="VBOX_E_INVALID_OBJECT_STATE">
2180 CD/DVD image already exists in the media registry.
2181 </result>
2182
2183 </desc>
2184 <param name="location" type="wstring" dir="in">
2185 <desc>
2186 Full path to the file that contains a valid CD/DVD image.
2187 </desc>
2188 </param>
2189 <param name="id" type="uuid" mod="string" dir="in">
2190 <desc>
2191 UUID to assign to the given image within this VirtualBox installation.
2192 If an empty (@c null) UUID is specified, the system will randomly
2193 generate a new UUID.
2194 </desc>
2195 </param>
2196 <param name="image" type="IMedium" dir="return">
2197 <desc>Opened CD/DVD image object.</desc>
2198 </param>
2199 </method>
2200
2201 <method name="getDVDImage">
2202 <desc>
2203 Returns a CD/DVD image with the given UUID.
2204
2205 The image with the given UUID must be known to this VirtualBox
2206 installation, i.e. it must be previously opened by <link
2207 to="#openDVDImage"/>, or mounted to some known virtual machine.
2208
2209 <result name="VBOX_E_OBJECT_NOT_FOUND">
2210 No matching DVD image found in the media registry.
2211 </result>
2212
2213 </desc>
2214 <param name="id" type="uuid" mod="string" dir="in">
2215 <desc>UUID of the image to look for.</desc>
2216 </param>
2217 <param name="image" type="IMedium" dir="return">
2218 <desc>Found CD/DVD image object.</desc>
2219 </param>
2220 </method>
2221
2222 <method name="findDVDImage">
2223 <desc>
2224 Returns a CD/DVD image with the given image location.
2225
2226 The image with the given UUID must be known to this VirtualBox
2227 installation, i.e. it must be previously opened by <link
2228 to="#openDVDImage"/>, or mounted to some known virtual machine.
2229
2230 The search is done by comparing the value of the @a location argument to
2231 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2232
2233 The requested location can be a path relative to the
2234 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2235 only a file name without any path is given, the
2236 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2237 folder</link> will be prepended to the file name before searching. Note
2238 that on case sensitive file systems, a case sensitive comparison is
2239 performed, otherwise the case in the file path is ignored.
2240
2241 <result name="VBOX_E_FILE_ERROR">
2242 Invalid image file location.
2243 </result>
2244 <result name="VBOX_E_OBJECT_NOT_FOUND">
2245 No matching DVD image found in the media registry.
2246 </result>
2247
2248 </desc>
2249 <param name="location" type="wstring" dir="in">
2250 <desc>CD/DVD image file path to look for.</desc>
2251 </param>
2252 <param name="image" type="IMedium" dir="return">
2253 <desc>Found CD/DVD image object.</desc>
2254 </param>
2255 </method>
2256
2257 <method name="openFloppyImage">
2258 <desc>
2259 Opens a floppy image contained in the specified file of the supported
2260 format and assigns it the given UUID.
2261
2262 After the image is successfully opened by this method, it gets
2263 remembered by (known to) this VirtualBox installation and will be
2264 accessible through <link to="#getFloppyImage"/> and
2265 <link to="#findFloppyImage"/> methods. Remembered images are also
2266 returned as part of the <link to="#floppyImages"/> array and can be
2267 mounted to virtual machines. See IMedium for more details.
2268
2269 See <link to="IMedium::location"/> to get more details about the format
2270 of the location string.
2271
2272 <result name="VBOX_E_FILE_ERROR">
2273 Invalid floppy image file location or could not find the floppy
2274 image at the specified location.
2275 </result>
2276 <result name="VBOX_E_INVALID_OBJECT_STATE">
2277 Floppy image already exists in the media registry.
2278 </result>
2279
2280 <note>
2281 Currently, only raw floppy images are supported by VirtualBox.
2282 </note>
2283 </desc>
2284 <param name="location" type="wstring" dir="in">
2285 <desc>
2286 Full path to the file that contains a valid floppy image.
2287 </desc>
2288 </param>
2289 <param name="id" type="uuid" mod="string" dir="in">
2290 <desc>
2291 UUID to assign to the given image file within this VirtualBox
2292 installation. If an empty (@c null) UUID is specified, the system will
2293 randomly generate a new UUID.
2294 </desc>
2295 </param>
2296 <param name="image" type="IMedium" dir="return">
2297 <desc>Opened floppy image object.</desc>
2298 </param>
2299 </method>
2300
2301 <method name="getFloppyImage">
2302 <desc>
2303 Returns a floppy image with the given UUID.
2304
2305 The image with the given UUID must be known to this VirtualBox
2306 installation, i.e. it must be previously opened by <link
2307 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2308
2309 <result name="VBOX_E_OBJECT_NOT_FOUND">
2310 No matching floppy image found in the media registry.
2311 </result>
2312
2313 </desc>
2314 <param name="id" type="uuid" mod="string" dir="in">
2315 <desc>UUID of the image to look for.</desc>
2316 </param>
2317 <param name="image" type="IMedium" dir="return">
2318 <desc>Found floppy image object.</desc>
2319 </param>
2320 </method>
2321
2322 <method name="findFloppyImage">
2323 <desc>
2324 Returns a floppy image with the given image location.
2325
2326 The image with the given UUID must be known to this VirtualBox
2327 installation, i.e. it must be previously opened by <link
2328 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2329
2330 The search is done by comparing the value of the @a location argument to
2331 the <link to="IMedium::location"/> attribute of each known floppy image.
2332
2333 The requested location can be a path relative to the
2334 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2335 only a file name without any path is given, the
2336 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2337 folder</link> will be prepended to the file name before searching. Note
2338 that on case sensitive file systems, a case sensitive comparison is
2339 performed, otherwise the case of symbols in the file path is ignored.
2340
2341 <result name="VBOX_E_FILE_ERROR">
2342 Invalid image file location.
2343 </result>
2344 <result name="VBOX_E_OBJECT_NOT_FOUND">
2345 No matching floppy image found in the media registry.
2346 </result>
2347
2348 </desc>
2349 <param name="location" type="wstring" dir="in">
2350 <desc>Floppy image file path to look for.</desc>
2351 </param>
2352 <param name="image" type="IMedium" dir="return">
2353 <desc>Found floppy image object.</desc>
2354 </param>
2355 </method>
2356
2357 <method name="getGuestOSType">
2358 <desc>
2359 Returns an object describing the specified guest OS type.
2360
2361 The requested guest OS type is specified using a string which is a
2362 mnemonic identifier of the guest operating system, such as
2363 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2364 particular virtual machine can be read or set using the
2365 <link to="IMachine::OSTypeId"/> attribute.
2366
2367 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2368 available guest OS type objects. Each object has an
2369 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2370 the guest OS this object describes.
2371
2372 <result name="E_INVALIDARG">
2373 @a id is not a valid Guest OS type.
2374 </result>
2375
2376 </desc>
2377 <param name="id" type="uuid" mod="string" dir="in">
2378 <desc>Guest OS type ID string.</desc>
2379 </param>
2380 <param name="type" type="IGuestOSType" dir="return">
2381 <desc>Guest OS type object.</desc>
2382 </param>
2383 </method>
2384
2385 <method name="createSharedFolder">
2386 <desc>
2387 Creates a new global shared folder by associating the given logical
2388 name with the given host path, adds it to the collection of shared
2389 folders and starts sharing it. Refer to the description of
2390 <link to="ISharedFolder"/> to read more about logical names.
2391 <note>
2392 In the current implementation, this operation is not
2393 implemented.
2394 </note>
2395 </desc>
2396 <param name="name" type="wstring" dir="in">
2397 <desc>Unique logical name of the shared folder.</desc>
2398 </param>
2399 <param name="hostPath" type="wstring" dir="in">
2400 <desc>Full path to the shared folder in the host file system.</desc>
2401 </param>
2402 <param name="writable" type="boolean" dir="in">
2403 <desc>Whether the share is writable or readonly</desc>
2404 </param>
2405 </method>
2406
2407 <method name="removeSharedFolder">
2408 <desc>
2409 Removes the global shared folder with the given name previously
2410 created by <link to="#createSharedFolder"/> from the collection of
2411 shared folders and stops sharing it.
2412 <note>
2413 In the current implementation, this operation is not
2414 implemented.
2415 </note>
2416 </desc>
2417 <param name="name" type="wstring" dir="in">
2418 <desc>Logical name of the shared folder to remove.</desc>
2419 </param>
2420 </method>
2421
2422 <method name="getExtraDataKeys">
2423 <desc>
2424 Returns an array representing the global extra data keys which currently
2425 have values defined.
2426 </desc>
2427 <param name="value" type="wstring" dir="return" safearray="yes">
2428 <desc>Array of extra data keys.</desc>
2429 </param>
2430 </method>
2431
2432 <method name="getExtraData">
2433 <desc>
2434 Returns associated global extra data.
2435
2436 If the requested data @a key does not exist, this function will
2437 succeed and return an empty string in the @a value argument.
2438
2439 <result name="VBOX_E_FILE_ERROR">
2440 Settings file not accessible.
2441 </result>
2442 <result name="VBOX_E_XML_ERROR">
2443 Could not parse the settings file.
2444 </result>
2445
2446 </desc>
2447 <param name="key" type="wstring" dir="in">
2448 <desc>Name of the data key to get.</desc>
2449 </param>
2450 <param name="value" type="wstring" dir="return">
2451 <desc>Value of the requested data key.</desc>
2452 </param>
2453 </method>
2454
2455 <method name="setExtraData">
2456 <desc>
2457 Sets associated global extra data.
2458
2459 If you pass @c null or empty string as a key @a value, the given @a key
2460 will be deleted.
2461
2462 <note>
2463 Before performing the actual data change, this method will ask all
2464 registered callbacks using the
2465 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2466 notification for a permission. If one of the callbacks refuses the
2467 new value, the change will not be performed.
2468 </note>
2469 <note>
2470 On success, the
2471 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2472 is called to inform all registered callbacks about a successful data
2473 change.
2474 </note>
2475
2476 <result name="VBOX_E_FILE_ERROR">
2477 Settings file not accessible.
2478 </result>
2479 <result name="VBOX_E_XML_ERROR">
2480 Could not parse the settings file.
2481 </result>
2482 <result name="E_ACCESSDENIED">
2483 Modification request refused.
2484 </result>
2485
2486 </desc>
2487 <param name="key" type="wstring" dir="in">
2488 <desc>Name of the data key to set.</desc>
2489 </param>
2490 <param name="value" type="wstring" dir="in">
2491 <desc>Value to assign to the key.</desc>
2492 </param>
2493 </method>
2494
2495 <method name="openSession">
2496 <desc>
2497 Opens a new direct session with the given virtual machine.
2498
2499 A direct session acts as a local lock on the given VM.
2500 There can be only one direct session open at a time for every
2501 virtual machine, protecting the VM from being manipulated by
2502 conflicting actions from different processes. Only after a
2503 direct session has been opened, one can change all VM settings
2504 and execute the VM in the process space of the session object.
2505
2506 Sessions therefore can be compared to mutex semaphores that
2507 lock a given VM for modification and execution.
2508 See <link to="ISession">ISession</link> for details.
2509
2510 <note>Unless you are writing a new VM frontend, you will not
2511 want to execute a VM in the current process. To spawn a new
2512 process that executes a VM, use
2513 <link to="IVirtualBox::openRemoteSession" />
2514 instead.</note>
2515
2516 Upon successful return, the session object can be used to
2517 get access to the machine and to the VM console.
2518
2519 In VirtualBox terminology, the machine becomes "mutable" after
2520 a session has been opened. Note that the "mutable" machine
2521 object, on which you may invoke IMachine methods to change its
2522 settings, will be a different object from the immutable IMachine
2523 objects returned by various IVirtualBox methods. To obtain a
2524 mutable IMachine object (upon which you can invoke settings methods),
2525 use the <link to="ISession::machine" /> attribute.
2526
2527 One must always call <link to="ISession::close" /> to release the
2528 lock on the machine, or the machine's state will eventually be
2529 set to "Aborted".
2530
2531 In other words, to change settings on a machine, the following
2532 sequence is typically performed:
2533
2534 <ol>
2535 <li>Call this method (openSession) to have a machine locked for
2536 the current session.</li>
2537
2538 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2539
2540 <li>Change the settings of the machine.</li>
2541
2542 <li>Call <link to="IMachine::saveSettings" />.</li>
2543
2544 <li>Close the session by calling <link to="ISession::close"/>.</li>
2545 </ol>
2546
2547 <result name="E_UNEXPECTED">
2548 Virtual machine not registered.
2549 </result>
2550 <result name="E_ACCESSDENIED">
2551 Process not started by OpenRemoteSession.
2552 </result>
2553 <result name="VBOX_E_OBJECT_NOT_FOUND">
2554 No matching virtual machine found.
2555 </result>
2556 <result name="VBOX_E_INVALID_OBJECT_STATE">
2557 Session already open or being opened.
2558 </result>
2559 <result name="VBOX_E_VM_ERROR">
2560 Failed to assign machine to session.
2561 </result>
2562
2563 </desc>
2564 <param name="session" type="ISession" dir="in">
2565 <desc>
2566 Session object that will represent the opened session after
2567 successful method invocation. This object must not represent
2568 the already open session.
2569 <note>
2570 This session will be automatically closed if the
2571 VirtualBox server is terminated for some reason.
2572 </note>
2573 </desc>
2574 </param>
2575 <param name="machineId" type="uuid" mod="string" dir="in">
2576 <desc>ID of the virtual machine to open a session with.</desc>
2577 </param>
2578 </method>
2579
2580 <method name="openRemoteSession">
2581 <desc>
2582 Spawns a new process that executes a virtual machine (called a
2583 "remote session").
2584
2585 Opening a remote session causes the VirtualBox server to start a new
2586 process that opens a direct session with the given VM. As a result, the
2587 VM is locked by that direct session in the new process, preventing
2588 conflicting changes from other processes. Since sessions act as locks
2589 that prevent conflicting changes, one cannot open a remote session
2590 for a VM that already has another open session (direct or remote), or
2591 is currently in the process of opening one (see <link
2592 to="IMachine::sessionState"/>).
2593
2594 While the remote session still provides some level of control over the
2595 VM execution to the caller (using the <link to="IConsole" /> interface),
2596 not all VM settings are available for modification within the remote
2597 session context.
2598
2599 This operation can take some time (a new VM is started in a new process,
2600 for which memory and other resources need to be set up). Because of this,
2601 an <link to="IProgress" /> is returned to allow the caller to wait for this
2602 asynchronous operation to be completed. Until then, the remote session
2603 object remains in the closed state, and accessing the machine or its
2604 console through it is invalid. It is recommended to use
2605 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2606 completion.
2607
2608 As with all <link to="ISession" /> objects, it is recommended to call
2609 <link to="ISession::close" /> on the local session object once openRemoteSession()
2610 has been called. However, the session's state (see <link to="ISession::state" />)
2611 will not return to "Closed" until the remote session has also closed (i.e.
2612 until the VM is no longer running). In that case, however, the state of
2613 the session will automatically change back to "Closed".
2614
2615 Currently supported session types (values of the @a type
2616 argument) are:
2617 <ul>
2618 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2619 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2620 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2621 </ul>
2622
2623 The @a environment argument is a string containing definitions of
2624 environment variables in the following format:
2625 @code
2626 NAME[=VALUE]\n
2627 NAME[=VALUE]\n
2628 ...
2629 @endcode
2630 where <tt>\\n</tt> is the new line character. These environment
2631 variables will be appended to the environment of the VirtualBox server
2632 process. If an environment variable exists both in the server process
2633 and in this list, the value from this list takes precedence over the
2634 server's variable. If the value of the environment variable is
2635 omitted, this variable will be removed from the resulting environment.
2636 If the environment string is @c null or empty, the server environment
2637 is inherited by the started process as is.
2638
2639 <see>openExistingSession</see>
2640
2641 <result name="E_UNEXPECTED">
2642 Virtual machine not registered.
2643 </result>
2644 <result name="E_INVALIDARG">
2645 Invalid session type @a type.
2646 </result>
2647 <result name="VBOX_E_OBJECT_NOT_FOUND">
2648 No machine matching @a machineId found.
2649 </result>
2650 <result name="VBOX_E_INVALID_OBJECT_STATE">
2651 Session already open or being opened.
2652 </result>
2653 <result name="VBOX_E_IPRT_ERROR">
2654 Launching process for machine failed.
2655 </result>
2656 <result name="VBOX_E_VM_ERROR">
2657 Failed to assign machine to session.
2658 </result>
2659
2660 </desc>
2661 <param name="session" type="ISession" dir="in">
2662 <desc>
2663 Session object that will represent the opened remote session
2664 after successful method invocation (this object must not
2665 represent an already open session).
2666 </desc>
2667 </param>
2668 <param name="machineId" type="uuid" mod="string" dir="in">
2669 <desc>ID of the virtual machine to open a session with.</desc>
2670 </param>
2671 <param name="type" type="wstring" dir="in">
2672 <desc>
2673 Type of the remote session (case sensitive).
2674 </desc>
2675 </param>
2676 <param name="environment" type="wstring" dir="in">
2677 <desc>
2678 Environment to pass to the opened session.
2679 </desc>
2680 </param>
2681 <param name="progress" type="IProgress" dir="return">
2682 <desc>Progress object to track the operation completion.</desc>
2683 </param>
2684 </method>
2685
2686 <method name="openExistingSession">
2687 <desc>
2688 Opens a new remote session with the virtual machine for
2689 which a direct session is already open.
2690
2691 The remote session provides some level of control over the VM
2692 execution (using the IConsole interface) to the caller; however,
2693 within the remote session context, not all VM settings are available
2694 for modification.
2695
2696 As opposed to <link to="#openRemoteSession"/>, the number of
2697 remote sessions opened this way is not limited by the API
2698
2699 <note>
2700 It is an error to open a remote session with the machine that
2701 doesn't have an open direct session.
2702 </note>
2703
2704 <result name="E_UNEXPECTED">
2705 Virtual machine not registered.
2706 </result>
2707 <result name="VBOX_E_OBJECT_NOT_FOUND">
2708 No machine matching @a machineId found.
2709 </result>
2710 <result name="VBOX_E_INVALID_OBJECT_STATE">
2711 Session already open or being opened.
2712 </result>
2713 <result name="VBOX_E_INVALID_SESSION_STATE">
2714 Direct session state not Open.
2715 </result>
2716 <result name="VBOX_E_VM_ERROR">
2717 Failed to get console object from direct session or assign
2718 machine to session.
2719 </result>
2720
2721 <see>openRemoteSession</see>
2722 </desc>
2723 <param name="session" type="ISession" dir="in">
2724 <desc>
2725 Session object that will represent the open remote session
2726 after successful method invocation. This object must not
2727 represent an already open session.
2728 <note>
2729 This session will be automatically closed when the peer
2730 (direct) session dies or gets closed.
2731 </note>
2732 </desc>
2733 </param>
2734 <param name="machineId" type="uuid" mod="string" dir="in">
2735 <desc>ID of the virtual machine to open a session with.</desc>
2736 </param>
2737 </method>
2738
2739 <method name="registerCallback">
2740 <desc>
2741 Registers a new global VirtualBox callback. The methods of the given
2742 callback object will be called by VirtualBox when an appropriate
2743 event occurs.
2744
2745 <result name="E_INVALIDARG">
2746 A @c null callback cannot be registered.
2747 </result>
2748
2749 </desc>
2750 <param name="callback" type="IVirtualBoxCallback" dir="in">
2751 <desc>Callback object to register.</desc>
2752 </param>
2753 </method>
2754
2755 <method name="unregisterCallback">
2756 <desc>
2757 Unregisters the previously registered global VirtualBox callback.
2758
2759 <result name="E_INVALIDARG">
2760 Specified @a callback not registered.
2761 </result>
2762
2763 </desc>
2764 <param name="callback" type="IVirtualBoxCallback" dir="in">
2765 <desc>Callback object to unregister.</desc>
2766 </param>
2767 </method>
2768
2769 <method name="waitForPropertyChange">
2770 <desc>
2771 Blocks the caller until any of the properties represented by the
2772 @a what argument changes the value or until the given timeout interval
2773 expires.
2774
2775 The @a what argument is a comma separated list of property masks that
2776 describe properties the caller is interested in. The property mask is
2777 a string in the following format:
2778
2779 <pre>
2780 [[group.]subgroup.]name
2781 </pre>
2782
2783 where @c name is the property name and @c group, @c subgroup are zero
2784 or more property group specifiers. Each element (group or name) in
2785 the property mask may be either a Latin string or an asterisk symbol
2786 (@c "*") which is used to match any string for the given element. A
2787 property mask that doesn't contain asterisk symbols represents a
2788 single fully qualified property name.
2789
2790 Groups in the fully qualified property name go from more generic (the
2791 left-most part) to more specific (the right-most part). The first
2792 element is usually a name of the object the property belongs to. The
2793 second element may be either a property name, or a child object name,
2794 or an index if the preceding element names an object which is one of
2795 many objects of the same type. This way, property names form a
2796 hierarchy of properties. Here are some examples of property names:
2797
2798 <table>
2799 <tr>
2800 <td><tt>VirtualBox.version</tt></td>
2801 <td><link to="IVirtualBox::version"/> property</td>
2802 </tr>
2803 <tr>
2804 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2805 <td><link to="IMachine::name"/> property of the machine with the
2806 given UUID</td>
2807 </tr>
2808 </table>
2809
2810 Most property names directly correspond to the properties of objects
2811 (components) provided by the VirtualBox library and may be used to
2812 track changes to these properties. However, there may be
2813 pseudo-property names that don't correspond to any existing object's
2814 property directly, as well as there may be object properties that
2815 don't have a corresponding property name that is understood by this
2816 method, and therefore changes to such properties cannot be
2817 tracked. See individual object's property descriptions to get a
2818 fully qualified property name that can be used with this method (if
2819 any).
2820
2821 There is a special property mask @c "*" (i.e. a string consisting of a
2822 single asterisk symbol) that can be used to match all properties.
2823 Below are more examples of property masks:
2824
2825 <table>
2826 <tr>
2827 <td><tt>VirtualBox.*</tt></td>
2828 <td>Track all properties of the VirtualBox object</td>
2829 </tr>
2830 <tr>
2831 <td><tt>Machine.*.name</tt></td>
2832 <td>Track changes to the <link to="IMachine::name"/> property of
2833 all registered virtual machines</td>
2834 </tr>
2835 </table>
2836
2837 <note>
2838 This function is not implemented in the current version of the
2839 product.
2840 </note>
2841 </desc>
2842 <param name="what" type="wstring" dir="in">
2843 <desc>Comma separated list of property masks.</desc>
2844 </param>
2845 <param name="timeout" type="unsigned long" dir="in">
2846 <desc>
2847 Wait timeout in milliseconds.
2848 Specify -1 for an indefinite wait.
2849 </desc>
2850 </param>
2851 <param name="changed" type="wstring" dir="out">
2852 <desc>
2853 Comma separated list of properties that have been changed and caused
2854 this method to return to the caller.
2855 </desc>
2856 </param>
2857 <param name="values" type="wstring" dir="out">
2858 <desc>Reserved, not currently used.</desc>
2859 </param>
2860 </method>
2861
2862 <!--method name="createDHCPServerForInterface">
2863 <desc>
2864 Creates a dhcp server settings to be used for the given interface
2865 <result name="E_INVALIDARG">
2866 Host network interface @a name already exists.
2867 </result>
2868 </desc>
2869 <param name="interface" type="IHostNetworkInterface" dir="in">
2870 <desc>Network Interface</desc>
2871 </param>
2872 <param name="server" type="IDHCPServer" dir="out">
2873 <desc>Dhcp server settings</desc>
2874 </param>
2875 </method-->
2876
2877 <method name="createDHCPServer">
2878 <desc>
2879 Creates a dhcp server settings to be used for the given internal network name
2880 <result name="E_INVALIDARG">
2881 Host network interface @a name already exists.
2882 </result>
2883 </desc>
2884 <param name="name" type="wstring" dir="in">
2885 <desc>server name</desc>
2886 </param>
2887 <param name="server" type="IDHCPServer" dir="return">
2888 <desc>Dhcp server settings</desc>
2889 </param>
2890 </method>
2891
2892 <method name="findDHCPServerByNetworkName">
2893 <desc>
2894 Searches a dhcp server settings to be used for the given internal network name
2895 <result name="E_INVALIDARG">
2896 Host network interface @a name already exists.
2897 </result>
2898
2899 </desc>
2900 <param name="name" type="wstring" dir="in">
2901 <desc>server name</desc>
2902 </param>
2903 <param name="server" type="IDHCPServer" dir="return">
2904 <desc>Dhcp server settings</desc>
2905 </param>
2906 </method>
2907
2908 <!--method name="findDHCPServerForInterface">
2909 <desc>
2910 Searches a dhcp server settings to be used for the given interface
2911 <result name="E_INVALIDARG">
2912 Host network interface @a name already exists.
2913 </result>
2914 </desc>
2915 <param name="interface" type="IHostNetworkInterface" dir="in">
2916 <desc>Network Interface</desc>
2917 </param>
2918 <param name="server" type="IDHCPServer" dir="out">
2919 <desc>Dhcp server settings</desc>
2920 </param>
2921 </method-->
2922
2923 <method name="removeDHCPServer">
2924 <desc>
2925 Removes the dhcp server settings
2926 <result name="E_INVALIDARG">
2927 Host network interface @a name already exists.
2928 </result>
2929 </desc>
2930 <param name="server" type="IDHCPServer" dir="in">
2931 <desc>Dhcp server settings to be removed</desc>
2932 </param>
2933 </method>
2934
2935 </interface>
2936
2937 <!--
2938 // IVFSExplorer
2939 /////////////////////////////////////////////////////////////////////////
2940 -->
2941
2942 <enum
2943 name="VFSType"
2944 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2945 >
2946 <desc>
2947 Virtual file systems supported by VFSExplorer.
2948 </desc>
2949
2950 <const name="File" value="1" />
2951 <const name="Cloud" value="2" />
2952 <const name="S3" value="3" />
2953 <const name="WebDav" value="4" />
2954 </enum>
2955
2956 <enum
2957 name="VFSFileType"
2958 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2959 >
2960 <desc>
2961 File types known by VFSExplorer.
2962 </desc>
2963
2964 <const name="Unknown" value="1" />
2965 <const name="Fifo" value="2" />
2966 <const name="DevChar" value="3" />
2967 <const name="Directory" value="4" />
2968 <const name="DevBlock" value="5" />
2969 <const name="File" value="6" />
2970 <const name="SymLink" value="7" />
2971 <const name="Socket" value="8" />
2972 <const name="WhiteOut" value="9" />
2973 </enum>
2974
2975 <interface
2976 name="IVFSExplorer" extends="$unknown"
2977 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2978 wsmap="managed"
2979 >
2980 <desc>
2981 The VFSExplorer interface unifies access to different file system
2982 types. This includes local file systems as well remote file systems like
2983 S3. For a list of supported types see <link to="VFSType" />.
2984 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2985 </desc>
2986
2987 <attribute name="path" type="wstring" readonly="yes">
2988 <desc>Returns the current path in the virtual file system.</desc>
2989 </attribute>
2990
2991 <attribute name="type" type="VFSType" readonly="yes">
2992 <desc>Returns the file system type which is currently in use.</desc>
2993 </attribute>
2994
2995 <method name="update">
2996 <desc>Updates the internal list of files/directories from the
2997 current directory level. Use <link to="#entryList" /> to get the full list
2998 after a call to this method.</desc>
2999
3000 <param name="aProgress" type="IProgress" dir="return">
3001 <desc>Progress object to track the operation completion.</desc>
3002 </param>
3003 </method>
3004
3005 <method name="cd">
3006 <desc>Change the current directory level.</desc>
3007
3008 <param name="aDir" type="wstring" dir="in">
3009 <desc>The name of the directory to go in.</desc>
3010 </param>
3011
3012 <param name="aProgress" type="IProgress" dir="return">
3013 <desc>Progress object to track the operation completion.</desc>
3014 </param>
3015 </method>
3016
3017 <method name="cdUp">
3018 <desc>Go one directory upwards from the current directory level.</desc>
3019
3020 <param name="aProgress" type="IProgress" dir="return">
3021 <desc>Progress object to track the operation completion.</desc>
3022 </param>
3023 </method>
3024
3025 <method name="entryList">
3026 <desc>Returns a list of files/directories after a call to <link
3027 to="#update" />. The user is responsible for keeping this internal
3028 list up do date.</desc>
3029
3030 <param name="aNames" type="wstring" safearray="yes" dir="out">
3031 <desc>The list of names for the entries.</desc>
3032 </param>
3033
3034 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3035 <desc>The list of types for the entries.</desc>
3036 </param>
3037 </method>
3038
3039 <method name="exists">
3040 <desc>Checks if the given file list exists in the current directory
3041 level.</desc>
3042
3043 <param name="aNames" type="wstring" safearray="yes" dir="in">
3044 <desc>The names to check.</desc>
3045 </param>
3046
3047 <param name="aExists" type="wstring" safearray="yes" dir="return">
3048 <desc>The names which exist.</desc>
3049 </param>
3050 </method>
3051
3052 <method name="remove">
3053 <desc>Deletes the given files in the current directory level.</desc>
3054
3055 <param name="aNames" type="wstring" safearray="yes" dir="in">
3056 <desc>The names to remove.</desc>
3057 </param>
3058
3059 <param name="aProgress" type="IProgress" dir="return">
3060 <desc>Progress object to track the operation completion.</desc>
3061 </param>
3062 </method>
3063
3064 </interface>
3065
3066 <!--
3067 // IAppliance
3068 /////////////////////////////////////////////////////////////////////////
3069 -->
3070
3071 <interface
3072 name="IAppliance" extends="$unknown"
3073 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3074 wsmap="managed"
3075 >
3076 <desc>
3077 Represents a platform-independent appliance in OVF format. An instance of this is returned
3078 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3079 appliances with VirtualBox.
3080
3081 The OVF standard suggests two different physical file formats:
3082
3083 <ol>
3084 <li>If the OVF is distributed as a set of files, then @a file must be a fully qualified
3085 path name to an existing OVF descriptor file with an <tt>.ovf</tt> file extension. If
3086 this descriptor file references other files, as OVF appliances distributed as a set of
3087 files most likely do, those files must be in the same directory as the descriptor file.</li>
3088
3089 <li>If the OVF is distributed as a single file, it must be in TAR format and have the
3090 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3091 files and optionally other files.
3092
3093 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3094 be added with a later version.</li>
3095 </ol>
3096
3097 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3098 <link to="IMachine" /> involves the following sequence of API calls:
3099
3100 <ol>
3101 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3102 </li>
3103
3104 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3105 would like to import. So long as this file is syntactically valid, this will succeed
3106 and return an instance of IAppliance that contains the parsed data from the OVF file.
3107 </li>
3108
3109 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3110 contents of the IAppliance attributes accordingly. These can be inspected by a
3111 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3112 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3113 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3114 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3115 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3116 The GUI can then give the user the option to confirm and/or change these suggestions.
3117 </li>
3118
3119 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3120 virtual system to override the suggestions made by the interpret() routine.
3121 </li>
3122
3123 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3124 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3125 virtual system descriptions.
3126 </li>
3127 </ol>
3128
3129 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3130
3131 <ol>
3132 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3133 an empty IAppliance object.
3134 </li>
3135
3136 <li>For each machine you would like to export, call <link to="IMachine::export" />
3137 with the IAppliance object you just created. This creates an instance of
3138 <link to="IVirtualSystemDescription" /> inside the appliance.
3139 </li>
3140
3141 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3142 virtual system to override the suggestions made by the export() routine.
3143 </li>
3144
3145 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3146 file written.</li>
3147 </ol>
3148
3149 </desc>
3150
3151 <attribute name="path" type="wstring" readonly="yes">
3152 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3153 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3154 <link to="#write" /> (for export).
3155 This attribute is empty until one of these methods has been called.
3156 </desc>
3157 </attribute>
3158
3159 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3160 <desc>
3161 Array of virtual disk definitions. One such description exists for each
3162 disk definition in the OVF; each string array item represents one such piece of
3163 disk information, with the information fields separated by tab (\\t) characters.
3164
3165 The caller should be prepared for additional fields being appended to
3166 this string in future versions of VirtualBox and therefore check for
3167 the number of tabs in the strings returned.
3168
3169 In the current version, the following eight fields are returned per string
3170 in the array:
3171
3172 <ol>
3173 <li>Disk ID (unique string identifier given to disk)</li>
3174
3175 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3176
3177 <li>Populated size (optional unsigned integer indicating the current size of the
3178 disk; can be approximate; -1 if unspecified)</li>
3179
3180 <li>Format (string identifying the disk format, typically
3181 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3182
3183 <li>Reference (where to find the disk image, typically a file name; if empty,
3184 then the disk should be created on import)</li>
3185
3186 <li>Image size (optional unsigned integer indicating the size of the image,
3187 which need not necessarily be the same as the values specified above, since
3188 the image may be compressed or sparse; -1 if not specified)</li>
3189
3190 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3191 presently unsupported and always -1)</li>
3192
3193 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3194 </ol>
3195 </desc>
3196 </attribute>
3197
3198 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3199 <desc> Array of virtual system descriptions. One such description is created
3200 for each virtual system found in the OVF.
3201 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3202 (for export) has been called.
3203 </desc>
3204 </attribute>
3205
3206 <method name="read">
3207 <desc>
3208 Reads an OVF file into the appliance object.
3209
3210 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3211 mere fact that this method returns successfully does not mean that VirtualBox supports all
3212 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3213 </desc>
3214 <param name="file" type="wstring" dir="in">
3215 <desc>
3216 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3217 on whether the appliance is distributed as a set of files or as a single file, respectively).
3218 </desc>
3219 </param>
3220 <param name="aProgress" type="IProgress" dir="return">
3221 <desc></desc>
3222 </param>
3223 </method>
3224
3225 <method name="interpret">
3226 <desc>
3227 Interprets the OVF data that was read when the appliance was constructed. After
3228 calling this method, one can inspect the
3229 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3230 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3231 the appliance.
3232
3233 Calling this method is the second step of importing an appliance into VirtualBox;
3234 see <link to="IAppliance" /> for an overview.
3235
3236 After calling this method, one should call <link to="#getWarnings" /> to find out
3237 if problems were encountered during the processing which might later lead to
3238 errors.
3239 </desc>
3240 </method>
3241
3242 <method name="importMachines">
3243 <desc>
3244 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3245 and other interfaces that match the information contained in the appliance as
3246 closely as possible, as represented by the import instructions in the
3247 <link to="#virtualSystemDescriptions" /> array.
3248
3249 Calling this method is the final step of importing an appliance into VirtualBox;
3250 see <link to="IAppliance" /> for an overview.
3251
3252 Since importing the appliance will most probably involve copying and converting
3253 disk images, which can take a long time, this method operates asynchronously and
3254 returns an IProgress object to allow the caller to monitor the progress.
3255 </desc>
3256
3257 <param name="aProgress" type="IProgress" dir="return">
3258 <desc></desc>
3259 </param>
3260 </method>
3261
3262 <method name="createVFSExplorer">
3263 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3264
3265 <param name="aUri" type="wstring" dir="in">
3266 <desc>The URI describing the file system to use.</desc>
3267 </param>
3268
3269 <param name="aExplorer" type="IVFSExplorer" dir="return">
3270 <desc></desc>
3271 </param>
3272 </method>
3273
3274 <method name="write">
3275 <desc>
3276 Writes the contents of the appliance exports into a new OVF file.
3277
3278 Calling this method is the final step of exporting an appliance from VirtualBox;
3279 see <link to="IAppliance" /> for an overview.
3280
3281 Since exporting the appliance will most probably involve copying and converting
3282 disk images, which can take a long time, this method operates asynchronously and
3283 returns an IProgress object to allow the caller to monitor the progress.
3284 </desc>
3285 <param name="format" type="wstring" dir="in">
3286 <desc>
3287 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3288 future versions of VirtualBox may support additional formats.
3289 </desc>
3290 </param>
3291 <param name="path" type="wstring" dir="in">
3292 <desc>
3293 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3294 on whether the appliance is distributed as a set of files or as a single file, respectively).
3295 </desc>
3296 </param>
3297 <param name="aProgress" type="IProgress" dir="return">
3298 <desc>Progress object to track the operation completion.</desc>
3299 </param>
3300 </method>
3301
3302 <method name="getWarnings">
3303 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3304
3305 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3306 <desc></desc>
3307 </param>
3308 </method>
3309
3310 </interface>
3311
3312 <enum
3313 name="VirtualSystemDescriptionType"
3314 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3315 >
3316 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3317 a configuration value.</desc>
3318
3319 <const name="Ignore" value="1" />
3320 <const name="OS" value="2" />
3321 <const name="Name" value="3" />
3322 <const name="Product" value="4" />
3323 <const name="Vendor" value="5" />
3324 <const name="Version" value="6" />
3325 <const name="ProductUrl" value="7" />
3326 <const name="VendorUrl" value="8" />
3327 <const name="Description" value="9" />
3328 <const name="License" value="10" />
3329 <const name="Miscellaneous" value="11" />
3330 <const name="CPU" value="12" />
3331 <const name="Memory" value="13" />
3332 <const name="HardDiskControllerIDE" value="14" />
3333 <const name="HardDiskControllerSATA" value="15" />
3334 <const name="HardDiskControllerSCSI" value="16" />
3335 <const name="HardDiskImage" value="17" />
3336 <const name="Floppy" value="18" />
3337 <const name="CDROM" value="19" />
3338 <const name="NetworkAdapter" value="20" />
3339 <const name="USBController" value="21" />
3340 <const name="SoundCard" value="22" />
3341
3342 </enum>
3343
3344 <enum
3345 name="VirtualSystemDescriptionValueType"
3346 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3347 >
3348 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3349 type to fetch.</desc>
3350
3351 <const name="Reference" value="1" />
3352 <const name="Original" value="2" />
3353 <const name="Auto" value="3" />
3354 <const name="ExtraConfig" value="4" />
3355
3356 </enum>
3357
3358 <interface
3359 name="IVirtualSystemDescription" extends="$unknown"
3360 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3361 wsmap="managed"
3362 >
3363
3364 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3365 After <link to="IAppliance::interpret" /> has been called, that array contains
3366 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3367 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3368 into VirtualBox.
3369 </desc>
3370
3371 <attribute name="count" type="unsigned long" readonly="yes">
3372 <desc>Return the number of virtual system description entries.</desc>
3373 </attribute>
3374
3375 <method name="getDescription">
3376 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3377 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3378
3379 The list below identifies the value sets that are possible depending on the
3380 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3381 the array item with the same index in aOvfValues[] will contain the original value as contained
3382 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3383 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3384 the aExtraConfigValues[] array item may also be used.
3385
3386 <ul>
3387 <li>
3388 "OS": the guest operating system type. There must be exactly one such array item on import. The
3389 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3390 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3391 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3392 </li>
3393 <li>
3394 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3395 if none is present on import, then an automatic name will be created from the operating system
3396 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3397 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3398 <link to="IMachine" /> name that does not exist yet.
3399 </li>
3400 <li>
3401 "Description": an arbitrary description.
3402 </li>
3403 <li>
3404 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3405 code to display such a license for agreement; the Main API does not enforce any such policy.
3406 </li>
3407 <li>
3408 Miscellaneous: reserved for future use.
3409 </li>
3410 <li>
3411 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3412 </li>
3413 <li>
3414 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3415 is present on import, then VirtualBox will set a meaningful default based on the operating system
3416 type.
3417 </li>
3418 <li>
3419 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3420 has no value in aOvfValues[] or aVBoxValues[].
3421 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3422 type can use to specify which hard disk controller a virtual disk should be connected to.
3423 </li>
3424 <li>
3425 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3426 has no value in aOvfValues[] or aVBoxValues[].
3427 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3428 </li>
3429 <li>
3430 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3431 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3432 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3433 </li>
3434 <li>
3435 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3436 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3437
3438 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3439 a path since the image file should be in the same location as the OVF file itself), whereas the
3440 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3441 hard disk image. This means that on import the image will be copied and converted from the
3442 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3443 On import, the target image will also be registered with VirtualBox.
3444
3445 The matching item in the aExtraConfigValues[] array must contain a string of the following
3446 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3447 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3448 the image to. That number must be the index of an array item with one of the hard disk controller
3449 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3450 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3451 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3452 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3453 </li>
3454 <li>
3455 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3456 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3457 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3458 </li>
3459 <li>
3460 "USBController": a USB controller. There can be at most one such item. If and only if such an
3461 item ispresent, USB support will be enabled for the new virtual machine.
3462 </li>
3463 <li>
3464 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3465 present, sound support will be enabled for the new virtual machine. Note that the virtual
3466 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3467 may be different from the virtual soundcard expected by the appliance.
3468 </li>
3469 </ul>
3470
3471 </desc>
3472
3473 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3474 <desc></desc>
3475 </param>
3476
3477 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3478 <desc></desc>
3479 </param>
3480
3481 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3482 <desc></desc>
3483 </param>
3484
3485 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3486 <desc></desc>
3487 </param>
3488
3489 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3490 <desc></desc>
3491 </param>
3492
3493 </method>
3494
3495 <method name="getDescriptionByType">
3496 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3497 should be returned.</desc>
3498
3499 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3500 <desc></desc>
3501 </param>
3502
3503 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3504 <desc></desc>
3505 </param>
3506
3507 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3508 <desc></desc>
3509 </param>
3510
3511 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3512 <desc></desc>
3513 </param>
3514
3515 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3516 <desc></desc>
3517 </param>
3518
3519 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3520 <desc></desc>
3521 </param>
3522
3523 </method>
3524
3525 <method name="getValuesByType">
3526 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3527 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3528 values.</desc>
3529
3530 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3531 <desc></desc>
3532 </param>
3533
3534 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3535 <desc></desc>
3536 </param>
3537
3538 <param name="aValues" type="wstring" dir="return" safearray="yes">
3539 <desc></desc>
3540 </param>
3541
3542 </method>
3543
3544 <method name="setFinalValues">
3545 <desc>
3546 This method allows the appliance's user to change the configuration for the virtual
3547 system descriptions. For each array item returned from <link to="#getDescription" />,
3548 you must pass in one boolean value and one configuration value.
3549
3550 Each item in the boolean array determines whether the particular configuration item
3551 should be enabled.
3552 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3553 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3554 and SoundCard.
3555
3556 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3557 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3558 the configuration remains unchanged. Please see the documentation for getDescription()
3559 for valid configuration values for the individual array item types. If the
3560 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3561 </desc>
3562
3563 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3564 <desc></desc>
3565 </param>
3566
3567 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3568 <desc></desc>
3569 </param>
3570
3571 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3572 <desc></desc>
3573 </param>
3574 </method>
3575
3576 <method name="addDescription">
3577 <desc>
3578 This method adds an additional description entry to the stack of already
3579 available descriptions for this virtual system. This is handy for writing
3580 values which aren't directly supported by VirtualBox. One example would
3581 be the License type of <link to="VirtualSystemDescriptionType" />.
3582 </desc>
3583
3584 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3585 <desc></desc>
3586 </param>
3587
3588 <param name="aVBoxValue" type="wstring" dir="in">
3589 <desc></desc>
3590 </param>
3591
3592 <param name="aExtraConfigValue" type="wstring" dir="in">
3593 <desc></desc>
3594 </param>
3595 </method>
3596 </interface>
3597
3598
3599 <!--
3600 // IMachine
3601 /////////////////////////////////////////////////////////////////////////
3602 -->
3603
3604 <interface
3605 name="IInternalMachineControl" extends="$unknown"
3606 uuid="6c08103e-b8e6-44fb-bc6c-36067153d4bd"
3607 internal="yes"
3608 wsmap="suppress"
3609 >
3610 <method name="setRemoveSavedState">
3611 <desc>
3612 Updates the flag whether saved state is removed on a machine state
3613 change from Saved to PoweredOff.
3614 </desc>
3615 <param name="aRemove" type="boolean" dir="in"/>
3616 </method>
3617
3618 <method name="updateState">
3619 <desc>
3620 Updates the VM state.
3621 <note>
3622 This operation will also update the settings file with
3623 the correct information about the saved state file
3624 and delete this file from disk when appropriate.
3625 </note>
3626 </desc>
3627 <param name="state" type="MachineState" dir="in"/>
3628 </method>
3629
3630 <method name="getIPCId">
3631 <param name="id" type="wstring" dir="return"/>
3632 </method>
3633
3634 <method name="runUSBDeviceFilters">
3635 <desc>
3636 Asks the server to run USB devices filters of the associated
3637 machine against the given USB device and tell if there is
3638 a match.
3639 <note>
3640 Intended to be used only for remote USB devices. Local
3641 ones don't require to call this method (this is done
3642 implicitly by the Host and USBProxyService).
3643 </note>
3644 </desc>
3645 <param name="device" type="IUSBDevice" dir="in"/>
3646 <param name="matched" type="boolean" dir="out"/>
3647 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3648 </method>
3649
3650 <method name="captureUSBDevice">
3651 <desc>
3652 Requests a capture of the given host USB device.
3653 When the request is completed, the VM process will
3654 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3655 notification.
3656 </desc>
3657 <param name="id" type="uuid" mod="string" dir="in"/>
3658 </method>
3659
3660 <method name="detachUSBDevice">
3661 <desc>
3662 Notification that a VM is going to detach (@a done = @c false) or has
3663 already detached (@a done = @c true) the given USB device.
3664 When the @a done = @c true request is completed, the VM process will
3665 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3666 notification.
3667 <note>
3668 In the @a done = @c true case, the server must run its own filters
3669 and filters of all VMs but this one on the detached device
3670 as if it were just attached to the host computer.
3671 </note>
3672 </desc>
3673 <param name="id" type="uuid" mod="string" dir="in"/>
3674 <param name="done" type="boolean" dir="in"/>
3675 </method>
3676
3677 <method name="autoCaptureUSBDevices">
3678 <desc>
3679 Requests a capture all matching USB devices attached to the host.
3680 When the request is completed, the VM process will
3681 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3682 notification per every captured device.
3683 </desc>
3684 </method>
3685
3686 <method name="detachAllUSBDevices">
3687 <desc>
3688 Notification that a VM that is being powered down. The done
3689 parameter indicates whether which stage of the power down
3690 we're at. When @a done = @c false the VM is announcing its
3691 intentions, while when @a done = @c true the VM is reporting
3692 what it has done.
3693 <note>
3694 In the @a done = @c true case, the server must run its own filters
3695 and filters of all VMs but this one on all detach devices as
3696 if they were just attached to the host computer.
3697 </note>
3698 </desc>
3699 <param name="done" type="boolean" dir="in"/>
3700 </method>
3701
3702 <method name="onSessionEnd">
3703 <desc>
3704 Triggered by the given session object when the session is about
3705 to close normally.
3706 </desc>
3707 <param name="session" type="ISession" dir="in">
3708 <desc>Session that is being closed</desc>
3709 </param>
3710 <param name="progress" type="IProgress" dir="return">
3711 <desc>
3712 Used to wait until the corresponding machine is actually
3713 dissociated from the given session on the server.
3714 Returned only when this session is a direct one.
3715 </desc>
3716 </param>
3717 </method>
3718
3719 <method name="beginSavingState">
3720 <desc>
3721 Called by the VM process to inform the server it wants to
3722 save the current state and stop the VM execution.
3723 </desc>
3724 <param name="progress" type="IProgress" dir="in">
3725 <desc>
3726 Progress object created by the VM process to wait until
3727 the state is saved.
3728 </desc>
3729 </param>
3730 <param name="stateFilePath" type="wstring" dir="out">
3731 <desc>
3732 File path the VM process must save the execution state to.
3733 </desc>
3734 </param>
3735 </method>
3736
3737 <method name="endSavingState">
3738 <desc>
3739 Called by the VM process to inform the server that saving
3740 the state previously requested by #beginSavingState is either
3741 successfully finished or there was a failure.
3742
3743 <result name="VBOX_E_FILE_ERROR">
3744 Settings file not accessible.
3745 </result>
3746 <result name="VBOX_E_XML_ERROR">
3747 Could not parse the settings file.
3748 </result>
3749
3750 </desc>
3751
3752 <param name="success" type="boolean" dir="in">
3753 <desc>@c true to indicate success and @c false otherwise.
3754 </desc>
3755 </param>
3756 </method>
3757
3758 <method name="adoptSavedState">
3759 <desc>
3760 Gets called by IConsole::adoptSavedState.
3761 <result name="VBOX_E_FILE_ERROR">
3762 Invalid saved state file path.
3763 </result>
3764 </desc>
3765 <param name="savedStateFile" type="wstring" dir="in">
3766 <desc>Path to the saved state file to adopt.</desc>
3767 </param>
3768 </method>
3769
3770 <method name="beginTakingSnapshot">
3771 <desc>
3772 Called from the VM process to request from the server to perform the
3773 server-side actions of creating a snapshot (creating differencing images
3774 and the snapshot object).
3775
3776 <result name="VBOX_E_FILE_ERROR">
3777 Settings file not accessible.
3778 </result>
3779 <result name="VBOX_E_XML_ERROR">
3780 Could not parse the settings file.
3781 </result>
3782 </desc>
3783 <param name="initiator" type="IConsole" dir="in">
3784 <desc>The console object that initiated this call.</desc>
3785 </param>
3786 <param name="name" type="wstring" dir="in">
3787 <desc>Snapshot name.</desc>
3788 </param>
3789 <param name="description" type="wstring" dir="in">
3790 <desc>Snapshot description.</desc>
3791 </param>
3792 <param name="consoleProgress" type="IProgress" dir="in">
3793 <desc>
3794 Progress object created by the VM process tracking the
3795 snapshot's progress. This has the following sub-operations:
3796 <ul>
3797 <li>setting up (weight 1);</li>
3798 <li>one for each hard disk attachment that needs a differencing image (weight 1 each);</li>
3799 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3800 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3801 <li>finishing up (weight 1)</li>
3802 </ul>
3803 </desc>
3804 </param>
3805 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3806 <desc>
3807 Whether this is an online snapshot (i.e. the machine is running).
3808 </desc>
3809 </param>
3810 <param name="stateFilePath" type="wstring" dir="out">
3811 <desc>
3812 File path the VM process must save the execution state to.
3813 </desc>
3814 </param>
3815 </method>
3816
3817 <method name="endTakingSnapshot">
3818 <desc>
3819 Called by the VM process to inform the server that the snapshot
3820 previously requested by #beginTakingSnapshot is either
3821 successfully taken or there was a failure.
3822 </desc>
3823
3824 <param name="success" type="boolean" dir="in">
3825 <desc>@c true to indicate success and @c false otherwise</desc>
3826 </param>
3827 </method>
3828
3829 <method name="discardSnapshot">
3830 <desc>
3831 Gets called by IConsole::discardSnapshot.
3832 <result name="VBOX_E_INVALID_OBJECT_STATE">
3833 Snapshot has more than one child snapshot.
3834 </result>
3835 </desc>
3836 <param name="initiator" type="IConsole" dir="in">
3837 <desc>The console object that initiated this call.</desc>
3838 </param>
3839 <param name="id" type="uuid" mod="string" dir="in">
3840 <desc>UUID of the snapshot to discard.</desc>
3841 </param>
3842 <param name="machineState" type="MachineState" dir="out">
3843 <desc>New machine state after this operation is started.</desc>
3844 </param>
3845 <param name="progress" type="IProgress" dir="return">
3846 <desc>Progress object to track the operation completion.</desc>
3847 </param>
3848 </method>
3849
3850 <method name="discardCurrentState">
3851 <desc>
3852 Gets called by IConsole::discardCurrentState.
3853 <result name="VBOX_E_INVALID_OBJECT_STATE">
3854 Virtual machine does not have any snapshot.
3855 </result>
3856 </desc>
3857 <param name="initiator" type="IConsole" dir="in">
3858 <desc>The console object that initiated this call.</desc>
3859 </param>
3860 <param name="machineState" type="MachineState" dir="out">
3861 <desc>New machine state after this operation is started.</desc>
3862 </param>
3863 <param name="progress" type="IProgress" dir="return">
3864 <desc>Progress object to track the operation completion.</desc>
3865 </param>
3866 </method>
3867
3868 <method name="discardCurrentSnapshotAndState">
3869 <desc>
3870 Gets called by IConsole::discardCurrentSnapshotAndState.
3871 <result name="VBOX_E_INVALID_OBJECT_STATE">
3872 Virtual machine does not have any snapshot.
3873 </result>
3874 </desc>
3875 <param name="initiator" type="IConsole" dir="in">
3876 <desc>The console object that initiated this call.</desc>
3877 </param>
3878 <param name="machineState" type="MachineState" dir="out">
3879 <desc>New machine state after this operation is started.</desc>
3880 </param>
3881 <param name="progress" type="IProgress" dir="return">
3882 <desc>Progress object to track the operation completion.</desc>
3883 </param>
3884 </method>
3885
3886 <method name="pullGuestProperties">
3887 <desc>
3888 Get the list of the guest properties matching a set of patterns along
3889 with their values, time stamps and flags and give responsibility for
3890 managing properties to the console.
3891 </desc>
3892 <param name="name" type="wstring" dir="out" safearray="yes">
3893 <desc>
3894 The names of the properties returned.
3895 </desc>
3896 </param>
3897 <param name="value" type="wstring" dir="out" safearray="yes">
3898 <desc>
3899 The values of the properties returned. The array entries match the
3900 corresponding entries in the @a name array.
3901 </desc>
3902 </param>
3903 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3904 <desc>
3905 The time stamps of the properties returned. The array entries match
3906 the corresponding entries in the @a name array.
3907 </desc>
3908 </param>
3909 <param name="flags" type="wstring" dir="out" safearray="yes">
3910 <desc>
3911 The flags of the properties returned. The array entries match the
3912 corresponding entries in the @a name array.
3913 </desc>
3914 </param>
3915 </method>
3916
3917 <method name="pushGuestProperties">
3918 <desc>
3919 Set the list of the guest properties matching a set of patterns along
3920 with their values, time stamps and flags and return responsibility for
3921 managing properties to IMachine.
3922 </desc>
3923 <param name="name" type="wstring" dir="in" safearray="yes">
3924 <desc>
3925 The names of the properties.
3926 </desc>
3927 </param>
3928 <param name="value" type="wstring" dir="in" safearray="yes">
3929 <desc>
3930 The values of the properties. The array entries match the
3931 corresponding entries in the @a name array.
3932 </desc>
3933 </param>
3934 <param name="timestamp" type="unsigned long long" dir="in" safearray="yes">
3935 <desc>
3936 The time stamps of the properties. The array entries match
3937 the corresponding entries in the @a name array.
3938 </desc>
3939 </param>
3940 <param name="flags" type="wstring" dir="in" safearray="yes">
3941 <desc>
3942 The flags of the properties. The array entries match the
3943 corresponding entries in the @a name array.
3944 </desc>
3945 </param>
3946 </method>
3947 <method name="pushGuestProperty">
3948 <desc>
3949 Update a single guest property in IMachine.
3950 </desc>
3951 <param name="name" type="wstring" dir="in">
3952 <desc>
3953 The name of the property to be updated.
3954 </desc>
3955 </param>
3956 <param name="value" type="wstring" dir="in">
3957 <desc>
3958 The value of the property.
3959 </desc>
3960 </param>
3961 <param name="timestamp" type="unsigned long long" dir="in">
3962 <desc>
3963 The timestamp of the property.
3964 </desc>
3965 </param>
3966 <param name="flags" type="wstring" dir="in">
3967 <desc>
3968 The flags of the property.
3969 </desc>
3970 </param>
3971 </method>
3972
3973 <method name="lockMedia">
3974 <desc>
3975 Locks all media attached to the machine for writing and parents of
3976 attached differencing media (if any) for reading. This operation is
3977 atomic so that if it fails no media is actually locked.
3978
3979 This method is intended to be called when the machine is in Starting or
3980 Restoring state. The locked media will be automatically unlocked when
3981 the machine is powered off or crashed.
3982 </desc>
3983 </method>
3984 </interface>
3985
3986 <interface
3987 name="IBIOSSettings" extends="$unknown"
3988 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3989 wsmap="managed"
3990 >
3991 <desc>
3992 The IBIOSSettings interface represents BIOS settings of the virtual
3993 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3994 </desc>
3995 <attribute name="logoFadeIn" type="boolean">
3996 <desc>Fade in flag for BIOS logo animation.</desc>
3997 </attribute>
3998
3999 <attribute name="logoFadeOut" type="boolean">
4000 <desc>Fade out flag for BIOS logo animation.</desc>
4001 </attribute>
4002
4003 <attribute name="logoDisplayTime" type="unsigned long">
4004 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4005 </attribute>
4006
4007 <attribute name="logoImagePath" type="wstring">
4008 <desc>Local file system path for external BIOS image.</desc>
4009 </attribute>
4010
4011 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4012 <desc>Mode of the BIOS boot device menu.</desc>
4013 </attribute>
4014
4015 <attribute name="ACPIEnabled" type="boolean">
4016 <desc>ACPI support flag.</desc>
4017 </attribute>
4018
4019 <attribute name="IOAPICEnabled" type="boolean">
4020 <desc>
4021 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4022 and support IRQs above 15.
4023 </desc>
4024 </attribute>
4025
4026 <attribute name="timeOffset" type="long long">
4027 <desc>
4028 Offset in milliseconds from the host system time. This allows for
4029 guests running with a different system date/time than the host.
4030 It is equivalent to setting the system date/time in the BIOS except
4031 it is not an absolute value but a relative one. Guest Additions
4032 time synchronization honors this offset.
4033 </desc>
4034 </attribute>
4035
4036 <attribute name="PXEDebugEnabled" type="boolean">
4037 <desc>
4038 PXE debug logging flag. If set, VirtualBox will write extensive
4039 PXE trace information to the release log.
4040 </desc>
4041 </attribute>
4042
4043 </interface>
4044
4045 <interface
4046 name="IMachine" extends="$unknown"
4047 uuid="ff5155a9-da1e-4225-8829-2f9f105d4db2"
4048 wsmap="managed"
4049 >
4050 <desc>
4051 The IMachine interface represents a virtual machine, or guest, created
4052 in VirtualBox.
4053
4054 This interface is used in two contexts. First of all, a collection of
4055 objects implementing this interface is stored in the
4056 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4057 machines that are currently registered with this VirtualBox
4058 installation. Also, once a session has been opened for the given virtual
4059 machine (e.g. the virtual machine is running), the machine object
4060 associated with the open session can be queried from the session object;
4061 see <link to="ISession"/> for details.
4062
4063 The main role of this interface is to expose the settings of the virtual
4064 machine and provide methods to change various aspects of the virtual
4065 machine's configuration. For machine objects stored in the
4066 <link to="IVirtualBox::machines"/> collection, all attributes are
4067 read-only unless explicitly stated otherwise in individual attribute
4068 and method descriptions. In order to change a machine setting, a session
4069 for this machine must be opened using one of
4070 <link to="IVirtualBox::openSession"/>,
4071 <link to="IVirtualBox::openRemoteSession"/> or
4072 <link to="IVirtualBox::openExistingSession"/> methods. After the
4073 session has been successfully opened, a mutable machine object needs to
4074 be queried from the session object and then the desired settings changes
4075 can be applied to the returned object using IMachine attributes and
4076 methods. See the <link to="ISession"/> interface description for more
4077 information about sessions.
4078
4079 Note that IMachine does not provide methods to control virtual machine
4080 execution (such as start the machine, or power it down) -- these methods
4081 are grouped in a separate interface called <link to="IConsole" />.
4082
4083 <see>ISession, IConsole</see>
4084 </desc>
4085
4086 <attribute name="parent" type="IVirtualBox" readonly="yes">
4087 <desc>Associated parent object.</desc>
4088 </attribute>
4089
4090 <attribute name="accessible" type="boolean" readonly="yes">
4091 <desc>
4092 Whether this virtual machine is currently accessible or not.
4093
4094 A machine is always deemed accessible unless it is registered <i>and</i>
4095 its settings file cannot be read or parsed (either because the file itself
4096 is unavailable or has invalid XML contents).
4097
4098 Every time this property is read, the accessibility state of
4099 this machine is re-evaluated. If the returned value is @c false,
4100 the <link to="#accessError"/> property may be used to get the
4101 detailed error information describing the reason of
4102 inaccessibility, including XML error messages.
4103
4104 When the machine is inaccessible, only the following properties
4105 can be used on it:
4106 <ul>
4107 <li><link to="#parent"/></li>
4108 <li><link to="#id"/></li>
4109 <li><link to="#settingsFilePath"/></li>
4110 <li><link to="#accessible"/></li>
4111 <li><link to="#accessError"/></li>
4112 </ul>
4113
4114 An attempt to access any other property or method will return
4115 an error.
4116
4117 The only possible action you can perform on an inaccessible
4118 machine is to unregister it using the
4119 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4120 for the accessibility state once more by querying this
4121 property).
4122
4123 <note>
4124 In the current implementation, once this property returns
4125 @c true, the machine will never become inaccessible
4126 later, even if its settings file cannot be successfully
4127 read/written any more (at least, until the VirtualBox
4128 server is restarted). This limitation may be removed in
4129 future releases.
4130 </note>
4131 </desc>
4132 </attribute>
4133
4134 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4135 <desc>
4136 Error information describing the reason of machine
4137 inaccessibility.
4138
4139 Reading this property is only valid after the last call to
4140 <link to="#accessible"/> returned @c false (i.e. the
4141 machine is currently unaccessible). Otherwise, a @c null
4142 IVirtualBoxErrorInfo object will be returned.
4143 </desc>
4144 </attribute>
4145
4146 <attribute name="name" type="wstring">
4147 <desc>
4148 Name of the virtual machine.
4149
4150 Besides being used for human-readable identification purposes
4151 everywhere in VirtualBox, the virtual machine name is also used
4152 as a name of the machine's settings file and as a name of the
4153 subdirectory this settings file resides in. Thus, every time you
4154 change the value of this property, the settings file will be
4155 renamed once you call <link to="#saveSettings"/> to confirm the
4156 change. The containing subdirectory will be also renamed, but
4157 only if it has exactly the same name as the settings file
4158 itself prior to changing this property (for backward compatibility
4159 with previous API releases). The above implies the following
4160 limitations:
4161 <ul>
4162 <li>The machine name cannot be empty.</li>
4163 <li>The machine name can contain only characters that are valid
4164 file name characters according to the rules of the file
4165 system used to store VirtualBox configuration.</li>
4166 <li>You cannot have two or more machines with the same name
4167 if they use the same subdirectory for storing the machine
4168 settings files.</li>
4169 <li>You cannot change the name of the machine if it is running,
4170 or if any file in the directory containing the settings file
4171 is being used by another running machine or by any other
4172 process in the host operating system at a time when
4173 <link to="#saveSettings"/> is called.
4174 </li>
4175 </ul>
4176 If any of the above limitations are hit, <link to="#saveSettings"/>
4177 will return an appropriate error message explaining the exact
4178 reason and the changes you made to this machine will not be
4179 saved.
4180 <note>
4181 For "legacy" machines created using the
4182 <link to="IVirtualBox::createLegacyMachine"/> call,
4183 the above naming limitations do not apply because the
4184 machine name does not affect the settings file name.
4185 The settings file name remains the same as it was specified
4186 during machine creation and never changes.
4187 </note>
4188 </desc>
4189 </attribute>
4190
4191 <attribute name="description" type="wstring">
4192 <desc>
4193 Description of the virtual machine.
4194
4195 The description attribute can contain any text and is
4196 typically used to describe the hardware and software
4197 configuration of the virtual machine in detail (i.e. network
4198 settings, versions of the installed software and so on).
4199 </desc>
4200 </attribute>
4201
4202 <attribute name="id" type="uuid" mod="string" readonly="yes">
4203 <desc>UUID of the virtual machine.</desc>
4204 </attribute>
4205
4206 <attribute name="OSTypeId" type="wstring">
4207 <desc>
4208 User-defined identifier of the Guest OS type.
4209 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4210 an IGuestOSType object representing details about the given
4211 Guest OS type.
4212 <note>
4213 This value may differ from the value returned by
4214 <link to="IGuest::OSTypeId"/> if Guest Additions are
4215 installed to the guest OS.
4216 </note>
4217 </desc>
4218 </attribute>
4219
4220 <attribute name="HardwareVersion" type="wstring">
4221 <desc>Hardware version identifier. Internal use only for now.</desc>
4222 </attribute>
4223
4224 <attribute name="CPUCount" type="unsigned long">
4225 <desc>Number of virtual CPUs in the VM.</desc>
4226 </attribute>
4227
4228 <attribute name="memorySize" type="unsigned long">
4229 <desc>System memory size in megabytes.</desc>
4230 </attribute>
4231
4232 <attribute name="memoryBalloonSize" type="unsigned long">
4233 <desc>Initial memory balloon size in megabytes.</desc>
4234 </attribute>
4235
4236 <attribute name="statisticsUpdateInterval" type="unsigned long">
4237 <desc>Initial interval to update guest statistics in seconds.</desc>
4238 </attribute>
4239
4240 <attribute name="VRAMSize" type="unsigned long">
4241 <desc>Video memory size in megabytes.</desc>
4242 </attribute>
4243
4244 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4245 <desc>
4246 This setting determines whether VirtualBox allows this machine to make
4247 use of the 3D graphics support available on the host.</desc>
4248 </attribute>
4249
4250 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4251 <desc>
4252 This setting determines whether VirtualBox allows this machine to make
4253 use of the 2D video acceleration support available on the host.</desc>
4254 </attribute>
4255
4256 <attribute name="monitorCount" type="unsigned long">
4257 <desc>
4258 Number of virtual monitors.
4259 <note>
4260 Only effective on Windows XP and later guests with
4261 Guest Additions installed.
4262 </note>
4263 </desc>
4264 </attribute>
4265
4266 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4267 <desc>Object containing all BIOS settings.</desc>
4268 </attribute>
4269
4270 <attribute name="firmwareType" type="FirmwareType">
4271 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4272 bootstrap in this VM.</desc>
4273 </attribute>
4274
4275 <attribute name="PAEEnabled" type="boolean" default="false">
4276 <desc>
4277 This setting determines whether VirtualBox will expose the Physical Address
4278 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
4279 is not available, it will not be reported.
4280 </desc>
4281 </attribute>
4282
4283 <attribute name="snapshotFolder" type="wstring">
4284 <desc>
4285 Full path to the directory used to store snapshot data
4286 (differencing media and saved state files) of this machine.
4287
4288 The initial value of this property is
4289 <tt>&lt;</tt><link to="#settingsFilePath">
4290 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4291 <link to="#id">machine_uuid</link>
4292 <tt>&gt;</tt>.
4293
4294 Currently, it is an error to try to change this property on
4295 a machine that has snapshots (because this would require to
4296 move possibly large files to a different location).
4297 A separate method will be available for this purpose later.
4298
4299 <note>
4300 Setting this property to @c null or to an empty string will restore
4301 the initial value.
4302 </note>
4303 <note>
4304 When setting this property, the specified path can be
4305 absolute (full path) or relative to the directory where the
4306 <link to="#settingsFilePath">machine settings file</link>
4307 is located. When reading this property, a full path is
4308 always returned.
4309 </note>
4310 <note>
4311 The specified path may not exist, it will be created
4312 when necessary.
4313 </note>
4314 </desc>
4315 </attribute>
4316
4317 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4318 <desc>VRDP server object.</desc>
4319 </attribute>
4320
4321 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4322 <desc>Array of media attached to this machine.</desc>
4323 </attribute>
4324
4325 <attribute name="USBController" type="IUSBController" readonly="yes">
4326 <desc>
4327 Associated USB controller object.
4328
4329 <note>
4330 If USB functionality is not available in the given edition of
4331 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4332 </note>
4333 </desc>
4334 </attribute>
4335
4336 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4337 <desc>Associated audio adapter, always present.</desc>
4338 </attribute>
4339
4340 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4341 <desc>Array of storage controllers attached to this machine.</desc>
4342 </attribute>
4343
4344 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4345 <desc>
4346 Full name of the file containing machine settings data.
4347 </desc>
4348 </attribute>
4349
4350 <attribute name="settingsModified" type="boolean" readonly="yes">
4351 <desc>
4352 Whether the settings of this machine have been modified
4353 (but neither yet saved nor discarded).
4354 <note>
4355 Reading this property is only valid on instances returned
4356 by <link to="ISession::machine"/> and on new machines
4357 created by <link to="IVirtualBox::createMachine"/> or opened
4358 by <link to="IVirtualBox::openMachine"/> but not
4359 yet registered, or on unregistered machines after calling
4360 <link to="IVirtualBox::unregisterMachine"/>. For all other
4361 cases, the settings can never be modified.
4362 </note>
4363 <note>
4364 For newly created unregistered machines, the value of this
4365 property is always @c true until <link to="#saveSettings"/>
4366 is called (no matter if any machine settings have been
4367 changed after the creation or not). For opened machines
4368 the value is set to @c false (and then follows to normal rules).
4369 </note>
4370 </desc>
4371 </attribute>
4372
4373 <attribute name="sessionState" type="SessionState" readonly="yes">
4374 <desc>Current session state for this machine.</desc>
4375 </attribute>
4376
4377 <attribute name="sessionType" type="wstring" readonly="yes">
4378 <desc>
4379 Type of the session. If <link to="#sessionState"/> is
4380 SessionSpawning or SessionOpen, this attribute contains the
4381 same value as passed to the
4382 <link to="IVirtualBox::openRemoteSession"/> method in the
4383 @a type parameter. If the session was opened directly using
4384 <link to="IVirtualBox::openSession"/>, or if
4385 <link to="#sessionState"/> is SessionClosed, the value of this
4386 attribute is an empty string.
4387 </desc>
4388 </attribute>
4389
4390 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4391 <desc>
4392 Identifier of the session process. This attribute contains the
4393 platform-dependent identifier of the process that has opened a
4394 direct session for this machine using the
4395 <link to="IVirtualBox::openSession"/> call. The returned value
4396 is only valid if <link to="#sessionState"/> is SessionOpen or
4397 SessionClosing (i.e. a session is currently open or being
4398 closed) by the time this property is read.
4399 </desc>
4400 </attribute>
4401
4402 <attribute name="state" type="MachineState" readonly="yes">
4403 <desc>Current execution state of this machine.</desc>
4404 </attribute>
4405
4406 <attribute name="lastStateChange" type="long long" readonly="yes">
4407 <desc>
4408 Time stamp of the last execution state change,
4409 in milliseconds since 1970-01-01 UTC.
4410 </desc>
4411 </attribute>
4412
4413 <attribute name="stateFilePath" type="wstring" readonly="yes">
4414 <desc>
4415 Full path to the file that stores the execution state of
4416 the machine when it is in the <link to="MachineState_Saved"/> state.
4417 <note>
4418 When the machine is not in the Saved state, this attribute is
4419 an empty string.
4420 </note>
4421 </desc>
4422 </attribute>
4423
4424 <attribute name="logFolder" type="wstring" readonly="yes">
4425 <desc>
4426 Full path to the folder that stores a set of rotated log files
4427 recorded during machine execution. The most recent log file is
4428 named <tt>VBox.log</tt>, the previous log file is
4429 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4430 in the current version).
4431 </desc>
4432 </attribute>
4433
4434 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4435 <desc>
4436 Current snapshot of this machine. This is @c null if the machine
4437 currently has no snapshots. Otherwise, this is always the last snapshot
4438 in the current implementation; see <link to="ISnapshot"/> for details.
4439 </desc>
4440 </attribute>
4441
4442 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4443 <desc>
4444 Number of snapshots taken on this machine. Zero means the
4445 machine doesn't have any snapshots.
4446 </desc>
4447 </attribute>
4448
4449 <attribute name="currentStateModified" type="boolean" readonly="yes">
4450 <desc>
4451 Returns @c true if the current state of the machine is not
4452 identical to the state stored in the current snapshot.
4453
4454 The current state is identical to the current snapshot right
4455 after one of the following calls are made:
4456 <ul>
4457 <li><link to="IConsole::discardCurrentState"/> or
4458 <link to="IConsole::discardCurrentSnapshotAndState"/>
4459 </li>
4460 <li><link to="IConsole::takeSnapshot"/> (issued on a
4461 powered off or saved machine, for which
4462 <link to="#settingsModified"/> returns @c false)
4463 </li>
4464 <li><link to="IMachine::setCurrentSnapshot"/>
4465 </li>
4466 </ul>
4467
4468 The current state remains identical until one of the following
4469 happens:
4470 <ul>
4471 <li>settings of the machine are changed</li>
4472 <li>the saved state is discarded</li>
4473 <li>the current snapshot is discarded</li>
4474 <li>an attempt to execute the machine is made</li>
4475 </ul>
4476
4477 <note>
4478 For machines that don't have snapshots, this property is
4479 always @c false.
4480 </note>
4481 </desc>
4482 </attribute>
4483
4484 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4485 <desc>
4486 Collection of shared folders for this machine (permanent shared
4487 folders). These folders are shared automatically at machine startup
4488 and available only to the guest OS installed within this machine.
4489
4490 New shared folders are added to the collection using
4491 <link to="#createSharedFolder"/>. Existing shared folders can be
4492 removed using <link to="#removeSharedFolder"/>.
4493 </desc>
4494 </attribute>
4495
4496 <attribute name="clipboardMode" type="ClipboardMode">
4497 <desc>
4498 Synchronization mode between the host OS clipboard
4499 and the guest OS clipboard.
4500 </desc>
4501 </attribute>
4502
4503 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4504 <desc>
4505 A comma-separated list of simple glob patterns. Changes to guest
4506 properties whose name matches one of the patterns will generate an
4507 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4508 </desc>
4509 </attribute>
4510
4511 <attribute name="liveMigrationTarget" type="boolean">
4512 <desc>
4513 When set to @a true, the virtual machine becomes a live migration
4514 target. This can only set to @a true when the VM is in the @a
4515 PoweredOff state.
4516
4517 This property is automatically set to @a false when the VM is powered
4518 on.
4519 </desc>
4520 </attribute>
4521
4522 <attribute name="liveMigrationPort" type="unsigned long">
4523 <desc>
4524 The TCP port used for live migration. This can only be set when the
4525 VM is in the @a PoweredOff state.
4526
4527 0 means the port is automatically selected and the source machine will
4528 have to be told where to connected after the destination has been
4529 started.
4530 </desc>
4531 </attribute>
4532
4533 <attribute name="liveMigrationPassword" type="wstring">
4534 <desc>
4535 The password the live migration target will check for.
4536 </desc>
4537 </attribute>
4538
4539 <method name="setBootOrder">
4540 <desc>
4541 Puts the given device to the specified position in
4542 the boot order.
4543
4544 To indicate that no device is associated with the given position,
4545 <link to="DeviceType_Null"/> should be used.
4546
4547 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4548
4549 <result name="E_INVALIDARG">
4550 Boot @a position out of range.
4551 </result>
4552 <result name="E_NOTIMPL">
4553 Booting from USB @a device currently not supported.
4554 </result>
4555
4556 </desc>
4557 <param name="position" type="unsigned long" dir="in">
4558 <desc>
4559 Position in the boot order (@c 1 to the total number of
4560 devices the machine can boot from, as returned by
4561 <link to="ISystemProperties::maxBootPosition"/>).
4562 </desc>
4563 </param>
4564 <param name="device" type="DeviceType" dir="in">
4565 <desc>
4566 The type of the device used to boot at the given position.
4567 </desc>
4568 </param>
4569 </method>
4570
4571 <method name="getBootOrder" const="yes">
4572 <desc>
4573 Returns the device type that occupies the specified
4574 position in the boot order.
4575
4576 @todo [remove?]
4577 If the machine can have more than one device of the returned type
4578 (such as hard disks), then a separate method should be used to
4579 retrieve the individual device that occupies the given position.
4580
4581 If here are no devices at the given position, then
4582 <link to="DeviceType_Null"/> is returned.
4583
4584 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4585
4586 <result name="E_INVALIDARG">
4587 Boot @a position out of range.
4588 </result>
4589
4590 </desc>
4591 <param name="position" type="unsigned long" dir="in">
4592 <desc>
4593 Position in the boot order (@c 1 to the total number of
4594 devices the machine can boot from, as returned by
4595 <link to="ISystemProperties::maxBootPosition"/>).
4596 </desc>
4597 </param>
4598 <param name="device" type="DeviceType" dir="return">
4599 <desc>
4600 Device at the given position.
4601 </desc>
4602 </param>
4603 </method>
4604
4605 <method name="attachDevice">
4606 <desc>
4607 Attaches a device and optionally mounts a medium to the given storage
4608 controller (<link to="IStorageController" />, identified by @a name),
4609 at the indicated port and device.
4610
4611 This method is intended for managing storage devices in general (it works
4612 for both fixed and removable media). For storage devices supporting removable
4613 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4614 for changing the media while the machine is running.
4615
4616 For the IDE bus, the @a controllerPort parameter can be either
4617 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4618 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4619 to specify the master or the slave device, respectively. (In the
4620 default configuration of virtual machines, the secondary master is
4621 used for a CD/DVD drive.)
4622
4623 For an SATA controller, @a controllerPort must be a number ranging
4624 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4625 be a number ranging from @c 0 to @c 15.
4626
4627 For both SCSI and SATA, the @a device parameter is unused and must
4628 be @c 0.
4629
4630 For fixed media such as hard disks, the given medium cannot be NULL. It may
4631 be NULL for removable media such as DVDs and floppies.
4632
4633 After calling this returns successfully, a new instance of
4634 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4635 attachments (<link to="IMachine::mediumAttachments"/>).
4636
4637 The specified device slot must not have another disk attached to it, or
4638 this method will fail.
4639
4640 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4641 information about attaching media.
4642
4643 <note>
4644 You cannot attach a hard disk to a running machine. Also, you cannot
4645 attach a hard disk to a newly created machine until this machine's
4646 settings are saved to disk using <link to="#saveSettings"/>.
4647 </note>
4648 <note>
4649 If the medium is being attached indirectly, a new differencing medium
4650 will implicitly be created for it and attached instead. If the
4651 changes made to the machine settings (including this indirect
4652 attachment) are later cancelled using <link to="#discardSettings"/>,
4653 this implicitly created differencing medium will implicitly
4654 be deleted.
4655 </note>
4656
4657 <result name="E_INVALIDARG">
4658 SATA device, SATA port, IDE port or IDE slot out of range.
4659 </result>
4660 <result name="VBOX_E_INVALID_OBJECT_STATE">
4661 Attempt to attach medium to an unregistered virtual machine.
4662 </result>
4663 <result name="VBOX_E_INVALID_VM_STATE">
4664 Invalid machine state.
4665 </result>
4666 <result name="VBOX_E_OBJECT_IN_USE">
4667 Hard disk already attached to this or another virtual machine.
4668 </result>
4669
4670 </desc>
4671 <param name="name" type="wstring" dir="in">
4672 <desc>Name of the storage controller to attach the device to.</desc>
4673 </param>
4674 <param name="controllerPort" type="long" dir="in">
4675 <desc>Port to attach the device to.</desc>
4676 </param>
4677 <param name="device" type="long" dir="in">
4678 <desc>Device slot in the given port to attach the device to.</desc>
4679 </param>
4680 <param name="type" type="DeviceType" dir="in">
4681 <desc>Device type of the attached device.</desc>
4682 </param>
4683 <param name="id" type="uuid" mod="string" dir="in">
4684 <desc>UUID of the medium to mount. NULL UUID means do not mount any
4685 medium.</desc>
4686 </param>
4687 </method>
4688
4689 <method name="detachDevice">
4690 <desc>
4691 Detaches the device attached to a device slot of the specified bus.
4692
4693 Detaching the device from the virtual machine is deferred. This means
4694 that the medium remains associated with the machine when this method
4695 returns and gets actually de-associated only after a successful
4696 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4697 for more detailed information about attaching media.
4698
4699 <note>
4700 You cannot detach the hard disk from a running machine.
4701 </note>
4702 <note>
4703 Detaching differencing media implicitly created by <link
4704 to="#attachDevice"/> for the indirect attachment using this
4705 method will <b>not</b> implicitly delete them. The
4706 <link to="IMedium::deleteStorage"/> operation should be
4707 explicitly performed by the caller after the medium is successfully
4708 detached and the settings are saved with
4709 <link to="#saveSettings"/>, if it is the desired action.
4710 </note>
4711
4712 <result name="VBOX_E_INVALID_VM_STATE">
4713 Attempt to detach medium from a running virtual machine.
4714 </result>
4715 <result name="VBOX_E_OBJECT_NOT_FOUND">
4716 No medium attached to given slot/bus.
4717 </result>
4718 <result name="VBOX_E_NOT_SUPPORTED">
4719 Hard disk format does not support storage deletion.
4720 </result>
4721
4722 </desc>
4723 <param name="name" type="wstring" dir="in">
4724 <desc>Name of the storage controller to detach the medium from.</desc>
4725 </param>
4726 <param name="controllerPort" type="long" dir="in">
4727 <desc>Port number to detach the medium from.</desc>
4728 </param>
4729 <param name="device" type="long" dir="in">
4730 <desc>Device slot number to detach the medium from.</desc>
4731 </param>
4732 </method>
4733
4734 <method name="mountMedium">
4735 <desc>
4736 Mounts a medium (<link to="IMedium" />, identified
4737 by the given UUID @a id) to the given storage controller
4738 (<link to="IStorageController" />, identified by @a name),
4739 at the indicated port and device. The device must already exist;
4740 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4741
4742 This method is intended only for managing removable media, where the
4743 device is fixed but media is changeable at runtime (such as DVDs
4744 and floppies). It cannot be used for fixed media such as hard disks.
4745
4746 The @a controllerPort and @a device parameters specify the device slot and
4747 have have the same meaning as with <link to="IMachine::attachDevice" />.
4748
4749 The specified device slot can have a medium mounted, which will be
4750 unmounted first. Specifying a NULL medium does just an unmount.
4751
4752 See <link to="IMedium"/> for more detailed information about
4753 attaching media.
4754
4755 <result name="E_INVALIDARG">
4756 SATA device, SATA port, IDE port or IDE slot out of range.
4757 </result>
4758 <result name="VBOX_E_INVALID_OBJECT_STATE">
4759 Attempt to attach medium to an unregistered virtual machine.
4760 </result>
4761 <result name="VBOX_E_INVALID_VM_STATE">
4762 Invalid machine state.
4763 </result>
4764 <result name="VBOX_E_OBJECT_IN_USE">
4765 Medium already attached to this or another virtual machine.
4766 </result>
4767
4768 </desc>
4769 <param name="name" type="wstring" dir="in">
4770 <desc>Name of the storage controller to attach the medium to.</desc>
4771 </param>
4772 <param name="controllerPort" type="long" dir="in">
4773 <desc>Port to attach the medium to.</desc>
4774 </param>
4775 <param name="device" type="long" dir="in">
4776 <desc>Device slot in the given port to attach the medium to.</desc>
4777 </param>
4778 <param name="id" type="uuid" mod="string" dir="in">
4779 <desc>UUID of the medium to attach.</desc>
4780 </param>
4781 </method>
4782
4783 <method name="getMedium" const="yes">
4784 <desc>
4785 Returns the virtual medium attached to a device slot of the specified
4786 bus.
4787
4788 Note that if the medium was indirectly attached by
4789 <link to="#mountMedium"/> to the given device slot then this
4790 method will return not the same object as passed to the
4791 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4792 more detailed information about mounting a medium.
4793
4794 <result name="VBOX_E_OBJECT_NOT_FOUND">
4795 No medium attached to given slot/bus.
4796 </result>
4797
4798 </desc>
4799 <param name="name" type="wstring" dir="in">
4800 <desc>Name of the storage controller the medium is attached to.</desc>
4801 </param>
4802 <param name="controllerPort" type="long" dir="in">
4803 <desc>Port to query.</desc>
4804 </param>
4805 <param name="device" type="long" dir="in">
4806 <desc>Device slot in the given port to query.</desc>
4807 </param>
4808 <param name="medium" type="IMedium" dir="return">
4809 <desc>Attached medium object.</desc>
4810 </param>
4811 </method>
4812
4813 <method name="getMediumAttachmentsOfController" const="yes">
4814 <desc>
4815 Returns an array of medium attachments which are attached to the
4816 the controller with the given name.
4817
4818 <result name="VBOX_E_OBJECT_NOT_FOUND">
4819 A storage controller with given name doesn't exist.
4820 </result>
4821 </desc>
4822 <param name="name" type="wstring" dir="in"/>
4823 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4824 </method>
4825
4826 <method name="getMediumAttachment" const="yes">
4827 <desc>
4828 Returns a medium attachment which corresponds to the controller with
4829 the given name, on the given port and device slot.
4830
4831 <result name="VBOX_E_OBJECT_NOT_FOUND">
4832 No attachment exists for the given controller/port/device combination.
4833 </result>
4834 </desc>
4835 <param name="name" type="wstring" dir="in"/>
4836 <param name="controllerPort" type="long" dir="in"/>
4837 <param name="device" type="long" dir="in"/>
4838 <param name="attachment" type="IMediumAttachment" dir="return"/>
4839 </method>
4840
4841 <method name="getNetworkAdapter" const="yes">
4842 <desc>
4843 Returns the network adapter associated with the given slot.
4844 Slots are numbered sequentially, starting with zero. The total
4845 number of adapters per machine is defined by the
4846 <link to="ISystemProperties::networkAdapterCount"/> property,
4847 so the maximum slot number is one less than that property's value.
4848
4849 <result name="E_INVALIDARG">
4850 Invalid @a slot number.
4851 </result>
4852
4853 </desc>
4854 <param name="slot" type="unsigned long" dir="in"/>
4855 <param name="adapter" type="INetworkAdapter" dir="return"/>
4856 </method>
4857
4858 <method name="addStorageController">
4859 <desc>
4860 Adds a new storage controller (SCSI or SATA controller) to the
4861 machine and returns it as an instance of
4862 <link to="IStorageController" />.
4863
4864 @a name identifies the controller for subsequent calls such as
4865 <link to="#getStorageControllerByName" />,
4866 <link to="#removeStorageController" />,
4867 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4868
4869 After the controller has been added, you can set its exact
4870 type by setting the <link to="IStorageController::controllerType" />.
4871
4872 <result name="VBOX_E_OBJECT_IN_USE">
4873 A storage controller with given name exists already.
4874 </result>
4875 <result name="E_INVALIDARG">
4876 Invalid @a controllerType.
4877 </result>
4878 </desc>
4879 <param name="name" type="wstring" dir="in"/>
4880 <param name="connectionType" type="StorageBus" dir="in"/>
4881 <param name="controller" type="IStorageController" dir="return"/>
4882 </method>
4883
4884 <method name="getStorageControllerByName" const="yes">
4885 <desc>
4886 Returns a storage controller with the given name.
4887
4888 <result name="VBOX_E_OBJECT_NOT_FOUND">
4889 A storage controller with given name doesn't exist.
4890 </result>
4891 </desc>
4892 <param name="name" type="wstring" dir="in"/>
4893 <param name="storageController" type="IStorageController" dir="return"/>
4894 </method>
4895
4896 <method name="removeStorageController">
4897 <desc>
4898 Removes a storage controller from the machine.
4899
4900 <result name="VBOX_E_OBJECT_NOT_FOUND">
4901 A storage controller with given name doesn't exist.
4902 </result>
4903 </desc>
4904 <param name="name" type="wstring" dir="in"/>
4905 </method>
4906
4907 <method name="getSerialPort" const="yes">
4908 <desc>
4909 Returns the serial port associated with the given slot.
4910 Slots are numbered sequentially, starting with zero. The total
4911 number of serial ports per machine is defined by the
4912 <link to="ISystemProperties::serialPortCount"/> property,
4913 so the maximum slot number is one less than that property's value.
4914
4915 <result name="E_INVALIDARG">
4916 Invalid @a slot number.
4917 </result>
4918
4919 </desc>
4920 <param name="slot" type="unsigned long" dir="in"/>
4921 <param name="port" type="ISerialPort" dir="return"/>
4922 </method>
4923
4924 <method name="getParallelPort" const="yes">
4925 <desc>
4926 Returns the parallel port associated with the given slot.
4927 Slots are numbered sequentially, starting with zero. The total
4928 number of parallel ports per machine is defined by the
4929 <link to="ISystemProperties::parallelPortCount"/> property,
4930 so the maximum slot number is one less than that property's value.
4931
4932 <result name="E_INVALIDARG">
4933 Invalid @a slot number.
4934 </result>
4935
4936 </desc>
4937 <param name="slot" type="unsigned long" dir="in"/>
4938 <param name="port" type="IParallelPort" dir="return"/>
4939 </method>
4940
4941 <method name="getExtraDataKeys">
4942 <desc>
4943 Returns an array representing the machine-specific extra data keys
4944 which currently have values defined.
4945 </desc>
4946 <param name="value" type="wstring" dir="return" safearray="yes">
4947 <desc>Array of extra data keys.</desc>
4948 </param>
4949 </method>
4950
4951 <method name="getExtraData">
4952 <desc>
4953 Returns associated machine-specific extra data.
4954
4955 If the requested data @a key does not exist, this function will
4956 succeed and return an empty string in the @a value argument.
4957
4958 <result name="VBOX_E_FILE_ERROR">
4959 Settings file not accessible.
4960 </result>
4961 <result name="VBOX_E_XML_ERROR">
4962 Could not parse the settings file.
4963 </result>
4964
4965 </desc>
4966 <param name="key" type="wstring" dir="in">
4967 <desc>Name of the data key to get.</desc>
4968 </param>
4969 <param name="value" type="wstring" dir="return">
4970 <desc>Value of the requested data key.</desc>
4971 </param>
4972 </method>
4973
4974 <method name="setExtraData">
4975 <desc>
4976 Sets associated machine-specific extra data.
4977
4978 If you pass @c null or an empty string as a key @a value, the given
4979 @a key will be deleted.
4980
4981 <note>
4982 Before performing the actual data change, this method will ask all
4983 registered callbacks using the
4984 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
4985 notification for a permission. If one of the callbacks refuses the
4986 new value, the change will not be performed.
4987 </note>
4988 <note>
4989 On success, the
4990 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
4991 is called to inform all registered callbacks about a successful data
4992 change.
4993 </note>
4994 <note>
4995 This method can be called outside the machine session and therefore
4996 it's a caller's responsibility to handle possible race conditions
4997 when several clients change the same key at the same time.
4998 </note>
4999
5000 <result name="VBOX_E_FILE_ERROR">
5001 Settings file not accessible.
5002 </result>
5003 <result name="VBOX_E_XML_ERROR">
5004 Could not parse the settings file.
5005 </result>
5006
5007 </desc>
5008 <param name="key" type="wstring" dir="in">
5009 <desc>Name of the data key to set.</desc>
5010 </param>
5011 <param name="value" type="wstring" dir="in">
5012 <desc>Value to assign to the key.</desc>
5013 </param>
5014 </method>
5015
5016 <method name="getHWVirtExProperty" const="yes">
5017 <desc>
5018 Returns the HWVirtEx boolean value of the specified property.
5019
5020 <result name="E_INVALIDARG">
5021 Invalid property.
5022 </result>
5023
5024 </desc>
5025 <param name="property" type="HWVirtExPropertyType" dir="in">
5026 <desc>
5027 Property type to query.
5028 </desc>
5029 </param>
5030 <param name="value" type="boolean" dir="return">
5031 <desc>
5032 Property value.
5033 </desc>
5034 </param>
5035 </method>
5036
5037 <method name="setHWVirtExProperty">
5038 <desc>
5039 Sets the HWVirtEx boolean value of the specified property.
5040
5041 <result name="E_INVALIDARG">
5042 Invalid property.
5043 </result>
5044
5045 </desc>
5046 <param name="property" type="HWVirtExPropertyType" dir="in">
5047 <desc>
5048 Property type to query.
5049 </desc>
5050 </param>
5051 <param name="value" type="boolean" dir="in">
5052 <desc>
5053 Property value.
5054 </desc>
5055 </param>
5056 </method>
5057
5058 <method name="saveSettings">
5059 <desc>
5060 Saves any changes to machine settings made since the session
5061 has been opened or a new machine has been created, or since the
5062 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5063 For registered machines, new settings become visible to all
5064 other VirtualBox clients after successful invocation of this
5065 method.
5066 <note>
5067 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5068 notification event after the configuration has been successfully
5069 saved (only for registered machines).
5070 </note>
5071 <note>
5072 Calling this method is only valid on instances returned
5073 by <link to="ISession::machine"/> and on new machines
5074 created by <link to="IVirtualBox::createMachine"/> but not
5075 yet registered, or on unregistered machines after calling
5076 <link to="IVirtualBox::unregisterMachine"/>.
5077 </note>
5078
5079 <result name="VBOX_E_FILE_ERROR">
5080 Settings file not accessible.
5081 </result>
5082 <result name="VBOX_E_XML_ERROR">
5083 Could not parse the settings file.
5084 </result>
5085 <result name="E_ACCESSDENIED">
5086 Modification request refused.
5087 </result>
5088
5089 </desc>
5090 </method>
5091
5092 <method name="discardSettings">
5093 <desc>
5094 Discards any changes to the machine settings made since the session
5095 has been opened or since the last call to <link to="#saveSettings"/>
5096 or <link to="#discardSettings"/>.
5097 <note>
5098 Calling this method is only valid on instances returned
5099 by <link to="ISession::machine"/> and on new machines
5100 created by <link to="IVirtualBox::createMachine"/> or
5101 opened by <link to="IVirtualBox::openMachine"/> but not
5102 yet registered, or on unregistered machines after calling
5103 <link to="IVirtualBox::unregisterMachine"/>.
5104 </note>
5105
5106 <result name="VBOX_E_INVALID_VM_STATE">
5107 Virtual machine is not mutable.
5108 </result>
5109
5110 </desc>
5111 </method>
5112
5113 <method name="deleteSettings">
5114 <desc>
5115 Deletes the settings file of this machine from disk.
5116 The machine must not be registered in order for this operation
5117 to succeed.
5118 <note>
5119 <link to="#settingsModified"/> will return @c true after this
5120 method successfully returns.
5121 </note>
5122 <note>
5123 Calling this method is only valid on instances returned
5124 by <link to="ISession::machine"/> and on new machines
5125 created by <link to="IVirtualBox::createMachine"/> or
5126 opened by <link to="IVirtualBox::openMachine"/> but not
5127 yet registered, or on unregistered machines after calling
5128 <link to="IVirtualBox::unregisterMachine"/>.
5129 </note>
5130 <note>
5131 The deleted machine settings file can be restored (saved again)
5132 by calling <link to="#saveSettings"/>.
5133 </note>
5134
5135 <result name="VBOX_E_INVALID_VM_STATE">
5136 Cannot delete settings of a registered machine or
5137 machine not mutable.
5138 </result>
5139 <result name="VBOX_E_IPRT_ERROR">
5140 Could not delete the settings file.
5141 </result>
5142
5143 </desc>
5144 </method>
5145
5146 <method name="export">
5147 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5148 steps required to export VirtualBox machines to OVF.
5149 </desc>
5150
5151 <param name="aAppliance" type="IAppliance" dir="in">
5152 <desc>Appliance to export this machine to.</desc>
5153 </param>
5154 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5155 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5156 </param>
5157 </method >
5158
5159 <method name="getSnapshot">
5160 <desc>
5161 Returns a snapshot of this machine with the given UUID.
5162 A @c null UUID can be used to obtain the first snapshot
5163 taken on this machine. This is useful if you want to traverse
5164 the whole tree of snapshots starting from the root.
5165
5166 <result name="VBOX_E_OBJECT_NOT_FOUND">
5167 Virtual machine has no snapshots or snapshot not found.
5168 </result>
5169
5170 </desc>
5171 <param name="id" type="uuid" mod="string" dir="in">
5172 <desc>UUID of the snapshot to get</desc>
5173 </param>
5174 <param name="snapshot" type="ISnapshot" dir="return">
5175 <desc>Snapshot object with the given UUID.</desc>
5176 </param>
5177 </method>
5178
5179 <method name="findSnapshot">
5180 <desc>
5181 Returns a snapshot of this machine with the given name.
5182
5183 <result name="VBOX_E_OBJECT_NOT_FOUND">
5184 Virtual machine has no snapshots or snapshot not found.
5185 </result>
5186
5187 </desc>
5188 <param name="name" type="wstring" dir="in">
5189 <desc>Name of the snapshot to find</desc>
5190 </param>
5191 <param name="snapshot" type="ISnapshot" dir="return">
5192 <desc>Snapshot object with the given name.</desc>
5193 </param>
5194 </method>
5195
5196 <method name="setCurrentSnapshot">
5197 <desc>
5198 Sets the current snapshot of this machine.
5199 <note>
5200 In the current implementation, this operation is not
5201 implemented.
5202 </note>
5203 </desc>
5204 <param name="id" type="uuid" mod="string" dir="in">
5205 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5206 </param>
5207 </method>
5208
5209 <method name="createSharedFolder">
5210 <desc>
5211 Creates a new permanent shared folder by associating the given logical
5212 name with the given host path, adds it to the collection of shared
5213 folders and starts sharing it. Refer to the description of
5214 <link to="ISharedFolder"/> to read more about logical names.
5215
5216 <result name="VBOX_E_OBJECT_IN_USE">
5217 Shared folder already exists.
5218 </result>
5219 <result name="VBOX_E_FILE_ERROR">
5220 Shared folder @a hostPath not accessible.
5221 </result>
5222
5223 </desc>
5224 <param name="name" type="wstring" dir="in">
5225 <desc>Unique logical name of the shared folder.</desc>
5226 </param>
5227 <param name="hostPath" type="wstring" dir="in">
5228 <desc>Full path to the shared folder in the host file system.</desc>
5229 </param>
5230 <param name="writable" type="boolean" dir="in">
5231 <desc>Whether the share is writable or readonly</desc>
5232 </param>
5233 </method>
5234
5235 <method name="removeSharedFolder">
5236 <desc>
5237 Removes the permanent shared folder with the given name previously
5238 created by <link to="#createSharedFolder"/> from the collection of
5239 shared folders and stops sharing it.
5240
5241 <result name="VBOX_E_INVALID_VM_STATE">
5242 Virtual machine is not mutable.
5243 </result>
5244 <result name="VBOX_E_OBJECT_NOT_FOUND">
5245 Shared folder @a name does not exist.
5246 </result>
5247
5248 </desc>
5249 <param name="name" type="wstring" dir="in">
5250 <desc>Logical name of the shared folder to remove.</desc>
5251 </param>
5252 </method>
5253
5254 <method name="canShowConsoleWindow">
5255 <desc>
5256 Returns @c true if the VM console process can activate the
5257 console window and bring it to foreground on the desktop of
5258 the host PC.
5259 <note>
5260 This method will fail if a session for this machine is not
5261 currently open.
5262 </note>
5263
5264 <result name="VBOX_E_INVALID_VM_STATE">
5265 Machine session is not open.
5266 </result>
5267
5268 </desc>
5269 <param name="canShow" type="boolean" dir="return">
5270 <desc>
5271 @c true if the console window can be shown and @c false otherwise.
5272 </desc>
5273 </param>
5274 </method>
5275
5276 <method name="showConsoleWindow">
5277 <desc>
5278 Activates the console window and brings it to foreground on
5279 the desktop of the host PC. Many modern window managers on
5280 many platforms implement some sort of focus stealing
5281 prevention logic, so that it may be impossible to activate
5282 a window without the help of the currently active
5283 application. In this case, this method will return a non-zero
5284 identifier that represents the top-level window of the VM
5285 console process. The caller, if it represents a currently
5286 active process, is responsible to use this identifier (in a
5287 platform-dependent manner) to perform actual window
5288 activation.
5289 <note>
5290 This method will fail if a session for this machine is not
5291 currently open.
5292 </note>
5293
5294 <result name="VBOX_E_INVALID_VM_STATE">
5295 Machine session is not open.
5296 </result>
5297
5298 </desc>
5299 <param name="winId" type="unsigned long long" dir="return">
5300 <desc>
5301 Platform-dependent identifier of the top-level VM console
5302 window, or zero if this method has performed all actions
5303 necessary to implement the <i>show window</i> semantics for
5304 the given platform and/or VirtualBox front-end.
5305 </desc>
5306 </param>
5307 </method>
5308
5309 <method name="getGuestProperty">
5310 <desc>
5311 Reads an entry from the machine's guest property store.
5312
5313 <result name="VBOX_E_INVALID_VM_STATE">
5314 Machine session is not open.
5315 </result>
5316
5317 </desc>
5318 <param name="name" type="wstring" dir="in">
5319 <desc>
5320 The name of the property to read.
5321 </desc>
5322 </param>
5323 <param name="value" type="wstring" dir="out">
5324 <desc>
5325 The value of the property. If the property does not exist then this
5326 will be empty.
5327 </desc>
5328 </param>
5329 <param name="timestamp" type="unsigned long long" dir="out">
5330 <desc>
5331 The time at which the property was last modified, as seen by the
5332 server process.
5333 </desc>
5334 </param>
5335 <param name="flags" type="wstring" dir="out">
5336 <desc>
5337 Additional property parameters, passed as a comma-separated list of
5338 "name=value" type entries.
5339 </desc>
5340 </param>
5341 </method>
5342
5343 <method name="getGuestPropertyValue">
5344 <desc>
5345 Reads a value from the machine's guest property store.
5346
5347 <result name="VBOX_E_INVALID_VM_STATE">
5348 Machine session is not open.
5349 </result>
5350
5351 </desc>
5352 <param name="property" type="wstring" dir="in">
5353 <desc>
5354 The name of the property to read.
5355 </desc>
5356 </param>
5357 <param name="value" type="wstring" dir="return">
5358 <desc>
5359 The value of the property. If the property does not exist then this
5360 will be empty.
5361 </desc>
5362 </param>
5363 </method>
5364
5365 <method name="getGuestPropertyTimestamp">
5366 <desc>
5367 Reads a property timestamp 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="unsigned long long" dir="return">
5380 <desc>
5381 The timestamp. If the property does not exist then this will be
5382 empty.
5383 </desc>
5384 </param>
5385 </method>
5386
5387 <method name="setGuestProperty">
5388 <desc>
5389 Sets, changes or deletes an entry in the machine's guest property
5390 store.
5391
5392 <result name="E_ACCESSDENIED">
5393 Property cannot be changed.
5394 </result>
5395 <result name="E_INVALIDARG">
5396 Invalid @a flags.
5397 </result>
5398 <result name="VBOX_E_INVALID_VM_STATE">
5399 Virtual machine is not mutable or session not open.
5400 </result>
5401 <result name="VBOX_E_INVALID_OBJECT_STATE">
5402 Cannot set transient property when machine not running.
5403 </result>
5404
5405 </desc>
5406 <param name="property" type="wstring" dir="in">
5407 <desc>
5408 The name of the property to set, change or delete.
5409 </desc>
5410 </param>
5411 <param name="value" type="wstring" dir="in">
5412 <desc>
5413 The new value of the property to set, change or delete. If the
5414 property does not yet exist and value is non-empty, it will be
5415 created. If the value is @c null or empty, the property will be
5416 deleted if it exists.
5417 </desc>
5418 </param>
5419 <param name="flags" type="wstring" dir="in">
5420 <desc>
5421 Additional property parameters, passed as a comma-separated list of
5422 "name=value" type entries.
5423 </desc>
5424 </param>
5425 </method>
5426
5427 <method name="setGuestPropertyValue">
5428 <desc>
5429 Sets, changes or deletes a value in the machine's guest property
5430 store. The flags field will be left unchanged or created empty for a
5431 new property.
5432
5433 <result name="E_ACCESSDENIED">
5434 Property cannot be changed.
5435 </result>
5436 <result name="VBOX_E_INVALID_VM_STATE">
5437 Virtual machine is not mutable or session not open.
5438 </result>
5439 <result name="VBOX_E_INVALID_OBJECT_STATE">
5440 Cannot set transient property when machine not running.
5441 </result>
5442 </desc>
5443
5444 <param name="property" type="wstring" dir="in">
5445 <desc>
5446 The name of the property to set, change or delete.
5447 </desc>
5448 </param>
5449 <param name="value" type="wstring" dir="in">
5450 <desc>
5451 The new value of the property to set, change or delete. If the
5452 property does not yet exist and value is non-empty, it will be
5453 created. If the value is @c null or empty, the property will be
5454 deleted if it exists.
5455 </desc>
5456 </param>
5457 </method>
5458
5459 <method name="enumerateGuestProperties">
5460 <desc>
5461 Return a list of the guest properties matching a set of patterns along
5462 with their values, time stamps and flags.
5463 </desc>
5464 <param name="patterns" type="wstring" dir="in">
5465 <desc>
5466 The patterns to match the properties against, separated by '|'
5467 characters. If this is empty or @c null, all properties will match.
5468 </desc>
5469 </param>
5470 <param name="name" type="wstring" dir="out" safearray="yes">
5471 <desc>
5472 The names of the properties returned.
5473 </desc>
5474 </param>
5475 <param name="value" type="wstring" dir="out" safearray="yes">
5476 <desc>
5477 The values of the properties returned. The array entries match the
5478 corresponding entries in the @a name array.
5479 </desc>
5480 </param>
5481 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5482 <desc>
5483 The time stamps of the properties returned. The array entries match
5484 the corresponding entries in the @a name array.
5485 </desc>
5486 </param>
5487 <param name="flags" type="wstring" dir="out" safearray="yes">
5488 <desc>
5489 The flags of the properties returned. The array entries match the
5490 corresponding entries in the @a name array.
5491 </desc>
5492 </param>
5493 </method>
5494</interface>
5495
5496 <!--
5497 // IConsole
5498 /////////////////////////////////////////////////////////////////////////
5499 -->
5500
5501 <interface
5502 name="IConsoleCallback" extends="$unknown"
5503 uuid="d6239535-bda2-4ef7-83f4-f4722e4a3b2c"
5504 wsmap="suppress"
5505 >
5506
5507 <desc>
5508 This interface is used by a client of the Main API that need to
5509 be notified of events. For example, a graphical user interface
5510 can use this to learn about machine state changes so they can
5511 update the list of virtual machines without having to rely
5512 on polling.
5513
5514 Whenever relevant events occur in VirtualBox, the callbacks in
5515 objects of this interface are called. In order for this to be
5516 useful, a client needs to create its own subclass that implements
5517 this interface in which the methods for the relevant callbacks
5518 are overridden. An instance of this subclass interface can then
5519 be passed to <link to="IConsole::registerCallback" />.
5520 </desc>
5521
5522 <method name="onMousePointerShapeChange">
5523 <desc>
5524 Notification when the guest mouse pointer shape has
5525 changed. The new shape data is given.
5526 </desc>
5527 <param name="visible" type="boolean" dir="in">
5528 <desc>
5529 Flag whether the pointer is visible.
5530 </desc>
5531 </param>
5532 <param name="alpha" type="boolean" dir="in">
5533 <desc>
5534 Flag whether the pointer has an alpha channel.
5535 </desc>
5536 </param>
5537 <param name="xHot" type="unsigned long" dir="in">
5538 <desc>
5539 The pointer hot spot x coordinate.
5540 </desc>
5541 </param>
5542 <param name="yHot" type="unsigned long" dir="in">
5543 <desc>
5544 The pointer hot spot y coordinate.
5545 </desc>
5546 </param>
5547 <param name="width" type="unsigned long" dir="in">
5548 <desc>
5549 Width of the pointer shape in pixels.
5550 </desc>
5551 </param>
5552 <param name="height" type="unsigned long" dir="in">
5553 <desc>
5554 Height of the pointer shape in pixels.
5555 </desc>
5556 </param>
5557 <param name="shape" type="octet" mod="ptr" dir="in">
5558 <desc>
5559 Address of the shape buffer.
5560
5561 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
5562 followed by a 32-bpp XOR (color) mask.
5563
5564 For pointers without alpha channel the XOR mask pixels are 32
5565 bit values: (lsb)BGR0(msb). For pointers with alpha channel
5566 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
5567
5568 An AND mask is used for pointers with alpha channel, so if the
5569 callback does not support alpha, the pointer could be
5570 displayed as a normal color pointer.
5571
5572 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
5573 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
5574 height</tt>. The padding bits at the end of each scanline are
5575 undefined.
5576
5577 The XOR mask follows the AND mask on the next 4-byte aligned
5578 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
5579 Bytes in the gap between the AND and the XOR mask are undefined.
5580 The XOR mask scanlines have no gap between them and the size of
5581 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
5582
5583 <note>
5584 If @a shape is 0, only the pointer visibility is changed.
5585 </note>
5586 </desc>
5587 </param>
5588 </method>
5589
5590 <method name="onMouseCapabilityChange">
5591 <desc>
5592 Notification when the mouse capabilities reported by the
5593 guest have changed. The new capabilities are passed.
5594 </desc>
5595 <param name="supportsAbsolute" type="boolean" dir="in"/>
5596 <param name="needsHostCursor" type="boolean" dir="in"/>
5597 </method>
5598
5599 <method name="onKeyboardLedsChange">
5600 <desc>
5601 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
5602 to alter the state of the keyboard LEDs.
5603 </desc>
5604 <param name="numLock" type="boolean" dir="in"/>
5605 <param name="capsLock" type="boolean" dir="in"/>
5606 <param name="scrollLock" type="boolean" dir="in"/>
5607 </method>
5608
5609 <method name="onStateChange">
5610 <desc>
5611 Notification when the execution state of the machine has changed.
5612 The new state will be given.
5613 </desc>
5614 <param name="state" type="MachineState" dir="in"/>
5615 </method>
5616
5617 <method name="onAdditionsStateChange">
5618 <desc>
5619 Notification when a Guest Additions property changes.
5620 Interested callees should query IGuest attributes to
5621 find out what has changed.
5622 </desc>
5623 </method>
5624
5625 <method name="onNetworkAdapterChange">
5626 <desc>
5627 Notification when a property of one of the
5628 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
5629 changes. Interested callees should use INetworkAdapter methods and
5630 attributes to find out what has changed.
5631 </desc>
5632 <param name="networkAdapter" type="INetworkAdapter" dir="in">
5633 <desc>Network adapter that is subject to change.</desc>
5634 </param>
5635 </method>
5636
5637 <method name="onSerialPortChange">
5638 <desc>
5639 Notification when a property of one of the
5640 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
5641 Interested callees should use ISerialPort methods and attributes
5642 to find out what has changed.
5643 </desc>
5644 <param name="serialPort" type="ISerialPort" dir="in">
5645 <desc>Serial port that is subject to change.</desc>
5646 </param>
5647 </method>
5648
5649 <method name="onParallelPortChange">
5650 <desc>
5651 Notification when a property of one of the
5652 virtual <link to="IMachine::getParallelPort">parallel ports</link>
5653 changes. Interested callees should use ISerialPort methods and
5654 attributes to find out what has changed.
5655 </desc>
5656 <param name="parallelPort" type="IParallelPort" dir="in">
5657 <desc>Parallel port that is subject to change.</desc>
5658 </param>
5659 </method>
5660
5661 <method name="onStorageControllerChange">
5662 <desc>
5663 Notification when a property of one of the
5664 virtual <link to="IMachine::storageControllers">storage controllers</link>
5665 changes. Interested callees should query the corresponding collections
5666 to find out what has changed.
5667 </desc>
5668 </method>
5669
5670 <method name="onMediumChange">
5671 <desc>
5672 Notification when a
5673 <link to="IMachine::mediumAttachments">medium attachment</link>
5674 changes.
5675 </desc>
5676 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
5677 <desc>Medium attachment that is subject to change.</desc>
5678 </param>
5679 </method>
5680
5681 <method name="onVRDPServerChange">
5682 <desc>
5683 Notification when a property of the
5684 <link to="IMachine::VRDPServer">VRDP server</link> changes.
5685 Interested callees should use IVRDPServer methods and attributes to
5686 find out what has changed.
5687 </desc>
5688 </method>
5689
5690 <method name="onRemoteDisplayInfoChange">
5691 <desc>
5692 Notification when the status of the VRDP server changes. Interested callees
5693 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
5694 attributes to find out what is the current status.
5695 </desc>
5696 </method>
5697
5698 <method name="onUSBControllerChange">
5699 <desc>
5700 Notification when a property of the virtual
5701 <link to="IMachine::USBController">USB controller</link> changes.
5702 Interested callees should use IUSBController methods and attributes to
5703 find out what has changed.
5704 </desc>
5705 </method>
5706
5707 <method name="onUSBDeviceStateChange">
5708 <desc>
5709 Notification when a USB device is attached to or detached from
5710 the virtual USB controller.
5711
5712 This notification is sent as a result of the indirect
5713 request to attach the device because it matches one of the
5714 machine USB filters, or as a result of the direct request
5715 issued by <link to="IConsole::attachUSBDevice"/> or
5716 <link to="IConsole::detachUSBDevice"/>.
5717
5718 This notification is sent in case of both a succeeded and a
5719 failed request completion. When the request succeeds, the
5720 @a error parameter is @c null, and the given device has been
5721 already added to (when @a attached is @c true) or removed from
5722 (when @a attached is @c false) the collection represented by
5723 <link to="IConsole::USBDevices"/>. On failure, the collection
5724 doesn't change and the @a error parameter represents the error
5725 message describing the failure.
5726
5727 </desc>
5728 <param name="device" type="IUSBDevice" dir="in">
5729 <desc>Device that is subject to state change.</desc>
5730 </param>
5731 <param name="attached" type="boolean" dir="in">
5732 <desc>
5733 @c true if the device was attached and @c false otherwise.
5734 </desc>
5735 </param>
5736 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
5737 <desc>
5738 @c null on success or an error message object on failure.
5739 </desc>
5740 </param>
5741 </method>
5742
5743 <method name="onSharedFolderChange">
5744 <desc>
5745 Notification when a shared folder is added or removed.
5746 The @a scope argument defines one of three scopes:
5747 <link to="IVirtualBox::sharedFolders">global shared folders</link>
5748 (<link to="Scope_Global">Global</link>),
5749 <link to="IMachine::sharedFolders">permanent shared folders</link> of
5750 the machine (<link to="Scope_Machine">Machine</link>) or <link
5751 to="IConsole::sharedFolders">transient shared folders</link> of the
5752 machine (<link to="Scope_Session">Session</link>). Interested callees
5753 should use query the corresponding collections to find out what has
5754 changed.
5755 </desc>
5756 <param name="scope" type="Scope" dir="in">
5757 <desc>Scope of the notification.</desc>
5758 </param>
5759 </method>
5760
5761 <method name="onRuntimeError">
5762 <desc>
5763 Notification when an error happens during the virtual
5764 machine execution.
5765
5766 There are three kinds of runtime errors:
5767 <ul>
5768 <li><i>fatal</i></li>
5769 <li><i>non-fatal with retry</i></li>
5770 <li><i>non-fatal warnings</i></li>
5771 </ul>
5772
5773 <b>Fatal</b> errors are indicated by the @a fatal parameter set
5774 to @c true. In case of fatal errors, the virtual machine
5775 execution is always paused before calling this notification, and
5776 the notification handler is supposed either to immediately save
5777 the virtual machine state using <link to="IConsole::saveState"/>
5778 or power it off using <link to="IConsole::powerDown"/>.
5779 Resuming the execution can lead to unpredictable results.
5780
5781 <b>Non-fatal</b> errors and warnings are indicated by the
5782 @a fatal parameter set to @c false. If the virtual machine
5783 is in the Paused state by the time the error notification is
5784 received, it means that the user can <i>try to resume</i> the machine
5785 execution after attempting to solve the problem that caused the
5786 error. In this case, the notification handler is supposed
5787 to show an appropriate message to the user (depending on the
5788 value of the @a id parameter) that offers several actions such
5789 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
5790 wants to retry, the notification handler should continue
5791 the machine execution using the <link to="IConsole::resume"/>
5792 call. If the machine execution is not Paused during this
5793 notification, then it means this notification is a <i>warning</i>
5794 (for example, about a fatal condition that can happen very soon);
5795 no immediate action is required from the user, the machine
5796 continues its normal execution.
5797
5798 Note that in either case the notification handler
5799 <b>must not</b> perform any action directly on a thread
5800 where this notification is called. Everything it is allowed to
5801 do is to post a message to another thread that will then talk
5802 to the user and take the corresponding action.
5803
5804 Currently, the following error identifiers are known:
5805 <ul>
5806 <li><tt>"HostMemoryLow"</tt></li>
5807 <li><tt>"HostAudioNotResponding"</tt></li>
5808 <li><tt>"VDIStorageFull"</tt></li>
5809 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
5810 </ul>
5811
5812 <note>
5813 This notification is not designed to be implemented by
5814 more than one callback at a time. If you have multiple
5815 IConsoleCallback instances registered on the given
5816 IConsole object, make sure you simply do nothing but
5817 return @c S_OK from all but one of them that does actual
5818 user notification and performs necessary actions.
5819 </note>
5820
5821 </desc>
5822 <param name="fatal" type="boolean" dir="in">
5823 <desc>Whether the error is fatal or not</desc>
5824 </param>
5825 <param name="id" type="wstring" dir="in">
5826 <desc>Error identifier</desc>
5827 </param>
5828 <param name="message" type="wstring" dir="in">
5829 <desc>Optional error message</desc>
5830 </param>
5831 </method>
5832
5833 <method name="onCanShowWindow">
5834 <desc>
5835 Notification when a call to
5836 <link to="IMachine::canShowConsoleWindow"/> is made by a
5837 front-end to check if a subsequent call to
5838 <link to="IMachine::showConsoleWindow"/> can succeed.
5839
5840 The callee should give an answer appropriate to the current
5841 machine state in the @a canShow argument. This answer must
5842 remain valid at least until the next
5843 <link to="IConsole::state">machine state</link> change.
5844
5845 <note>
5846 This notification is not designed to be implemented by
5847 more than one callback at a time. If you have multiple
5848 IConsoleCallback instances registered on the given
5849 IConsole object, make sure you simply do nothing but
5850 return @c true and @c S_OK from all but one of them that
5851 actually manages console window activation.
5852 </note>
5853 </desc>
5854 <param name="canShow" type="boolean" dir="return">
5855 <desc>
5856 @c true if the console window can be shown and @c false otherwise.
5857 </desc>
5858 </param>
5859 </method>
5860
5861 <method name="onShowWindow">
5862 <desc>
5863 Notification when a call to
5864 <link to="IMachine::showConsoleWindow"/>
5865 requests the console window to be activated and brought to
5866 foreground on the desktop of the host PC.
5867
5868 This notification should cause the VM console process to
5869 perform the requested action as described above. If it is
5870 impossible to do it at a time of this notification, this
5871 method should return a failure.
5872
5873 Note that many modern window managers on many platforms
5874 implement some sort of focus stealing prevention logic, so
5875 that it may be impossible to activate a window without the
5876 help of the currently active application (which is supposedly
5877 an initiator of this notification). In this case, this method
5878 must return a non-zero identifier that represents the
5879 top-level window of the VM console process. The caller, if it
5880 represents a currently active process, is responsible to use
5881 this identifier (in a platform-dependent manner) to perform
5882 actual window activation.
5883
5884 This method must set @a winId to zero if it has performed all
5885 actions necessary to complete the request and the console
5886 window is now active and in foreground, to indicate that no
5887 further action is required on the caller's side.
5888
5889 <note>
5890 This notification is not designed to be implemented by
5891 more than one callback at a time. If you have multiple
5892 IConsoleCallback instances registered on the given
5893 IConsole object, make sure you simply do nothing but
5894 return @c S_OK from all but one of them that actually
5895 manages console window activation.
5896 </note>
5897 </desc>
5898 <param name="winId" type="unsigned long long" dir="return">
5899 <desc>
5900 Platform-dependent identifier of the top-level VM console
5901 window, or zero if this method has performed all actions
5902 necessary to implement the <i>show window</i> semantics for
5903 the given platform and/or this VirtualBox front-end.
5904 </desc>
5905 </param>
5906 </method>
5907
5908 </interface>
5909
5910 <interface
5911 name="IRemoteDisplayInfo" extends="$unknown"
5912 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5913 wsmap="struct"
5914 >
5915 <desc>
5916 Contains information about the remote display (VRDP) capabilities and status.
5917 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5918 </desc>
5919
5920 <attribute name="active" type="boolean" readonly="yes">
5921 <desc>
5922 Whether the remote display connection is active.
5923 </desc>
5924 </attribute>
5925
5926 <attribute name="port" type="long" readonly="yes">
5927 <desc>
5928 VRDP server port number. If this property is equal to <tt>0</tt>, then
5929 the VRDP server failed to start, usually because there are no free TCP
5930 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5931 server has not yet been started.
5932 </desc>
5933 </attribute>
5934
5935 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5936 <desc>
5937 How many times a client connected.
5938 </desc>
5939 </attribute>
5940
5941 <attribute name="beginTime" type="long long" readonly="yes">
5942 <desc>
5943 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5944 </desc>
5945 </attribute>
5946
5947 <attribute name="endTime" type="long long" readonly="yes">
5948 <desc>
5949 When the last connection was terminated or the current time, if
5950 connection is still active, in milliseconds since 1970-01-01 UTC.
5951 </desc>
5952 </attribute>
5953
5954 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5955 <desc>
5956 How many bytes were sent in last or current, if still active, connection.
5957 </desc>
5958 </attribute>
5959
5960 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5961 <desc>
5962 How many bytes were sent in all connections.
5963 </desc>
5964 </attribute>
5965
5966 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5967 <desc>
5968 How many bytes were received in last or current, if still active, connection.
5969 </desc>
5970 </attribute>
5971
5972 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5973 <desc>
5974 How many bytes were received in all connections.
5975 </desc>
5976 </attribute>
5977
5978 <attribute name="user" type="wstring" readonly="yes">
5979 <desc>
5980 Login user name supplied by the client.
5981 </desc>
5982 </attribute>
5983
5984 <attribute name="domain" type="wstring" readonly="yes">
5985 <desc>
5986 Login domain name supplied by the client.
5987 </desc>
5988 </attribute>
5989
5990 <attribute name="clientName" type="wstring" readonly="yes">
5991 <desc>
5992 The client name supplied by the client.
5993 </desc>
5994 </attribute>
5995
5996 <attribute name="clientIP" type="wstring" readonly="yes">
5997 <desc>
5998 The IP address of the client.
5999 </desc>
6000 </attribute>
6001
6002 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6003 <desc>
6004 The client software version number.
6005 </desc>
6006 </attribute>
6007
6008 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6009 <desc>
6010 Public key exchange method used when connection was established.
6011 Values: 0 - RDP4 public key exchange scheme.
6012 1 - X509 certificates were sent to client.
6013 </desc>
6014 </attribute>
6015
6016 </interface>
6017
6018 <interface
6019 name="IConsole" extends="$unknown"
6020 uuid="c47486e1-3d99-4212-b1c5-86451978999d"
6021 wsmap="managed"
6022 >
6023 <desc>
6024 The IConsole interface represents an interface to control virtual
6025 machine execution.
6026
6027 The console object that implements the IConsole interface is obtained
6028 from a session object after the session for the given machine has been
6029 opened using one of <link to="IVirtualBox::openSession"/>,
6030 <link to="IVirtualBox::openRemoteSession"/> or
6031 <link to="IVirtualBox::openExistingSession"/> methods.
6032
6033 Methods of the IConsole interface allow the caller to query the current
6034 virtual machine execution state, pause the machine or power it down, save
6035 the machine state or take a snapshot, attach and detach removable media
6036 and so on.
6037
6038 <see>ISession</see>
6039 </desc>
6040
6041 <attribute name="machine" type="IMachine" readonly="yes">
6042 <desc>
6043 Machine object this console is sessioned with.
6044 <note>
6045 This is a convenience property, it has the same value as
6046 <link to="ISession::machine"/> of the corresponding session
6047 object.
6048 </note>
6049 </desc>
6050 </attribute>
6051
6052 <attribute name="state" type="MachineState" readonly="yes">
6053 <desc>
6054 Current execution state of the machine.
6055 <note>
6056 This property always returns the same value as the corresponding
6057 property of the IMachine object this console is sessioned with.
6058 For the process that owns (executes) the VM, this is the
6059 preferable way of querying the VM state, because no IPC
6060 calls are made.
6061 </note>
6062 </desc>
6063 </attribute>
6064
6065 <attribute name="guest" type="IGuest" readonly="yes">
6066 <desc>Guest object.</desc>
6067 </attribute>
6068
6069 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6070 <desc>
6071 Virtual keyboard object.
6072 <note>
6073 If the machine is not running, any attempt to use
6074 the returned object will result in an error.
6075 </note>
6076 </desc>
6077 </attribute>
6078
6079 <attribute name="mouse" type="IMouse" readonly="yes">
6080 <desc>
6081 Virtual mouse object.
6082 <note>
6083 If the machine is not running, any attempt to use
6084 the returned object will result in an error.
6085 </note>
6086 </desc>
6087 </attribute>
6088
6089 <attribute name="display" type="IDisplay" readonly="yes">
6090 <desc>Virtual display object.
6091 <note>
6092 If the machine is not running, any attempt to use
6093 the returned object will result in an error.
6094 </note>
6095 </desc>
6096 </attribute>
6097
6098 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6099 <desc>Debugging interface.</desc>
6100 </attribute>
6101
6102 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6103 <desc>
6104 Collection of USB devices currently attached to the virtual
6105 USB controller.
6106 <note>
6107 The collection is empty if the machine is not running.
6108 </note>
6109 </desc>
6110 </attribute>
6111
6112 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6113 <desc>
6114 List of USB devices currently attached to the remote VRDP client.
6115 Once a new device is physically attached to the remote host computer,
6116 it appears in this list and remains there until detached.
6117 </desc>
6118 </attribute>
6119
6120 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6121 <desc>
6122 Collection of shared folders for the current session. These folders
6123 are called transient shared folders because they are available to the
6124 guest OS running inside the associated virtual machine only for the
6125 duration of the session (as opposed to
6126 <link to="IMachine::sharedFolders"/> which represent permanent shared
6127 folders). When the session is closed (e.g. the machine is powered down),
6128 these folders are automatically discarded.
6129
6130 New shared folders are added to the collection using
6131 <link to="#createSharedFolder"/>. Existing shared folders can be
6132 removed using <link to="#removeSharedFolder"/>.
6133 </desc>
6134 </attribute>
6135
6136 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6137 <desc>
6138 Interface that provides information on Remote Display (VRDP) connection.
6139 </desc>
6140 </attribute>
6141
6142 <method name="powerUp">
6143 <desc>
6144 Starts the virtual machine execution using the current machine
6145 state (that is, its current execution state, current settings and
6146 current hard disks).
6147
6148 If the machine is powered off or aborted, the execution will
6149 start from the beginning (as if the real hardware were just
6150 powered on).
6151
6152 If the machine is in the <link to="MachineState_Saved"/> state,
6153 it will continue its execution the point where the state has
6154 been saved.
6155
6156 <note>
6157 Unless you are trying to write a new VirtualBox front-end that
6158 performs direct machine execution (like the VirtualBox or VBoxSDL
6159 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6160 session opened by <link to="IVirtualBox::openSession"/> and use this
6161 session only to change virtual machine settings. If you simply want to
6162 start virtual machine execution using one of the existing front-ends
6163 (for example the VirtualBox GUI or headless server), simply use
6164 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6165 power up the machine automatically for you.
6166 </note>
6167
6168 <see>#saveState</see>
6169 <result name="VBOX_E_INVALID_VM_STATE">
6170 Virtual machine already running.
6171 </result>
6172 <result name="VBOX_E_HOST_ERROR">
6173 Host interface does not exist or name not set.
6174 </result>
6175 <result name="VBOX_E_FILE_ERROR">
6176 Invalid saved state file.
6177 </result>
6178 </desc>
6179 <param name="progress" type="IProgress" dir="return">
6180 <desc>Progress object to track the operation completion.</desc>
6181 </param>
6182 </method>
6183
6184 <method name="powerUpPaused">
6185 <desc>
6186 Identical to powerUp except that the VM will enter the
6187 <link to="MachineState_Paused"/> state, instead of
6188 <link to="MachineState_Running"/>.
6189
6190 <see>#powerUp</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="powerDown">
6207 <desc>
6208 Initiates the power down procedure to stop the virtual machine
6209 execution.
6210
6211 The completion of the power down procedure is tracked using the returned
6212 IProgress object. After the operation is complete, the machine will go
6213 to the PoweredOff state.
6214 <result name="VBOX_E_INVALID_VM_STATE">
6215 Virtual machine must be Running, Paused or Stuck to be powered down.
6216 </result>
6217 </desc>
6218 <param name="progress" type="IProgress" dir="return">
6219 <desc>Progress object to track the operation completion.</desc>
6220 </param>
6221 </method>
6222
6223 <method name="reset">
6224 <desc>Resets the virtual machine.
6225 <result name="VBOX_E_INVALID_VM_STATE">
6226 Virtual machine not in Running state.
6227 </result>
6228 <result name="VBOX_E_VM_ERROR">
6229 Virtual machine error in reset operation.
6230 </result>
6231 </desc>
6232 </method>
6233
6234 <method name="pause">
6235 <desc>Pauses the virtual machine execution.
6236 <result name="VBOX_E_INVALID_VM_STATE">
6237 Virtual machine not in Running state.
6238 </result>
6239 <result name="VBOX_E_VM_ERROR">
6240 Virtual machine error in suspend operation.
6241 </result>
6242 </desc>
6243 </method>
6244
6245 <method name="resume">
6246 <desc>Resumes the virtual machine execution.
6247 <result name="VBOX_E_INVALID_VM_STATE">
6248 Virtual machine not in Paused state.
6249 </result>
6250 <result name="VBOX_E_VM_ERROR">
6251 Virtual machine error in resume operation.
6252 </result>
6253 </desc>
6254 </method>
6255
6256 <method name="powerButton">
6257 <desc>Sends the ACPI power button event to the guest.
6258 <result name="VBOX_E_INVALID_VM_STATE">
6259 Virtual machine not in Running state.
6260 </result>
6261 <result name="VBOX_E_PDM_ERROR">
6262 Controlled power off failed.
6263 </result>
6264 </desc>
6265 </method>
6266
6267 <method name="sleepButton">
6268 <desc>Sends the ACPI sleep button event to the guest.
6269 <result name="VBOX_E_INVALID_VM_STATE">
6270 Virtual machine not in Running state.
6271 </result>
6272 <result name="VBOX_E_PDM_ERROR">
6273 Sending sleep button event failed.
6274 </result>
6275 </desc>
6276 </method>
6277
6278 <method name="getPowerButtonHandled">
6279 <desc>Checks if the last power button event was handled by guest.
6280 <result name="VBOX_E_PDM_ERROR">
6281 Checking if the event was handled by the guest OS failed.
6282 </result>
6283 </desc>
6284 <param name="handled" type="boolean" dir="return"/>
6285 </method>
6286
6287 <method name="getGuestEnteredACPIMode">
6288 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6289 G1 (sleeping). If this method returns @c false, the guest will
6290 most likely not respond to external ACPI events.
6291 <result name="VBOX_E_INVALID_VM_STATE">
6292 Virtual machine not in Running state.
6293 </result>
6294 </desc>
6295 <param name="entered" type="boolean" dir="return"/>
6296 </method>
6297
6298 <method name="saveState">
6299 <desc>
6300 Saves the current execution state of a running virtual machine
6301 and stops its execution.
6302
6303 After this operation completes, the machine will go to the
6304 Saved state. Next time it is powered up, this state will
6305 be restored and the machine will continue its execution from
6306 the place where it was saved.
6307
6308 This operation differs from taking a snapshot to the effect
6309 that it doesn't create new differencing media. Also, once
6310 the machine is powered up from the state saved using this method,
6311 the saved state is deleted, so it will be impossible to return
6312 to this state later.
6313
6314 <note>
6315 On success, this method implicitly calls
6316 <link to="IMachine::saveSettings"/> to save all current machine
6317 settings (including runtime changes to the DVD medium, etc.).
6318 Together with the impossibility to change any VM settings when it is
6319 in the Saved state, this guarantees adequate hardware
6320 configuration of the machine when it is restored from the saved
6321 state file.
6322 </note>
6323
6324 <note>
6325 The machine must be in the Running or Paused state, otherwise
6326 the operation will fail.
6327 </note>
6328 <result name="VBOX_E_INVALID_VM_STATE">
6329 Virtual machine state neither Running nor Paused.
6330 </result>
6331 <result name="VBOX_E_FILE_ERROR">
6332 Failed to create directory for saved state file.
6333 </result>
6334
6335 <see><link to="#takeSnapshot"/></see>
6336 </desc>
6337 <param name="progress" type="IProgress" dir="return">
6338 <desc>Progress object to track the operation completion.</desc>
6339 </param>
6340 </method>
6341
6342 <method name="adoptSavedState">
6343 <desc>
6344 Associates the given saved state file to the virtual machine.
6345
6346 On success, the machine will go to the Saved state. Next time it is
6347 powered up, it will be restored from the adopted saved state and
6348 continue execution from the place where the saved state file was
6349 created.
6350
6351 The specified saved state file path may be absolute or relative to the
6352 folder the VM normally saves the state to (usually,
6353 <link to="IMachine::snapshotFolder"/>).
6354
6355 <note>
6356 It's a caller's responsibility to make sure the given saved state
6357 file is compatible with the settings of this virtual machine that
6358 represent its virtual hardware (memory size, hard disk configuration
6359 etc.). If there is a mismatch, the behavior of the virtual machine
6360 is undefined.
6361 </note>
6362 <result name="VBOX_E_INVALID_VM_STATE">
6363 Virtual machine state neither PoweredOff nor Aborted.
6364 </result>
6365 </desc>
6366 <param name="savedStateFile" type="wstring" dir="in">
6367 <desc>Path to the saved state file to adopt.</desc>
6368 </param>
6369 </method>
6370
6371 <method name="forgetSavedState">
6372 <desc>
6373 Forgets the saved state of the virtual machine previously created
6374 by <link to="#saveState"/>. Next time the machine is powered up, a
6375 clean boot will occur. If @a remove is @c true the saved state file
6376 is deleted.
6377 <note>
6378 This operation is equivalent to resetting or powering off
6379 the machine without doing a proper shutdown in the guest OS.
6380 </note>
6381 <result name="VBOX_E_INVALID_VM_STATE">
6382 Virtual machine not in state Saved.
6383 </result>
6384 </desc>
6385 <param name="remove" type="boolean" dir="in">
6386 <desc>If @c true remove the saved state file.</desc>
6387 </param>
6388 </method>
6389
6390 <method name="getDeviceActivity">
6391 <desc>
6392 Gets the current activity type of a given device or device group.
6393 <result name="E_INVALIDARG">
6394 Invalid device type.
6395 </result>
6396 </desc>
6397 <param name="type" type="DeviceType" dir="in"/>
6398 <param name="activity" type="DeviceActivity" dir="return"/>
6399 </method>
6400
6401 <method name="attachUSBDevice">
6402 <desc>
6403 Attaches a host USB device with the given UUID to the
6404 USB controller of the virtual machine.
6405
6406 The device needs to be in one of the following states:
6407 <link to="USBDeviceState_Busy"/>,
6408 <link to="USBDeviceState_Available"/> or
6409 <link to="USBDeviceState_Held"/>,
6410 otherwise an error is immediately returned.
6411
6412 When the device state is
6413 <link to="USBDeviceState_Busy">Busy</link>, an error may also
6414 be returned if the host computer refuses to release it for some reason.
6415
6416 <see>IUSBController::deviceFilters, USBDeviceState</see>
6417 <result name="VBOX_E_INVALID_VM_STATE">
6418 Virtual machine state neither Running nor Paused.
6419 </result>
6420 <result name="VBOX_E_PDM_ERROR">
6421 Virtual machine does not have a USB controller.
6422 </result>
6423 </desc>
6424 <param name="id" type="uuid" mod="string" dir="in">
6425 <desc>UUID of the host USB device to attach.</desc>
6426 </param>
6427 </method>
6428
6429 <method name="detachUSBDevice">
6430 <desc>
6431 Detaches an USB device with the given UUID from the USB controller
6432 of the virtual machine.
6433
6434 After this method succeeds, the VirtualBox server re-initiates
6435 all USB filters as if the device were just physically attached
6436 to the host, but filters of this machine are ignored to avoid
6437 a possible automatic re-attachment.
6438
6439 <see>IUSBController::deviceFilters, USBDeviceState</see>
6440
6441 <result name="VBOX_E_PDM_ERROR">
6442 Virtual machine does not have a USB controller.
6443 </result>
6444 <result name="E_INVALIDARG">
6445 USB device not attached to this virtual machine.
6446 </result>
6447 </desc>
6448 <param name="id" type="uuid" mod="string" dir="in">
6449 <desc>UUID of the USB device to detach.</desc>
6450 </param>
6451 <param name="device" type="IUSBDevice" dir="return">
6452 <desc>Detached USB device.</desc>
6453 </param>
6454 </method>
6455
6456 <method name="findUSBDeviceByAddress">
6457 <desc>
6458 Searches for a USB device with the given host address.
6459
6460 <result name="VBOX_E_OBJECT_NOT_FOUND">
6461 Given @c name does not correspond to any USB device.
6462 </result>
6463
6464 <see>IUSBDevice::address</see>
6465 </desc>
6466 <param name="name" type="wstring" dir="in">
6467 <desc>
6468 Address of the USB device (as assigned by the host) to
6469 search for.
6470 </desc>
6471 </param>
6472 <param name="device" type="IUSBDevice" dir="return">
6473 <desc>Found USB device object.</desc>
6474 </param>
6475 </method>
6476
6477 <method name="findUSBDeviceById">
6478 <desc>
6479 Searches for a USB device with the given UUID.
6480
6481 <result name="VBOX_E_OBJECT_NOT_FOUND">
6482 Given @c id does not correspond to any USB device.
6483 </result>
6484
6485 <see>IUSBDevice::id</see>
6486 </desc>
6487 <param name="id" type="uuid" mod="string" dir="in">
6488 <desc>UUID of the USB device to search for.</desc>
6489 </param>
6490 <param name="device" type="IUSBDevice" dir="return">
6491 <desc>Found USB device object.</desc>
6492 </param>
6493 </method>
6494
6495 <method name="createSharedFolder">
6496 <desc>
6497 Creates a transient new shared folder by associating the given logical
6498 name with the given host path, adds it to the collection of shared
6499 folders and starts sharing it. Refer to the description of
6500 <link to="ISharedFolder"/> to read more about logical names.
6501
6502 <result name="VBOX_E_INVALID_VM_STATE">
6503 Virtual machine in Saved state or currently changing state.
6504 </result>
6505 <result name="VBOX_E_FILE_ERROR">
6506 Shared folder already exists or not accessible.
6507 </result>
6508 </desc>
6509 <param name="name" type="wstring" dir="in">
6510 <desc>Unique logical name of the shared folder.</desc>
6511 </param>
6512 <param name="hostPath" type="wstring" dir="in">
6513 <desc>Full path to the shared folder in the host file system.</desc>
6514 </param>
6515 <param name="writable" type="boolean" dir="in">
6516 <desc>Whether the share is writable or readonly</desc>
6517 </param>
6518 </method>
6519
6520 <method name="removeSharedFolder">
6521 <desc>
6522 Removes a transient shared folder with the given name previously
6523 created by <link to="#createSharedFolder"/> from the collection of
6524 shared folders and stops sharing it.
6525 <result name="VBOX_E_INVALID_VM_STATE">
6526 Virtual machine in Saved state or currently changing state.
6527 </result>
6528 <result name="VBOX_E_FILE_ERROR">
6529 Shared folder does not exists.
6530 </result>
6531 </desc>
6532 <param name="name" type="wstring" dir="in">
6533 <desc>Logical name of the shared folder to remove.</desc>
6534 </param>
6535 </method>
6536
6537 <method name="takeSnapshot">
6538 <desc>
6539 Saves the current execution state
6540 and all settings of the machine and creates differencing images
6541 for all normal (non-independent) media.
6542 See <link to="ISnapshot" /> for an introduction to snapshots.
6543
6544 This method can be called for a PoweredOff, Saved (see
6545 <link to="#saveState"/>), Running or
6546 Paused virtual machine. When the machine is PoweredOff, an
6547 offline snapshot is created. When the machine is Running a live
6548 snapshot is created, and an online snapshot is is created when Paused.
6549
6550 The taken snapshot is always based on the
6551 <link to="IMachine::currentSnapshot">current snapshot</link>
6552 of the associated virtual machine and becomes a new current snapshot.
6553
6554 <note>
6555 This method implicitly calls <link to="IMachine::saveSettings"/> to
6556 save all current machine settings before taking an offline snapshot.
6557 </note>
6558
6559 <result name="VBOX_E_INVALID_VM_STATE">
6560 Virtual machine currently changing state.
6561 </result>
6562 </desc>
6563 <param name="name" type="wstring" dir="in">
6564 <desc>Short name for the snapshot.</desc>
6565 </param>
6566 <param name="description" type="wstring" dir="in">
6567 <desc>Optional description of the snapshot.</desc>
6568 </param>
6569 <param name="progress" type="IProgress" dir="return">
6570 <desc>Progress object to track the operation completion.</desc>
6571 </param>
6572 </method>
6573
6574 <method name="discardSnapshot">
6575 <desc>
6576 Starts discarding the specified snapshot asynchronously.
6577 See <link to="ISnapshot" /> for an introduction to snapshots.
6578
6579 The execution state
6580 and settings of the associated machine stored in the snapshot
6581 will be deleted. The contents of all differencing media of
6582 this snapshot will be merged with the contents of their
6583 dependent child media to keep the disks valid (in other
6584 words, all changes represented by media being discarded
6585 will be propagated to their child medium). After that, this
6586 snapshot's differencing medium will be deleted. The parent
6587 of this snapshot will become a new parent for all its child
6588 snapshots.
6589
6590 If the discarded snapshot is the current one, its parent
6591 snapshot will become a new current snapshot. The current machine
6592 state is not directly affected in this case, except that
6593 currently attached differencing media based on media
6594 of the discarded snapshot will be also merged as described
6595 above.
6596
6597 If the discarded snapshot is the first one (the root snapshot)
6598 and it has exactly one child snapshot, this child snapshot will
6599 become the first snapshot after discarding. If there are no
6600 children at all (i.e. the first snapshot is the only snapshot of
6601 the machine), both the current and the first snapshot of the
6602 machine will be set to @c null. In all other cases, the first
6603 snapshot cannot be discarded.
6604
6605 You cannot discard the snapshot if it
6606 stores <link to="MediumType_Normal">normal</link> (non-differencing)
6607 media that have differencing media based on them. Snapshots of
6608 such kind can be discarded only when every normal medium has either
6609 no children at all or exactly one child. In the former case, the normal
6610 medium simply becomes unused (i.e. not attached to any VM). In the
6611 latter case, it receives all the changes stored in the child medium,
6612 and then it replaces the child medium in the configuration of the
6613 corresponding snapshot or machine.
6614
6615 Also, you cannot discard the snapshot if it stores media
6616 (of any type) having differencing child media that belong
6617 to other machines. Such snapshots can be only discarded after
6618 you discard all snapshots of other machines containing "foreign"
6619 child disks, or detach these "foreign" child disks from machines
6620 they are attached to.
6621
6622 One particular example of the snapshot storing normal media
6623 is the first snapshot of a virtual machine that had normal media
6624 attached when taking the snapshot. Be careful when
6625 discarding such snapshots because this implicitly commits
6626 changes (made since the snapshot being discarded has been taken)
6627 to normal media (as described above), which may be not what
6628 you want.
6629
6630 The virtual machine is put to
6631 the <link to="MachineState_Discarding">Discarding</link> state until
6632 the discard operation is completed.
6633
6634 <note>
6635 The machine must not be running, otherwise the operation
6636 will fail.
6637 </note>
6638
6639 <note>
6640 Child media of all normal media of the discarded snapshot
6641 must be accessible (see <link to="IMedium::state"/>) for this
6642 operation to succeed. In particular, this means that all virtual
6643 machines, whose media are directly or indirectly based on the
6644 media of discarded snapshot, must be powered off.
6645 </note>
6646 <note>
6647 Merging medium contents can be very time and disk space
6648 consuming, if these disks are big in size and have many
6649 children. However, if the snapshot being discarded is the last
6650 (head) snapshot on the branch, the operation will be rather
6651 quick.
6652 </note>
6653 <note>
6654 Note that discarding the current snapshot
6655 will implicitly call <link to="IMachine::saveSettings"/> to
6656 make all current machine settings permanent.
6657 </note>
6658 <result name="VBOX_E_INVALID_VM_STATE">
6659 Virtual machine is running.
6660 </result>
6661 </desc>
6662 <param name="id" type="uuid" mod="string" dir="in">
6663 <desc>UUID of the snapshot to discard.</desc>
6664 </param>
6665 <param name="progress" type="IProgress" dir="return">
6666 <desc>Progress object to track the operation completion.</desc>
6667 </param>
6668 </method>
6669
6670 <method name="discardCurrentState">
6671 <desc>
6672 Starts resetting the machine's current state to the state contained
6673 in the current snapshot, asynchronously. All current settings of the
6674 machine will be reset and changes stored in differencing media
6675 will be lost.
6676 See <link to="ISnapshot" /> for an introduction to snapshots.
6677
6678 After this operation is successfully completed, new empty differencing
6679 media are created for all normal media of the machine.
6680
6681 If the current snapshot of the machine is an online snapshot, the
6682 machine will go to the <link to="MachineState_Saved"> saved
6683 state</link>, so that the next time it is powered on, the execution
6684 state will be restored from the current snapshot.
6685
6686 <note>
6687 The machine must not be running, otherwise the operation will fail.
6688 </note>
6689
6690 <note>
6691 If the machine state is <link to="MachineState_Saved">Saved</link>
6692 prior to this operation, the saved state file will be implicitly
6693 discarded (as if <link to="IConsole::forgetSavedState"/> were
6694 called).
6695 </note>
6696
6697 <result name="VBOX_E_INVALID_VM_STATE">
6698 Virtual machine is running.
6699 </result>
6700 </desc>
6701 <param name="progress" type="IProgress" dir="return">
6702 <desc>Progress object to track the operation completion.</desc>
6703 </param>
6704 </method>
6705
6706 <method name="discardCurrentSnapshotAndState">
6707 <desc>
6708
6709 This method is equivalent to
6710 doing <link to="IConsole::discardSnapshot">discardSnapshot</link>
6711 (currentSnapshot.id(), progress) followed by
6712 <link to="IConsole::discardCurrentState"/>.
6713
6714 As a result, the machine will be fully restored from the
6715 snapshot preceding the current snapshot, while both the current
6716 snapshot and the current machine state will be discarded.
6717
6718 If the current snapshot is the first snapshot of the machine (i.e. it
6719 has the only snapshot), the current machine state will be
6720 discarded <b>before</b> discarding the snapshot. In other words, the
6721 machine will be restored from its last snapshot, before discarding
6722 it. This differs from performing a single
6723 <link to="IConsole::discardSnapshot"/> call (note that no
6724 <link to="IConsole::discardCurrentState"/> will be possible after it)
6725 to the effect that the latter will preserve the current state instead of
6726 discarding it.
6727
6728 Unless explicitly mentioned otherwise, all remarks and
6729 limitations of the above two methods also apply to this method.
6730
6731 <note>
6732 The machine must not be running, otherwise the operation
6733 will fail.
6734 </note>
6735
6736 <note>
6737 If the machine state is <link to="MachineState_Saved">Saved</link>
6738 prior to this operation, the saved state file will be implicitly
6739 discarded (as if <link to="#forgetSavedState"/> were
6740 called).
6741 </note>
6742
6743 <note>
6744 This method is more efficient than calling both of the above
6745 methods separately: it requires less IPC calls and provides
6746 a single progress object.
6747 </note>
6748
6749 <result name="VBOX_E_INVALID_VM_STATE">
6750 Virtual machine is running.
6751 </result>
6752 </desc>
6753 <param name="progress" type="IProgress" dir="return">
6754 <desc>Progress object to track the operation completion.</desc>
6755 </param>
6756 </method>
6757
6758 <method name="migrate">
6759 <desc>
6760 Migrate the VM to a different host machine.
6761
6762 TODO explain the details.
6763
6764 <result name="VBOX_E_INVALID_VM_STATE">
6765 Virtual machine not running or paused.
6766 </result>
6767 </desc>
6768 <param name="hostname" type="wstring" dir="in">
6769 <desc>The name or IP of the host to migrate to.</desc>
6770 </param>
6771 <param name="tcpport" type="unsigned long" dir="in">
6772 <desc>The TCP port to connect to (1..65535).</desc>
6773 </param>
6774 <param name="password" type="wstring" dir="in">
6775 <desc>The password.</desc>
6776 </param>
6777 <param name="progress" type="IProgress" dir="return">
6778 <desc>Progress object to track the operation completion.</desc>
6779 </param>
6780 </method>
6781
6782 <method name="registerCallback">
6783 <desc>
6784 Registers a new console callback on this instance. The methods of the
6785 callback interface will be called by this instance when the appropriate
6786 event occurs.
6787 </desc>
6788 <param name="callback" type="IConsoleCallback" dir="in"/>
6789 </method>
6790
6791 <method name="unregisterCallback">
6792 <desc>
6793 Unregisters the console callback previously registered using
6794 <link to="#registerCallback"/>.
6795 <result name="E_INVALIDARG">
6796 Given @a callback handler is not registered.
6797 </result>
6798 </desc>
6799 <param name="callback" type="IConsoleCallback" dir="in"/>
6800 </method>
6801 </interface>
6802
6803 <!--
6804 // IHost
6805 /////////////////////////////////////////////////////////////////////////
6806 -->
6807
6808 <enum
6809 name="HostNetworkInterfaceMediumType"
6810 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6811 >
6812 <desc>
6813 Type of encapsulation. Ethernet encapsulation includes both wired and
6814 wireless Ethernet connections.
6815 <see>IHostNetworkInterface</see>
6816 </desc>
6817
6818 <const name="Unknown" value="0">
6819 <desc>
6820 The type of interface cannot be determined.
6821 </desc>
6822 </const>
6823 <const name="Ethernet" value="1">
6824 <desc>
6825 Ethernet frame encapsulation.
6826 </desc>
6827 </const>
6828 <const name="PPP" value="2">
6829 <desc>
6830 Point-to-point protocol encapsulation.
6831 </desc>
6832 </const>
6833 <const name="SLIP" value="3">
6834 <desc>
6835 Serial line IP encapsulation.
6836 </desc>
6837 </const>
6838 </enum>
6839
6840 <enum
6841 name="HostNetworkInterfaceStatus"
6842 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6843 >
6844 <desc>
6845 Current status of the interface.
6846 <see>IHostNetworkInterface</see>
6847 </desc>
6848
6849 <const name="Unknown" value="0">
6850 <desc>
6851 The state of interface cannot be determined.
6852 </desc>
6853 </const>
6854 <const name="Up" value="1">
6855 <desc>
6856 The interface is fully operational.
6857 </desc>
6858 </const>
6859 <const name="Down" value="2">
6860 <desc>
6861 The interface is not functioning.
6862 </desc>
6863 </const>
6864 </enum>
6865
6866 <enum
6867 name="HostNetworkInterfaceType"
6868 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6869 >
6870 <desc>
6871 Network interface type.
6872 </desc>
6873 <const name="Bridged" value="1"/>
6874 <const name="HostOnly" value="2"/>
6875 </enum>
6876
6877 <interface
6878 name="IHostNetworkInterface" extends="$unknown"
6879 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6880 wsmap="managed"
6881 >
6882 <desc>
6883 Represents one of host's network interfaces. IP V6 address and network
6884 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6885 separated by colons.
6886 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6887 </desc>
6888 <attribute name="name" type="wstring" readonly="yes">
6889 <desc>Returns the host network interface name.</desc>
6890 </attribute>
6891
6892 <attribute name="id" type="uuid" mod="string" readonly="yes">
6893 <desc>Returns the interface UUID.</desc>
6894 </attribute>
6895
6896 <attribute name="networkName" type="wstring" readonly="yes">
6897 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6898 </attribute>
6899
6900 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6901 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6902 </attribute>
6903
6904 <attribute name="IPAddress" type="wstring" readonly="yes">
6905 <desc>Returns the IP V4 address of the interface.</desc>
6906 </attribute>
6907
6908 <attribute name="networkMask" type="wstring" readonly="yes">
6909 <desc>Returns the network mask of the interface.</desc>
6910 </attribute>
6911
6912 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6913 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6914 </attribute>
6915
6916 <attribute name="IPV6Address" type="wstring" readonly="yes">
6917 <desc>Returns the IP V6 address of the interface.</desc>
6918 </attribute>
6919
6920 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6921 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6922 </attribute>
6923
6924 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6925 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6926 </attribute>
6927
6928 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6929 <desc>Type of protocol encapsulation used.</desc>
6930 </attribute>
6931
6932 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6933 <desc>Status of the interface.</desc>
6934 </attribute>
6935
6936 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6937 <desc>specifies the host interface type.</desc>
6938 </attribute>
6939
6940 <method name="enableStaticIpConfig">
6941 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6942 <param name="IPAddress" type="wstring" dir="in">
6943 <desc>
6944 IP address.
6945 </desc>
6946 </param>
6947 <param name="networkMask" type="wstring" dir="in">
6948 <desc>
6949 network mask.
6950 </desc>
6951 </param>
6952 </method>
6953
6954 <method name="enableStaticIpConfigV6">
6955 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6956 <param name="IPV6Address" type="wstring" dir="in">
6957 <desc>
6958 IP address.
6959 </desc>
6960 </param>
6961 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6962 <desc>
6963 network mask.
6964 </desc>
6965 </param>
6966 </method>
6967
6968 <method name="enableDynamicIpConfig">
6969 <desc>enables the dynamic IP configuration.</desc>
6970 </method>
6971
6972 <method name="dhcpRediscover">
6973 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6974 </method>
6975
6976 </interface>
6977
6978 <interface
6979 name="IHost" extends="$unknown"
6980 uuid="95522f11-1ecc-443b-9242-3af6b24d430c"
6981 wsmap="managed"
6982 >
6983 <desc>
6984 The IHost interface represents the physical machine that this VirtualBox
6985 installation runs on.
6986
6987 An object implementing this interface is returned by the
6988 <link to="IVirtualBox::host" /> attribute. This interface contains
6989 read-only information about the host's physical hardware (such as what
6990 processors and disks are available, what the host operating system is,
6991 and so on) and also allows for manipulating some of the host's hardware,
6992 such as global USB device filters and host interface networking.
6993
6994 </desc>
6995 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6996 <desc>List of DVD drives available on the host.</desc>
6997 </attribute>
6998
6999 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7000 <desc>List of floppy drives available on the host.</desc>
7001 </attribute>
7002
7003 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7004 <desc>
7005 List of USB devices currently attached to the host.
7006 Once a new device is physically attached to the host computer,
7007 it appears in this list and remains there until detached.
7008
7009 <note>
7010 If USB functionality is not available in the given edition of
7011 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7012 </note>
7013 </desc>
7014 </attribute>
7015
7016 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7017 <desc>
7018 List of USB device filters in action.
7019 When a new device is physically attached to the host computer,
7020 filters from this list are applied to it (in order they are stored
7021 in the list). The first matched filter will determine the
7022 <link to="IHostUSBDeviceFilter::action">action</link>
7023 performed on the device.
7024
7025 Unless the device is ignored by these filters, filters of all
7026 currently running virtual machines
7027 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7028
7029 <note>
7030 If USB functionality is not available in the given edition of
7031 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7032 </note>
7033
7034 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7035 </desc>
7036 </attribute>
7037
7038 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7039 <desc>List of host network interfaces currently defined on the host.</desc>
7040 </attribute>
7041
7042 <attribute name="processorCount" type="unsigned long" readonly="yes">
7043 <desc>Number of (logical) CPUs installed in the host system.</desc>
7044 </attribute>
7045
7046 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7047 <desc>Number of (logical) CPUs online in the host system.</desc>
7048 </attribute>
7049
7050 <method name="getProcessorSpeed">
7051 <desc>Query the (approximate) maximum speed of a specified host CPU in
7052 Megahertz.
7053 </desc>
7054 <param name="cpuId" type="unsigned long" dir="in">
7055 <desc>
7056 Identifier of the CPU.
7057 </desc>
7058 </param>
7059 <param name="speed" type="unsigned long" dir="return">
7060 <desc>
7061 Speed value. 0 is returned if value is not known or @a cpuId is
7062 invalid.
7063 </desc>
7064 </param>
7065 </method>
7066
7067 <method name="getProcessorFeature">
7068 <desc>Query whether a CPU feature is supported or not.</desc>
7069 <param name="feature" type="ProcessorFeature" dir="in">
7070 <desc>
7071 CPU Feature identifier.
7072 </desc>
7073 </param>
7074 <param name="supported" type="boolean" dir="return">
7075 <desc>
7076 Feature is supported or not.
7077 </desc>
7078 </param>
7079 </method>
7080
7081 <method name="getProcessorDescription">
7082 <desc>Query the model string of a specified host CPU.
7083 </desc>
7084 <param name="cpuId" type="unsigned long" dir="in">
7085 <desc>
7086 Identifier of the CPU.
7087 </desc>
7088 </param>
7089 <param name="description" type="wstring" dir="return">
7090 <desc>
7091 Model string. An empty string is returned if value is not known or
7092 @a cpuId is invalid.
7093 </desc>
7094 </param>
7095 </method>
7096
7097 <attribute name="memorySize" type="unsigned long" readonly="yes">
7098 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7099 </attribute>
7100
7101 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7102 <desc>Available system memory in the host system.</desc>
7103 </attribute>
7104
7105 <attribute name="operatingSystem" type="wstring" readonly="yes">
7106 <desc>Name of the host system's operating system.</desc>
7107 </attribute>
7108
7109 <attribute name="OSVersion" type="wstring" readonly="yes">
7110 <desc>Host operating system's version string.</desc>
7111 </attribute>
7112
7113 <attribute name="UTCTime" type="long long" readonly="yes">
7114 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7115 </attribute>
7116
7117 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7118 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7119 </attribute>
7120
7121 <method name="createHostOnlyNetworkInterface">
7122 <desc>
7123 Creates a new adapter for Host Only Networking.
7124 <result name="E_INVALIDARG">
7125 Host network interface @a name already exists.
7126 </result>
7127 </desc>
7128 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7129 <desc>
7130 Created host interface object.
7131 </desc>
7132 </param>
7133 <param name="progress" type="IProgress" dir="return">
7134 <desc>
7135 Progress object to track the operation completion.
7136 </desc>
7137 </param>
7138 </method>
7139
7140 <method name="removeHostOnlyNetworkInterface">
7141 <desc>
7142 Removes the given Host Only Networking interface.
7143 <result name="VBOX_E_OBJECT_NOT_FOUND">
7144 No host network interface matching @a id found.
7145 </result>
7146 </desc>
7147 <param name="id" type="uuid" mod="string" dir="in">
7148 <desc>
7149 Adapter GUID.
7150 </desc>
7151 </param>
7152 <param name="progress" type="IProgress" dir="return">
7153 <desc>
7154 Progress object to track the operation completion.
7155 </desc>
7156 </param>
7157 </method>
7158
7159 <method name="createUSBDeviceFilter">
7160 <desc>
7161 Creates a new USB device filter. All attributes except
7162 the filter name are set to empty (any match),
7163 <i>active</i> is @c false (the filter is not active).
7164
7165 The created filter can be added to the list of filters using
7166 <link to="#insertUSBDeviceFilter"/>.
7167
7168 <see>#USBDeviceFilters</see>
7169 </desc>
7170 <param name="name" type="wstring" dir="in">
7171 <desc>
7172 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7173 for more info.
7174 </desc>
7175 </param>
7176 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7177 <desc>Created filter object.</desc>
7178 </param>
7179 </method>
7180
7181 <method name="insertUSBDeviceFilter">
7182 <desc>
7183 Inserts the given USB device to the specified position
7184 in the list of filters.
7185
7186 Positions are numbered starting from @c 0. If the specified
7187 position is equal to or greater than the number of elements in
7188 the list, the filter is added at the end of the collection.
7189
7190 <note>
7191 Duplicates are not allowed, so an attempt to insert a
7192 filter already in the list is an error.
7193 </note>
7194 <note>
7195 If USB functionality is not available in the given edition of
7196 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7197 </note>
7198
7199 <see>#USBDeviceFilters</see>
7200
7201 <result name="VBOX_E_INVALID_OBJECT_STATE">
7202 USB device filter is not created within this VirtualBox instance.
7203 </result>
7204 <result name="E_INVALIDARG">
7205 USB device filter already in list.
7206 </result>
7207
7208 </desc>
7209 <param name="position" type="unsigned long" dir="in">
7210 <desc>Position to insert the filter to.</desc>
7211 </param>
7212 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7213 <desc>USB device filter to insert.</desc>
7214 </param>
7215 </method>
7216
7217 <method name="removeUSBDeviceFilter">
7218 <desc>
7219 Removes a USB device filter from the specified position in the
7220 list of filters.
7221
7222 Positions are numbered starting from @c 0. Specifying a
7223 position equal to or greater than the number of elements in
7224 the list will produce an error.
7225
7226 <note>
7227 If USB functionality is not available in the given edition of
7228 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7229 </note>
7230
7231 <see>#USBDeviceFilters</see>
7232
7233 <result name="E_INVALIDARG">
7234 USB device filter list empty or invalid @a position.
7235 </result>
7236
7237 </desc>
7238 <param name="position" type="unsigned long" dir="in">
7239 <desc>Position to remove the filter from.</desc>
7240 </param>
7241 </method>
7242
7243 <method name="findHostDVDDrive">
7244 <desc>
7245 Searches for a host DVD drive with the given @c name.
7246
7247 <result name="VBOX_E_OBJECT_NOT_FOUND">
7248 Given @c name does not correspond to any host drive.
7249 </result>
7250
7251 </desc>
7252 <param name="name" type="wstring" dir="in">
7253 <desc>Name of the host drive to search for</desc>
7254 </param>
7255 <param name="drive" type="IMedium" dir="return">
7256 <desc>Found host drive object</desc>
7257 </param>
7258 </method>
7259
7260 <method name="findHostFloppyDrive">
7261 <desc>
7262 Searches for a host floppy drive with the given @c name.
7263
7264 <result name="VBOX_E_OBJECT_NOT_FOUND">
7265 Given @c name does not correspond to any host floppy drive.
7266 </result>
7267
7268 </desc>
7269 <param name="name" type="wstring" dir="in">
7270 <desc>Name of the host floppy drive to search for</desc>
7271 </param>
7272 <param name="drive" type="IMedium" dir="return">
7273 <desc>Found host floppy drive object</desc>
7274 </param>
7275 </method>
7276
7277 <method name="findHostNetworkInterfaceByName">
7278 <desc>
7279 Searches through all host network interfaces for an interface with
7280 the given @c name.
7281 <note>
7282 The method returns an error if the given @c name does not
7283 correspond to any host network interface.
7284 </note>
7285 </desc>
7286 <param name="name" type="wstring" dir="in">
7287 <desc>Name of the host network interface to search for.</desc>
7288 </param>
7289 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7290 <desc>Found host network interface object.</desc>
7291 </param>
7292 </method>
7293 <method name="findHostNetworkInterfaceById">
7294 <desc>
7295 Searches through all host network interfaces for an interface with
7296 the given GUID.
7297 <note>
7298 The method returns an error if the given GUID does not
7299 correspond to any host network interface.
7300 </note>
7301 </desc>
7302 <param name="id" type="uuid" mod="string" dir="in">
7303 <desc>GUID of the host network interface to search for.</desc>
7304 </param>
7305 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7306 <desc>Found host network interface object.</desc>
7307 </param>
7308 </method>
7309 <method name="findHostNetworkInterfacesOfType">
7310 <desc>
7311 Searches through all host network interfaces and returns a list of interfaces of the specified type
7312 </desc>
7313 <param name="type" type="HostNetworkInterfaceType" dir="in">
7314 <desc>type of the host network interfaces to search for.</desc>
7315 </param>
7316 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7317 <desc>Found host network interface objects.</desc>
7318 </param>
7319 </method>
7320
7321 <method name="findUSBDeviceById">
7322 <desc>
7323 Searches for a USB device with the given UUID.
7324
7325 <result name="VBOX_E_OBJECT_NOT_FOUND">
7326 Given @c id does not correspond to any USB device.
7327 </result>
7328
7329 <see>IHostUSBDevice::id</see>
7330 </desc>
7331 <param name="id" type="uuid" mod="string" dir="in">
7332 <desc>UUID of the USB device to search for.</desc>
7333 </param>
7334 <param name="device" type="IHostUSBDevice" dir="return">
7335 <desc>Found USB device object.</desc>
7336 </param>
7337 </method>
7338
7339 <method name="findUSBDeviceByAddress">
7340 <desc>
7341 Searches for a USB device with the given host address.
7342
7343 <result name="VBOX_E_OBJECT_NOT_FOUND">
7344 Given @c name does not correspond to any USB device.
7345 </result>
7346
7347 <see>IHostUSBDevice::address</see>
7348 </desc>
7349 <param name="name" type="wstring" dir="in">
7350 <desc>
7351 Address of the USB device (as assigned by the host) to
7352 search for.
7353 </desc>
7354 </param>
7355 <param name="device" type="IHostUSBDevice" dir="return">
7356 <desc>Found USB device object.</desc>
7357 </param>
7358 </method>
7359
7360 </interface>
7361
7362 <!--
7363 // ISystemProperties
7364 /////////////////////////////////////////////////////////////////////////
7365 -->
7366
7367 <interface
7368 name="ISystemProperties"
7369 extends="$unknown"
7370 uuid="4b78105a-d066-4eab-ae48-ccb2c0ba5057"
7371 wsmap="managed"
7372 >
7373 <desc>
7374 The ISystemProperties interface represents global properties of the given
7375 VirtualBox installation.
7376
7377 These properties define limits and default values for various attributes
7378 and parameters. Most of the properties are read-only, but some can be
7379 changed by a user.
7380 </desc>
7381
7382 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7383 <desc>Minimum guest system memory in Megabytes.</desc>
7384 </attribute>
7385
7386 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7387 <desc>Maximum guest system memory in Megabytes.</desc>
7388 </attribute>
7389
7390 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7391 <desc>Minimum guest video memory in Megabytes.</desc>
7392 </attribute>
7393
7394 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7395 <desc>Maximum guest video memory in Megabytes.</desc>
7396 </attribute>
7397
7398 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7399 <desc>Minimum CPU count.</desc>
7400 </attribute>
7401
7402 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7403 <desc>Maximum CPU count.</desc>
7404 </attribute>
7405
7406 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7407 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7408 </attribute>
7409
7410 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7411 <desc>
7412 Number of network adapters associated with every
7413 <link to="IMachine"/> instance.
7414 </desc>
7415 </attribute>
7416
7417 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7418 <desc>
7419 Number of serial ports associated with every
7420 <link to="IMachine"/> instance.
7421 </desc>
7422 </attribute>
7423
7424 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7425 <desc>
7426 Number of parallel ports associated with every
7427 <link to="IMachine"/> instance.
7428 </desc>
7429 </attribute>
7430
7431 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7432 <desc>
7433 Maximum device position in the boot order. This value corresponds
7434 to the total number of devices a machine can boot from, to make it
7435 possible to include all possible devices to the boot list.
7436 <see><link to="IMachine::setBootOrder"/></see>
7437 </desc>
7438 </attribute>
7439
7440 <attribute name="defaultMachineFolder" type="wstring">
7441 <desc>
7442 Full path to the default directory used to create new or open
7443 existing machines when a settings file name contains no
7444 path.
7445
7446 The initial value of this property is
7447 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7448 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7449
7450 <note>
7451 Setting this property to @c null or an empty string will restore the
7452 initial value.
7453 </note>
7454 <note>
7455 When settings this property, the specified path can be
7456 absolute (full path) or relative
7457 to the <link to="IVirtualBox::homeFolder">
7458 VirtualBox home directory</link>.
7459 When reading this property, a full path is
7460 always returned.
7461 </note>
7462 <note>
7463 The specified path may not exist, it will be created
7464 when necessary.
7465 </note>
7466
7467 <see>
7468 <link to="IVirtualBox::createMachine"/>,
7469 <link to="IVirtualBox::openMachine"/>
7470 </see>
7471 </desc>
7472 </attribute>
7473
7474 <attribute name="defaultHardDiskFolder" type="wstring">
7475 <desc>
7476 Full path to the default directory used to create new or open existing
7477 virtual disks.
7478
7479 This path is used when the storage unit of a hard disk is a regular file
7480 in the host's file system and only a file name that contains no path is
7481 given.
7482
7483 The initial value of this property is
7484 <tt>&lt;</tt>
7485 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7486 <tt>&gt;/HardDisks</tt>.
7487
7488 <note>
7489 Setting this property to @c null or empty string will restore the
7490 initial value.
7491 </note>
7492 <note>
7493 When settings this property, the specified path can be relative
7494 to the
7495 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7496 absolute. When reading this property, a full path is
7497 always returned.
7498 </note>
7499 <note>
7500 The specified path may not exist, it will be created
7501 when necessary.
7502 </note>
7503
7504 <see>
7505 IMedium,
7506 <link to="IVirtualBox::createHardDisk"/>,
7507 <link to="IVirtualBox::openHardDisk"/>,
7508 <link to="IMedium::location"/>
7509 </see>
7510 </desc>
7511 </attribute>
7512
7513 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7514 <desc>
7515 List of all medium storage formats supported by this VirtualBox
7516 installation.
7517
7518 Keep in mind that the medium format identifier
7519 (<link to="IMediumFormat::id"/>) used in other API calls like
7520 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7521 medium format is a case-insensitive string. This means that, for
7522 example, all of the following strings:
7523 <pre>
7524 "VDI"
7525 "vdi"
7526 "VdI"</pre>
7527 refer to the same medium format.
7528
7529 Note that the virtual medium framework is backend-based, therefore
7530 the list of supported formats depends on what backends are currently
7531 installed.
7532
7533 <see>
7534 <link to="IMediumFormat"/>,
7535 </see>
7536 </desc>
7537 </attribute>
7538
7539 <attribute name="defaultHardDiskFormat" type="wstring">
7540 <desc>
7541 Identifier of the default medium format used by VirtualBox.
7542
7543 The medium format set by this attribute is used by VirtualBox
7544 when the medium format was not specified explicitly. One example is
7545 <link to="IVirtualBox::createHardDisk"/> with the empty
7546 format argument. A more complex example is implicit creation of
7547 differencing media when taking a snapshot of a virtual machine:
7548 this operation will try to use a format of the parent medium first
7549 and if this format does not support differencing media the default
7550 format specified by this argument will be used.
7551
7552 The list of supported medium formats may be obtained by the
7553 <link to="#mediaFormats"/> call. Note that the default medium
7554 format must have a capability to create differencing media;
7555 otherwise operations that create media implicitly may fail
7556 unexpectedly.
7557
7558 The initial value of this property is <tt>"VDI"</tt> in the current
7559 version of the VirtualBox product, but may change in the future.
7560
7561 <note>
7562 Setting this property to @c null or empty string will restore the
7563 initial value.
7564 </note>
7565
7566 <see>
7567 <link to="#mediaFormats"/>,
7568 <link to="IMediumFormat::id"/>,
7569 <link to="IVirtualBox::createHardDisk"/>
7570 </see>
7571 </desc>
7572 </attribute>
7573
7574 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7575 <desc>
7576 Library that provides authentication for VRDP clients. The library
7577 is used if a virtual machine's authentication type is set to "external"
7578 in the VM RemoteDisplay configuration.
7579
7580 The system library extension (".DLL" or ".so") must be omitted.
7581 A full path can be specified; if not, then the library must reside on the
7582 system's default library path.
7583
7584 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7585 of that name in one of the default VirtualBox library directories.
7586
7587 For details about VirtualBox authentication libraries and how to implement
7588 them, please refer to the VirtualBox manual.
7589
7590 <note>
7591 Setting this property to @c null or empty string will restore the
7592 initial value.
7593 </note>
7594 </desc>
7595 </attribute>
7596
7597 <attribute name="webServiceAuthLibrary" type="wstring">
7598 <desc>
7599 Library that provides authentication for webservice clients. The library
7600 is used if a virtual machine's authentication type is set to "external"
7601 in the VM RemoteDisplay configuration and will be called from
7602 within the <link to="IWebsessionManager::logon" /> implementation.
7603
7604 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7605 there is no per-VM setting for this, as the webservice is a global
7606 resource (if it is running). Only for this setting (for the webservice),
7607 setting this value to a literal <tt>"null"</tt> string disables authentication,
7608 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7609 no matter what user name and password are supplied.
7610
7611 The initial value of this property is <tt>"VRDPAuth"</tt>,
7612 meaning that the webservice will use the same authentication
7613 library that is used by default for VBoxVRDP (again, see
7614 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7615 The format and calling convention of authentication libraries
7616 is the same for the webservice as it is for VBoxVRDP.
7617
7618 <note>
7619 Setting this property to @c null or empty string will restore the
7620 initial value.
7621 </note>
7622 </desc>
7623 </attribute>
7624
7625 <attribute name="LogHistoryCount" type="unsigned long">
7626 <desc>
7627 This value specifies how many old release log files are kept.
7628 </desc>
7629 </attribute>
7630
7631 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7632 <desc>This value hold the default audio driver for the current
7633 system.</desc>
7634 </attribute>
7635
7636 <method name="getMaxDevicesPerPortForStorageBus">
7637 <desc>Returns the maximum number of devices which can be attached to a port
7638 for the given storage bus.</desc>
7639
7640 <param name="bus" type="StorageBus" dir="in">
7641 <desc>The storage bus type to get the value for.</desc>
7642 </param>
7643
7644 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7645 <desc>The maximum number of devices which can eb attached to the port for the given
7646 storage bus.</desc>
7647 </param>
7648 </method>
7649
7650 <method name="getMinPortCountForStorageBus">
7651 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7652
7653 <param name="bus" type="StorageBus" dir="in">
7654 <desc>The storage bus type to get the value for.</desc>
7655 </param>
7656
7657 <param name="minPortCount" type="unsigned long" dir="return">
7658 <desc>The minimum number of ports for the given storage bus.</desc>
7659 </param>
7660 </method>
7661
7662 <method name="getMaxPortCountForStorageBus">
7663 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7664
7665 <param name="bus" type="StorageBus" dir="in">
7666 <desc>The storage bus type to get the value for.</desc>
7667 </param>
7668
7669 <param name="maxPortCount" type="unsigned long" dir="return">
7670 <desc>The maximum number of ports for the given storage bus.</desc>
7671 </param>
7672 </method>
7673
7674 <method name="getMaxInstancesOfStorageBus">
7675 <desc>Returns the maximum number of storage bus instances which
7676 can be configured for each VM. This corresponds to the number of
7677 storage controllers one can have.</desc>
7678
7679 <param name="bus" type="StorageBus" dir="in">
7680 <desc>The storage bus type to get the value for.</desc>
7681 </param>
7682
7683 <param name="maxInstances" type="unsigned long" dir="return">
7684 <desc>The maximum number of instances for the given storage bus.</desc>
7685 </param>
7686 </method>
7687 </interface>
7688
7689 <!--
7690 // IGuest
7691 /////////////////////////////////////////////////////////////////////////
7692 -->
7693
7694 <interface
7695 name="IGuestOSType" extends="$unknown"
7696 uuid="cfe9e64c-4430-435b-9e7c-e3d8e417bd58"
7697 wsmap="struct"
7698 >
7699 <desc>
7700 </desc>
7701
7702 <attribute name="familyId" type="wstring" readonly="yes">
7703 <desc>Guest OS family identifier string.</desc>
7704 </attribute>
7705
7706 <attribute name="familyDescription" type="wstring" readonly="yes">
7707 <desc>Human readable description of the guest OS family.</desc>
7708 </attribute>
7709
7710 <attribute name="id" type="wstring" readonly="yes">
7711 <desc>Guest OS identifier string.</desc>
7712 </attribute>
7713
7714 <attribute name="description" type="wstring" readonly="yes">
7715 <desc>Human readable description of the guest OS.</desc>
7716 </attribute>
7717
7718 <attribute name="is64Bit" type="boolean" readonly="yes">
7719 <desc>Returns @c true if the given OS is 64-bit</desc>
7720 </attribute>
7721
7722 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7723 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7724 </attribute>
7725
7726 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7727 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7728 </attribute>
7729
7730 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7731 <desc>Recommended RAM size in Megabytes.</desc>
7732 </attribute>
7733
7734 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7735 <desc>Recommended video RAM size in Megabytes.</desc>
7736 </attribute>
7737
7738 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7739 <desc>Recommended hard disk size in Megabytes.</desc>
7740 </attribute>
7741
7742 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7743 <desc>Returns recommended network adapter for this OS type.</desc>
7744 </attribute>
7745 </interface>
7746
7747 <interface
7748 name="IGuest" extends="$unknown"
7749 uuid="d8556fca-81bc-12af-fca3-365528fa38ca"
7750 wsmap="managed"
7751 >
7752 <desc>
7753 The IGuest interface represents information about the operating system
7754 running inside the virtual machine. Used in
7755 <link to="IConsole::guest"/>.
7756
7757 IGuest provides information about the guest operating system, whether
7758 Guest Additions are installed and other OS-specific virtual machine
7759 properties.
7760 </desc>
7761
7762 <attribute name="OSTypeId" type="wstring" readonly="yes">
7763 <desc>
7764 Identifier of the Guest OS type as reported by the Guest
7765 Additions.
7766 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7767 an IGuestOSType object representing details about the given
7768 Guest OS type.
7769 <note>
7770 If Guest Additions are not installed, this value will be
7771 the same as <link to="IMachine::OSTypeId"/>.
7772 </note>
7773 </desc>
7774 </attribute>
7775
7776 <attribute name="additionsActive" type="boolean" readonly="yes">
7777 <desc>
7778 Flag whether the Guest Additions are installed and active
7779 in which case their version will be returned by the
7780 <link to="#additionsVersion"/> property.
7781 </desc>
7782 </attribute>
7783
7784 <attribute name="additionsVersion" type="wstring" readonly="yes">
7785 <desc>
7786 Version of the Guest Additions (3 decimal numbers separated
7787 by dots) or empty when the Additions are not installed. The
7788 Additions may also report a version but yet not be active as
7789 the version might be refused by VirtualBox (incompatible) or
7790 other failures occurred.
7791 </desc>
7792 </attribute>
7793
7794 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7795 <desc>
7796 Flag whether seamless guest display rendering (seamless desktop
7797 integration) is supported.
7798 </desc>
7799 </attribute>
7800
7801 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7802 <desc>
7803 Flag whether the guest is in graphics mode. If it is not, then
7804 seamless rendering will not work, resize hints are not immediately
7805 acted on and guest display resizes are probably not initiated by
7806 the guest additions.
7807 </desc>
7808 </attribute>
7809
7810 <attribute name="memoryBalloonSize" type="unsigned long">
7811 <desc>Guest system memory balloon size in megabytes.</desc>
7812 </attribute>
7813
7814 <attribute name="statisticsUpdateInterval" type="unsigned long">
7815 <desc>Interval to update guest statistics in seconds.</desc>
7816 </attribute>
7817
7818 <method name="setCredentials">
7819 <desc>
7820 Store login credentials that can be queried by guest operating
7821 systems with Additions installed. The credentials are transient
7822 to the session and the guest may also choose to erase them. Note
7823 that the caller cannot determine whether the guest operating system
7824 has queried or made use of the credentials.
7825
7826 <result name="VBOX_E_VM_ERROR">
7827 VMM device is not available.
7828 </result>
7829
7830 </desc>
7831 <param name="userName" type="wstring" dir="in">
7832 <desc>User name string, can be empty</desc>
7833 </param>
7834 <param name="password" type="wstring" dir="in">
7835 <desc>Password string, can be empty</desc>
7836 </param>
7837 <param name="domain" type="wstring" dir="in">
7838 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7839 </param>
7840 <param name="allowInteractiveLogon" type="boolean" dir="in">
7841 <desc>
7842 Flag whether the guest should alternatively allow the user to
7843 interactively specify different credentials. This flag might
7844 not be supported by all versions of the Additions.
7845 </desc>
7846 </param>
7847 </method>
7848
7849 <method name="getStatistic">
7850 <desc>
7851 Query specified guest statistics as reported by the VirtualBox Additions.
7852 </desc>
7853 <param name="cpuId" type="unsigned long" dir="in">
7854 <desc>Virtual CPU id; not relevant for all statistic types</desc>
7855 </param>
7856 <param name="statistic" type="GuestStatisticType" dir="in">
7857 <desc>Statistic type.</desc>
7858 </param>
7859 <param name="statVal" type="unsigned long" dir="return">
7860 <desc>Statistics value</desc>
7861 </param>
7862 </method>
7863
7864 </interface>
7865
7866
7867 <!--
7868 // IProgress
7869 /////////////////////////////////////////////////////////////////////////
7870 -->
7871
7872 <interface
7873 name="IProgress" extends="$unknown"
7874 uuid="62827ef1-c098-40eb-be96-36d0508489a6"
7875 wsmap="managed"
7876 >
7877 <desc>
7878 The IProgress interface is used to track and control
7879 asynchronous tasks within VirtualBox.
7880
7881 An instance of this is returned every time VirtualBox starts
7882 an asynchronous task (in other words, a separate thread) which
7883 continues to run after a method call returns. For example,
7884 <link to="IConsole::saveState" />, which saves the state of
7885 a running virtual machine, can take a long time to complete.
7886 To be able to display a progress bar, a user interface such as
7887 the VirtualBox graphical user interface can use the IProgress
7888 object returned by that method.
7889
7890 Note that IProgress is a "read-only" interface in the sense
7891 that only the VirtualBox internals behind the Main API can
7892 create and manipulate progress objects, whereas client code
7893 can only use the IProgress object to monitor a task's
7894 progress and, if <link to="#cancelable" /> is @c true,
7895 cancel the task by calling <link to="#cancel" />.
7896
7897 A task represented by IProgress consists of either one or
7898 several sub-operations that run sequentially, one by one (see
7899 <link to="#operation" /> and <link to="#operationCount" />).
7900 Every operation is identified by a number (starting from 0)
7901 and has a separate description.
7902
7903 You can find the individual percentage of completion of the current
7904 operation in <link to="#operationPercent" /> and the
7905 percentage of completion of the task as a whole
7906 in <link to="#percent" />.
7907
7908 Similarly, you can wait for the completion of a particular
7909 operation via <link to="#waitForOperationCompletion" /> or
7910 for the completion of the whole task via
7911 <link to="#waitForCompletion" />.
7912 </desc>
7913
7914 <attribute name="id" type="uuid" mod="string" readonly="yes">
7915 <desc>ID of the task.</desc>
7916 </attribute>
7917
7918 <attribute name="description" type="wstring" readonly="yes">
7919 <desc>Description of the task.</desc>
7920 </attribute>
7921
7922 <attribute name="initiator" type="$unknown" readonly="yes">
7923 <desc>Initiator of the task.</desc>
7924 </attribute>
7925
7926 <attribute name="cancelable" type="boolean" readonly="yes">
7927 <desc>Whether the task can be interrupted.</desc>
7928 </attribute>
7929
7930 <attribute name="percent" type="unsigned long" readonly="yes">
7931 <desc>
7932 Current progress value of the task as a whole, in percent.
7933 This value depends on how many operations are already complete.
7934 Returns 100 if <link to="#completed" /> is @c true.
7935 </desc>
7936 </attribute>
7937
7938 <attribute name="timeRemaining" type="long" readonly="yes">
7939 <desc>
7940 Estimated remaining time until the task completes, in
7941 seconds. Returns 0 once the task has completed; returns -1
7942 if the remaining time cannot be computed, in particular if
7943 the current progress is 0.
7944
7945 Even if a value is returned, the estimate will be unreliable
7946 for low progress values. It will become more reliable as the
7947 task progresses; it is not recommended to display an ETA
7948 before at least 20% of a task have completed.
7949 </desc>
7950 </attribute>
7951
7952 <attribute name="completed" type="boolean" readonly="yes">
7953 <desc>Whether the task has been completed.</desc>
7954 </attribute>
7955
7956 <attribute name="canceled" type="boolean" readonly="yes">
7957 <desc>Whether the task has been canceled.</desc>
7958 </attribute>
7959
7960 <attribute name="resultCode" type="long" readonly="yes">
7961 <desc>
7962 Result code of the progress task.
7963 Valid only if <link to="#completed"/> is @c true.
7964 </desc>
7965 </attribute>
7966
7967 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7968 <desc>
7969 Extended information about the unsuccessful result of the
7970 progress operation. May be @c null if no extended information
7971 is available.
7972 Valid only if <link to="#completed"/> is @c true and
7973 <link to="#resultCode"/> indicates a failure.
7974 </desc>
7975 </attribute>
7976
7977 <attribute name="operationCount" type="unsigned long" readonly="yes">
7978 <desc>
7979 Number of sub-operations this task is divided into.
7980 Every task consists of at least one suboperation.
7981 </desc>
7982 </attribute>
7983
7984 <attribute name="operation" type="unsigned long" readonly="yes">
7985 <desc>Number of the sub-operation being currently executed.</desc>
7986 </attribute>
7987
7988 <attribute name="operationDescription" type="wstring" readonly="yes">
7989 <desc>
7990 Description of the sub-operation being currently executed.
7991 </desc>
7992 </attribute>
7993
7994 <attribute name="operationPercent" type="unsigned long" readonly="yes">
7995 <desc>Progress value of the current sub-operation only, in percent.</desc>
7996 </attribute>
7997
7998 <method name="setCurrentOperationProgress">
7999 <desc>Internal method, not to be called externally.</desc>
8000 <param name="percent" type="unsigned long" dir="in" />
8001 </method>
8002 <method name="setNextOperation">
8003 <desc>Internal method, not to be called externally.</desc>
8004 <param name="nextOperationDescription" type="wstring" dir="in" />
8005 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8006 </method>
8007
8008 <method name="waitForCompletion">
8009 <desc>
8010 Waits until the task is done (including all sub-operations)
8011 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8012
8013 <result name="VBOX_E_IPRT_ERROR">
8014 Failed to wait for task completion.
8015 </result>
8016 </desc>
8017
8018 <param name="timeout" type="long" dir="in">
8019 <desc>
8020 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8021 </desc>
8022 </param>
8023 </method>
8024
8025 <method name="waitForOperationCompletion">
8026 <desc>
8027 Waits until the given operation is done with a given timeout in
8028 milliseconds; specify -1 for an indefinite wait.
8029
8030 <result name="VBOX_E_IPRT_ERROR">
8031 Failed to wait for operation completion.
8032 </result>
8033
8034 </desc>
8035 <param name="operation" type="unsigned long" dir="in">
8036 <desc>
8037 Number of the operation to wait for.
8038 Must be less than <link to="#operationCount"/>.
8039 </desc>
8040 </param>
8041 <param name="timeout" type="long" dir="in">
8042 <desc>
8043 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8044 </desc>
8045 </param>
8046 </method>
8047
8048 <method name="cancel">
8049 <desc>
8050 Cancels the task.
8051 <note>
8052 If <link to="#cancelable"/> is @c false, then this method will fail.
8053 </note>
8054
8055 <result name="VBOX_E_INVALID_OBJECT_STATE">
8056 Operation cannot be canceled.
8057 </result>
8058
8059 </desc>
8060 </method>
8061
8062 </interface>
8063
8064
8065 <!--
8066 // ISnapshot
8067 /////////////////////////////////////////////////////////////////////////
8068 -->
8069
8070 <interface
8071 name="ISnapshot" extends="$unknown"
8072 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8073 wsmap="managed"
8074 >
8075 <desc>
8076 The ISnapshot interface represents a snapshot of the virtual
8077 machine.
8078
8079 Together with the differencing media that are created
8080 when a snapshot is taken, a machine can be brought back to
8081 the exact state it was in when the snapshot was taken.
8082
8083 The ISnapshot interface has no methods, only attributes; snapshots
8084 are controlled through methods of the <link to="IConsole" /> interface
8085 which also manage the media associated with the snapshot.
8086 The following operations exist:
8087
8088 <ul>
8089 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8090 by creating new, empty differencing images for the machine's
8091 media and saving the VM settings and (if the VM is running)
8092 the current VM state in the snapshot.
8093
8094 The differencing images will then receive all data written to
8095 the machine's media, while their parent (base) images
8096 remain unmodified after the snapshot has been taken (see
8097 <link to="IMedium" /> for details about differencing images).
8098 This simplifies restoring a machine to the state of a snapshot:
8099 only the differencing images need to be deleted.
8100
8101 The current machine state is not changed by taking a snapshot.
8102 If the machine is running, it will resume execution after the
8103 snapshot has been taken.
8104 </li>
8105
8106 <li><link to="IConsole::discardCurrentState"/>: this goes back to
8107 a previous snapshot. This resets the machine's state to that of
8108 the previous snapshot by deleting the differencing image of each
8109 of the machine's media and setting the machine's settings
8110 and state to the state that was saved in the snapshot (if any).
8111
8112 This destroys the machine's current state.
8113 </li>
8114
8115 <li><link to="IConsole::discardSnapshot"/>: deletes a snapshot
8116 without affecting the current machine state.
8117
8118 This does not change the machine, but instead frees the resources
8119 allocated when the snapshot was taken: the settings and machine state
8120 is deleted (if any), and the snapshot's differencing image for each
8121 of the machine's media gets merged with its parent image.
8122
8123 Neither the current machine state nor other snapshots are affected
8124 by this operation, except that parent disk images will be modified
8125 to contain the disk data associated with the snapshot being deleted.
8126 </li>
8127
8128 <li><link to="IConsole::discardCurrentSnapshotAndState"/>:
8129 this completely reverts the virtual machine to the state it was in
8130 before the current snapshot has been taken. Effectively, this goes
8131 back to the state before the current snapshot, which might be
8132 an earlier snapshot.
8133
8134 The current state, as well as the current snapshot, are lost.
8135 </li>
8136 </ul>
8137
8138 Each snapshot contains the settings of the virtual machine (hardware
8139 configuration etc.). In addition, if the machine was running when the
8140 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8141 the current VM state is saved in the snapshot (similarly to what happens
8142 when a VM's state is saved). The snapshot is then said to
8143 be <i>online</i> because when restoring it, the VM will be running.
8144
8145 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8146 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8147
8148 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8149 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8150 it then contains a so-called "zero execution state", representing a
8151 machine that is powered off.
8152
8153 <h3>Snapshot branches and the "current" snapshot</h3>
8154
8155 Snapshots can be chained, whereby every next snapshot is based on the
8156 previous one. This chaining is related to medium branching
8157 (see the <link to="IMedium"/> description) in that every time
8158 a new snapshot is created, a new differencing medium is implicitly
8159 created for all normal media attached to the machine.
8160
8161 Each virtual machine has a "current snapshot", identified by
8162 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8163 to the last snapshot in the chain. In a future version of VirtualBox,
8164 it will be possible to reset a machine's current state to that of an
8165 earlier snapshot without discarding the current state so that it will be
8166 possible to create alternative snapshot paths in a snapshot tree.
8167
8168 In the current implementation, multiple snapshot branches within one
8169 virtual machine are not allowed. Every machine has a single branch,
8170 and <link to="IConsole::takeSnapshot"/> operation adds a new
8171 snapshot to the top of that branch.
8172 </desc>
8173
8174 <attribute name="id" type="uuid" mod="string" readonly="yes">
8175 <desc>UUID of the snapshot.</desc>
8176 </attribute>
8177
8178 <attribute name="name" type="wstring">
8179 <desc>Short name of the snapshot.</desc>
8180 </attribute>
8181
8182 <attribute name="description" type="wstring">
8183 <desc>Optional description of the snapshot.</desc>
8184 </attribute>
8185
8186 <attribute name="timeStamp" type="long long" readonly="yes">
8187 <desc>
8188 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8189 </desc>
8190 </attribute>
8191
8192 <attribute name="online" type="boolean" readonly="yes">
8193 <desc>
8194 @c true if this snapshot is an online snapshot and @c false otherwise.
8195
8196 When this attribute is @c true, the
8197 <link to="IMachine::stateFilePath"/> attribute of the
8198 <link to="#machine"/> object associated with this snapshot
8199 will point to the saved state file. Otherwise, it will be
8200 an empty string.
8201 </desc>
8202 </attribute>
8203
8204 <attribute name="machine" type="IMachine" readonly="yes">
8205 <desc>
8206 Virtual machine this snapshot is taken on. This object
8207 stores all settings the machine had when taking this snapshot.
8208 <note>
8209 The returned machine object is immutable, i.e. no
8210 any settings can be changed.
8211 </note>
8212 </desc>
8213 </attribute>
8214
8215 <attribute name="parent" type="ISnapshot" readonly="yes">
8216 <desc>
8217 Parent snapshot (a snapshot this one is based on), or
8218 @c null if the snapshot has no parent.
8219 </desc>
8220 </attribute>
8221
8222 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8223 <desc>
8224 Child snapshots (all snapshots having this one as a parent).
8225 <note>
8226 In the current implementation, there can be only one
8227 child snapshot, or no children at all, meaning this is the
8228 last (head) snapshot.
8229 </note>
8230 </desc>
8231 </attribute>
8232
8233 </interface>
8234
8235
8236 <!--
8237 // IMedium
8238 /////////////////////////////////////////////////////////////////////////
8239 -->
8240
8241 <enum
8242 name="MediumState"
8243 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8244 >
8245 <desc>
8246 Virtual medium state.
8247 <see>IMedium</see>
8248 </desc>
8249
8250 <const name="NotCreated" value="0">
8251 <desc>
8252 Associated medium storage does not exist (either was not created yet or
8253 was deleted).
8254 </desc>
8255 </const>
8256 <const name="Created" value="1">
8257 <desc>
8258 Associated storage exists and accessible.
8259 </desc>
8260 </const>
8261 <const name="LockedRead" value="2">
8262 <desc>
8263 Medium is locked for reading, no data modification is possible.
8264 </desc>
8265 </const>
8266 <const name="LockedWrite" value="3">
8267 <desc>
8268 Medium is locked for writing, no concurrent data reading or modification
8269 is possible.
8270 </desc>
8271 </const>
8272 <const name="Inaccessible" value="4">
8273 <desc>
8274 Associated medium storage is not accessible.
8275 </desc>
8276 </const>
8277 <const name="Creating" value="5">
8278 <desc>
8279 Associated medium storage is being created.
8280 </desc>
8281 </const>
8282 <const name="Deleting" value="6">
8283 <desc>
8284 Associated medium storage is being deleted.
8285 </desc>
8286 </const>
8287 </enum>
8288
8289 <enum
8290 name="MediumType"
8291 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
8292 >
8293 <desc>
8294 Virtual medium type.
8295 <see>IMedium</see>
8296 </desc>
8297
8298 <const name="Normal" value="0">
8299 <desc>
8300 Normal medium (attached directly or indirectly, preserved
8301 when taking snapshots).
8302 </desc>
8303 </const>
8304 <const name="Immutable" value="1">
8305 <desc>
8306 Immutable medium (attached indirectly, changes are wiped out
8307 after powering off the virtual machine).
8308 </desc>
8309 </const>
8310 <const name="Writethrough" value="2">
8311 <desc>
8312 Write through medium (attached directly, ignored when
8313 taking snapshots).
8314 </desc>
8315 </const>
8316 </enum>
8317
8318 <enum
8319 name="MediumVariant"
8320 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8321 >
8322 <desc>
8323 Virtual medium image variant. More than one flag may be set.
8324 <see>IMedium</see>
8325 </desc>
8326
8327 <const name="Standard" value="0">
8328 <desc>
8329 No particular variant requested, results in using the backend default.
8330 </desc>
8331 </const>
8332 <const name="VmdkSplit2G" value="0x01">
8333 <desc>
8334 VMDK image split in chunks of less than 2GByte.
8335 </desc>
8336 </const>
8337 <const name="VmdkStreamOptimized" value="0x04">
8338 <desc>
8339 VMDK streamOptimized image. Special import/export format which is
8340 read-only/append-only.
8341 </desc>
8342 </const>
8343 <const name="VmdkESX" value="0x08">
8344 <desc>
8345 VMDK format variant used on ESX products.
8346 </desc>
8347 </const>
8348 <const name="Fixed" value="0x10000">
8349 <desc>
8350 Fixed image. Only allowed for base images.
8351 </desc>
8352 </const>
8353 <const name="Diff" value="0x20000">
8354 <desc>
8355 Fixed image. Only allowed for base images.
8356 </desc>
8357 </const>
8358 </enum>
8359
8360 <interface
8361 name="IMediumAttachment" extends="$unknown"
8362 uuid="0dcf987b-a024-453f-bace-7eb9f885a413"
8363 wsmap="struct"
8364 >
8365 <desc>
8366 The IMediumAttachment interface represents the attachment
8367 of a storage medium to a virtual machine. Each machine contains
8368 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
8369
8370 Each medium attachment specifies a storage controller as well as a port
8371 and device number. Fixed media (hard disks) will always also specify
8372 an instance of IMedium in <link to="#medium" />, referring to the hard disk
8373 image or images that represent the virtual hard disk. For removeable media,
8374 the IMedia instance is optional; it can be NULL if no media is mounted (see
8375 <link to="IMachine::mountMedium" />).
8376 </desc>
8377
8378 <attribute name="medium" type="IMedium" readonly="yes">
8379 <desc>Medium object associated with this attachment; it
8380 can be NULL for removable devices.</desc>
8381 </attribute>
8382
8383 <attribute name="controller" type="wstring" readonly="yes">
8384 <desc>Name of the storage controller of this attachment; this
8385 refers to one of the controllers in <link to="IMachine::storageControllers" />
8386 by name.</desc>
8387 </attribute>
8388
8389 <attribute name="port" type="long" readonly="yes">
8390 <desc>Port number of this attachment.</desc>
8391 </attribute>
8392
8393 <attribute name="device" type="long" readonly="yes">
8394 <desc>Device slot number of this attachment.</desc>
8395 </attribute>
8396
8397 <attribute name="type" type="DeviceType" readonly="yes">
8398 <desc>Device type of this attachment.</desc>
8399 </attribute>
8400
8401 <attribute name="passthrough" type="boolean" readonly="no">
8402 <desc>Pass I/O requests through to a device on the host.</desc>
8403 </attribute>
8404
8405 </interface>
8406
8407 <interface
8408 name="IMedium" extends="$unknown"
8409 uuid="62551115-83b8-4d20-925f-79e9d3c00f96"
8410 wsmap="managed"
8411 >
8412 <desc>
8413 The IMedium interface represents virtual storage for a machine's
8414 hard disks, CD/DVD or floppy drives. It will typically represent
8415 a disk image on the host, for example a VDI or VMDK file representing
8416 a virtual hard disk, or an ISO or RAW file representing virtual
8417 removable media, but can also point to a network location (e.g.
8418 for iSCSI targets).
8419
8420 Instances of IMedium are connected to virtual machines by way of
8421 medium attachments (see <link to="IMediumAttachment" />), which link
8422 the storage medium to a particular device slot of a storage controller
8423 of the virtual machine.
8424 In the VirtualBox API, virtual storage is therefore always represented
8425 by the following chain of object links:
8426
8427 <ul>
8428 <li><link to="IMachine::storageControllers"/> contains an array of
8429 storage controllers (IDE, SATA, SCSI or a floppy controller;
8430 these are instances of <link to="IStorageController"/>).</li>
8431 <li><link to="IMachine::mediumAttachments"/> contains an array of
8432 medium attachments (instances of <link to="IMediumAttachment"/>),
8433 each containing the name of a storage controller from the above
8434 array, a port/device specification, and an instance of
8435 IMedium representing the medium storage (image file). For removable
8436 media, the storage medium is optional; a medium attachment with no
8437 medium represents a CD/DVD or floppy drive with no medium inserted.
8438 By contrast, hard disk attachments will always have an IMedium
8439 object attached.</li>
8440 <li>Each IMedium in turn points to a storage unit (such as a file on the host
8441 computer or a network resource) that holds actual data. The location of
8442 the storage unit is represented by the <link to="#location"/> attribute.
8443 The value of this attribute is medium type dependent.</li>
8444 </ul>
8445
8446 Existing media are opened using the following methods, depending on the
8447 media type:
8448 <ul>
8449 <li><link to="IVirtualBox::openHardDisk"/></li>
8450 <li><link to="IVirtualBox::openDVDImage"/></li>
8451 <li><link to="IVirtualBox::openFloppyImage"/></li>
8452 </ul>
8453
8454 New hard disk media can be created with the VirtualBox API using the
8455 <link to="IVirtualBox::createHardDisk"/> method.
8456
8457 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8458 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8459 type in a regular file.
8460
8461 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8462 drive; in that case the <link to="#id" /> attribute contains the UUID of
8463 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8464
8465 <h3>Known media</h3>
8466
8467 When an existing medium is opened for the first time, it is automatically
8468 remembered by the given VirtualBox installation or, in other words, becomes
8469 a <i>known medium</i>. Known media are stored in the media
8470 registry transparently maintained by VirtualBox and stored in settings
8471 files so that this registry is preserved when VirtualBox is not running.
8472
8473 Newly created virtual media are remembered only when the associated
8474 storage unit is actually created.
8475
8476 All known media can be enumerated using
8477 <link to="IVirtualBox::hardDisks"/>,
8478 <link to="IVirtualBox::DVDImages"/> and
8479 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8480 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
8481 and similar methods or by location using
8482 <link to="IVirtualBox::findHardDisk"/> and similar methods.
8483
8484 Only known media can be attached to virtual machines.
8485
8486 Removing known media from the media registry is performed when the given
8487 medium is closed using the <link to="#close"/> method or when its
8488 associated storage unit is deleted.
8489
8490 <h3>Accessibility checks</h3>
8491
8492 The given medium (with the created storage unit) is considered to be
8493 <i>accessible</i> when its storage unit can be read. In that case, the
8494 <link to="#state"/> attribute has a value of "Created".
8495 When the storage unit cannot be read (for example, because it is located on
8496 a disconnected network resource, or was accidentally deleted outside VirtualBox),
8497 the medium is considered to be <i>inaccessible</i>, which is indicated by the
8498 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8499 obtained by reading the <link to="#lastAccessError"/> attribute.
8500
8501 A new accessibility check is performed each time the <link to="#state"/>
8502 attribute is read. This check may take long time (several seconds or even
8503 minutes, depending on the storage unit location and format), and will
8504 block the calling thread until finished. For this reason, it is recommended
8505 to never read this attribute on the main UI thread to avoid making the UI
8506 unresponsive.
8507
8508 Note that when VirtualBox starts up (e.g. the VirtualBox object gets
8509 created for the first time), all known media are in the
8510 <link to="MediumState_Inaccessible"/> state but the value of the <link
8511 to="#lastAccessError"/> attribute is an empty string because no actual
8512 accessibility check is made on startup. This is done to make the
8513 VirtualBox object ready for serving requests as
8514 fast as possible and let the end-user application decide if it needs to
8515 check media accessibility right away or not.
8516
8517 <h3>Hard disk types</h3>
8518
8519 There are three types of hard disk images (see <link to="MediumType" />):
8520 "normal", "immutable" and "writethrough", represented by the
8521 <link to="#type"/> attribute. The type of the hard disk defines how the
8522 hard disk is attached to a virtual machine and what happens when a
8523 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8524 attached hard disk is taken.
8525
8526 All hard disks can be also divided in two groups: <i>base</i> hard
8527 disks and <i>differencing</i> hard disks. A base hard disk contains all
8528 sectors of the hard disk data in its own storage and therefore can be
8529 used independently. On the contrary, a differencing hard disk is a
8530 "delta" to some other disk and contains only those sectors which differ
8531 from that other disk, which is then called a <i>parent</i>. The differencing
8532 hard disk is said to be <i>linked to</i> that parent.
8533 The parent may be itself a differencing image, thus forming a chain of
8534 linked hard disks. The last element in that chain
8535 must always be a base medium. Note that several differencing
8536 hard disks may be linked to the same parent hard disk.
8537
8538 Differencing hard disks can be distinguished from base hard disks by
8539 querying the <link to="#parent"/> attribute: base hard disks do not have
8540 parents they would depend on, so the value of this attribute is always
8541 @c null for them. Using this attribute, it is possible to walk up
8542 the hard disk tree (from the child hard disk to its parent). It is also
8543 possible to walk down the tree using the <link to="#children"/>
8544 attribute.
8545
8546 Note that the type of all differencing hard disks is
8547 <link to="MediumType_Normal" />; all other values are
8548 meaningless for them. Base hard disks may be of any type.
8549
8550 <h3>Creating hard disks</h3>
8551
8552 New base hard disks are created using
8553 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8554 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
8555 disks are usually implicitly created by VirtualBox when needed but may
8556 also be created explicitly using <link to="#createDiffStorage"/>.
8557
8558 After the hard disk is successfully created (including the storage unit)
8559 or opened, it becomes a known hard disk (remembered in the internal media
8560 registry). Known hard disks can be attached to a virtual machine, accessed
8561 through <link to="IVirtualBox::getHardDisk"/> and
8562 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
8563 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8564
8565 The following methods, besides <link to="IMedium::close"/>,
8566 automatically remove the hard disk from the media registry:
8567 <ul>
8568 <li><link to="#deleteStorage"/></li>
8569 <li><link to="#mergeTo"/></li>
8570 </ul>
8571
8572 If the storage unit of the hard disk is a regular file in the host's
8573 file system then the rules stated in the description of the
8574 <link to="IMedium::location"/> attribute apply when setting its value. In
8575 addition, a plain file name without any path may be given, in which case
8576 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8577 folder</link> will be prepended to it.
8578
8579 <h4>Automatic composition of the file name part</h4>
8580
8581 Another extension to the <link to="IMedium::location"/> attribute is that
8582 there is a possibility to cause VirtualBox to compose a unique value for
8583 the file name part of the location using the UUID of the hard disk. This
8584 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
8585 e.g. before the storage unit is created, and works as follows. You set the
8586 value of the <link to="IMedium::location"/> attribute to a location
8587 specification which only contains the path specification but not the file
8588 name part and ends with either a forward slash or a backslash character.
8589 In response, VirtualBox will generate a new UUID for the hard disk and
8590 compose the file name using the following pattern:
8591 <pre>
8592 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8593 </pre>
8594 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8595 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8596 is the default extension for the storage format of this hard disk. After
8597 that, you may call any of the methods that create a new hard disk storage
8598 unit and they will use the generated UUID and file name.
8599
8600 <h3>Attaching Hard Disks</h3>
8601
8602 Hard disks are attached to virtual machines using the
8603 <link to="IMachine::attachDevice"/> method and detached using the
8604 <link to="IMachine::detachDevice"/> method. Depending on their
8605 <link to="#type"/>, hard disks are attached either
8606 <i>directly</i> or <i>indirectly</i>.
8607
8608 When a hard disk is being attached directly, it is associated with the
8609 virtual machine and used for hard disk operations when the machine is
8610 running. When a hard disk is being attached indirectly, a new differencing
8611 hard disk linked to it is implicitly created and this differencing hard
8612 disk is associated with the machine and used for hard disk operations.
8613 This also means that if <link to="IMachine::attachDevice"/> performs
8614 a direct attachment then the same hard disk will be returned in response
8615 to the subsequent <link to="IMachine::getMedium"/> call; however if
8616 an indirect attachment is performed then
8617 <link to="IMachine::getMedium"/> will return the implicitly created
8618 differencing hard disk, not the original one passed to <link
8619 to="IMachine::attachDevice"/>. In detail:
8620
8621 <ul>
8622 <li><b>Normal base</b> hard disks that do not have children (i.e.
8623 differencing hard disks linked to them) and that are not already
8624 attached to virtual machines in snapshots are attached <b>directly</b>.
8625 Otherwise, they are attached <b>indirectly</b> because having
8626 dependent children or being part of the snapshot makes it impossible
8627 to modify hard disk contents without breaking the integrity of the
8628 dependent party. The <link to="#readOnly"/> attribute allows to
8629 quickly determine the kind of the attachment for the given hard
8630 disk. Note that if a normal base hard disk is to be indirectly
8631 attached to a virtual machine with snapshots then a special
8632 procedure called <i>smart attachment</i> is performed (see below).</li>
8633 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8634 they are attached <b>directly</b> if they do not have children and are
8635 not attached to virtual machines in snapshots, and <b>indirectly</b>
8636 otherwise. Note that the smart attachment procedure is never performed
8637 for differencing hard disks.</li>
8638 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8639 they are designed to be non-writable. If an immutable hard disk is
8640 attached to a virtual machine with snapshots then a special
8641 procedure called smart attachment is performed (see below).</li>
8642 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8643 also as designed. This also means that writethrough hard disks cannot
8644 have other hard disks linked to them at all.</li>
8645 </ul>
8646
8647 Note that the same hard disk, regardless of its type, may be attached to
8648 more than one virtual machine at a time. In this case, the machine that is
8649 started first gains exclusive access to the hard disk and attempts to
8650 start other machines having this hard disk attached will fail until the
8651 first machine is powered down.
8652
8653 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8654 that the given hard disk remains associated with the given machine after a
8655 successful <link to="IMachine::detachDevice"/> call until
8656 <link to="IMachine::saveSettings"/> is called to save all changes to
8657 machine settings to disk. This deferring is necessary to guarantee that
8658 the hard disk configuration may be restored at any time by a call to
8659 <link to="IMachine::discardSettings"/> before the settings
8660 are saved (committed).
8661
8662 Note that if <link to="IMachine::discardSettings"/> is called after
8663 indirectly attaching some hard disks to the machine but before a call to
8664 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8665 all differencing hard disks implicitly created by
8666 <link to="IMachine::attachDevice"/> for these indirect attachments.
8667 Such implicitly created hard disks will also be immediately deleted when
8668 detached explicitly using the <link to="IMachine::detachDevice"/>
8669 call if it is made before <link to="IMachine::saveSettings"/>. This
8670 implicit deletion is safe because newly created differencing hard
8671 disks do not contain any user data.
8672
8673 However, keep in mind that detaching differencing hard disks that were
8674 implicitly created by <link to="IMachine::attachDevice"/>
8675 before the last <link to="IMachine::saveSettings"/> call will
8676 <b>not</b> implicitly delete them as they may already contain some data
8677 (for example, as a result of virtual machine execution). If these hard
8678 disks are no more necessary, the caller can always delete them explicitly
8679 using <link to="#deleteStorage"/> after they are actually de-associated
8680 from this machine by the <link to="IMachine::saveSettings"/> call.
8681
8682 <h3>Smart Attachment</h3>
8683
8684 When normal base or immutable hard disks are indirectly attached to a
8685 virtual machine then some additional steps are performed to make sure the
8686 virtual machine will have the most recent "view" of the hard disk being
8687 attached. These steps include walking through the machine's snapshots
8688 starting from the current one and going through ancestors up to the first
8689 snapshot. Hard disks attached to the virtual machine in all
8690 of the encountered snapshots are checked whether they are descendants of
8691 the given normal base or immutable hard disk. The first found child (which
8692 is the differencing hard disk) will be used instead of the normal base or
8693 immutable hard disk as a parent for creating a new differencing hard disk
8694 that will be actually attached to the machine. And only if no descendants
8695 are found or if the virtual machine does not have any snapshots then the
8696 normal base or immutable hard disk will be used itself as a parent for
8697 this differencing hard disk.
8698
8699 It is easier to explain what smart attachment does using the
8700 following example:
8701 <pre>
8702BEFORE attaching B.vdi: AFTER attaching B.vdi:
8703
8704Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8705 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8706 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8707 Snapshot 4 (none) Snapshot 4 (none)
8708 CurState (none) CurState (D3->D2.vdi)
8709
8710 NOT
8711 ...
8712 CurState (D3->B.vdi)
8713 </pre>
8714 The first column is the virtual machine configuration before the base hard
8715 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8716 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8717 mean that the hard disk that is actually attached to the machine is a
8718 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8719 another hard disk, <tt>B.vdi</tt>.
8720
8721 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8722 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8723 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8724 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8725 it cannot be attached directly and needs an indirect attachment (i.e.
8726 implicit creation of a new differencing hard disk). Due to the smart
8727 attachment procedure, the new differencing hard disk
8728 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8729 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8730 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8731 machine.
8732
8733 Note that if there is more than one descendant hard disk of the given base
8734 hard disk found in a snapshot, and there is an exact device, channel and
8735 bus match, then this exact match will be used. Otherwise, the youngest
8736 descendant will be picked up.
8737
8738 There is one more important aspect of the smart attachment procedure which
8739 is not related to snapshots at all. Before walking through the snapshots
8740 as described above, the backup copy of the current list of hard disk
8741 attachment is searched for descendants. This backup copy is created when
8742 the hard disk configuration is changed for the first time after the last
8743 <link to="IMachine::saveSettings"/> call and used by
8744 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8745 changes. When such a descendant is found in this backup copy, it will be
8746 simply re-attached back, without creating a new differencing hard disk for
8747 it. This optimization is necessary to make it possible to re-attach the
8748 base or immutable hard disk to a different bus, channel or device slot
8749 without losing the contents of the differencing hard disk actually
8750 attached to the machine in place of it.
8751 </desc>
8752
8753 <attribute name="id" type="uuid" mod="string" readonly="yes">
8754 <desc>
8755 UUID of the medium. For a newly created medium, this value is a randomly
8756 generated UUID.
8757
8758 <note>
8759 For media in one of MediumState_NotCreated, MediumState_Creating or
8760 MediumState_Deleting states, the value of this property is undefined
8761 and will most likely be an empty UUID.
8762 </note>
8763 </desc>
8764 </attribute>
8765
8766 <attribute name="description" type="wstring">
8767 <desc>
8768 Optional description of the medium. For a newly created medium the value
8769 of this attribute is an empty string.
8770
8771 Medium types that don't support this attribute will return E_NOTIMPL in
8772 attempt to get or set this attribute's value.
8773
8774 <note>
8775 For some storage types, reading this attribute may return an outdated
8776 (last known) value when <link to="#state"/> is <link
8777 to="MediumState_Inaccessible"/> or <link
8778 to="MediumState_LockedWrite"/> because the value of this attribute is
8779 stored within the storage unit itself. Also note that changing the
8780 attribute value is not possible in such case, as well as when the
8781 medium is the <link to="MediumState_LockedRead"/> state.
8782 </note>
8783 </desc>
8784 </attribute>
8785
8786 <attribute name="state" type="MediumState" readonly="yes">
8787 <desc>
8788 Current medium state. Inspect <link to="MediumState"/> values for details.
8789
8790 Reading this attribute may take a long time because an accessibility
8791 check of the storage unit is performed each time the attribute is read.
8792 This check may cause a significant delay if the storage unit of the
8793 given medium is, for example, a file located on a network share which is
8794 not currently accessible due to connectivity problems -- the call will
8795 not return until a timeout interval defined by the host OS for this
8796 operation expires.
8797
8798 If the last known state of the medium is <link to="MediumState_Created"/>
8799 and the accessibility check fails then the state would be set to
8800 <link to="MediumState_Inaccessible"/> and <link to="#lastAccessError"/>
8801 may be used to get more details about the failure. If the state of the
8802 medium is <link to="MediumState_LockedRead"/> or
8803 <link to="MediumState_LockedWrite"/> then it remains the same, and a
8804 non-empty value of <link to="#lastAccessError"/> will indicate a failed
8805 accessibility check in this case.
8806
8807 Note that not all medium states are applicable to all medium types.
8808 </desc>
8809 </attribute>
8810
8811 <attribute name="location" type="wstring">
8812 <desc>
8813 Location of the storage unit holding medium data.
8814
8815 The format of the location string is medium type specific. For medium
8816 types using regular files in a host's file system, the location
8817 string is the full file name.
8818
8819 Some medium types may support changing the storage unit location by
8820 simply changing the value of this property. If this operation is not
8821 supported, the implementation will return E_NOTIMPL in attempt to set
8822 this attribute's value.
8823
8824 When setting a value of the location attribute which is a regular file
8825 in the host's file system, the given file name may be either relative to
8826 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8827 absolute. Note that if the given location specification does not contain
8828 the file extension part then a proper default extension will be
8829 automatically appended by the implementation depending on the medium type.
8830 </desc>
8831 </attribute>
8832
8833 <attribute name="name" type="wstring" readonly="yes">
8834 <desc>
8835 Name of the storage unit holding medium data.
8836
8837 The returned string is a short version of the <link to="#location"/>
8838 attribute that is suitable for representing the medium in situations
8839 where the full location specification is too long (such as lists
8840 and comboboxes in GUI frontends). This string is also used by frontends
8841 to sort the media list alphabetically when needed.
8842
8843 For example, for locations that are regular files in the host's file
8844 system, the value of this attribute is just the file name (+ extension),
8845 without the path specification.
8846
8847 Note that as opposed to the <link to="#location"/> attribute, the name
8848 attribute will not necessary be unique for a list of media of the
8849 given type and format.
8850 </desc>
8851 </attribute>
8852
8853 <attribute name="hostDrive" type="boolean" readonly="yes">
8854 <desc>True if this corresponds to a drive on the host.</desc>
8855 </attribute>
8856
8857 <attribute name="size" type="unsigned long long" readonly="yes">
8858 <desc>
8859 Physical size of the storage unit used to hold medium data (in bytes).
8860
8861 <note>
8862 For media whose <link to="#state"/> is <link
8863 to="MediumState_Inaccessible"/>, the value of this property is the
8864 last known size. For <link to="MediumState_NotCreated"/> media,
8865 the returned value is zero.
8866 </note>
8867 </desc>
8868 </attribute>
8869
8870 <attribute name="format" type="wstring" readonly="yes">
8871 <desc>
8872 Storage format of this medium.
8873
8874 The value of this attribute is a string that specifies a backend used to
8875 store hard disk data. The storage format is defined when you create a
8876 new hard disk or automatically detected when you open an existing hard
8877 disk medium, and cannot be changed later.
8878
8879 The list of all storage formats supported by this VirtualBox
8880 installation can be obtained using
8881 <link to="ISystemProperties::mediumFormats"/>.
8882 </desc>
8883 </attribute>
8884
8885 <attribute name="type" type="MediumType">
8886 <desc>
8887 Type (role) of this hard disk.
8888
8889 The following constraints apply when changing the value of this
8890 attribute:
8891 <ul>
8892 <li>If a hard disk is attached to a virtual machine (either in the
8893 current state or in one of the snapshots), its type cannot be
8894 changed.
8895 </li>
8896 <li>As long as the hard disk has children, its type cannot be set
8897 to <link to="MediumType_Writethrough"/>.
8898 </li>
8899 <li>The type of all differencing hard disks is
8900 <link to="MediumType_Normal"/> and cannot be changed.
8901 </li>
8902 </ul>
8903
8904 The type of a newly created or opened hard disk is set to
8905 <link to="MediumType_Normal"/>.
8906 </desc>
8907 </attribute>
8908
8909 <attribute name="parent" type="IMedium" readonly="yes">
8910 <desc>
8911 Parent of this hard disk (a hard disk this hard disk is directly based
8912 on).
8913
8914 Only differencing hard disks have parents. For base (non-differencing)
8915 hard disks, @c null is returned.
8916 </desc>
8917 </attribute>
8918
8919 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8920 <desc>
8921 Children of this hard disk (all differencing hard disks directly based
8922 on this hard disk). A @c null array is returned if this hard disk
8923 does not have any children.
8924 </desc>
8925 </attribute>
8926
8927 <attribute name="base" type="IMedium" readonly="yes">
8928 <desc>
8929 Base medium of this medium.
8930
8931 If this is a differencing medium, its base hard disk is the medium
8932 the given hard disk branch starts from. For all other types of hard
8933 disks, this property returns the hard disk object itself (i.e. the same
8934 object this property is read on).
8935 </desc>
8936 </attribute>
8937
8938 <attribute name="readOnly" type="boolean" readonly="yes">
8939 <desc>
8940 Returns @c true if this hard disk is read-only and @c false otherwise.
8941
8942 A hard disk is considered to be read-only when its contents cannot be
8943 modified without breaking the integrity of other parties that depend on
8944 this hard disk such as its child hard disks or snapshots of virtual
8945 machines where this hard disk is attached to these machines. If there
8946 are no children and no such snapshots then there is no dependency and
8947 the hard disk is not read-only.
8948
8949 The value of this attribute can be used to determine the kind of the
8950 attachment that will take place when attaching this hard disk to a
8951 virtual machine. If the value is @c false then the hard disk will
8952 be attached directly. If the value is @c true then the hard disk
8953 will be attached indirectly by creating a new differencing child hard
8954 disk for that. See the interface description for more information.
8955
8956 Note that all <link to="MediumType_Immutable">Immutable</link> hard
8957 disks are always read-only while all
8958 <link to="MediumType_Writethrough">Writethrough</link> hard disks are
8959 always not.
8960
8961 <note>
8962 The read-only condition represented by this attribute is related to
8963 the hard disk type and usage, not to the current
8964 <link to="IMedium::state">medium state</link> and not to the read-only
8965 state of the storage unit.
8966 </note>
8967 </desc>
8968 </attribute>
8969
8970 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
8971 <desc>
8972 Logical size of this hard disk (in megabytes), as reported to the
8973 guest OS running inside the virtual machine this disk is
8974 attached to. The logical size is defined when the hard disk is created
8975 and cannot be changed later.
8976
8977 <note>
8978 Reading this property on a differencing hard disk will return the size
8979 of its <link to="#base"/> medium.
8980 </note>
8981 <note>
8982 For hard disks whose state is <link to="#state"/> is <link
8983 to="MediumState_Inaccessible"/>, the value of this property is the
8984 last known logical size. For <link to="MediumaState_NotCreated"/> hard
8985 disks, the returned value is zero.
8986 </note>
8987 </desc>
8988 </attribute>
8989
8990 <attribute name="autoReset" type="boolean">
8991 <desc>
8992 Whether this differencing hard disk will be automatically reset each
8993 time a virtual machine it is attached to is powered up.
8994
8995 See <link to="#reset()"/> for more information about resetting
8996 differencing hard disks.
8997
8998 <note>
8999 Reading this property on a base (non-differencing) hard disk will
9000 always @c false. Changing the value of this property in this
9001 case is not supported.
9002 </note>
9003
9004 <result name="VBOX_E_NOT_SUPPORTED">
9005 This is not a differencing hard disk (when changing the attribute
9006 value).
9007 </result>
9008 </desc>
9009 </attribute>
9010
9011 <attribute name="lastAccessError" type="wstring" readonly="yes">
9012 <desc>
9013 Text message that represents the result of the last accessibility
9014 check.
9015
9016 Accessibility checks are performed each time the <link to="#state"/>
9017 attribute is read. An empty string is returned if the last
9018 accessibility check was successful. A non-empty string indicates a
9019 failure and should normally describe a reason of the failure (for
9020 example, a file read error).
9021 </desc>
9022 </attribute>
9023
9024 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9025 <desc>
9026 Array of UUIDs of all machines this medium is attached to.
9027
9028 A @c null array is returned if this medium is not attached to any
9029 machine or to any machine's snapshot.
9030
9031 <note>
9032 The returned array will include a machine even if this medium is not
9033 attached to that machine in the current state but attached to it in
9034 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9035 details.
9036 </note>
9037 </desc>
9038 </attribute>
9039
9040 <method name="getSnapshotIds">
9041 <desc>
9042 Returns an array of UUIDs of all snapshots of the given machine where
9043 this medium is attached to.
9044
9045 If the medium is attached to the machine in the current state, then the
9046 first element in the array will always be the ID of the queried machine
9047 (i.e. the value equal to the @c machineId argument), followed by
9048 snapshot IDs (if any).
9049
9050 If the medium is not attached to the machine in the current state, then
9051 the array will contain only snapshot IDs.
9052
9053 The returned array may be @c null if this medium is not attached
9054 to the given machine at all, neither in the current state nor in one of
9055 the snapshots.
9056 </desc>
9057 <param name="machineId" type="uuid" mod="string" dir="in">
9058 <desc>
9059 UUID of the machine to query.
9060 </desc>
9061 </param>
9062 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9063 <desc>
9064 Array of snapshot UUIDs of the given machine using this medium.
9065 </desc>
9066 </param>
9067 </method>
9068
9069 <method name="lockRead">
9070 <desc>
9071 Locks this medium for reading.
9072
9073 The read lock is shared: many clients can simultaneously lock the
9074 same medium for reading unless it is already locked for writing (see
9075 <link to="#lockWrite"/>) in which case an error is returned.
9076
9077 When the medium is locked for reading, it cannot be modified
9078 from within VirtualBox. This means that any method that changes
9079 the properties of this medium or contents of the storage unit
9080 will return an error (unless explicitly stated otherwise) and
9081 that an attempt to start a virtual machine that wants to modify
9082 the medium will also fail.
9083
9084 When the virtual machine is started up, it locks for reading all
9085 media it uses in read-only mode. If some medium cannot be locked
9086 for reading, the startup procedure will fail.
9087
9088 The medium locked for reading must be unlocked using the <link
9089 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9090 can be nested and must be followed by the same number of paired
9091 <link to="#unlockRead"/> calls.
9092
9093 This method sets the medium state to <link
9094 to="MediumState_LockedRead" /> on success. The state prior to
9095 this call must be <link to="MediumState_Created" />,
9096 <link to="MediumState_Inaccessible" /> or
9097 <link to="MediumState_LockedRead" />.
9098 As you can see, an inaccessible medium can be locked too. This is
9099 not an error; this method performs a logical lock that prevents
9100 modifications of this medium through the VirtualBox API, not a
9101 physical lock of the underlying storage unit.
9102
9103 This method returns the current state of the medium
9104 <b>before</b> the operation.
9105
9106 <result name="VBOX_E_INVALID_OBJECT_STATE">
9107 Invalid medium state (e.g. not created, locked, inaccessible,
9108 creating, deleting).
9109 </result>
9110
9111 </desc>
9112 <param name="state" type="MediumState" dir="return">
9113 <desc>
9114 State of the medium after the operation.
9115 </desc>
9116 </param>
9117 </method>
9118
9119 <method name="unlockRead">
9120 <desc>
9121 Cancels the read lock previously set by <link to="#lockRead"/>.
9122
9123 For both, success and failure, this method returns the current state
9124 of the medium <b>after</b> the operation.
9125
9126 See <link to="#lockRead"/> for more details.
9127
9128 <result name="VBOX_E_INVALID_OBJECT_STATE">
9129 Medium not locked for reading.
9130 </result>
9131
9132 </desc>
9133 <param name="state" type="MediumState" dir="return">
9134 <desc>
9135 State of the medium after the operation.
9136 </desc>
9137 </param>
9138 </method>
9139
9140 <method name="lockWrite">
9141 <desc>
9142 Locks this medium for writing.
9143
9144 The write lock, as opposed to <link to="#lockRead"/>, is
9145 exclusive: there may be only one client holding a write lock
9146 and there may be no read locks while the write lock is held.
9147
9148 When the medium is locked for writing, it cannot be modified
9149 from within VirtualBox and it is not guaranteed that the values
9150 of its properties are up-to-date. Any method that changes the
9151 properties of this medium or contents of the storage unit will
9152 return an error (unless explicitly stated otherwise) and an
9153 attempt to start a virtual machine wanting to modify or to
9154 read the medium will fail.
9155
9156 When the virtual machine is started up, it locks for writing all
9157 media it uses to write data to. If any medium could not be locked
9158 for writing, the startup procedure will fail.
9159
9160 The medium locked for writing must be unlocked using the <link
9161 to="#unlockWrite"/> method. Calls to <link to="#lockWrite"/>
9162 can <b>not</b> be nested and must be followed by a<link
9163 to="#unlockWrite"/> call before the next lockWrite call.
9164
9165 This method sets the medium state to <link to="MediumState_LockedWrite" />
9166 on success. The state prior to this call must be <link to="MediumState_Created"/>
9167 or <link to="MediumState_Inaccessible"/>. As you can see, an inaccessible
9168 medium can be locked too. This is not an error; this method
9169 performs a logical lock preventing modifications of this
9170 medium through the VirtualBox API, not a physical lock of the
9171 underlying storage unit.
9172
9173 For both, success and failure, this method returns the current
9174 state of the medium <b>before</b> the operation.
9175
9176 <result name="VBOX_E_INVALID_OBJECT_STATE">
9177 Invalid medium state (e.g. not created, locked, inaccessible,
9178 creating, deleting).
9179 </result>
9180
9181 </desc>
9182 <param name="state" type="MediumState" dir="return">
9183 <desc>
9184 State of the medium after the operation.
9185 </desc>
9186 </param>
9187 </method>
9188
9189 <method name="unlockWrite">
9190 <desc>
9191 Cancels the write lock previously set by <link to="#lockWrite"/>.
9192
9193 For both, success and failure, this method returns the current
9194 state of the medium <b>after</b> the operation.
9195
9196 See <link to="#lockWrite"/> for more details.
9197
9198 <result name="VBOX_E_INVALID_OBJECT_STATE">
9199 Medium not locked for writing.
9200 </result>
9201
9202 </desc>
9203 <param name="state" type="MediumState" dir="return">
9204 <desc>
9205 State of the medium after the operation.
9206 </desc>
9207 </param>
9208 </method>
9209
9210 <method name="close">
9211 <desc>
9212 Closes this medium.
9213
9214 The medium must not be attached to any known virtual machine
9215 and must not have any known child media, otherwise the
9216 operation will fail.
9217
9218 When the medium is successfully closed, it gets removed from
9219 the list of remembered media, but its storage unit is not
9220 deleted. In particular, this means that this medium can be
9221 later opened again using the <link
9222 to="IVirtualBox::openHardDisk"/> call.
9223
9224 Note that after this method successfully returns, the given medium
9225 object becomes uninitialized. This means that any attempt
9226 to call any of its methods or attributes will fail with the
9227 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9228
9229 <result name="VBOX_E_INVALID_OBJECT_STATE">
9230 Invalid medium state (other than not created, created or
9231 inaccessible).
9232 </result>
9233 <result name="VBOX_E_OBJECT_IN_USE">
9234 Medium attached to virtual machine.
9235 </result>
9236 <result name="VBOX_E_FILE_ERROR">
9237 Settings file not accessible.
9238 </result>
9239 <result name="VBOX_E_XML_ERROR">
9240 Could not parse the settings file.
9241 </result>
9242
9243 </desc>
9244 </method>
9245
9246 <!-- storage methods -->
9247
9248 <method name="getProperty">
9249 <desc>
9250 Returns the value of the custom hard disk property with the given name.
9251
9252 The list of all properties supported by the given hard disk format can
9253 be obtained with <link to="IMediumFormat::describeProperties"/>.
9254
9255 Note that if this method returns an empty string in @a value, the
9256 requested property is supported but currently not assigned any value.
9257
9258 <result name="VBOX_E_OBJECT_NOT_FOUND">
9259 Requested property does not exist (not supported by the format).
9260 </result>
9261 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9262 </desc>
9263 <param name="name" type="wstring" dir="in">
9264 <desc>Name of the property to get.</desc>
9265 </param>
9266 <param name="value" type="wstring" dir="return">
9267 <desc>Current property value.</desc>
9268 </param>
9269 </method>
9270
9271 <method name="setProperty">
9272 <desc>
9273 Sets the value of the custom hard disk property with the given name.
9274
9275 The list of all properties supported by the given hard disk format can
9276 be obtained with <link to="IMediumFormat::describeProperties"/>.
9277
9278 Note that setting the property value to @c null or an empty string is
9279 equivalent to deleting the existing value. A default value (if it is
9280 defined for this property) will be used by the format backend in this
9281 case.
9282
9283 <result name="VBOX_E_OBJECT_NOT_FOUND">
9284 Requested property does not exist (not supported by the format).
9285 </result>
9286 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9287 </desc>
9288 <param name="name" type="wstring" dir="in">
9289 <desc>Name of the property to set.</desc>
9290 </param>
9291 <param name="value" type="wstring" dir="in">
9292 <desc>Property value to set.</desc>
9293 </param>
9294 </method>
9295
9296 <method name="getProperties">
9297 <desc>
9298 Returns values for a group of properties in one call.
9299
9300 The names of the properties to get are specified using the @a names
9301 argument which is a list of comma-separated property names or
9302 an empty string if all properties are to be returned. Note that currently
9303 the value of this argument is ignored and the method always returns all
9304 existing properties.
9305
9306 The list of all properties supported by the given hard disk format can
9307 be obtained with <link to="IMediumFormat::describeProperties"/>.
9308
9309 The method returns two arrays, the array of property names corresponding
9310 to the @a names argument and the current values of these properties.
9311 Both arrays have the same number of elements with each elemend at the
9312 given index in the first array corresponds to an element at the same
9313 index in the second array.
9314
9315 Note that for properties that do not have assigned values,
9316 an empty string is returned at the appropriate index in the
9317 @a returnValues array.
9318
9319 </desc>
9320 <param name="names" type="wstring" dir="in">
9321 <desc>
9322 Names of properties to get.
9323 </desc>
9324 </param>
9325 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9326 <desc>Names of returned properties.</desc>
9327 </param>
9328 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9329 <desc>Values of returned properties.</desc>
9330 </param>
9331 </method>
9332
9333 <method name="setProperties">
9334 <desc>
9335 Sets values for a group of properties in one call.
9336
9337 The names of the properties to set are passed in the @a names
9338 array along with the new values for them in the @a values array. Both
9339 arrays have the same number of elements with each elemend at the given
9340 index in the first array corresponding to an element at the same index
9341 in the second array.
9342
9343 If there is at least one property name in @a names that is not valid,
9344 the method will fail before changing the values of any other properties
9345 from the @a names array.
9346
9347 Using this method over <link to="#setProperty"/> is preferred if you
9348 need to set several properties at once since it will result into less
9349 IPC calls.
9350
9351 The list of all properties supported by the given hard disk format can
9352 be obtained with <link to="IMediumFormat::describeProperties"/>.
9353
9354 Note that setting the property value to @c null or an empty string is
9355 equivalent to deleting the existing value. A default value (if it is
9356 defined for this property) will be used by the format backend in this
9357 case.
9358 </desc>
9359 <param name="names" type="wstring" safearray="yes" dir="in">
9360 <desc>Names of properties to set.</desc>
9361 </param>
9362 <param name="values" type="wstring" safearray="yes" dir="in">
9363 <desc>Values of properties to set.</desc>
9364 </param>
9365 </method>
9366
9367 <!-- storage methods -->
9368
9369 <method name="createBaseStorage">
9370 <desc>
9371 Starts creating a hard disk storage unit (fixed/dynamic, according
9372 to the variant flags) in in the background. The previous storage unit
9373 created for this object, if any, must first be deleted using
9374 <link to="#deleteStorage"/>, otherwise the operation will fail.
9375
9376 Before the operation starts, the hard disk is placed in
9377 <link to="MediumState_Creating"/> state. If the create operation
9378 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
9379 state.
9380
9381 After the returned progress object reports that the operation has
9382 successfully completed, the medium state will be set to <link
9383 to="MediumState_Created"/>, the hard disk will be remembered by this
9384 VirtualBox installation and may be attached to virtual machines.
9385
9386 <result name="VBOX_E_NOT_SUPPORTED">
9387 The variant of storage creation operation is not supported. See <link
9388 to="IMediumFormat::capabilities"/>.
9389 </result>
9390 </desc>
9391 <param name="logicalSize" type="unsigned long long" dir="in">
9392 <desc>Maximum logical size of the hard disk in megabytes.</desc>
9393 </param>
9394 <param name="variant" type="MediumVariant" dir="in">
9395 <desc>Exact image variant which should be created.</desc>
9396 </param>
9397 <param name="progress" type="IProgress" dir="return">
9398 <desc>Progress object to track the operation completion.</desc>
9399 </param>
9400 </method>
9401
9402 <method name="deleteStorage">
9403 <desc>
9404 Starts deleting the storage unit of this hard disk.
9405
9406 The hard disk must not be attached to any known virtual machine and must
9407 not have any known child hard disks, otherwise the operation will fail.
9408 It will also fail if there is no storage unit to delete or if deletion
9409 is already in progress, or if the hard disk is being in use (locked for
9410 read or for write) or inaccessible. Therefore, the only valid state for
9411 this operation to succeed is <link to="MediumState_Created"/>.
9412
9413 Before the operation starts, the hard disk is placed to
9414 <link to="MediumState_Deleting"/> state and gets removed from the list
9415 of remembered hard disks (media registry). If the delete operation
9416 fails, the medium will be remembered again and placed back to
9417 <link to="MediumState_Created"/> state.
9418
9419 After the returned progress object reports that the operation is
9420 complete, the medium state will be set to
9421 <link to="MediumState_NotCreated"/> and you will be able to use one of
9422 the storage creation methods to create it again.
9423
9424 <see>#close()</see>
9425
9426 <result name="VBOX_E_OBJECT_IN_USE">
9427 Hard disk is attached to a virtual machine.
9428 </result>
9429 <result name="VBOX_E_NOT_SUPPORTED">
9430 Storage deletion is not allowed because neither of storage creation
9431 operations are supported. See
9432 <link to="IMediumFormat::capabilities"/>.
9433 </result>
9434
9435 <note>
9436 If the deletion operation fails, it is not guaranteed that the storage
9437 unit still exists. You may check the <link to="IMedium::state"/> value
9438 to answer this question.
9439 </note>
9440 </desc>
9441 <param name="progress" type="IProgress" dir="return">
9442 <desc>Progress object to track the operation completion.</desc>
9443 </param>
9444 </method>
9445
9446 <!-- diff methods -->
9447
9448 <method name="createDiffStorage">
9449 <desc>
9450 Starts creating an empty differencing storage unit based on this hard
9451 disk in the format and at the location defined by the @a target
9452 argument.
9453
9454 The target hard disk must be in <link to="MediumState_NotCreated"/>
9455 state (i.e. must not have an existing storage unit). Upon successful
9456 completion, this operation will set the type of the target hard disk to
9457 <link to="MediumType_Normal"/> and create a storage unit necessary to
9458 represent the differencing hard disk data in the given format (according
9459 to the storage format of the target object).
9460
9461 After the returned progress object reports that the operation is
9462 successfully complete, the target hard disk gets remembered by this
9463 VirtualBox installation and may be attached to virtual machines.
9464
9465 <note>
9466 The hard disk will be set to <link to="MediumState_LockedRead"/>
9467 state for the duration of this operation.
9468 </note>
9469 <result name="VBOX_E_OBJECT_IN_USE">
9470 Hard disk not in @c NotCreated state.
9471 </result>
9472 </desc>
9473 <param name="target" type="IMedium" dir="in">
9474 <desc>Target hard disk.</desc>
9475 </param>
9476 <param name="variant" type="MediumVariant" dir="in">
9477 <desc>Exact image variant which should be created.</desc>
9478 </param>
9479 <param name="progress" type="IProgress" dir="return">
9480 <desc>Progress object to track the operation completion.</desc>
9481 </param>
9482 </method>
9483
9484 <method name="mergeTo">
9485 <desc>
9486 Starts merging the contents of this hard disk and all intermediate
9487 differencing hard disks in the chain to the given target hard disk.
9488
9489 The target hard disk must be either a descendant of this hard disk or
9490 its ancestor (otherwise this method will immediately return a failure).
9491 It follows that there are two logical directions of the merge operation:
9492 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9493 ancestor (<i>backward merge</i>). Let us consider the following hard disk
9494 chain:
9495
9496 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9497
9498 Here, calling this method on the <tt>Base</tt> hard disk object with
9499 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9500 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9501 merge. Note that in both cases the contents of the resulting hard disk
9502 will be the same, the only difference is the hard disk object that takes
9503 the result of the merge operation. In case of the forward merge in the
9504 above example, the result will be written to <tt>Diff_2</tt>; in case of
9505 the backward merge, the result will be written to <tt>Base</tt>. In
9506 other words, the result of the operation is always stored in the target
9507 hard disk.
9508
9509 Upon successful operation completion, the storage units of all hard
9510 disks in the chain between this (source) hard disk and the target hard
9511 disk, including the source hard disk itself, will be automatically
9512 deleted and the relevant hard disk objects (including this hard disk)
9513 will become uninitialized. This means that any attempt to call any of
9514 their methods or attributes will fail with the
9515 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9516 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9517 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> hard
9518 disks. Note that <tt>Diff_2</tt> in this case will become a base hard
9519 disk itself since it will no longer be based on any other hard disk.
9520
9521 Considering the above, all of the following conditions must be met in
9522 order for the merge operation to succeed:
9523 <ul>
9524 <li>
9525 Neither this (source) hard disk nor any intermediate
9526 differencing hard disk in the chain between it and the target
9527 hard disk is attached to any virtual machine.
9528 </li>
9529 <li>
9530 Neither the source hard disk nor the target hard disk is an
9531 <link to="MediumType_Immutable"/> hard disk.
9532 </li>
9533 <li>
9534 The part of the hard disk tree from the source hard disk to the
9535 target hard disk is a linear chain, i.e. all hard disks in this
9536 chain have exactly one child which is the next hard disk in this
9537 chain. The only exception from this rule is the target hard disk in
9538 the forward merge operation; it is allowed to have any number of
9539 child hard disks because the merge operation will hot change its
9540 logical contents (as it is seen by the guest OS or by children).
9541 </li>
9542 <li>
9543 None of the involved hard disks are in
9544 <link to="MediumState_LockedRead"/> or
9545 <link to="MediumState_LockedWrite"/> state.
9546 </li>
9547 </ul>
9548
9549 <note>
9550 This (source) hard disk and all intermediates will be placed to <link
9551 to="MediumState_Deleting"/> state and the target hard disk will be
9552 placed to <link to="MediumState_LockedWrite"/> state and for the
9553 duration of this operation.
9554 </note>
9555 </desc>
9556 <param name="targetId" type="uuid" mod="string" dir="in">
9557 <desc>UUID of the target ancestor or descendant hard disk.</desc>
9558 </param>
9559 <param name="progress" type="IProgress" dir="return">
9560 <desc>Progress object to track the operation completion.</desc>
9561 </param>
9562 </method>
9563
9564 <!-- clone method -->
9565
9566 <method name="cloneTo">
9567 <desc>
9568 Starts creating a clone of this hard disk in the format and at the
9569 location defined by the @a target argument.
9570
9571 The target hard disk must be either in <link to="MediumState_NotCreated"/>
9572 state (i.e. must not have an existing storage unit) or in
9573 <link to="MediumState_Created"/> state (i.e. created and not locked, and
9574 big enough to hold the data or else the copy will be partial). Upon
9575 successful completion, the cloned hard disk will contain exactly the
9576 same sector data as the hard disk being cloned, except that in the
9577 first case a new UUID for the clone will be randomly generated, and in
9578 the second case the UUID will remain unchanged.
9579
9580 The @a parent argument defines which hard disk will be the parent
9581 of the clone. Passing a @c null reference indicates that the clone will
9582 be a base image, i.e. completely independent. It is possible to specify
9583 an arbitrary hard disk for this parameter, including the parent of the
9584 hard disk which is being cloned. Even cloning to a child of the source
9585 hard disk is possible. Note that when cloning to an existing image, the
9586 @a parent irgument is ignored.
9587
9588 After the returned progress object reports that the operation is
9589 successfully complete, the target hard disk gets remembered by this
9590 VirtualBox installation and may be attached to virtual machines.
9591
9592 <note>
9593 This hard disk will be placed to <link to="MediumState_LockedRead"/>
9594 state for the duration of this operation.
9595 </note>
9596 <result name="E_NOTIMPL">
9597 The specified cloning variant is not supported at the moment.
9598 </result>
9599 </desc>
9600 <param name="target" type="IMedium" dir="in">
9601 <desc>Target hard disk.</desc>
9602 </param>
9603 <param name="variant" type="MediumVariant" dir="in">
9604 <desc>Exact image variant which should be created.</desc>
9605 </param>
9606 <param name="parent" type="IMedium" dir="in">
9607 <desc>Parent of the cloned hard disk.</desc>
9608 </param>
9609 <param name="progress" type="IProgress" dir="return">
9610 <desc>Progress object to track the operation completion.</desc>
9611 </param>
9612 </method>
9613
9614 <!-- other methods -->
9615
9616 <method name="compact">
9617 <desc>
9618 Starts compacting of this hard disk. This means that the disk is
9619 transformed into a possibly more compact storage representation.
9620 This potentially creates temporary images, which can require a
9621 substantial amount of additional disk space.
9622
9623 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9624 state and all its parent hard disks (if any) will be placed to
9625 <link to="MediumState_LockedRead"/> state for the duration of this
9626 operation.
9627
9628 Please note that the results can be either returned straight away,
9629 or later as the result of the background operation via the object
9630 returned via the @a progress parameter.
9631
9632 <result name="VBOX_E_NOT_SUPPORTED">
9633 Hard disk format does not support compacting (but potentially
9634 needs it).
9635 </result>
9636 </desc>
9637 <param name="progress" type="IProgress" dir="return">
9638 <desc>Progress object to track the operation completion.</desc>
9639 </param>
9640 </method>
9641
9642 <method name="reset">
9643 <desc>
9644 Starts erasing the contents of this differencing hard disk.
9645
9646 This operation will reset the differencing hard disk to its initial
9647 state when it does not contain any sector data and any read operation is
9648 redirected to its parent hard disk.
9649
9650 This hard disk will be placed to <link to="MediumState_LockedWrite"/>
9651 for the duration of this operation.
9652
9653 <result name="VBOX_E_NOT_SUPPORTED">
9654 This is not a differencing hard disk.
9655 </result>
9656 <result name="VBOX_E_INVALID_OBJECT_STATE">
9657 Hard disk is not in <link to="MediumState_Created"/> or
9658 <link to="MediumState_Inaccessible"/> state.
9659 </result>
9660 </desc>
9661 <param name="progress" type="IProgress" dir="return">
9662 <desc>Progress object to track the operation completion.</desc>
9663 </param>
9664 </method>
9665
9666 </interface>
9667
9668
9669 <!--
9670 // IMediumFormat
9671 /////////////////////////////////////////////////////////////////////////
9672 -->
9673
9674 <enum
9675 name="DataType"
9676 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9677 >
9678 <const name="Int32" value="0"/>
9679 <const name="Int8" value="1"/>
9680 <const name="String" value="2"/>
9681 </enum>
9682
9683 <enum
9684 name="DataFlags"
9685 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9686 >
9687 <const name="None" value="0x00"/>
9688 <const name="Mandatory" value="0x01"/>
9689 <const name="Expert" value="0x02"/>
9690 <const name="Array" value="0x04"/>
9691 <const name="FlagMask" value="0x07"/>
9692 </enum>
9693
9694 <enum
9695 name="MediumFormatCapabilities"
9696 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9697 >
9698 <desc>
9699 Hard disk format capability flags.
9700 </desc>
9701
9702 <const name="Uuid" value="0x01">
9703 <desc>
9704 Supports UUIDs as expected by VirtualBox code.
9705 </desc>
9706 </const>
9707
9708 <const name="CreateFixed" value="0x02">
9709 <desc>
9710 Supports creating fixed size images, allocating all space instantly.
9711 </desc>
9712 </const>
9713
9714 <const name="CreateDynamic" value="0x04">
9715 <desc>
9716 Supports creating dynamically growing images, allocating space on
9717 demand.
9718 </desc>
9719 </const>
9720
9721 <const name="CreateSplit2G" value="0x08">
9722 <desc>
9723 Supports creating images split in chunks of a bit less than 2 GBytes.
9724 </desc>
9725 </const>
9726
9727 <const name="Differencing" value="0x10">
9728 <desc>
9729 Supports being used as a format for differencing media (see <link
9730 to="IMedium::createDiffStorage"/>).
9731 </desc>
9732 </const>
9733
9734 <const name="Asynchronous" value="0x20">
9735 <desc>
9736 Supports asynchronous I/O operations for at least some configurations.
9737 </desc>
9738 </const>
9739
9740 <const name="File" value="0x40">
9741 <desc>
9742 The format backend operates on files (the <link to="IMedium::location"/>
9743 attribute of the medium specifies a file used to store medium
9744 data; for a list of supported file extensions see
9745 <link to="IMediumFormat::fileExtensions"/>).
9746 </desc>
9747 </const>
9748
9749 <const name="Properties" value="0x80">
9750 <desc>
9751 The format backend uses the property interface to configure the storage
9752 location and properties (the <link to="IMediumFormat::describeProperties"/>
9753 method is used to get access to properties supported by the given medium format).
9754 </desc>
9755 </const>
9756
9757 <const name="CapabilityMask" value="0xFF"/>
9758 </enum>
9759
9760 <interface
9761 name="IMediumFormat" extends="$unknown"
9762 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9763 wsmap="managed"
9764 >
9765 <desc>
9766 The IMediumFormat interface represents a medium format.
9767
9768 Each medium format has an associated backend which is used to handle
9769 media stored in this format. This interface provides information
9770 about the properties of the associated backend.
9771
9772 Each medium format is identified by a string represented by the
9773 <link to="#id"/> attribute. This string is used in calls like
9774 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9775 format.
9776
9777 The list of all supported medium formats can be obtained using
9778 <link to="ISystemProperties::mediaFormats"/>.
9779
9780 <see>IMedium</see>
9781 </desc>
9782
9783 <attribute name="id" type="wstring" readonly="yes">
9784 <desc>
9785 Identifier of this format.
9786
9787 The format identifier is a non-@c null non-empty ASCII string. Note that
9788 this string is case-insensitive. This means that, for example, all of
9789 the following strings:
9790 <pre>
9791 "VDI"
9792 "vdi"
9793 "VdI"</pre>
9794 refer to the same medium format.
9795
9796 This string is used in methods of other interfaces where it is necessary
9797 to specify a medium format, such as
9798 <link to="IVirtualBox::createHardDisk"/>.
9799 </desc>
9800 </attribute>
9801
9802 <attribute name="name" type="wstring" readonly="yes">
9803 <desc>
9804 Human readable description of this format.
9805
9806 Mainly for use in file open dialogs.
9807 </desc>
9808 </attribute>
9809
9810 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9811 <desc>
9812 Array of strings containing the supported file extensions.
9813
9814 The first extension in the array is the extension preferred by the
9815 backend. It is recommended to use this extension when specifying a
9816 location of the storage unit for a new medium.
9817
9818 Note that some backends do not work on files, so this array may be
9819 empty.
9820
9821 <see>IMediumFormat::capabilities</see>
9822 </desc>
9823 </attribute>
9824
9825 <attribute name="capabilities" type="unsigned long" readonly="yes">
9826 <desc>
9827 Capabilities of the format as a set of bit flags.
9828
9829 For the meaning of individual capability flags see
9830 <link to="MediumFormatCapabilities"/>.
9831 </desc>
9832 </attribute>
9833
9834 <method name="describeProperties">
9835 <desc>
9836 Returns several arrays describing the properties supported by this
9837 format.
9838
9839 An element with the given index in each array describes one
9840 property. Thus, the number of elements in each returned array is the
9841 same and corresponds to the number of supported properties.
9842
9843 The returned arrays are filled in only if the
9844 <link to="MediumFormatCapabilities_Properties"/> flag is set.
9845 All arguments must be non-@c null.
9846
9847 <see>DataType</see>
9848 <see>DataFlags</see>
9849 </desc>
9850
9851 <param name="names" type="wstring" safearray="yes" dir="out">
9852 <desc>Array of property names.</desc>
9853 </param>
9854 <param name="description" type="wstring" safearray="yes" dir="out">
9855 <desc>Array of property descriptions.</desc>
9856 </param>
9857 <param name="types" type="DataType" safearray="yes" dir="out">
9858 <desc>Array of property types.</desc>
9859 </param>
9860 <param name="flags" type="unsigned long" safearray="yes" dir="out">
9861 <desc>Array of property flags.</desc>
9862 </param>
9863 <param name="defaults" type="wstring" safearray="yes" dir="out">
9864 <desc>Array of default property values.</desc>
9865 </param>
9866 </method>
9867
9868 </interface>
9869
9870
9871 <!--
9872 // IKeyboard
9873 /////////////////////////////////////////////////////////////////////////
9874 -->
9875
9876 <interface
9877 name="IKeyboard" extends="$unknown"
9878 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
9879 wsmap="managed"
9880 >
9881 <desc>
9882 The IKeyboard interface represents the virtual machine's keyboard. Used
9883 in <link to="IConsole::keyboard"/>.
9884
9885 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
9886 to the virtual machine.
9887
9888 </desc>
9889 <method name="putScancode">
9890 <desc>Sends a scancode to the keyboard.
9891
9892 <result name="VBOX_E_IPRT_ERROR">
9893 Could not send scan code to virtual keyboard.
9894 </result>
9895
9896 </desc>
9897 <param name="scancode" type="long" dir="in"/>
9898 </method>
9899
9900 <method name="putScancodes">
9901 <desc>Sends an array of scancodes to the keyboard.
9902
9903 <result name="VBOX_E_IPRT_ERROR">
9904 Could not send all scan codes to virtual keyboard.
9905 </result>
9906
9907 </desc>
9908 <param name="scancodes" type="long" dir="in" safearray="yes"/>
9909 <param name="codesStored" type="unsigned long" dir="return"/>
9910 </method>
9911
9912 <method name="putCAD">
9913 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
9914 function is nothing special, it is just a convenience function
9915 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
9916
9917 <result name="VBOX_E_IPRT_ERROR">
9918 Could not send all scan codes to virtual keyboard.
9919 </result>
9920
9921 </desc>
9922 </method>
9923
9924 </interface>
9925
9926
9927 <!--
9928 // IMouse
9929 /////////////////////////////////////////////////////////////////////////
9930 -->
9931
9932 <enum
9933 name="MouseButtonState"
9934 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
9935 >
9936 <desc>
9937 Mouse button state.
9938 </desc>
9939
9940 <const name="LeftButton" value="0x01"/>
9941 <const name="RightButton" value="0x02"/>
9942 <const name="MiddleButton" value="0x04"/>
9943 <const name="WheelUp" value="0x08"/>
9944 <const name="WheelDown" value="0x10"/>
9945 <const name="XButton1" value="0x20"/>
9946 <const name="XButton2" value="0x40"/>
9947 <const name="MouseStateMask" value="0x7F"/>
9948 </enum>
9949
9950 <interface
9951 name="IMouse" extends="$unknown"
9952 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
9953 wsmap="managed"
9954 >
9955 <desc>
9956 The IMouse interface represents the virtual machine's mouse. Used in
9957 <link to="IConsole::mouse"/>.
9958
9959 Through this interface, the virtual machine's virtual mouse can be
9960 controlled.
9961 </desc>
9962
9963 <attribute name="absoluteSupported" type="boolean" readonly="yes">
9964 <desc>
9965 Whether the guest OS supports absolute mouse pointer positioning
9966 or not.
9967 <note>
9968 VirtualBox Guest Tools need to be installed to the guest OS
9969 in order to enable absolute mouse positioning support.
9970 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
9971 callback to be instantly informed about changes of this attribute
9972 during virtual machine execution.
9973 </note>
9974 <see><link to="#putMouseEventAbsolute"/></see>
9975 </desc>
9976 </attribute>
9977
9978 <method name="putMouseEvent">
9979 <desc>
9980 Initiates a mouse event using relative pointer movements
9981 along x and y axis.
9982
9983 <result name="E_ACCESSDENIED">
9984 Console not powered up.
9985 </result>
9986 <result name="VBOX_E_IPRT_ERROR">
9987 Could not send mouse event to virtual mouse.
9988 </result>
9989
9990 </desc>
9991
9992 <param name="dx" type="long" dir="in">
9993 <desc>
9994 Amount of pixels the mouse should move to the right.
9995 Negative values move the mouse to the left.
9996 </desc>
9997 </param>
9998 <param name="dy" type="long" dir="in">
9999 <desc>
10000 Amount of pixels the mouse should move downwards.
10001 Negative values move the mouse upwards.
10002 </desc>
10003 </param>
10004 <param name="dz" type="long" dir="in">
10005 <desc>
10006 Amount of mouse wheel moves.
10007 Positive values describe clockwise wheel rotations,
10008 negative values describe counterclockwise rotations.
10009 </desc>
10010 </param>
10011 <param name="dw" type="long" dir="in">
10012 <desc>
10013 Amount of horizontal mouse wheel moves.
10014 Positive values describe a movement to the left,
10015 negative values describe a movement to the right.
10016 </desc>
10017 </param>
10018 <param name="buttonState" type="long" dir="in">
10019 <desc>
10020 The current state of mouse buttons. Every bit represents
10021 a mouse button as follows:
10022 <table>
10023 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10024 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10025 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10026 </table>
10027 A value of <tt>1</tt> means the corresponding button is pressed.
10028 otherwise it is released.
10029 </desc>
10030 </param>
10031 </method>
10032
10033 <method name="putMouseEventAbsolute">
10034 <desc>
10035 Positions the mouse pointer using absolute x and y coordinates.
10036 These coordinates are expressed in pixels and
10037 start from <tt>[1,1]</tt> which corresponds to the top left
10038 corner of the virtual display.
10039
10040 <result name="E_ACCESSDENIED">
10041 Console not powered up.
10042 </result>
10043 <result name="VBOX_E_IPRT_ERROR">
10044 Could not send mouse event to virtual mouse.
10045 </result>
10046
10047 <note>
10048 This method will have effect only if absolute mouse
10049 positioning is supported by the guest OS.
10050 </note>
10051
10052 <see><link to="#absoluteSupported"/></see>
10053 </desc>
10054
10055 <param name="x" type="long" dir="in">
10056 <desc>
10057 X coordinate of the pointer in pixels, starting from @c 1.
10058 </desc>
10059 </param>
10060 <param name="y" type="long" dir="in">
10061 <desc>
10062 Y coordinate of the pointer in pixels, starting from @c 1.
10063 </desc>
10064 </param>
10065 <param name="dz" type="long" dir="in">
10066 <desc>
10067 Amount of mouse wheel moves.
10068 Positive values describe clockwise wheel rotations,
10069 negative values describe counterclockwise rotations.
10070 </desc>
10071 </param>
10072 <param name="dw" type="long" dir="in">
10073 <desc>
10074 Amount of horizontal mouse wheel moves.
10075 Positive values describe a movement to the left,
10076 negative values describe a movement to the right.
10077 </desc>
10078 </param>
10079 <param name="buttonState" type="long" dir="in">
10080 <desc>
10081 The current state of mouse buttons. Every bit represents
10082 a mouse button as follows:
10083 <table>
10084 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10085 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10086 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10087 </table>
10088 A value of @c 1 means the corresponding button is pressed.
10089 otherwise it is released.
10090 </desc>
10091 </param>
10092 </method>
10093
10094 </interface>
10095
10096 <!--
10097 // IDisplay
10098 /////////////////////////////////////////////////////////////////////////
10099 -->
10100
10101 <enum
10102 name="FramebufferPixelFormat"
10103 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10104 >
10105 <desc>
10106 Format of the video memory buffer. Constants represented by this enum can
10107 be used to test for particular values of <link
10108 to="IFramebuffer::pixelFormat"/>. See also <link
10109 to="IFramebuffer::requestResize"/>.
10110
10111 See also www.fourcc.org for more information about FOURCC pixel formats.
10112 </desc>
10113
10114 <const name="Opaque" value="0">
10115 <desc>
10116 Unknown buffer format (the user may not assume any particular format of
10117 the buffer).
10118 </desc>
10119 </const>
10120 <const name="FOURCC_RGB" value="0x32424752">
10121 <desc>
10122 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10123 bit layout).
10124 </desc>
10125 </const>
10126 </enum>
10127
10128 <interface
10129 name="IFramebuffer" extends="$unknown"
10130 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10131 wsmap="suppress"
10132 >
10133 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10134 <desc>Address of the start byte of the frame buffer.</desc>
10135 </attribute>
10136
10137 <attribute name="width" type="unsigned long" readonly="yes">
10138 <desc>Frame buffer width, in pixels.</desc>
10139 </attribute>
10140
10141 <attribute name="height" type="unsigned long" readonly="yes">
10142 <desc>Frame buffer height, in pixels.</desc>
10143 </attribute>
10144
10145 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10146 <desc>
10147 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10148 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10149 are: 8, 15, 16, 24 and 32.
10150 </desc>
10151 </attribute>
10152
10153 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10154 <desc>
10155 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10156 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
10157 size of the scan line must be aligned to 32 bits.
10158 </desc>
10159 </attribute>
10160
10161 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10162 <desc>
10163 Frame buffer pixel format. It's either one of the values defined by <link
10164 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10165 <note>
10166 This attribute must never return <link
10167 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
10168 <link to="#address"/> points to must be always known.
10169 </note>
10170 </desc>
10171 </attribute>
10172
10173 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10174 <desc>
10175 Defines whether this frame buffer uses the virtual video card's memory
10176 buffer (guest VRAM) directly or not. See <link
10177 to="IFramebuffer::requestResize"/> for more information.
10178 </desc>
10179 </attribute>
10180
10181 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10182 <desc>
10183 Hint from the frame buffer about how much of the standard
10184 screen height it wants to use for itself. This information is
10185 exposed to the guest through the VESA BIOS and VMMDev interface
10186 so that it can use it for determining its video mode table. It
10187 is not guaranteed that the guest respects the value.
10188 </desc>
10189 </attribute>
10190
10191 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10192 <desc>
10193 An alpha-blended overlay which is superposed over the frame buffer.
10194 The initial purpose is to allow the display of icons providing
10195 information about the VM state, including disk activity, in front
10196 ends which do not have other means of doing that. The overlay is
10197 designed to controlled exclusively by IDisplay. It has no locking
10198 of its own, and any changes made to it are not guaranteed to be
10199 visible until the affected portion of IFramebuffer is updated. The
10200 overlay can be created lazily the first time it is requested. This
10201 attribute can also return @c null to signal that the overlay is not
10202 implemented.
10203 </desc>
10204 </attribute>
10205
10206 <attribute name="winId" type="unsigned long long" readonly="yes">
10207 <desc>
10208 Platform-dependent identifier of the window where context of this
10209 frame buffer is drawn, or zero if there's no such window.
10210 </desc>
10211 </attribute>
10212
10213 <method name="lock">
10214 <desc>
10215 Locks the frame buffer.
10216 Gets called by the IDisplay object where this frame buffer is
10217 bound to.
10218 </desc>
10219 </method>
10220
10221 <method name="unlock">
10222 <desc>
10223 Unlocks the frame buffer.
10224 Gets called by the IDisplay object where this frame buffer is
10225 bound to.
10226 </desc>
10227 </method>
10228
10229 <method name="notifyUpdate">
10230 <desc>
10231 Informs about an update.
10232 Gets called by the display object where this buffer is
10233 registered.
10234 </desc>
10235 <param name="x" type="unsigned long" dir="in"/>
10236 <param name="y" type="unsigned long" dir="in"/>
10237 <param name="width" type="unsigned long" dir="in"/>
10238 <param name="height" type="unsigned long" dir="in"/>
10239 </method>
10240
10241 <method name="requestResize">
10242 <desc>
10243 Requests a size and pixel format change.
10244
10245 There are two modes of working with the video buffer of the virtual
10246 machine. The <i>indirect</i> mode implies that the IFramebuffer
10247 implementation allocates a memory buffer for the requested display mode
10248 and provides it to the virtual machine. In <i>direct</i> mode, the
10249 IFramebuffer implementation uses the memory buffer allocated and owned
10250 by the virtual machine. This buffer represents the video memory of the
10251 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10252 usually faster because the implementation gets a raw pointer to the
10253 guest VRAM buffer which it can directly use for visualizing the contents
10254 of the virtual display, as opposed to the indirect mode where the
10255 contents of guest VRAM are copied to the memory buffer provided by
10256 the implementation every time a display update occurs.
10257
10258 It is important to note that the direct mode is really fast only when
10259 the implementation uses the given guest VRAM buffer directly, for
10260 example, by blitting it to the window representing the virtual machine's
10261 display, which saves at least one copy operation comparing to the
10262 indirect mode. However, using the guest VRAM buffer directly is not
10263 always possible: the format and the color depth of this buffer may be
10264 not supported by the target window, or it may be unknown (opaque) as in
10265 case of text or non-linear multi-plane VGA video modes. In this case,
10266 the indirect mode (that is always available) should be used as a
10267 fallback: when the guest VRAM contents are copied to the
10268 implementation-provided memory buffer, color and format conversion is
10269 done automatically by the underlying code.
10270
10271 The @a pixelFormat parameter defines whether the direct mode is
10272 available or not. If @a pixelFormat is <link
10273 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
10274 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10275 @a bytesPerLine parameters must be ignored and the implementation must use
10276 the indirect mode (where it provides its own buffer in one of the
10277 supported formats). In all other cases, @a pixelFormat together with
10278 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10279 buffer pointed to by the @a VRAM parameter and the implementation is
10280 free to choose which mode to use. To indicate that this frame buffer uses
10281 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10282 attribute must return @c true and <link to="#address"/> must
10283 return exactly the same address that is passed in the @a VRAM parameter
10284 of this method; otherwise it is assumed that the indirect strategy is
10285 chosen.
10286
10287 The @a width and @a height parameters represent the size of the
10288 requested display mode in both modes. In case of indirect mode, the
10289 provided memory buffer should be big enough to store data of the given
10290 display mode. In case of direct mode, it is guaranteed that the given
10291 @a VRAM buffer contains enough space to represent the display mode of the
10292 given size. Note that this frame buffer's <link to="#width"/> and <link
10293 to="#height"/> attributes must return exactly the same values as
10294 passed to this method after the resize is completed (see below).
10295
10296 The @a finished output parameter determines if the implementation has
10297 finished resizing the frame buffer or not. If, for some reason, the
10298 resize cannot be finished immediately during this call, @a finished
10299 must be set to @c false, and the implementation must call
10300 <link to="IDisplay::resizeCompleted"/> after it has returned from
10301 this method as soon as possible. If @a finished is @c false, the
10302 machine will not call any frame buffer methods until
10303 <link to="IDisplay::resizeCompleted"/> is called.
10304
10305 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10306 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10307 this frame buffer must return exactly the same values as specified in the
10308 parameters of this method, after the resize is completed. If the
10309 indirect mode is chosen, these attributes must return values describing
10310 the format of the implementation's own memory buffer <link
10311 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10312 value must always correlate with <link to="#pixelFormat"/>. Note that
10313 the <link to="#pixelFormat"/> attribute must never return <link
10314 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
10315
10316 <note>
10317 This method is called by the IDisplay object under the
10318 <link to="#lock"/> provided by this IFramebuffer
10319 implementation. If this method returns @c false in @a finished, then
10320 this lock is not released until
10321 <link to="IDisplay::resizeCompleted"/> is called.
10322 </note>
10323 </desc>
10324 <param name="screenId" type="unsigned long" dir="in">
10325 <desc>
10326 Logical screen number. Must be used in the corresponding call to
10327 <link to="IDisplay::resizeCompleted"/> if this call is made.
10328 </desc>
10329 </param>
10330 <param name="pixelFormat" type="unsigned long" dir="in">
10331 <desc>
10332 Pixel format of the memory buffer pointed to by @a VRAM.
10333 See also <link to="FramebufferPixelFormat"/>.
10334 </desc>
10335 </param>
10336 <param name="VRAM" type="octet" mod="ptr" dir="in">
10337 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10338 </param>
10339 <param name="bitsPerPixel" type="unsigned long" dir="in">
10340 <desc>Color depth, bits per pixel.</desc>
10341 </param>
10342 <param name="bytesPerLine" type="unsigned long" dir="in">
10343 <desc>Size of one scan line, in bytes.</desc>
10344 </param>
10345 <param name="width" type="unsigned long" dir="in">
10346 <desc>Width of the guest display, in pixels.</desc>
10347 </param>
10348 <param name="height" type="unsigned long" dir="in">
10349 <desc>Height of the guest display, in pixels.</desc>
10350 </param>
10351 <param name="finished" type="boolean" dir="return">
10352 <desc>
10353 Can the VM start using the new frame buffer immediately
10354 after this method returns or it should wait for
10355 <link to="IDisplay::resizeCompleted"/>.
10356 </desc>
10357 </param>
10358 </method>
10359
10360 <method name="videoModeSupported">
10361 <desc>
10362 Returns whether the frame buffer implementation is willing to
10363 support a given video mode. In case it is not able to render
10364 the video mode (or for some reason not willing), it should
10365 return @c false. Usually this method is called when the guest
10366 asks the VMM device whether a given video mode is supported
10367 so the information returned is directly exposed to the guest.
10368 It is important that this method returns very quickly.
10369 </desc>
10370 <param name="width" type="unsigned long" dir="in"/>
10371 <param name="height" type="unsigned long" dir="in"/>
10372 <param name="bpp" type="unsigned long" dir="in"/>
10373 <param name="supported" type="boolean" dir="return"/>
10374 </method>
10375
10376 <method name="getVisibleRegion">
10377 <desc>
10378 Returns the visible region of this frame buffer.
10379
10380 If the @a rectangles parameter is @c null then the value of the
10381 @a count parameter is ignored and the number of elements necessary to
10382 describe the current visible region is returned in @a countCopied.
10383
10384 If @a rectangles is not @c null but @a count is less
10385 than the required number of elements to store region data, the method
10386 will report a failure. If @a count is equal or greater than the
10387 required number of elements, then the actual number of elements copied
10388 to the provided array will be returned in @a countCopied.
10389
10390 <note>
10391 The address of the provided array must be in the process space of
10392 this IFramebuffer object.
10393 </note>
10394 <note>
10395 Method not yet implemented.
10396 </note>
10397 </desc>
10398 <param name="rectangles" type="octet" mod="ptr" dir="in">
10399 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10400 </param>
10401 <param name="count" type="unsigned long" dir="in">
10402 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10403 </param>
10404 <param name="countCopied" type="unsigned long" dir="return">
10405 <desc>Number of elements copied to the @a rectangles array.</desc>
10406 </param>
10407 </method>
10408
10409 <method name="setVisibleRegion">
10410 <desc>
10411 Suggests a new visible region to this frame buffer. This region
10412 represents the area of the VM display which is a union of regions of
10413 all top-level windows of the guest operating system running inside the
10414 VM (if the Guest Additions for this system support this
10415 functionality). This information may be used by the frontends to
10416 implement the seamless desktop integration feature.
10417
10418 <note>
10419 The address of the provided array must be in the process space of
10420 this IFramebuffer object.
10421 </note>
10422 <note>
10423 The IFramebuffer implementation must make a copy of the provided
10424 array of rectangles.
10425 </note>
10426 <note>
10427 Method not yet implemented.
10428 </note>
10429 </desc>
10430 <param name="rectangles" type="octet" mod="ptr" dir="in">
10431 <desc>Pointer to the @c RTRECT array.</desc>
10432 </param>
10433 <param name="count" type="unsigned long" dir="in">
10434 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10435 </param>
10436 </method>
10437
10438 <method name="processVHWACommand">
10439 <desc>
10440 Posts a Video HW Acceleration Command to the frame buffer for processing.
10441 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10442 are posted from quest to the host to be processed by the host hardware.
10443
10444 <note>
10445 The address of the provided command must be in the process space of
10446 this IFramebuffer object.
10447 </note>
10448 </desc>
10449
10450 <param name="command" type="octet" mod="ptr" dir="in">
10451 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10452 </param>
10453 </method>
10454
10455 </interface>
10456
10457 <interface
10458 name="IFramebufferOverlay" extends="IFramebuffer"
10459 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10460 wsmap="suppress"
10461 >
10462 <desc>
10463 The IFramebufferOverlay interface represents an alpha blended overlay
10464 for displaying status icons above an IFramebuffer. It is always created
10465 not visible, so that it must be explicitly shown. It only covers a
10466 portion of the IFramebuffer, determined by its width, height and
10467 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10468 that order) format, and may be written to directly. Do re-read the
10469 width though, after setting it, as it may be adjusted (increased) to
10470 make it more suitable for the front end.
10471 </desc>
10472 <attribute name="x" type="unsigned long" readonly="yes">
10473 <desc>X position of the overlay, relative to the frame buffer.</desc>
10474 </attribute>
10475
10476 <attribute name="y" type="unsigned long" readonly="yes">
10477 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10478 </attribute>
10479
10480 <attribute name="visible" type="boolean" readonly="no">
10481 <desc>
10482 Whether the overlay is currently visible.
10483 </desc>
10484 </attribute>
10485
10486 <attribute name="alpha" type="unsigned long" readonly="no">
10487 <desc>
10488 The global alpha value for the overlay. This may or may not be
10489 supported by a given front end.
10490 </desc>
10491 </attribute>
10492
10493 <method name="move">
10494 <desc>
10495 Changes the overlay's position relative to the IFramebuffer.
10496 </desc>
10497 <param name="x" type="unsigned long" dir="in"/>
10498 <param name="y" type="unsigned long" dir="in"/>
10499 </method>
10500
10501 </interface>
10502
10503 <interface
10504 name="IDisplay" extends="$unknown"
10505 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
10506 wsmap="managed"
10507 >
10508 <desc>
10509 The IDisplay interface represents the virtual machine's display.
10510
10511 The object implementing this interface is contained in each
10512 <link to="IConsole::display"/> attribute and represents the visual
10513 output of the virtual machine.
10514
10515 The virtual display supports pluggable output targets represented by the
10516 IFramebuffer interface. Examples of the output target are a window on
10517 the host computer or an RDP session's display on a remote computer.
10518 </desc>
10519 <attribute name="width" type="unsigned long" readonly="yes">
10520 <desc>Current display width.</desc>
10521 </attribute>
10522
10523 <attribute name="height" type="unsigned long" readonly="yes">
10524 <desc>Current display height.</desc>
10525 </attribute>
10526
10527 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10528 <desc>
10529 Current guest display color depth. Note that this may differ
10530 from <link to="IFramebuffer::bitsPerPixel"/>.
10531 </desc>
10532 </attribute>
10533
10534 <method name="setFramebuffer">
10535 <desc>
10536 Sets the framebuffer for given screen.
10537 </desc>
10538 <param name="screenId" type="unsigned long" dir="in"/>
10539 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10540 </method>
10541
10542 <method name="getFramebuffer">
10543 <desc>
10544 Queries the framebuffer for given screen.
10545 </desc>
10546 <param name="screenId" type="unsigned long" dir="in"/>
10547 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10548 <param name="xOrigin" type="long" dir="out"/>
10549 <param name="yOrigin" type="long" dir="out"/>
10550 </method>
10551
10552 <method name="setVideoModeHint">
10553 <desc>
10554 Asks VirtualBox to request the given video mode from
10555 the guest. This is just a hint and it cannot be guaranteed
10556 that the requested resolution will be used. Guest Additions
10557 are required for the request to be seen by guests. The caller
10558 should issue the request and wait for a resolution change and
10559 after a timeout retry.
10560
10561 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10562 parameters means that the corresponding values should be taken from the
10563 current video mode (i.e. left unchanged).
10564
10565 If the guest OS supports multi-monitor configuration then the @a display
10566 parameter specifies the number of the guest display to send the hint to:
10567 @c 0 is the primary display, @c 1 is the first secondary and
10568 so on. If the multi-monitor configuration is not supported, @a display
10569 must be @c 0.
10570
10571 <result name="E_INVALIDARG">
10572 The @a display is not associated with any monitor.
10573 </result>
10574
10575 </desc>
10576 <param name="width" type="unsigned long" dir="in"/>
10577 <param name="height" type="unsigned long" dir="in"/>
10578 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10579 <param name="display" type="unsigned long" dir="in"/>
10580 </method>
10581
10582 <method name="setSeamlessMode">
10583 <desc>
10584 Enables or disables seamless guest display rendering (seamless desktop
10585 integration) mode.
10586 <note>
10587 Calling this method has no effect if <link
10588 to="IGuest::supportsSeamless"/> returns @c false.
10589 </note>
10590 </desc>
10591 <param name="enabled" type="boolean" dir="in"/>
10592 </method>
10593
10594 <method name="takeScreenShot">
10595 <desc>
10596 Takes a screen shot of the requested size and copies it to the
10597 32-bpp buffer allocated by the caller and pointed to by @a address.
10598
10599 <note>This API can be used only by the COM/XPCOM C++ API as it
10600 requires pointer support. Use <link to="#takeScreenShotSlow" />
10601 with other language bindings.
10602 </note>
10603
10604 <result name="E_NOTIMPL">
10605 Feature not implemented.
10606 </result>
10607 <result name="VBOX_E_IPRT_ERROR">
10608 Could not take a screenshot.
10609 </result>
10610
10611 </desc>
10612 <param name="address" type="octet" mod="ptr" dir="in"/>
10613 <param name="width" type="unsigned long" dir="in"/>
10614 <param name="height" type="unsigned long" dir="in"/>
10615 </method>
10616
10617 <method name="takeScreenShotSlow">
10618 <desc>
10619 Takes a guest screen shot of the requested size and returns it as
10620 an array of bytes in uncompressed 32-bit ARGB format.
10621 This API is slow, but could be the only option to get guest screenshot
10622 for scriptable languages not allowed to manipulate with addresses
10623 directly.
10624
10625 <result name="E_NOTIMPL">
10626 Feature not implemented.
10627 </result>
10628 <result name="VBOX_E_IPRT_ERROR">
10629 Could not take a screenshot.
10630 </result>
10631 </desc>
10632 <param name="width" type="unsigned long" dir="in">
10633 <desc>
10634 Desired image width.
10635 </desc>
10636 </param>
10637 <param name="height" type="unsigned long" dir="in">
10638 <desc>
10639 Desired image height.
10640 </desc>
10641 </param>
10642 <param name="screenData" type="octet" dir="return" safearray="yes">
10643 <desc>
10644 Array with resulting screen data.
10645 </desc>
10646 </param>
10647 </method>
10648
10649 <method name="drawToScreen">
10650 <desc>
10651 Draws a 32-bpp image of the specified size from the given buffer
10652 to the given point on the VM display.
10653
10654 <result name="E_NOTIMPL">
10655 Feature not implemented.
10656 </result>
10657 <result name="VBOX_E_IPRT_ERROR">
10658 Could not draw to screen.
10659 </result>
10660
10661 </desc>
10662 <param name="address" type="octet" mod="ptr" dir="in"/>
10663 <param name="x" type="unsigned long" dir="in"/>
10664 <param name="y" type="unsigned long" dir="in"/>
10665 <param name="width" type="unsigned long" dir="in"/>
10666 <param name="height" type="unsigned long" dir="in"/>
10667 </method>
10668
10669 <method name="invalidateAndUpdate">
10670 <desc>
10671 Does a full invalidation of the VM display and instructs the VM
10672 to update it.
10673
10674 <result name="VBOX_E_IPRT_ERROR">
10675 Could not invalidate and update screen.
10676 </result>
10677
10678 </desc>
10679 </method>
10680
10681 <method name="resizeCompleted">
10682 <desc>
10683 Signals that a framebuffer has completed the resize operation.
10684
10685 <result name="VBOX_E_NOT_SUPPORTED">
10686 Operation only valid for external frame buffers.
10687 </result>
10688
10689 </desc>
10690 <param name="screenId" type="unsigned long" dir="in"/>
10691 </method>
10692
10693 <method name="updateCompleted">
10694 <desc>
10695 Signals that a framebuffer has completed the update operation.
10696
10697 <result name="VBOX_E_NOT_SUPPORTED">
10698 Operation only valid for external frame buffers.
10699 </result>
10700
10701 </desc>
10702 </method>
10703
10704 <method name="completeVHWACommand">
10705 <desc>
10706 Signals that the Video HW Acceleration command has completed.
10707 </desc>
10708
10709 <param name="command" type="octet" mod="ptr" dir="in">
10710 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10711 </param>
10712 </method>
10713
10714 </interface>
10715
10716 <!--
10717 // INetworkAdapter
10718 /////////////////////////////////////////////////////////////////////////
10719 -->
10720
10721 <enum
10722 name="NetworkAttachmentType"
10723 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10724 >
10725 <desc>
10726 Network attachment type.
10727 </desc>
10728
10729 <const name="Null" value="0">
10730 <desc>Null value, also means "not attached".</desc>
10731 </const>
10732 <const name="NAT" value="1"/>
10733 <const name="Bridged" value="2"/>
10734 <const name="Internal" value="3"/>
10735 <const name="HostOnly" value="4"/>
10736 </enum>
10737
10738 <enum
10739 name="NetworkAdapterType"
10740 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10741 >
10742 <desc>
10743 Network adapter type.
10744 </desc>
10745
10746 <const name="Null" value="0">
10747 <desc>Null value (never used by the API).</desc>
10748 </const>
10749 <const name="Am79C970A" value="1">
10750 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10751 </const>
10752 <const name="Am79C973" value="2">
10753 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10754 </const>
10755 <const name="I82540EM" value="3">
10756 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10757 </const>
10758 <const name="I82543GC" value="4">
10759 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10760 </const>
10761 <const name="I82545EM" value="5">
10762 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10763 </const>
10764 <const name="Virtio" value="6">
10765 <desc>Virtio network device.</desc>
10766 </const>
10767 </enum>
10768
10769 <interface
10770 name="INetworkAdapter" extends="$unknown"
10771 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
10772 wsmap="managed"
10773 >
10774 <desc>
10775 Represents a virtual network adapter that is attached to a virtual machine.
10776 Each virtual machine has a fixed number of network adapter slots with one
10777 instance of this attached to each of them. Call
10778 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10779 is attached to a given slot in a given machine.
10780
10781 Each network adapter can be in one of five attachment modes, which are
10782 represented by the <link to="NetworkAttachmentType" /> enumeration;
10783 see the <link to="#attachmentType" /> attribute.
10784 </desc>
10785
10786 <attribute name="adapterType" type="NetworkAdapterType">
10787 <desc>
10788 Type of the virtual network adapter. Depending on this value,
10789 VirtualBox will provide a different virtual network hardware
10790 to the guest.
10791 </desc>
10792 </attribute>
10793
10794 <attribute name="slot" type="unsigned long" readonly="yes">
10795 <desc>
10796 Slot number this adapter is plugged into. Corresponds to
10797 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10798 to obtain this instance.
10799 </desc>
10800 </attribute>
10801
10802 <attribute name="enabled" type="boolean">
10803 <desc>
10804 Flag whether the network adapter is present in the
10805 guest system. If disabled, the virtual guest hardware will
10806 not contain this network adapter. Can only be changed when
10807 the VM is not running.
10808 </desc>
10809 </attribute>
10810
10811 <attribute name="MACAddress" type="wstring">
10812 <desc>
10813 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
10814 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
10815 </desc>
10816 </attribute>
10817
10818 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
10819
10820 <attribute name="hostInterface" type="wstring">
10821 <desc>
10822 Name of the host network interface the VM is attached to.
10823 </desc>
10824 </attribute>
10825
10826 <attribute name="internalNetwork" type="wstring">
10827 <desc>
10828 Name of the internal network the VM is attached to.
10829 </desc>
10830 </attribute>
10831
10832 <attribute name="NATNetwork" type="wstring">
10833 <desc>
10834 Name of the NAT network the VM is attached to.
10835 </desc>
10836 </attribute>
10837
10838 <attribute name="cableConnected" type="boolean">
10839 <desc>
10840 Flag whether the adapter reports the cable as connected or not.
10841 It can be used to report offline situations to a VM.
10842 </desc>
10843 </attribute>
10844
10845 <attribute name="lineSpeed" type="unsigned long">
10846 <desc>
10847 Line speed reported by custom drivers, in units of 1 kbps.
10848 </desc>
10849 </attribute>
10850
10851 <attribute name="traceEnabled" type="boolean">
10852 <desc>
10853 Flag whether network traffic from/to the network card should be traced.
10854 Can only be toggled when the VM is turned off.
10855 </desc>
10856 </attribute>
10857
10858 <attribute name="traceFile" type="wstring">
10859 <desc>
10860 Filename where a network trace will be stored. If not set, VBox-pid.pcap
10861 will be used.
10862 </desc>
10863 </attribute>
10864
10865 <method name="attachToNAT">
10866 <desc>
10867 Attach the network adapter to the Network Address Translation (NAT) interface.
10868 </desc>
10869 </method>
10870
10871 <method name="attachToBridgedInterface">
10872 <desc>
10873 Attach the network adapter to a bridged host interface.
10874 </desc>
10875 </method>
10876
10877 <method name="attachToInternalNetwork">
10878 <desc>
10879 Attach the network adapter to an internal network.
10880 </desc>
10881 </method>
10882
10883 <method name="attachToHostOnlyInterface">
10884 <desc>
10885 Attach the network adapter to the host-only network.
10886 </desc>
10887 </method>
10888
10889 <method name="detach">
10890 <desc>
10891 Detach the network adapter
10892 </desc>
10893 </method>
10894 </interface>
10895
10896
10897 <!--
10898 // ISerialPort
10899 /////////////////////////////////////////////////////////////////////////
10900 -->
10901
10902 <enum
10903 name="PortMode"
10904 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
10905 >
10906 <desc>
10907 The PortMode enumeration represents possible communication modes for
10908 the virtual serial port device.
10909 </desc>
10910
10911 <const name="Disconnected" value="0">
10912 <desc>Virtual device is not attached to any real host device.</desc>
10913 </const>
10914 <const name="HostPipe" value="1">
10915 <desc>Virtual device is attached to a host pipe.</desc>
10916 </const>
10917 <const name="HostDevice" value="2">
10918 <desc>Virtual device is attached to a host device.</desc>
10919 </const>
10920 <const name="RawFile" value="3">
10921 <desc>Virtual device is attached to a raw file.</desc>
10922 </const>
10923 </enum>
10924
10925 <interface
10926 name="ISerialPort" extends="$unknown"
10927 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
10928 wsmap="managed"
10929 >
10930
10931 <desc>
10932 The ISerialPort interface represents the virtual serial port device.
10933
10934 The virtual serial port device acts like an ordinary serial port
10935 inside the virtual machine. This device communicates to the real
10936 serial port hardware in one of two modes: host pipe or host device.
10937
10938 In host pipe mode, the #path attribute specifies the path to the pipe on
10939 the host computer that represents a serial port. The #server attribute
10940 determines if this pipe is created by the virtual machine process at
10941 machine startup or it must already exist before starting machine
10942 execution.
10943
10944 In host device mode, the #path attribute specifies the name of the
10945 serial port device on the host computer.
10946
10947 There is also a third communication mode: the disconnected mode. In this
10948 mode, the guest OS running inside the virtual machine will be able to
10949 detect the serial port, but all port write operations will be discarded
10950 and all port read operations will return no data.
10951
10952 <see>IMachine::getSerialPort</see>
10953 </desc>
10954
10955 <attribute name="slot" type="unsigned long" readonly="yes">
10956 <desc>
10957 Slot number this serial port is plugged into. Corresponds to
10958 the value you pass to <link to="IMachine::getSerialPort"/>
10959 to obtain this instance.
10960 </desc>
10961 </attribute>
10962
10963 <attribute name="enabled" type="boolean">
10964 <desc>
10965 Flag whether the serial port is enabled. If disabled,
10966 the serial port will not be reported to the guest OS.
10967 </desc>
10968 </attribute>
10969
10970 <attribute name="IOBase" type="unsigned long">
10971 <desc>Base I/O address of the serial port.</desc>
10972 </attribute>
10973
10974 <attribute name="IRQ" type="unsigned long">
10975 <desc>IRQ number of the serial port.</desc>
10976 </attribute>
10977
10978 <attribute name="hostMode" type="PortMode">
10979 <desc>
10980 How is this port connected to the host.
10981 <note>
10982 Changing this attribute may fail if the conditions for
10983 <link to="#path"/> are not met.
10984 </note>
10985 </desc>
10986 </attribute>
10987
10988 <attribute name="server" type="boolean">
10989 <desc>
10990 Flag whether this serial port acts as a server (creates a new pipe on
10991 the host) or as a client (uses the existing pipe). This attribute is
10992 used only when <link to="#hostMode"/> is PortMode_HostPipe.
10993 </desc>
10994 </attribute>
10995
10996 <attribute name="path" type="wstring">
10997 <desc>
10998 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
10999 PortMode_HostPipe, or the host serial device name when
11000 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11001 cases, setting a @c null or empty string as the attribute's value
11002 is an error. Otherwise, the value of this property is ignored.
11003 </desc>
11004 </attribute>
11005
11006 </interface>
11007
11008 <!--
11009 // IParallelPort
11010 /////////////////////////////////////////////////////////////////////////
11011 -->
11012
11013 <interface
11014 name="IParallelPort" extends="$unknown"
11015 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11016 wsmap="managed"
11017 >
11018
11019 <desc>
11020 The IParallelPort interface represents the virtual parallel port device.
11021
11022 The virtual parallel port device acts like an ordinary parallel port
11023 inside the virtual machine. This device communicates to the real
11024 parallel port hardware using the name of the parallel device on the host
11025 computer specified in the #path attribute.
11026
11027 Each virtual parallel port device is assigned a base I/O address and an
11028 IRQ number that will be reported to the guest operating system and used
11029 to operate the given parallel port from within the virtual machine.
11030
11031 <see>IMachine::getParallelPort</see>
11032 </desc>
11033
11034 <attribute name="slot" type="unsigned long" readonly="yes">
11035 <desc>
11036 Slot number this parallel port is plugged into. Corresponds to
11037 the value you pass to <link to="IMachine::getParallelPort"/>
11038 to obtain this instance.
11039 </desc>
11040 </attribute>
11041
11042 <attribute name="enabled" type="boolean">
11043 <desc>
11044 Flag whether the parallel port is enabled. If disabled,
11045 the parallel port will not be reported to the guest OS.
11046 </desc>
11047 </attribute>
11048
11049 <attribute name="IOBase" type="unsigned long">
11050 <desc>Base I/O address of the parallel port.</desc>
11051 </attribute>
11052
11053 <attribute name="IRQ" type="unsigned long">
11054 <desc>IRQ number of the parallel port.</desc>
11055 </attribute>
11056
11057 <attribute name="path" type="wstring">
11058 <desc>
11059 Host parallel device name. If this parallel port is enabled, setting a
11060 @c null or an empty string as this attribute's value will result into
11061 an error.
11062 </desc>
11063 </attribute>
11064
11065 </interface>
11066
11067
11068 <!--
11069 // IMachineDebugger
11070 /////////////////////////////////////////////////////////////////////////
11071 -->
11072
11073 <interface
11074 name="IMachineDebugger" extends="$unknown"
11075 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11076 wsmap="suppress"
11077 >
11078 <method name="resetStats">
11079 <desc>
11080 Reset VM statistics.
11081 </desc>
11082 <param name="pattern" type="wstring" dir="in">
11083 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11084 </param>
11085 </method>
11086
11087 <method name="dumpStats">
11088 <desc>
11089 Dumps VM statistics.
11090 </desc>
11091 <param name="pattern" type="wstring" dir="in">
11092 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11093 </param>
11094 </method>
11095
11096 <method name="getStats">
11097 <desc>
11098 Get the VM statistics in a XMLish format.
11099 </desc>
11100 <param name="pattern" type="wstring" dir="in">
11101 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11102 </param>
11103 <param name="withDescriptions" type="boolean" dir="in">
11104 <desc>Whether to include the descriptions.</desc>
11105 </param>
11106 <param name="stats" type="wstring" dir="out">
11107 <desc>The XML document containing the statistics.</desc>
11108 </param>
11109 </method>
11110
11111 <method name="injectNMI">
11112 <desc>
11113 Inject an NMI into a running VT-x/AMD-V VM.
11114 </desc>
11115 </method>
11116
11117 <attribute name="singlestep" type="boolean">
11118 <desc>Switch for enabling singlestepping.</desc>
11119 </attribute>
11120
11121 <attribute name="recompileUser" type="boolean">
11122 <desc>Switch for forcing code recompilation for user mode code.</desc>
11123 </attribute>
11124
11125 <attribute name="recompileSupervisor" type="boolean">
11126 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11127 </attribute>
11128
11129 <attribute name="PATMEnabled" type="boolean">
11130 <desc>Switch for enabling and disabling the PATM component.</desc>
11131 </attribute>
11132
11133 <attribute name="CSAMEnabled" type="boolean">
11134 <desc>Switch for enabling and disabling the CSAM component.</desc>
11135 </attribute>
11136
11137 <attribute name="logEnabled" type="boolean">
11138 <desc>Switch for enabling and disabling logging.</desc>
11139 </attribute>
11140
11141 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11142 <desc>
11143 Flag indicating whether the VM is currently making use of CPU hardware
11144 virtualization extensions.
11145 </desc>
11146 </attribute>
11147
11148 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11149 <desc>
11150 Flag indicating whether the VM is currently making use of the nested paging
11151 CPU hardware virtualization extension.
11152 </desc>
11153 </attribute>
11154
11155 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11156 <desc>
11157 Flag indicating whether the VM is currently making use of the VPID
11158 VT-x extension.
11159 </desc>
11160 </attribute>
11161
11162 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11163 <desc>
11164 Flag indicating whether the VM is currently making use of the Physical
11165 Address Extension CPU feature.
11166 </desc>
11167 </attribute>
11168
11169 <attribute name="virtualTimeRate" type="unsigned long">
11170 <desc>
11171 The rate at which the virtual time runs expressed as a percentage.
11172 The accepted range is 2% to 20000%.
11173 </desc>
11174 </attribute>
11175
11176 <!-- @todo method for setting log flags, groups and destination! -->
11177
11178 <attribute name="VM" type="unsigned long long" readonly="yes">
11179 <desc>
11180 Gets the VM handle. This is only for internal use while
11181 we carve the details of this interface.
11182 </desc>
11183 </attribute>
11184
11185 </interface>
11186
11187 <!--
11188 // IUSBController
11189 /////////////////////////////////////////////////////////////////////////
11190 -->
11191
11192 <interface
11193 name="IUSBController" extends="$unknown"
11194 uuid="238540fa-4b73-435a-a38e-4e1d9eab5c17"
11195 wsmap="managed"
11196 >
11197 <attribute name="enabled" type="boolean">
11198 <desc>
11199 Flag whether the USB controller is present in the
11200 guest system. If disabled, the virtual guest hardware will
11201 not contain any USB controller. Can only be changed when
11202 the VM is powered off.
11203 </desc>
11204 </attribute>
11205
11206 <attribute name="enabledEhci" type="boolean">
11207 <desc>
11208 Flag whether the USB EHCI controller is present in the
11209 guest system. If disabled, the virtual guest hardware will
11210 not contain a USB EHCI controller. Can only be changed when
11211 the VM is powered off.
11212 </desc>
11213 </attribute>
11214
11215 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11216 <desc>
11217 USB standard version which the controller implements.
11218 This is a BCD which means that the major version is in the
11219 high byte and minor version is in the low byte.
11220 </desc>
11221 </attribute>
11222
11223 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11224 <desc>
11225 List of USB device filters associated with the machine.
11226
11227 If the machine is currently running, these filters are activated
11228 every time a new (supported) USB device is attached to the host
11229 computer that was not ignored by global filters
11230 (<link to="IHost::USBDeviceFilters"/>).
11231
11232 These filters are also activated when the machine is powered up.
11233 They are run against a list of all currently available USB
11234 devices (in states
11235 <link to="USBDeviceState_Available"/>,
11236 <link to="USBDeviceState_Busy"/>,
11237 <link to="USBDeviceState_Held"/>) that were not previously
11238 ignored by global filters.
11239
11240 If at least one filter matches the USB device in question, this
11241 device is automatically captured (attached to) the virtual USB
11242 controller of this machine.
11243
11244 <see>IUSBDeviceFilter, ::IUSBController</see>
11245 </desc>
11246 </attribute>
11247
11248 <method name="createDeviceFilter">
11249 <desc>
11250 Creates a new USB device filter. All attributes except
11251 the filter name are set to empty (any match),
11252 <i>active</i> is @c false (the filter is not active).
11253
11254 The created filter can then be added to the list of filters using
11255 <link to="#insertDeviceFilter"/>.
11256
11257 <result name="VBOX_E_INVALID_VM_STATE">
11258 The virtual machine is not mutable.
11259 </result>
11260
11261 <see>#deviceFilters</see>
11262 </desc>
11263 <param name="name" type="wstring" dir="in">
11264 <desc>
11265 Filter name. See <link to="IUSBDeviceFilter::name"/>
11266 for more info.
11267 </desc>
11268 </param>
11269 <param name="filter" type="IUSBDeviceFilter" dir="return">
11270 <desc>Created filter object.</desc>
11271 </param>
11272 </method>
11273
11274 <method name="insertDeviceFilter">
11275 <desc>
11276 Inserts the given USB device to the specified position
11277 in the list of filters.
11278
11279 Positions are numbered starting from <tt>0</tt>. If the specified
11280 position is equal to or greater than the number of elements in
11281 the list, the filter is added to the end of the collection.
11282
11283 <note>
11284 Duplicates are not allowed, so an attempt to insert a
11285 filter that is already in the collection, will return an
11286 error.
11287 </note>
11288
11289 <result name="VBOX_E_INVALID_VM_STATE">
11290 Virtual machine is not mutable.
11291 </result>
11292 <result name="E_INVALIDARG">
11293 USB device filter not created within this VirtualBox instance.
11294 </result>
11295 <result name="VBOX_E_INVALID_OBJECT_STATE">
11296 USB device filter already in list.
11297 </result>
11298
11299 <see>#deviceFilters</see>
11300 </desc>
11301 <param name="position" type="unsigned long" dir="in">
11302 <desc>Position to insert the filter to.</desc>
11303 </param>
11304 <param name="filter" type="IUSBDeviceFilter" dir="in">
11305 <desc>USB device filter to insert.</desc>
11306 </param>
11307 </method>
11308
11309 <method name="removeDeviceFilter">
11310 <desc>
11311 Removes a USB device filter from the specified position in the
11312 list of filters.
11313
11314 Positions are numbered starting from <tt>0</tt>. Specifying a
11315 position equal to or greater than the number of elements in
11316 the list will produce an error.
11317
11318 <see>#deviceFilters</see>
11319
11320 <result name="VBOX_E_INVALID_VM_STATE">
11321 Virtual machine is not mutable.
11322 </result>
11323 <result name="E_INVALIDARG">
11324 USB device filter list empty or invalid @a position.
11325 </result>
11326
11327 </desc>
11328 <param name="position" type="unsigned long" dir="in">
11329 <desc>Position to remove the filter from.</desc>
11330 </param>
11331 <param name="filter" type="IUSBDeviceFilter" dir="return">
11332 <desc>Removed USB device filter.</desc>
11333 </param>
11334 </method>
11335
11336 </interface>
11337
11338
11339 <!--
11340 // IUSBDevice
11341 /////////////////////////////////////////////////////////////////////////
11342 -->
11343
11344 <interface
11345 name="IUSBDevice" extends="$unknown"
11346 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11347 wsmap="managed"
11348 >
11349 <desc>
11350 The IUSBDevice interface represents a virtual USB device attached to the
11351 virtual machine.
11352
11353 A collection of objects implementing this interface is stored in the
11354 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11355 attached to a running virtual machine's USB controller.
11356 </desc>
11357
11358 <attribute name="id" type="uuid" mod="string" readonly="yes">
11359 <desc>
11360 Unique USB device ID. This ID is built from #vendorId,
11361 #productId, #revision and #serialNumber.
11362 </desc>
11363 </attribute>
11364
11365 <attribute name="vendorId" type="unsigned short" readonly="yes">
11366 <desc>Vendor ID.</desc>
11367 </attribute>
11368
11369 <attribute name="productId" type="unsigned short" readonly="yes">
11370 <desc>Product ID.</desc>
11371 </attribute>
11372
11373 <attribute name="revision" type="unsigned short" readonly="yes">
11374 <desc>
11375 Product revision number. This is a packed BCD represented as
11376 unsigned short. The high byte is the integer part and the low
11377 byte is the decimal.
11378 </desc>
11379 </attribute>
11380
11381 <attribute name="manufacturer" type="wstring" readonly="yes">
11382 <desc>Manufacturer string.</desc>
11383 </attribute>
11384
11385 <attribute name="product" type="wstring" readonly="yes">
11386 <desc>Product string.</desc>
11387 </attribute>
11388
11389 <attribute name="serialNumber" type="wstring" readonly="yes">
11390 <desc>Serial number string.</desc>
11391 </attribute>
11392
11393 <attribute name="address" type="wstring" readonly="yes">
11394 <desc>Host specific address of the device.</desc>
11395 </attribute>
11396
11397 <attribute name="port" type="unsigned short" readonly="yes">
11398 <desc>
11399 Host USB port number the device is physically
11400 connected to.
11401 </desc>
11402 </attribute>
11403
11404 <attribute name="version" type="unsigned short" readonly="yes">
11405 <desc>
11406 The major USB version of the device - 1 or 2.
11407 </desc>
11408 </attribute>
11409
11410 <attribute name="portVersion" type="unsigned short" readonly="yes">
11411 <desc>
11412 The major USB version of the host USB port the device is
11413 physically connected to - 1 or 2. For devices not connected to
11414 anything this will have the same value as the version attribute.
11415 </desc>
11416 </attribute>
11417
11418 <attribute name="remote" type="boolean" readonly="yes">
11419 <desc>
11420 Whether the device is physically connected to a remote VRDP
11421 client or to a local host machine.
11422 </desc>
11423 </attribute>
11424
11425 </interface>
11426
11427
11428 <!--
11429 // IUSBDeviceFilter
11430 /////////////////////////////////////////////////////////////////////////
11431 -->
11432
11433 <interface
11434 name="IUSBDeviceFilter" extends="$unknown"
11435 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11436 wsmap="managed"
11437 >
11438 <desc>
11439 The IUSBDeviceFilter interface represents an USB device filter used
11440 to perform actions on a group of USB devices.
11441
11442 This type of filters is used by running virtual machines to
11443 automatically capture selected USB devices once they are physically
11444 attached to the host computer.
11445
11446 A USB device is matched to the given device filter if and only if all
11447 attributes of the device match the corresponding attributes of the
11448 filter (that is, attributes are joined together using the logical AND
11449 operation). On the other hand, all together, filters in the list of
11450 filters carry the semantics of the logical OR operation. So if it is
11451 desirable to create a match like "this vendor id OR this product id",
11452 one needs to create two filters and specify "any match" (see below)
11453 for unused attributes.
11454
11455 All filter attributes used for matching are strings. Each string
11456 is an expression representing a set of values of the corresponding
11457 device attribute, that will match the given filter. Currently, the
11458 following filtering expressions are supported:
11459
11460 <ul>
11461 <li><i>Interval filters</i>. Used to specify valid intervals for
11462 integer device attributes (Vendor ID, Product ID and Revision).
11463 The format of the string is:
11464
11465 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11466
11467 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11468 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11469 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11470 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11471 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11472 possible integer is assumed.
11473 </li>
11474 <li><i>Boolean filters</i>. Used to specify acceptable values for
11475 boolean device attributes. The format of the string is:
11476
11477 <tt>true|false|yes|no|0|1</tt>
11478
11479 </li>
11480 <li><i>Exact match</i>. Used to specify a single value for the given
11481 device attribute. Any string that doesn't start with <tt>int:</tt>
11482 represents the exact match. String device attributes are compared to
11483 this string including case of symbols. Integer attributes are first
11484 converted to a string (see individual filter attributes) and then
11485 compared ignoring case.
11486
11487 </li>
11488 <li><i>Any match</i>. Any value of the corresponding device attribute
11489 will match the given filter. An empty or @c null string is
11490 used to construct this type of filtering expressions.
11491
11492 </li>
11493 </ul>
11494
11495 <note>
11496 On the Windows host platform, interval filters are not currently
11497 available. Also all string filter attributes
11498 (<link to="#manufacturer"/>, <link to="#product"/>,
11499 <link to="#serialNumber"/>) are ignored, so they behave as
11500 <i>any match</i> no matter what string expression is specified.
11501 </note>
11502
11503 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11504 </desc>
11505
11506 <attribute name="name" type="wstring">
11507 <desc>
11508 Visible name for this filter.
11509 This name is used to visually distinguish one filter from another,
11510 so it can neither be @c null nor an empty string.
11511 </desc>
11512 </attribute>
11513
11514 <attribute name="active" type="boolean">
11515 <desc>Whether this filter active or has been temporarily disabled.</desc>
11516 </attribute>
11517
11518 <attribute name="vendorId" type="wstring">
11519 <desc>
11520 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11521 The string representation for the <i>exact matching</i>
11522 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11523 (including leading zeroes).
11524 </desc>
11525 </attribute>
11526
11527 <attribute name="productId" type="wstring">
11528 <desc>
11529 <link to="IUSBDevice::productId">Product ID</link> filter.
11530 The string representation for the <i>exact matching</i>
11531 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11532 (including leading zeroes).
11533 </desc>
11534 </attribute>
11535
11536 <attribute name="revision" type="wstring">
11537 <desc>
11538 <link to="IUSBDevice::productId">Product revision number</link>
11539 filter. The string representation for the <i>exact matching</i>
11540 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11541 of the integer part of the revision, and <tt>F</tt> is the
11542 decimal digit of its fractional part (including leading and
11543 trailing zeros).
11544 Note that for interval filters, it's best to use the hexadecimal
11545 form, because the revision is stored as a 16 bit packed BCD value;
11546 so the expression <tt>int:0x0100-0x0199</tt> will match any
11547 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11548 </desc>
11549 </attribute>
11550
11551 <attribute name="manufacturer" type="wstring">
11552 <desc>
11553 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11554 </desc>
11555 </attribute>
11556
11557 <attribute name="product" type="wstring">
11558 <desc>
11559 <link to="IUSBDevice::product">Product</link> filter.
11560 </desc>
11561 </attribute>
11562
11563 <attribute name="serialNumber" type="wstring">
11564 <desc>
11565 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11566 </desc>
11567 </attribute>
11568
11569 <attribute name="port" type="wstring">
11570 <desc>
11571 <link to="IUSBDevice::port">Host USB port</link> filter.
11572 </desc>
11573 </attribute>
11574
11575 <attribute name="remote" type="wstring">
11576 <desc>
11577 <link to="IUSBDevice::remote">Remote state</link> filter.
11578 <note>
11579 This filter makes sense only for machine USB filters,
11580 i.e. it is ignored by IHostUSBDeviceFilter objects.
11581 </note>
11582 </desc>
11583 </attribute>
11584
11585 <attribute name="maskedInterfaces" type="unsigned long">
11586 <desc>
11587 This is an advanced option for hiding one or more USB interfaces
11588 from the guest. The value is a bit mask where the bits that are set
11589 means the corresponding USB interface should be hidden, masked off
11590 if you like.
11591 This feature only works on Linux hosts.
11592 </desc>
11593 </attribute>
11594
11595 </interface>
11596
11597
11598 <!--
11599 // IHostUSBDevice
11600 /////////////////////////////////////////////////////////////////////////
11601 -->
11602
11603 <enum
11604 name="USBDeviceState"
11605 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11606 >
11607 <desc>
11608 USB device state. This enumeration represents all possible states
11609 of the USB device physically attached to the host computer regarding
11610 its state on the host computer and availability to guest computers
11611 (all currently running virtual machines).
11612
11613 Once a supported USB device is attached to the host, global USB
11614 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11615 either ignore the device, or put it to USBDeviceState_Held state, or do
11616 nothing. Unless the device is ignored by global filters, filters of all
11617 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11618 activated that can put it to USBDeviceState_Captured state.
11619
11620 If the device was ignored by global filters, or didn't match
11621 any filters at all (including guest ones), it is handled by the host
11622 in a normal way. In this case, the device state is determined by
11623 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11624 or USBDeviceState_Available, depending on the current device usage.
11625
11626 Besides auto-capturing based on filters, the device can be manually
11627 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11628 state is USBDeviceState_Busy, USBDeviceState_Available or
11629 USBDeviceState_Held.
11630
11631 <note>
11632 Due to differences in USB stack implementations in Linux and Win32,
11633 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11634 only to the Linux version of the product. This also means that (<link
11635 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11636 device state is USBDeviceState_Held.
11637 </note>
11638
11639 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11640 </desc>
11641
11642 <const name="NotSupported" value="0">
11643 <desc>
11644 Not supported by the VirtualBox server, not available to guests.
11645 </desc>
11646 </const>
11647 <const name="Unavailable" value="1">
11648 <desc>
11649 Being used by the host computer exclusively,
11650 not available to guests.
11651 </desc>
11652 </const>
11653 <const name="Busy" value="2">
11654 <desc>
11655 Being used by the host computer, potentially available to guests.
11656 </desc>
11657 </const>
11658 <const name="Available" value="3">
11659 <desc>
11660 Not used by the host computer, available to guests (the host computer
11661 can also start using the device at any time).
11662 </desc>
11663 </const>
11664 <const name="Held" value="4">
11665 <desc>
11666 Held by the VirtualBox server (ignored by the host computer),
11667 available to guests.
11668 </desc>
11669 </const>
11670 <const name="Captured" value="5">
11671 <desc>
11672 Captured by one of the guest computers, not available
11673 to anybody else.
11674 </desc>
11675 </const>
11676 </enum>
11677
11678 <interface
11679 name="IHostUSBDevice" extends="IUSBDevice"
11680 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11681 wsmap="managed"
11682 >
11683 <desc>
11684 The IHostUSBDevice interface represents a physical USB device attached
11685 to the host computer.
11686
11687 Besides properties inherited from IUSBDevice, this interface adds the
11688 <link to="#state"/> property that holds the current state of the USB
11689 device.
11690
11691 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11692 </desc>
11693
11694 <attribute name="state" type="USBDeviceState" readonly="yes">
11695 <desc>
11696 Current state of the device.
11697 </desc>
11698 </attribute>
11699
11700 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11701
11702 </interface>
11703
11704
11705 <!--
11706 // IHostUSBDeviceFilter
11707 /////////////////////////////////////////////////////////////////////////
11708 -->
11709
11710 <enum
11711 name="USBDeviceFilterAction"
11712 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11713 >
11714 <desc>
11715 Actions for host USB device filters.
11716 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11717 </desc>
11718
11719 <const name="Null" value="0">
11720 <desc>Null value (never used by the API).</desc>
11721 </const>
11722 <const name="Ignore" value="1">
11723 <desc>Ignore the matched USB device.</desc>
11724 </const>
11725 <const name="Hold" value="2">
11726 <desc>Hold the matched USB device.</desc>
11727 </const>
11728 </enum>
11729
11730 <interface
11731 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11732 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11733 wsmap="managed"
11734 >
11735 <desc>
11736 The IHostUSBDeviceFilter interface represents a global filter for a
11737 physical USB device used by the host computer. Used indirectly in
11738 <link to="IHost::USBDeviceFilters"/>.
11739
11740 Using filters of this type, the host computer determines the initial
11741 state of the USB device after it is physically attached to the
11742 host's USB controller.
11743
11744 <note>
11745 The <link to="#remote"/> attribute is ignored by this type of
11746 filters, because it makes sense only for
11747 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11748 </note>
11749
11750 <see>IHost::USBDeviceFilters</see>
11751 </desc>
11752
11753 <attribute name="action" type="USBDeviceFilterAction">
11754 <desc>
11755 Action performed by the host when an attached USB device
11756 matches this filter.
11757 </desc>
11758 </attribute>
11759
11760 </interface>
11761
11762 <!--
11763 // IAudioAdapter
11764 /////////////////////////////////////////////////////////////////////////
11765 -->
11766
11767 <enum
11768 name="AudioDriverType"
11769 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
11770 >
11771 <desc>
11772 Host audio driver type.
11773 </desc>
11774
11775 <const name="Null" value="0">
11776 <desc>Null value, also means "dummy audio driver".</desc>
11777 </const>
11778 <const name="WinMM" value="1">
11779 <desc>Windows multimedia (Windows hosts only).</desc>
11780 </const>
11781 <const name="OSS" value="2">
11782 <desc>Open Sound System (Linux hosts only).</desc>
11783 </const>
11784 <const name="ALSA" value="3">
11785 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
11786 </const>
11787 <const name="DirectSound" value="4">
11788 <desc>DirectSound (Windows hosts only).</desc>
11789 </const>
11790 <const name="CoreAudio" value="5">
11791 <desc>CoreAudio (Mac hosts only).</desc>
11792 </const>
11793 <const name="MMPM" value="6">
11794 <desc>Reserved for historical reasons.</desc>
11795 </const>
11796 <const name="Pulse" value="7">
11797 <desc>PulseAudio (Linux hosts only).</desc>
11798 </const>
11799 <const name="SolAudio" value="8">
11800 <desc>Solaris audio (Solaris hosts only).</desc>
11801 </const>
11802 </enum>
11803
11804 <enum
11805 name="AudioControllerType"
11806 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
11807 >
11808 <desc>
11809 Virtual audio controller type.
11810 </desc>
11811
11812 <const name="AC97" value="0"/>
11813 <const name="SB16" value="1"/>
11814 </enum>
11815
11816 <interface
11817 name="IAudioAdapter" extends="$unknown"
11818 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
11819 wsmap="managed"
11820 >
11821 <desc>
11822 The IAudioAdapter interface represents the virtual audio adapter of
11823 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
11824 </desc>
11825 <attribute name="enabled" type="boolean">
11826 <desc>
11827 Flag whether the audio adapter is present in the
11828 guest system. If disabled, the virtual guest hardware will
11829 not contain any audio adapter. Can only be changed when
11830 the VM is not running.
11831 </desc>
11832 </attribute>
11833 <attribute name="audioController" type="AudioControllerType">
11834 <desc>
11835 The audio hardware we emulate.
11836 </desc>
11837 </attribute>
11838 <attribute name="audioDriver" type="AudioDriverType">
11839 <desc>
11840 Audio driver the adapter is connected to. This setting
11841 can only be changed when the VM is not running.
11842 </desc>
11843 </attribute>
11844 </interface>
11845
11846 <!--
11847 // IVRDPServer
11848 /////////////////////////////////////////////////////////////////////////
11849 -->
11850
11851 <enum
11852 name="VRDPAuthType"
11853 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
11854 >
11855 <desc>
11856 VRDP authentication type.
11857 </desc>
11858
11859 <const name="Null" value="0">
11860 <desc>Null value, also means "no authentication".</desc>
11861 </const>
11862 <const name="External" value="1"/>
11863 <const name="Guest" value="2"/>
11864 </enum>
11865
11866 <interface
11867 name="IVRDPServer" extends="$unknown"
11868 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
11869 wsmap="managed"
11870 >
11871 <attribute name="enabled" type="boolean">
11872 <desc>VRDP server status.</desc>
11873 </attribute>
11874
11875 <attribute name="ports" type="wstring">
11876 <desc>
11877 VRDP server port numbers.
11878 <note>
11879 This is a string of comma separated TCP port numbers or port number ranges.
11880 The server will try to bind to one of ports from the list. Example
11881 <tt>3000,3010-3012,3015</tt>
11882 </note>
11883 </desc>
11884 </attribute>
11885
11886 <attribute name="netAddress" type="wstring">
11887 <desc>VRDP server address.</desc>
11888 </attribute>
11889
11890 <attribute name="authType" type="VRDPAuthType">
11891 <desc>VRDP authentication method.</desc>
11892 </attribute>
11893
11894 <attribute name="authTimeout" type="unsigned long">
11895 <desc>Timeout for guest authentication. Milliseconds.</desc>
11896 </attribute>
11897
11898 <attribute name="allowMultiConnection" type="boolean">
11899 <desc>
11900 Flag whether multiple simultaneous connections to the VM are permitted.
11901 Note that this will be replaced by a more powerful mechanism in the future.
11902 </desc>
11903 </attribute>
11904
11905 <attribute name="reuseSingleConnection" type="boolean">
11906 <desc>
11907 Flag whether the existing connection must be dropped and a new connection
11908 must be established by the VRDP server, when a new client connects in single
11909 connection mode.
11910 </desc>
11911 </attribute>
11912
11913 </interface>
11914
11915
11916 <!--
11917 // ISharedFolder
11918 /////////////////////////////////////////////////////////////////////////
11919 -->
11920
11921 <interface
11922 name="ISharedFolder" extends="$unknown"
11923 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
11924 wsmap="struct"
11925 >
11926 <desc>
11927 The ISharedFolder interface represents a folder in the host computer's
11928 file system accessible from the guest OS running inside a virtual
11929 machine using an associated logical name.
11930
11931 There are three types of shared folders:
11932 <ul>
11933 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
11934 folders available to all virtual machines.</li>
11935 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
11936 VM-specific shared folders available to the given virtual machine at
11937 startup.</li>
11938 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
11939 VM-specific shared folders created in the session context (for
11940 example, when the virtual machine is running) and automatically
11941 discarded when the session is closed (the VM is powered off).</li>
11942 </ul>
11943
11944 Logical names of shared folders must be unique within the given scope
11945 (global, permanent or transient). However, they do not need to be unique
11946 across scopes. In this case, the definition of the shared folder in a
11947 more specific scope takes precedence over definitions in all other
11948 scopes. The order of precedence is (more specific to more general):
11949 <ol>
11950 <li>Transient definitions</li>
11951 <li>Permanent definitions</li>
11952 <li>Global definitions</li>
11953 </ol>
11954
11955 For example, if MyMachine has a shared folder named
11956 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
11957 transient shared folder named <tt>C_DRIVE</tt> (that points
11958 to <tt>C:\\\\WINDOWS</tt>) will change the definition
11959 of <tt>C_DRIVE</tt> in the guest OS so
11960 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
11961 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
11962 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
11963 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
11964 to <tt>C:\\</tt> if it still exists.
11965
11966 Note that permanent and transient shared folders of different machines
11967 are in different name spaces, so they don't overlap and don't need to
11968 have unique logical names.
11969
11970 <note>
11971 Global shared folders are not implemented in the current version of the
11972 product.
11973 </note>
11974 </desc>
11975
11976 <attribute name="name" type="wstring" readonly="yes">
11977 <desc>Logical name of the shared folder.</desc>
11978 </attribute>
11979
11980 <attribute name="hostPath" type="wstring" readonly="yes">
11981 <desc>Full path to the shared folder in the host file system.</desc>
11982 </attribute>
11983
11984 <attribute name="accessible" type="boolean" readonly="yes">
11985 <desc>
11986 Whether the folder defined by the host path is currently
11987 accessible or not.
11988 For example, the folder can be unaccessible if it is placed
11989 on the network share that is not available by the time
11990 this property is read.
11991 </desc>
11992 </attribute>
11993
11994 <attribute name="writable" type="boolean" readonly="yes">
11995 <desc>
11996 Whether the folder defined by the host path is writable or
11997 not.
11998 </desc>
11999 </attribute>
12000
12001 <attribute name="lastAccessError" type="wstring" readonly="yes">
12002 <desc>
12003 Text message that represents the result of the last accessibility
12004 check.
12005
12006 Accessibility checks are performed each time the <link to="#accessible"/>
12007 attribute is read. An empty string is returned if the last
12008 accessibility check was successful. A non-empty string indicates a
12009 failure and should normally describe a reason of the failure (for
12010 example, a file read error).
12011 </desc>
12012 </attribute>
12013
12014 </interface>
12015
12016 <!--
12017 // ISession
12018 /////////////////////////////////////////////////////////////////////////
12019 -->
12020
12021 <interface
12022 name="IInternalSessionControl" extends="$unknown"
12023 uuid="989e2c33-8dfa-437a-9a15-5ad441d50dbf"
12024 internal="yes"
12025 wsmap="suppress"
12026 >
12027 <method name="getPID">
12028 <desc>PID of the process that has created this Session object.
12029 </desc>
12030 <param name="pid" type="unsigned long" dir="return"/>
12031 </method>
12032
12033 <method name="getRemoteConsole">
12034 <desc>
12035 Returns the console object suitable for remote control.
12036
12037 <result name="VBOX_E_INVALID_VM_STATE">
12038 Session state prevents operation.
12039 </result>
12040 <result name="VBOX_E_INVALID_OBJECT_STATE">
12041 Session type prevents operation.
12042 </result>
12043
12044 </desc>
12045 <param name="console" type="IConsole" dir="return"/>
12046 </method>
12047
12048 <method name="assignMachine">
12049 <desc>
12050 Assigns the machine object associated with this direct-type
12051 session or informs the session that it will be a remote one
12052 (if @a machine == @c null).
12053
12054 <result name="VBOX_E_INVALID_VM_STATE">
12055 Session state prevents operation.
12056 </result>
12057 <result name="VBOX_E_INVALID_OBJECT_STATE">
12058 Session type prevents operation.
12059 </result>
12060
12061 </desc>
12062 <param name="machine" type="IMachine" dir="in"/>
12063 </method>
12064
12065 <method name="assignRemoteMachine">
12066 <desc>
12067 Assigns the machine and the (remote) console object associated with
12068 this remote-type session.
12069
12070 <result name="VBOX_E_INVALID_VM_STATE">
12071 Session state prevents operation.
12072 </result>
12073
12074 </desc>
12075 <param name="machine" type="IMachine" dir="in"/>
12076 <param name="console" type="IConsole" dir="in"/>
12077 </method>
12078
12079 <method name="updateMachineState">
12080 <desc>
12081 Updates the machine state in the VM process.
12082 Must be called only in certain cases
12083 (see the method implementation).
12084
12085 <result name="VBOX_E_INVALID_VM_STATE">
12086 Session state prevents operation.
12087 </result>
12088 <result name="VBOX_E_INVALID_OBJECT_STATE">
12089 Session type prevents operation.
12090 </result>
12091
12092 </desc>
12093 <param name="aMachineState" type="MachineState" dir="in"/>
12094 </method>
12095
12096 <method name="uninitialize">
12097 <desc>
12098 Uninitializes (closes) this session. Used by VirtualBox to close
12099 the corresponding remote session when the direct session dies
12100 or gets closed.
12101
12102 <result name="VBOX_E_INVALID_VM_STATE">
12103 Session state prevents operation.
12104 </result>
12105
12106 </desc>
12107 </method>
12108
12109 <method name="onNetworkAdapterChange">
12110 <desc>
12111 Triggered when settings of a network adapter of the
12112 associated virtual machine have changed.
12113
12114 <result name="VBOX_E_INVALID_VM_STATE">
12115 Session state prevents operation.
12116 </result>
12117 <result name="VBOX_E_INVALID_OBJECT_STATE">
12118 Session type prevents operation.
12119 </result>
12120
12121 </desc>
12122 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12123 <param name="changeAdapter" type="boolean" dir="in"/>
12124 </method>
12125
12126 <method name="onSerialPortChange">
12127 <desc>
12128 Triggered when settings of a serial port of the
12129 associated virtual machine have changed.
12130
12131 <result name="VBOX_E_INVALID_VM_STATE">
12132 Session state prevents operation.
12133 </result>
12134 <result name="VBOX_E_INVALID_OBJECT_STATE">
12135 Session type prevents operation.
12136 </result>
12137
12138 </desc>
12139 <param name="serialPort" type="ISerialPort" dir="in"/>
12140 </method>
12141
12142 <method name="onParallelPortChange">
12143 <desc>
12144 Triggered when settings of a parallel port of the
12145 associated virtual machine have changed.
12146
12147 <result name="VBOX_E_INVALID_VM_STATE">
12148 Session state prevents operation.
12149 </result>
12150 <result name="VBOX_E_INVALID_OBJECT_STATE">
12151 Session type prevents operation.
12152 </result>
12153
12154 </desc>
12155 <param name="parallelPort" type="IParallelPort" dir="in"/>
12156 </method>
12157
12158 <method name="onStorageControllerChange">
12159 <desc>
12160 Triggered when settings of a storage controller of the
12161 associated virtual machine have changed.
12162
12163 <result name="VBOX_E_INVALID_VM_STATE">
12164 Session state prevents operation.
12165 </result>
12166 <result name="VBOX_E_INVALID_OBJECT_STATE">
12167 Session type prevents operation.
12168 </result>
12169
12170 </desc>
12171 </method>
12172
12173 <method name="onMediumChange">
12174 <desc>
12175 Triggered when attached media of the
12176 associated virtual machine have changed.
12177
12178 <result name="VBOX_E_INVALID_VM_STATE">
12179 Session state prevents operation.
12180 </result>
12181 <result name="VBOX_E_INVALID_OBJECT_STATE">
12182 Session type prevents operation.
12183 </result>
12184
12185 </desc>
12186
12187 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12188 </method>
12189
12190 <method name="onVRDPServerChange">
12191 <desc>
12192 Triggered when settings of the VRDP server object of the
12193 associated virtual machine have changed.
12194
12195 <result name="VBOX_E_INVALID_VM_STATE">
12196 Session state prevents operation.
12197 </result>
12198 <result name="VBOX_E_INVALID_OBJECT_STATE">
12199 Session type prevents operation.
12200 </result>
12201
12202 </desc>
12203 </method>
12204
12205 <method name="onUSBControllerChange">
12206 <desc>
12207 Triggered when settings of the USB controller object of the
12208 associated virtual machine have changed.
12209
12210 <result name="VBOX_E_INVALID_VM_STATE">
12211 Session state prevents operation.
12212 </result>
12213 <result name="VBOX_E_INVALID_OBJECT_STATE">
12214 Session type prevents operation.
12215 </result>
12216
12217 </desc>
12218 </method>
12219
12220 <method name="onSharedFolderChange">
12221 <desc>
12222 Triggered when a permanent (global or machine) shared folder has been
12223 created or removed.
12224 <note>
12225 We don't pass shared folder parameters in this notification because
12226 the order in which parallel notifications are delivered is not defined,
12227 therefore it could happen that these parameters were outdated by the
12228 time of processing this notification.
12229 </note>
12230
12231 <result name="VBOX_E_INVALID_VM_STATE">
12232 Session state prevents operation.
12233 </result>
12234 <result name="VBOX_E_INVALID_OBJECT_STATE">
12235 Session type prevents operation.
12236 </result>
12237
12238 </desc>
12239 <param name="global" type="boolean" dir="in"/>
12240 </method>
12241
12242 <method name="onUSBDeviceAttach">
12243 <desc>
12244 Triggered when a request to capture a USB device (as a result
12245 of matched USB filters or direct call to
12246 <link to="IConsole::attachUSBDevice"/>) has completed.
12247 A @c null @a error object means success, otherwise it
12248 describes a failure.
12249
12250 <result name="VBOX_E_INVALID_VM_STATE">
12251 Session state prevents operation.
12252 </result>
12253 <result name="VBOX_E_INVALID_OBJECT_STATE">
12254 Session type prevents operation.
12255 </result>
12256
12257 </desc>
12258 <param name="device" type="IUSBDevice" dir="in"/>
12259 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12260 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12261 </method>
12262
12263 <method name="onUSBDeviceDetach">
12264 <desc>
12265 Triggered when a request to release the USB device (as a result
12266 of machine termination or direct call to
12267 <link to="IConsole::detachUSBDevice"/>) has completed.
12268 A @c null @a error object means success, otherwise it
12269 describes a failure.
12270
12271 <result name="VBOX_E_INVALID_VM_STATE">
12272 Session state prevents operation.
12273 </result>
12274 <result name="VBOX_E_INVALID_OBJECT_STATE">
12275 Session type prevents operation.
12276 </result>
12277
12278 </desc>
12279 <param name="id" type="uuid" mod="string" dir="in"/>
12280 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12281 </method>
12282
12283 <method name="onShowWindow">
12284 <desc>
12285 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12286 <link to="IMachine::showConsoleWindow"/> in order to notify
12287 console callbacks
12288 <link to="IConsoleCallback::onCanShowWindow"/>
12289 and <link to="IConsoleCallback::onShowWindow"/>.
12290
12291 <result name="VBOX_E_INVALID_OBJECT_STATE">
12292 Session type prevents operation.
12293 </result>
12294
12295 </desc>
12296 <param name="check" type="boolean" dir="in"/>
12297 <param name="canShow" type="boolean" dir="out"/>
12298 <param name="winId" type="unsigned long long" dir="out"/>
12299 </method>
12300
12301 <method name="accessGuestProperty">
12302 <desc>
12303 Called by <link to="IMachine::getGuestProperty"/> and by
12304 <link to="IMachine::setGuestProperty"/> in order to read and
12305 modify guest properties.
12306
12307 <result name="VBOX_E_INVALID_VM_STATE">
12308 Machine session is not open.
12309 </result>
12310 <result name="VBOX_E_INVALID_OBJECT_STATE">
12311 Session type is not direct.
12312 </result>
12313
12314 </desc>
12315 <param name="name" type="wstring" dir="in"/>
12316 <param name="value" type="wstring" dir="in"/>
12317 <param name="flags" type="wstring" dir="in"/>
12318 <param name="isSetter" type="boolean" dir="in"/>
12319 <param name="retValue" type="wstring" dir="out"/>
12320 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12321 <param name="retFlags" type="wstring" dir="out"/>
12322 </method>
12323
12324 <method name="enumerateGuestProperties">
12325 <desc>
12326 Return a list of the guest properties matching a set of patterns along
12327 with their values, time stamps and flags.
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="patterns" type="wstring" dir="in">
12338 <desc>
12339 The patterns to match the properties against as a comma-separated
12340 string. If this is empty, all properties currently set will be
12341 returned.
12342 </desc>
12343 </param>
12344 <param name="key" type="wstring" dir="out" safearray="yes">
12345 <desc>
12346 The key names of the properties returned.
12347 </desc>
12348 </param>
12349 <param name="value" type="wstring" dir="out" safearray="yes">
12350 <desc>
12351 The values of the properties returned. The array entries match the
12352 corresponding entries in the @a key array.
12353 </desc>
12354 </param>
12355 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12356 <desc>
12357 The time stamps of the properties returned. The array entries match
12358 the corresponding entries in the @a key array.
12359 </desc>
12360 </param>
12361 <param name="flags" type="wstring" dir="out" safearray="yes">
12362 <desc>
12363 The flags of the properties returned. The array entries match the
12364 corresponding entries in the @a key array.
12365 </desc>
12366 </param>
12367 </method>
12368
12369 </interface>
12370
12371 <interface
12372 name="ISession" extends="$dispatched"
12373 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12374 wsmap="managed"
12375 >
12376 <desc>
12377 The ISession interface represents a serialization primitive for virtual
12378 machines.
12379
12380 With VirtualBox, every time one wishes to manipulate a virtual machine
12381 (e.g. change its settings or start execution), a session object is
12382 required. Such an object must be passed to one of the session methods
12383 that open the given session, which then initiates the machine manipulation.
12384
12385 A session serves several purposes: it identifies to the inter-process VirtualBox
12386 code which process is currently working with the virtual machine, and it ensures
12387 that there are no incompatible requests from several processes for the
12388 same virtual machine. Session objects can therefore be thought of as mutex
12389 semaphores that lock virtual machines to prevent conflicting accesses from
12390 several processes.
12391
12392 How sessions objects are used depends on whether you use the Main API
12393 via COM or via the webservice:
12394
12395 <ul>
12396 <li>When using the COM API directly, an object of the Session class from the
12397 VirtualBox type library needs to be created. In regular COM C++ client code,
12398 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12399 This object will then act as a local session object in further calls to open
12400 a session.
12401 </li>
12402
12403 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12404 one session object automatically when <link to="IWebsessionManager::logon" />
12405 is called. A managed object reference to that session object can be retrieved by
12406 calling <link to="IWebsessionManager::getSessionObject" />. This session object
12407 reference can then be used to open sessions.
12408 </li>
12409 </ul>
12410
12411 Sessions are mainly used in two variations:
12412
12413 <ul>
12414 <li>
12415 To start a virtual machine in a separate process, one would call
12416 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
12417 object as its first parameter. This session then identifies the caller
12418 and lets him control the started machine (for example, pause machine
12419 execution or power it down) as well as be notified about machine
12420 execution state changes.
12421 </li>
12422
12423 <li>To alter machine settings, or to start machine execution within the
12424 current process, one needs to open a direct session for the machine first by
12425 calling <link to="IVirtualBox::openSession"/>. While a direct session
12426 is open within one process, no any other process may open another direct
12427 session for the same machine. This prevents the machine from being changed
12428 by other processes while it is running or while the machine is being configured.
12429 </li>
12430 </ul>
12431
12432 One also can attach to an existing direct session already opened by
12433 another process (for example, in order to send a control request to the
12434 virtual machine such as the pause or the reset request). This is done by
12435 calling <link to="IVirtualBox::openExistingSession"/>.
12436
12437 <note>
12438 Unless you are trying to write a new VirtualBox front-end that
12439 performs direct machine execution (like the VirtualBox or VBoxSDL
12440 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
12441 session opened by <link to="IVirtualBox::openSession"/> and use this
12442 session only to change virtual machine settings. If you simply want to
12443 start virtual machine execution using one of the existing front-ends
12444 (for example the VirtualBox GUI or headless server), simply use
12445 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
12446 will power up the machine automatically for you.
12447 </note>
12448 </desc>
12449
12450 <attribute name="state" type="SessionState" readonly="yes">
12451 <desc>Current state of this session.</desc>
12452 </attribute>
12453
12454 <attribute name="type" type="SessionType" readonly="yes">
12455 <desc>
12456 Type of this session. The value of this attribute is valid only
12457 if the session is currently open (i.e. its #state is
12458 SessionType_SessionOpen), otherwise an error will be returned.
12459 </desc>
12460 </attribute>
12461
12462 <attribute name="machine" type="IMachine" readonly="yes">
12463 <desc>Machine object associated with this session.</desc>
12464 </attribute>
12465
12466 <attribute name="console" type="IConsole" readonly="yes">
12467 <desc>Console object associated with this session.</desc>
12468 </attribute>
12469
12470 <method name="close">
12471 <desc>
12472 Closes a session that was previously opened.
12473
12474 It is recommended that every time an "open session" method (such as
12475 <link to="IVirtualBox::openRemoteSession" /> or
12476 <link to="IVirtualBox::openSession" />) has been called to
12477 manipulate a virtual machine, the caller invoke
12478 ISession::close() when it's done doing so. Since sessions are
12479 serialization primitives much like ordinary mutexes, they are
12480 best used the same way: for each "open" call, there should be
12481 a matching "close" call, even when errors occur.
12482
12483 Otherwise, if a direct session for a machine opened with
12484 <link to="IVirtualBox::openSession"/> is not explicitly closed
12485 when the application terminates, the state of the machine will
12486 be set to <link to="MachineState_Aborted" /> on the server.
12487
12488 Generally, it is recommended to close all open sessions explicitly
12489 before terminating the application (regardless of the reason for
12490 the termination).
12491
12492 <note>
12493 Do not expect the session state (<link to="ISession::state" />
12494 to return to "Closed" immediately after you invoke
12495 ISession::close(), particularly if you have started a remote
12496 session to execute the VM in a new process. The session state will
12497 automatically return to "Closed" once the VM is no longer executing,
12498 which can of course take a very long time.
12499 </note>
12500
12501 <result name="E_UNEXPECTED">
12502 Session is not open.
12503 </result>
12504
12505 </desc>
12506 </method>
12507
12508 </interface>
12509
12510 <!--
12511 // IStorageController
12512 /////////////////////////////////////////////////////////////////////////
12513 -->
12514
12515 <enum
12516 name="StorageBus"
12517 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12518 >
12519 <desc>
12520 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
12521 see <link to="IStorageController::bus" />.
12522 </desc>
12523 <const name="Null" value="0">
12524 <desc>@c null value. Never used by the API.</desc>
12525 </const>
12526 <const name="IDE" value="1"/>
12527 <const name="SATA" value="2"/>
12528 <const name="SCSI" value="3"/>
12529 <const name="Floppy" value="4"/>
12530 </enum>
12531
12532 <enum
12533 name="StorageControllerType"
12534 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12535 >
12536 <desc>
12537 The exact variant of storage controller hardware presented
12538 to the guest; see <link to="IStorageController::controllerType" />.
12539 </desc>
12540
12541 <const name="Null" value="0">
12542 <desc>@c null value. Never used by the API.</desc>
12543 </const>
12544 <const name="LsiLogic" value="1">
12545 <desc>A SCSI controller of the LsiLogic variant.</desc>
12546 </const>
12547 <const name="BusLogic" value="2">
12548 <desc>A SCSI controller of the BusLogic variant.</desc>
12549 </const>
12550 <const name="IntelAhci" value="3">
12551 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12552 </const>
12553 <const name="PIIX3" value="4">
12554 <desc>An IDE controller of the PIIX3 variant.</desc>
12555 </const>
12556 <const name="PIIX4" value="5">
12557 <desc>An IDE controller of the PIIX4 variant.</desc>
12558 </const>
12559 <const name="ICH6" value="6">
12560 <desc>An IDE controller of the ICH6 variant.</desc>
12561 </const>
12562 <const name="I82078" value="7">
12563 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12564 </const>
12565 </enum>
12566
12567 <interface
12568 name="IStorageController" extends="$unknown"
12569 uuid="6bf8335b-d14a-44a5-9b45-ddc49ce7d5b2"
12570 wsmap="managed"
12571 >
12572 <desc>
12573 Represents a storage controller that is attached to a virtual machine
12574 (<link to="IMachine" />). Just as disks (hard disks, DVDs, FDs) are
12575 attached to storage controllers in a real computer, virtual media
12576 (represented by <link to="IMedium" />) are attached to virtual
12577 storage controllers, represented by this interface.
12578
12579 As opposed to physical hardware, VirtualBox has a very generic concept
12580 of a storage controller, and for purposes of the Main API, all virtual
12581 storage is attached to virtual machines via instances of this interface.
12582 There are four types of such virtual storage controllers: IDE, SCSI, SATA
12583 and Floppy (see <link to="#bus" />). Depending on which of these four is
12584 used, certain sub-types may be available and can be selected in
12585 <link to="#controllerType" />.
12586
12587 Depending on these settings, the guest operating system might see
12588 significantly different virtual hardware.
12589 </desc>
12590
12591 <attribute name="name" type="wstring" readonly="yes">
12592 <desc>
12593 Name of the storage controller, as originally specified with
12594 <link to="IMachine::addStorageController" />. This then uniquely
12595 identifies this controller with other method calls such as
12596 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12597 </desc>
12598 </attribute>
12599
12600 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12601 <desc>
12602 Maximum number of devices which can be attached to one port.
12603 </desc>
12604 </attribute>
12605
12606 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12607 <desc>
12608 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12609 </desc>
12610 </attribute>
12611
12612 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12613 <desc>
12614 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12615 </desc>
12616 </attribute>
12617
12618 <attribute name="instance" type="unsigned long">
12619 <desc>
12620 The instance number of the device in the running VM.
12621 </desc>
12622 </attribute>
12623
12624 <attribute name="portCount" type="unsigned long">
12625 <desc>
12626 The number of currently usable ports on the controller.
12627 The minimum and maximum number of ports for one controller are
12628 stored in <link to="IStorageController::minPortCount"/>
12629 and <link to="IStorageController::maxPortCount"/>.
12630 </desc>
12631 </attribute>
12632
12633 <attribute name="bus" type="StorageBus" readonly="yes">
12634 <desc>
12635 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
12636 </desc>
12637 </attribute>
12638
12639 <attribute name="controllerType" type="StorageControllerType">
12640 <desc>
12641 The exact variant of storage controller hardware presented
12642 to the guest.
12643 Depending on this value, VirtualBox will provide a different
12644 virtual storage controller hardware to the guest.
12645 For SATA and floppy controllers, only one variant is available,
12646 but for IDE and SCSI, there are several.
12647
12648 For SCSI controllers, the default type is LsiLogic.
12649 </desc>
12650 </attribute>
12651
12652 <method name="GetIDEEmulationPort">
12653 <desc>
12654 Gets the corresponding port number which is emulated as an IDE device.
12655 Works only with SATA controllers.
12656
12657 <result name="E_INVALIDARG">
12658 The @a devicePosition is not in the range 0 to 3.
12659 </result>
12660 <result name="E_NOTIMPL">
12661 The storage controller type is not SATAIntelAhci.
12662 </result>
12663
12664 </desc>
12665 <param name="devicePosition" type="long" dir="in"/>
12666 <param name="portNumber" type="long" dir="return"/>
12667 </method>
12668
12669 <method name="SetIDEEmulationPort">
12670 <desc>
12671 Sets the port number which is emulated as an IDE device.
12672 Works only with SATA controllers.
12673
12674 <result name="E_INVALIDARG">
12675 The @a devicePosition is not in the range 0 to 3 or the
12676 @a portNumber is not in the range 0 to 29.
12677 </result>
12678 <result name="E_NOTIMPL">
12679 The storage controller type is not SATAIntelAhci.
12680 </result>
12681
12682 </desc>
12683 <param name="devicePosition" type="long" dir="in"/>
12684 <param name="portNumber" type="long" dir="in"/>
12685 </method>
12686
12687 </interface>
12688
12689<if target="wsdl">
12690
12691 <!--
12692 // IManagedObjectRef
12693 /////////////////////////////////////////////////////////////////////////
12694 -->
12695
12696 <interface
12697 name="IManagedObjectRef" extends="$unknown"
12698 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
12699 internal="yes"
12700 wsmap="managed"
12701 wscpp="hardcoded"
12702 >
12703 <desc>
12704 Managed object reference.
12705
12706 Only within the webservice, a managed object reference (which is really
12707 an opaque number) allows a webservice client to address an object
12708 that lives in the address space of the webservice server.
12709
12710 Behind each managed object reference, there is a COM object that lives
12711 in the webservice server's address space. The COM object is not freed
12712 until the managed object reference is released, either by an explicit
12713 call to <link to="IManagedObjectRef::release" /> or by logging off from
12714 the webservice (<link to="IWebsessionManager::logoff" />), which releases
12715 all objects created during the webservice session.
12716
12717 Whenever a method call of the VirtualBox API returns a COM object, the
12718 webservice representation of that method will instead return a
12719 managed object reference, which can then be used to invoke methods
12720 on that object.
12721 </desc>
12722
12723 <method name="getInterfaceName">
12724 <desc>
12725 Returns the name of the interface that this managed object represents,
12726 for example, "IMachine", as a string.
12727 </desc>
12728 <param name="return" type="wstring" dir="return"/>
12729 </method>
12730
12731 <method name="release">
12732 <desc>
12733 Releases this managed object reference and frees the resources that
12734 were allocated for it in the webservice server process. After calling
12735 this method, the identifier of the reference can no longer be used.
12736 </desc>
12737 </method>
12738
12739 </interface>
12740
12741 <!--
12742 // IWebsessionManager
12743 /////////////////////////////////////////////////////////////////////////
12744 -->
12745
12746 <interface
12747 name="IWebsessionManager" extends="$unknown"
12748 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
12749 internal="yes"
12750 wsmap="global"
12751 wscpp="hardcoded"
12752 >
12753 <desc>
12754 Websession manager. This provides essential services
12755 to webservice clients.
12756 </desc>
12757 <method name="logon">
12758 <desc>
12759 Logs a new client onto the webservice and returns a managed object reference to
12760 the IVirtualBox instance, which the client can then use as a basis to further
12761 queries, since all calls to the VirtualBox API are based on the IVirtualBox
12762 interface, in one way or the other.
12763 </desc>
12764 <param name="username" type="wstring" dir="in"/>
12765 <param name="password" type="wstring" dir="in"/>
12766 <param name="return" type="IVirtualBox" dir="return"/>
12767 </method>
12768
12769 <method name="getSessionObject">
12770 <desc>
12771 Returns a managed object reference to the internal ISession object that was created
12772 for this web service session when the client logged on.
12773
12774 <see>ISession</see>
12775 </desc>
12776 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12777 <param name="return" type="ISession" dir="return"/>
12778 </method>
12779
12780 <method name="logoff">
12781 <desc>
12782 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
12783 and destroys all resources associated with the session (most importantly, all
12784 managed objects created in the server while the session was active).
12785 </desc>
12786 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
12787 </method>
12788
12789 </interface>
12790
12791</if>
12792
12793 <!--
12794 // IPerformanceCollector & friends
12795 /////////////////////////////////////////////////////////////////////////
12796 -->
12797
12798 <interface
12799 name="IPerformanceMetric" extends="$unknown"
12800 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
12801 >
12802 <desc>
12803 The IPerformanceMetric interface represents parameters of the given
12804 performance metric.
12805 </desc>
12806
12807 <attribute name="metricName" type="wstring" readonly="yes">
12808 <desc>
12809 Name of the metric.
12810 </desc>
12811 </attribute>
12812
12813 <attribute name="object" type="$unknown" readonly="yes">
12814 <desc>
12815 Object this metric belongs to.
12816 </desc>
12817 </attribute>
12818
12819 <attribute name="description" type="wstring" readonly="yes">
12820 <desc>
12821 Textual description of the metric.
12822 </desc>
12823 </attribute>
12824
12825 <attribute name="period" type="unsigned long" readonly="yes">
12826 <desc>
12827 Time interval between samples, measured in seconds.
12828 </desc>
12829 </attribute>
12830
12831 <attribute name="count" type="unsigned long" readonly="yes">
12832 <desc>
12833 Number of recent samples retained by the performance collector for this
12834 metric.
12835
12836 When the collected sample count exceeds this number, older samples
12837 are discarded.
12838 </desc>
12839 </attribute>
12840
12841 <attribute name="unit" type="wstring" readonly="yes">
12842 <desc>
12843 Unit of measurement.
12844 </desc>
12845 </attribute>
12846
12847 <attribute name="minimumValue" type="long" readonly="yes">
12848 <desc>
12849 Minimum possible value of this metric.
12850 </desc>
12851 </attribute>
12852
12853 <attribute name="maximumValue" type="long" readonly="yes">
12854 <desc>
12855 Maximum possible value of this metric.
12856 </desc>
12857 </attribute>
12858 </interface>
12859
12860 <interface
12861 name="IPerformanceCollector" extends="$unknown"
12862 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
12863 wsmap="managed"
12864 >
12865 <desc>
12866 The IPerformanceCollector interface represents a service that collects and
12867 stores performance metrics data.
12868
12869 Performance metrics are associated with objects of interfaces like IHost and
12870 IMachine. Each object has a distinct set of performance metrics.
12871 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
12872
12873 Metric data is collected at the specified intervals and is retained
12874 internally. The interval and the number of retained samples can be set
12875 with <link to="IPerformanceCollector::setupMetrics" />.
12876
12877 Metrics are organized hierarchically, with each level separated by a
12878 slash (/) character. Generally, the scheme for metric names is like this:
12879
12880 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
12881
12882 "Category/Metric" together form the base metric name. A base metric is the
12883 smallest unit for which a sampling interval and the number of retained
12884 samples can be set. Only base metrics can be enabled and disabled. All
12885 sub-metrics are collected when their base metric is collected.
12886 Collected values for any set of sub-metrics can be queried with
12887 <link to="IPerformanceCollector::queryMetricsData" />.
12888
12889 For example "CPU/Load/User:avg"
12890 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
12891 "average" aggregate. An aggregate function is computed over all retained
12892 data. Valid aggregate functions are:
12893
12894 <ul>
12895 <li>avg -- average</li>
12896 <li>min -- minimum</li>
12897 <li>max -- maximum</li>
12898 </ul>
12899
12900 When setting up
12901 metric parameters, querying metric data, enabling or disabling metrics
12902 wildcards can be used in metric names to specify a subset of metrics. For
12903 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
12904 averages can be queried using <tt>*:avg</tt> and so on. To query metric
12905 values without aggregates <tt>*:</tt> can be used.
12906
12907 The valid names for base metrics are:
12908
12909 <ul>
12910 <li>CPU/Load</li>
12911 <li>CPU/MHz</li>
12912 <li>RAM/Usage</li>
12913 </ul>
12914
12915 The general sequence for collecting and retrieving the metrics is:
12916 <ul>
12917 <li>
12918 Obtain an instance of IPerformanceCollector with
12919 <link to="IVirtualBox::performanceCollector" />
12920 </li>
12921 <li>
12922 Allocate and populate an array with references to objects the metrics
12923 will be collected for. Use references to IHost and IMachine objects.
12924 </li>
12925 <li>
12926 Allocate and populate an array with base metric names the data will be
12927 collected for.
12928 </li>
12929 <li>
12930 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
12931 metric data will be collected and stored.
12932 </li>
12933 <li>
12934 Wait for the data to get collected.
12935 </li>
12936 <li>
12937 Allocate and populate an array with references to objects the metric
12938 values will be queried for. You can re-use the object array used for
12939 setting base metrics.
12940 </li>
12941 <li>
12942 Allocate and populate an array with metric names the data will be
12943 collected for. Note that metric names differ from base metric names.
12944 </li>
12945 <li>
12946 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
12947 have been collected so far are returned. Note that the values are still
12948 retained internally and data collection continues.
12949 </li>
12950 </ul>
12951
12952 For an example of usage refer to the following files in VirtualBox SDK:
12953 <ul>
12954 <li>
12955 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
12956 </li>
12957 <li>
12958 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
12959 </li>
12960 </ul>
12961 </desc>
12962
12963 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
12964 <desc>
12965 Array of unique names of metrics.
12966
12967 This array represents all metrics supported by the performance
12968 collector. Individual objects do not necessarily support all of them.
12969 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
12970 list of supported metrics for a particular object.
12971 </desc>
12972 </attribute>
12973
12974 <method name="getMetrics">
12975 <desc>
12976 Returns parameters of specified metrics for a set of objects.
12977 <note>
12978 @c Null metrics array means all metrics. @c Null object array means
12979 all existing objects.
12980 </note>
12981 </desc>
12982 <param name="metricNames" type="wstring" dir="in" safearray="yes">
12983 <desc>
12984 Metric name filter. Currently, only a comma-separated list of metrics
12985 is supported.
12986 </desc>
12987 </param>
12988 <param name="objects" type="$unknown" dir="in" safearray="yes">
12989 <desc>
12990 Set of objects to return metric parameters for.
12991 </desc>
12992 </param>
12993 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
12994 <desc>
12995 Array of returned metric parameters.
12996 </desc>
12997 </param>
12998 </method>
12999
13000 <method name="setupMetrics">
13001 <desc>
13002 Sets parameters of specified base metrics for a set of objects. Returns
13003 an array of <link to="IPerformanceMetric" /> describing the metrics have
13004 been affected.
13005 <note>
13006 @c Null or empty metric name array means all metrics. @c Null or empty
13007 object array means all existing objects. If metric name array contains
13008 a single element and object array contains many, the single metric
13009 name array element is applied to each object array element to form
13010 metric/object pairs.
13011 </note>
13012 </desc>
13013 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13014 <desc>
13015 Metric name filter. Comma-separated list of metrics with wildcard
13016 support.
13017 </desc>
13018 </param>
13019 <param name="objects" type="$unknown" dir="in" safearray="yes">
13020 <desc>
13021 Set of objects to setup metric parameters for.
13022 </desc>
13023 </param>
13024 <param name="period" type="unsigned long" dir="in">
13025 <desc>
13026 Time interval in seconds between two consecutive samples of performance
13027 data.
13028 </desc>
13029 </param>
13030 <param name="count" type="unsigned long" dir="in">
13031 <desc>
13032 Number of samples to retain in performance data history. Older samples
13033 get discarded.
13034 </desc>
13035 </param>
13036 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13037 <desc>
13038 Array of metrics that have been modified by the call to this method.
13039 </desc>
13040 </param>
13041 </method>
13042
13043 <method name="enableMetrics">
13044 <desc>
13045 Turns on collecting specified base metrics. Returns an array of
13046 <link to="IPerformanceMetric" /> describing the metrics have been
13047 affected.
13048 <note>
13049 @c Null or empty metric name array means all metrics. @c Null or empty
13050 object array means all existing objects. If metric name array contains
13051 a single element and object array contains many, the single metric
13052 name array element is applied to each object array element to form
13053 metric/object pairs.
13054 </note>
13055 </desc>
13056 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13057 <desc>
13058 Metric name filter. Comma-separated list of metrics with wildcard
13059 support.
13060 </desc>
13061 </param>
13062 <param name="objects" type="$unknown" dir="in" safearray="yes">
13063 <desc>
13064 Set of objects to enable metrics for.
13065 </desc>
13066 </param>
13067 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13068 <desc>
13069 Array of metrics that have been modified by the call to this method.
13070 </desc>
13071 </param>
13072 </method>
13073
13074 <method name="disableMetrics">
13075 <desc>
13076 Turns off collecting specified base metrics. Returns an array of
13077 <link to="IPerformanceMetric" /> describing the metrics have been
13078 affected.
13079 <note>
13080 @c Null or empty metric name array means all metrics. @c Null or empty
13081 object array means all existing objects. If metric name array contains
13082 a single element and object array contains many, the single metric
13083 name array element is applied to each object array element to form
13084 metric/object pairs.
13085 </note>
13086 </desc>
13087 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13088 <desc>
13089 Metric name filter. Comma-separated list of metrics with wildcard
13090 support.
13091 </desc>
13092 </param>
13093 <param name="objects" type="$unknown" dir="in" safearray="yes">
13094 <desc>
13095 Set of objects to disable metrics for.
13096 </desc>
13097 </param>
13098 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13099 <desc>
13100 Array of metrics that have been modified by the call to this method.
13101 </desc>
13102 </param>
13103 </method>
13104
13105 <method name="queryMetricsData">
13106 <desc>
13107 Queries collected metrics data for a set of objects.
13108
13109 The data itself and related metric information are returned in seven
13110 parallel and one flattened array of arrays. Elements of
13111 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13112 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13113 the same index describe one set of values corresponding to a single
13114 metric.
13115
13116 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13117 start and length of a sub-array is indicated by
13118 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13119 value for metric <tt>metricNames[i]</tt> is at
13120 <tt>returnData[returnIndices[i]]</tt>.
13121
13122 <note>
13123 @c Null or empty metric name array means all metrics. @c Null or empty
13124 object array means all existing objects. If metric name array contains
13125 a single element and object array contains many, the single metric
13126 name array element is applied to each object array element to form
13127 metric/object pairs.
13128 </note>
13129 <note>
13130 Data collection continues behind the scenes after call to
13131 @c queryMetricsData. The return data can be seen as the snapshot of
13132 the current state at the time of @c queryMetricsData call. The
13133 internally kept metric values are not cleared by the call. This makes
13134 possible querying different subsets of metrics or aggregates with
13135 subsequent calls. If periodic querying is needed it is highly
13136 suggested to query the values with @c interval*count period to avoid
13137 confusion. This way a completely new set of data values will be
13138 provided by each query.
13139 </note>
13140 </desc>
13141 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13142 <desc>
13143 Metric name filter. Comma-separated list of metrics with wildcard
13144 support.
13145 </desc>
13146 </param>
13147 <param name="objects" type="$unknown" dir="in" safearray="yes">
13148 <desc>
13149 Set of objects to query metrics for.
13150 </desc>
13151 </param>
13152 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13153 <desc>
13154 Names of metrics returned in @c returnData.
13155 </desc>
13156 </param>
13157 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13158 <desc>
13159 Objects associated with metrics returned in @c returnData.
13160 </desc>
13161 </param>
13162 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13163 <desc>
13164 Units of measurement for each returned metric.
13165 </desc>
13166 </param>
13167 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13168 <desc>
13169 Divisor that should be applied to return values in order to get
13170 floating point values. For example:
13171 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13172 will retrieve the floating point value of i-th sample of the first
13173 metric.
13174 </desc>
13175 </param>
13176 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13177 <desc>
13178 Sequence numbers of the first elements of value sequences of particular metrics
13179 returned in @c returnData. For aggregate metrics it is the sequence number of
13180 the sample the aggregate started calculation from.
13181 </desc>
13182 </param>
13183 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13184 <desc>
13185 Indices of the first elements of value sequences of particular metrics
13186 returned in @c returnData.
13187 </desc>
13188 </param>
13189 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13190 <desc>
13191 Lengths of value sequences of particular metrics.
13192 </desc>
13193 </param>
13194 <param name="returnData" type="long" dir="return" safearray="yes">
13195 <desc>
13196 Flattened array of all metric data containing sequences of values for
13197 each metric.
13198 </desc>
13199 </param>
13200 </method>
13201
13202 </interface>
13203
13204 <module name="VBoxSVC" context="LocalServer">
13205 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
13206 namespace="virtualbox.org">
13207 <interface name="IVirtualBox" default="yes"/>
13208 </class>
13209 </module>
13210
13211 <module name="VBoxC" context="InprocServer" threadingModel="Free">
13212 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
13213 namespace="virtualbox.org">
13214 <interface name="ISession" default="yes"/>
13215 </class>
13216 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
13217 namespace="virtualbox.org">
13218 <interface name="ILocalOwner" default="yes"/>
13219 <interface name="IVirtualBoxCallback"/>
13220 <interface name="IConsoleCallback"/>
13221 </class>
13222 </module>
13223
13224</library>
13225
13226</idl>
13227
13228<!-- 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