VirtualBox

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

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

Main/GuestProperties: cleaned up and fixed a problem with accessibility of properties after a VM shutdown

  • Property svn:eol-style set to native
File size: 517.1 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-2010 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="v1_10" value="12">
457 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
458 <!-- Machine changes: RTC localOrUTC (done)
459 CPU hot-plug support
460 -->
461 </const>
462 <const name="Future" value="13">
463 <desc>Settings version greater than "1.10", written by a future VirtualBox version.</desc>
464 </const>
465 </enum>
466
467 <enum
468 name="AccessMode"
469 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
470 >
471 <desc>
472 Access mode for opening files.
473 </desc>
474
475 <const name="ReadOnly" value="1"/>
476 <const name="ReadWrite" value="2"/>
477 </enum>
478
479 <enum
480 name="MachineState"
481 uuid="36518cf6-cdf0-4d0d-ad2a-5ee9c60c7494"
482 >
483 <desc>
484 Virtual machine execution state.
485
486 This enumeration represents possible values of the <link
487 to="IMachine::state"/> attribute.
488
489 Below is the basic virtual machine state diagram. It shows how the state
490 changes during virtual machine execution. The text in square braces shows
491 a method of the IConsole interface that performs the given state
492 transition.
493
494 <pre>
495 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
496 V |
497 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
498 | | | | V |
499 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
500 | | ^ | ^ |
501 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
502 | ^ | | | |
503 | | +-----------------------------------------+-|-------------------+ +
504 | | | | |
505 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
506 | | | |
507 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
508 | | |
509 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
510 </pre>
511
512 Note that states to the right from PoweredOff, Aborted and Saved in the
513 above diagram are called <i>online VM states</i>. These states
514 represent the virtual machine which is being executed in a dedicated
515 process (usually with a GUI window attached to it where you can see the
516 activity of the virtual machine and interact with it). There are two
517 special pseudo-states, FirstOnline and LastOnline, that can be used in
518 relational expressions to detect if the given machine state is online or
519 not:
520
521 <pre>
522 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
523 machine.GetState() &lt;= MachineState_LastOnline)
524 {
525 ...the machine is being executed...
526 }
527 </pre>
528
529 When the virtual machine is in one of the online VM states (that is, being
530 executed), only a few machine settings can be modified. Methods working
531 with such settings contain an explicit note about that. An attempt to
532 change any oter setting or perform a modifying operation during this time
533 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
534
535 All online states except Running, Paused and Stuck are transitional: they
536 represent temporary conditions of the virtual machine that will last as
537 long as the operation that initiated such a condition.
538
539 The Stuck state is a special case. It means that execution of the machine
540 has reached the "Guru Meditation" condition. This condition indicates an
541 internal VMM (virtual machine manager) failure which may happen as a
542 result of either an unhandled low-level virtual hardware exception or one
543 of the recompiler exceptions (such as the <i>too-many-traps</i>
544 condition).
545
546 Note also that any online VM state may transit to the Aborted state. This
547 happens if the process that is executing the virtual machine terminates
548 unexpectedly (for example, crashes). Other than that, the Aborted state is
549 equivalent to PoweredOff.
550
551 There are also a few additional state diagrams that do not deal with
552 virtual machine execution and therefore are shown separately. The states
553 shown on these diagrams are called <i>offline VM states</i> (this includes
554 PoweredOff, Aborted and Saved too).
555
556 The first diagram shows what happens when a lengthy setup operation is
557 being executed (such as <link to="IMachine::attachDevice"/>).
558
559 <pre>
560 +----------------------------------(same state as before the call)------+
561 | |
562 +-&gt; PoweredOff --+ |
563 | | |
564 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
565 | |
566 +-&gt; Saved -------+
567 </pre>
568
569 The next two diagrams demonstrate the process of taking a snapshot of a
570 powered off virtual machine and performing one of the "discard..."
571 operations, respectively.
572
573 <pre>
574 +----------------------------------(same state as before the call)------+
575 | |
576 +-&gt; PoweredOff --+ |
577 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
578 +-&gt; Aborted -----+
579
580 +-&gt; PoweredOff --+
581 | |
582 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
583 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
584 +-&gt; Saved -------+ |
585 | |
586 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
587 </pre>
588
589 Note that the Saving state is present in both the offline state group and
590 online state group. Currently, the only way to determine what group is
591 assumed in a particular case is to remember the previous machine state: if
592 it was Running or Paused, then Saving is an online state, otherwise it is
593 an offline state. This inconsistency may be removed in one of the future
594 versions of VirtualBox by adding a new state.
595
596 <note internal="yes">
597 For whoever decides to touch this enum: In order to keep the
598 comparisons involving FirstOnline and LastOnline pseudo-states valid,
599 the numeric values of these states must be correspondingly updated if
600 needed: for any online VM state, the condition
601 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
602 @c true. The same relates to transient states for which
603 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
604 @c true.
605 </note>
606 </desc>
607
608 <const name="Null" value="0">
609 <desc>Null value (never used by the API).</desc>
610 </const>
611 <const name="PoweredOff" value="1">
612 <desc>
613 The machine is not running and has no saved execution state; it has
614 either never been started or been shut down successfully.
615 </desc>
616 </const>
617 <const name="Saved" value="2">
618 <desc>
619 The machine is not currently running, but the execution state of the machine
620 has been saved to an external file when it was running, from where
621 it can be resumed.
622 </desc>
623 </const>
624 <const name="Teleported" value="3">
625 <desc>
626 The machine was teleported to a different host (or process) and then
627 powered off. Take care when powering it on again may corrupt resources
628 it shares with the teleportation target (e.g. disk and network).
629 </desc>
630 </const>
631 <const name="Aborted" value="4">
632 <desc>
633 The process running the machine has terminated abnormally. This may
634 indicate a crash of the VM process in host execution context, or
635 the VM process has been terminated externally.
636 </desc>
637 </const>
638 <const name="Running" value="5">
639 <desc>
640 The machine is currently being executed.
641 <note internal="yes">
642 For whoever decides to touch this enum: In order to keep the
643 comparisons in the old source code valid, this state must immediately
644 precede the Paused state.
645 TODO: Lift this spectacularly wonderful restriction.
646 </note>
647 </desc>
648 </const>
649 <const name="Paused" value="6">
650 <desc>
651 Execution of the machine has been paused.
652 <note internal="yes">
653 For whoever decides to touch this enum: In order to keep the
654 comparisons in the old source code valid, this state must immediately
655 follow the Running state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Stuck" value="7">
661 <desc>
662 Execution of the machine has reached the "Guru Meditation"
663 condition. This indicates a severe error in the hypervisor itself.
664 <note internal="yes">
665 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
666 "Guru", perhaps? Or are there some other VMM states that are
667 intended to be lumped in here as well?
668 </note>
669 </desc>
670 </const>
671 <const name="Teleporting" value="8">
672 <desc>
673 The machine is about to be teleported to a different host or process.
674 It is possible to pause a machine in this state, but it will go to the
675 <link to="MachineState::PausedTeleporting"/> state and it will not be
676 possible to resume it again unless the teleportation fails.
677 </desc>
678 </const>
679 <const name="LiveSnapshotting" value="9">
680 <desc>
681 A live snapshot is being taken. The machine is running normally, but
682 some of the runtime configuration options are inaccessible. Also, if
683 paused while in this state it will transition to
684 <link to="MachineState::Saving"/> and it will not be resume the
685 execution until the snapshot operation has completed.
686 </desc>
687 </const>
688 <const name="Starting" value="10">
689 <desc>
690 Machine is being started after powering it on from a
691 zero execution state.
692 </desc>
693 </const>
694 <const name="Stopping" value="11">
695 <desc>
696 Machine is being normally stopped powering it off, or after the guest OS
697 has initiated a shutdown sequence.
698 </desc>
699 </const>
700 <const name="Saving" value="12">
701 <desc>
702 Machine is saving its execution state to a file, or an online
703 snapshot of the machine is being taken.
704 </desc>
705 </const>
706 <const name="Restoring" value="13">
707 <desc>
708 Execution state of the machine is being restored from a file
709 after powering it on from the saved execution state.
710 </desc>
711 </const>
712 <const name="TeleportingPausedVM" value="14">
713 <desc>
714 The machine is being teleported to another host or process, but it is
715 not running. This is the paused variant of the
716 <link to="MachineState::Teleporting"/> state.
717 </desc>
718 </const>
719 <const name="TeleportingIn" value="15">
720 <desc>
721 Teleporting the machine state in from another host or process.
722 </desc>
723 </const>
724 <const name="RestoringSnapshot" value="16">
725 <desc>
726 A machine snapshot is being restored; this typically does not take long.
727 </desc>
728 </const>
729 <const name="DeletingSnapshot" value="17">
730 <desc>
731 A machine snapshot is being deleted; this can take a long time since this
732 may require merging differencing media.
733 </desc>
734 </const>
735 <const name="SettingUp" value="18">
736 <desc>
737 Lengthy setup operation is in progress.
738 </desc>
739 </const>
740
741 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
742 <desc>
743 Pseudo-state: first online state (for use in relational expressions).
744 </desc>
745 </const>
746 <const name="LastOnline" value="13" wsmap="suppress"> <!-- TeleportingIn -->
747 <desc>
748 Pseudo-state: last online state (for use in relational expressions).
749 </desc>
750 </const>
751
752 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
753 <desc>
754 Pseudo-state: first transient state (for use in relational expressions).
755 </desc>
756 </const>
757 <const name="LastTransient" value="18" wsmap="suppress"> <!-- SettingUp -->
758 <desc>
759 Pseudo-state: last transient state (for use in relational expressions).
760 </desc>
761 </const>
762
763 </enum>
764
765 <enum
766 name="SessionState"
767 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
768 >
769 <desc>
770 Session state. This enumeration represents possible values of
771 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
772 attributes. See individual enumerator descriptions for the meaning for
773 every value.
774 </desc>
775
776 <const name="Null" value="0">
777 <desc>Null value (never used by the API).</desc>
778 </const>
779 <const name="Closed" value="1">
780 <desc>
781 The machine has no open sessions (<link to="IMachine::sessionState"/>);
782 the session is closed (<link to="ISession::state"/>)
783 </desc>
784 </const>
785 <const name="Open" value="2">
786 <desc>
787 The machine has an open direct session (<link to="IMachine::sessionState"/>);
788 the session is open (<link to="ISession::state"/>)
789 </desc>
790 </const>
791 <const name="Spawning" value="3">
792 <desc>
793 A new (direct) session is being opened for the machine as a result of
794 <link to="IVirtualBox::openRemoteSession"/> call
795 (<link to="IMachine::sessionState"/> or <link to="ISession::state"/>).
796 This state also occurs as a short transient state when a new direct
797 session is opened by calling <link to="IVirtualBox::openSession"/>.
798 </desc>
799 </const>
800 <const name="Closing" value="4">
801 <desc>
802 The direct session is being closed (<link to="IMachine::sessionState"/>);
803 the session is being closed (<link to="ISession::state"/>)
804 </desc>
805 </const>
806 </enum>
807
808 <enum
809 name="CPUPropertyType"
810 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
811 >
812 <desc>
813 Virtual CPU property type. This enumeration represents possible values of the
814 IMachine get- and setCPUProperty methods.
815 </desc>
816 <const name="Null" value="0">
817 <desc>Null value (never used by the API).</desc>
818 </const>
819 <const name="PAE" value="1">
820 <desc>
821 This setting determines whether VirtualBox will expose the Physical Address
822 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
823 is not available, it will not be reported.
824 </desc>
825 </const>
826 <const name="Synthetic" value="2">
827 <desc>
828 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
829 teleporting between host systems that differ significantly.
830 </desc>
831 </const>
832 </enum>
833
834
835 <enum
836 name="HWVirtExPropertyType"
837 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
838 >
839 <desc>
840 Hardware virtualization property type. This enumeration represents possible values
841 for the <link to="IMachine::getHWVirtExProperty"/> and
842 <link to="IMachine::setHWVirtExProperty"/> methods.
843 </desc>
844 <const name="Null" value="0">
845 <desc>Null value (never used by the API).</desc>
846 </const>
847 <const name="Enabled" value="1">
848 <desc>
849 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
850 such extensions are not available, they will not be used.
851 </desc>
852 </const>
853 <const name="Exclusive" value="2">
854 <desc>
855 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
856 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
857 feature of the host. To share these with other hypervisors, you must disable this property.
858 </desc>
859 </const>
860 <const name="VPID" value="3">
861 <desc>
862 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
863 </desc>
864 </const>
865 <const name="NestedPaging" value="4">
866 <desc>
867 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
868 </desc>
869 </const>
870 <const name="LargePages" value="5">
871 <desc>
872 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
873 </desc>
874 </const>
875 </enum>
876
877 <enum
878 name="SessionType"
879 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
880 >
881 <desc>
882 Session type. This enumeration represents possible values of the
883 <link to="ISession::type"/> attribute.
884 </desc>
885
886 <const name="Null" value="0">
887 <desc>Null value (never used by the API).</desc>
888 </const>
889 <const name="Direct" value="1">
890 <desc>
891 Direct session
892 (opened by <link to="IVirtualBox::openSession"/>)
893 </desc>
894 </const>
895 <const name="Remote" value="2">
896 <desc>
897 Remote session
898 (opened by <link to="IVirtualBox::openRemoteSession"/>)
899 </desc>
900 </const>
901 <const name="Existing" value="3">
902 <desc>
903 Existing session
904 (opened by <link to="IVirtualBox::openExistingSession"/>)
905 </desc>
906 </const>
907 </enum>
908
909 <enum
910 name="DeviceType"
911 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
912 >
913 <desc>
914 Device type.
915 </desc>
916 <const name="Null" value="0">
917 <desc>
918 Null value, may also mean "no device" (not allowed for
919 <link to="IConsole::getDeviceActivity"/>).
920 </desc>
921 </const>
922 <const name="Floppy" value="1">
923 <desc>Floppy device.</desc>
924 </const>
925 <const name="DVD" value="2">
926 <desc>CD/DVD-ROM device.</desc>
927 </const>
928 <const name="HardDisk" value="3">
929 <desc>Hard disk device.</desc>
930 </const>
931 <const name="Network" value="4">
932 <desc>Network device.</desc>
933 </const>
934 <const name="USB" value="5">
935 <desc>USB device.</desc>
936 </const>
937 <const name="SharedFolder" value="6">
938 <desc>Shared folder device.</desc>
939 </const>
940 </enum>
941
942 <enum
943 name="DeviceActivity"
944 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
945 >
946 <desc>
947 Device activity for <link to="IConsole::getDeviceActivity"/>.
948 </desc>
949
950 <const name="Null" value="0"/>
951 <const name="Idle" value="1"/>
952 <const name="Reading" value="2"/>
953 <const name="Writing" value="3"/>
954 </enum>
955
956 <enum
957 name="ClipboardMode"
958 uuid="33364716-4008-4701-8f14-be0fa3d62950"
959 >
960 <desc>
961 Host-Guest clipboard interchange mode.
962 </desc>
963
964 <const name="Disabled" value="0"/>
965 <const name="HostToGuest" value="1"/>
966 <const name="GuestToHost" value="2"/>
967 <const name="Bidirectional" value="3"/>
968 </enum>
969
970 <enum
971 name="Scope"
972 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
973 >
974 <desc>
975 Scope of the operation.
976
977 A generic enumeration used in various methods to define the action or
978 argument scope.
979 </desc>
980
981 <const name="Global" value="0"/>
982 <const name="Machine" value="1"/>
983 <const name="Session" value="2"/>
984 </enum>
985
986 <enum
987 name="GuestStatisticType"
988 uuid="aa7c1d71-aafe-47a8-9608-27d2d337cf55"
989 >
990 <desc>
991 Statistics type for <link to="IGuest::getStatistic"/>.
992 </desc>
993
994 <const name="CPULoad_Idle" value="0">
995 <desc>
996 Idle CPU load (0-100%) for last interval.
997 </desc>
998 </const>
999 <const name="CPULoad_Kernel" value="1">
1000 <desc>
1001 Kernel CPU load (0-100%) for last interval.
1002 </desc>
1003 </const>
1004 <const name="CPULoad_User" value="2">
1005 <desc>
1006 User CPU load (0-100%) for last interval.
1007 </desc>
1008 </const>
1009 <const name="Threads" value="3">
1010 <desc>
1011 Total number of threads in the system.
1012 </desc>
1013 </const>
1014 <const name="Processes" value="4">
1015 <desc>
1016 Total number of processes in the system.
1017 </desc>
1018 </const>
1019 <const name="Handles" value="5">
1020 <desc>
1021 Total number of handles in the system.
1022 </desc>
1023 </const>
1024 <const name="MemoryLoad" value="6">
1025 <desc>
1026 Memory load (0-100%).
1027 </desc>
1028 </const>
1029 <const name="PhysMemTotal" value="7">
1030 <desc>
1031 Total physical memory in megabytes.
1032 </desc>
1033 </const>
1034 <const name="PhysMemAvailable" value="8">
1035 <desc>
1036 Free physical memory in megabytes.
1037 </desc>
1038 </const>
1039 <const name="PhysMemBalloon" value="9">
1040 <desc>
1041 Ballooned physical memory in megabytes.
1042 </desc>
1043 </const>
1044 <const name="MemCommitTotal" value="10">
1045 <desc>
1046 Total amount of memory in the committed state in megabytes.
1047 </desc>
1048 </const>
1049 <const name="MemKernelTotal" value="11">
1050 <desc>
1051 Total amount of memory used by the guest OS's kernel in megabytes.
1052 </desc>
1053 </const>
1054 <const name="MemKernelPaged" value="12">
1055 <desc>
1056 Total amount of paged memory used by the guest OS's kernel in megabytes.
1057 </desc>
1058 </const>
1059 <const name="MemKernelNonpaged" value="13">
1060 <desc>
1061 Total amount of non-paged memory used by the guest OS's kernel in megabytes.
1062 </desc>
1063 </const>
1064 <const name="MemSystemCache" value="14">
1065 <desc>
1066 Total amount of memory used by the guest OS's system cache in megabytes.
1067 </desc>
1068 </const>
1069 <const name="PageFileSize" value="15">
1070 <desc>
1071 Pagefile size in megabytes.
1072 </desc>
1073 </const>
1074 <const name="SampleNumber" value="16">
1075 <desc>
1076 Statistics sample number
1077 </desc>
1078 </const>
1079 <const name="MaxVal" value="17"/>
1080 </enum>
1081
1082 <enum
1083 name="BIOSBootMenuMode"
1084 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1085 >
1086 <desc>
1087 BIOS boot menu mode.
1088 </desc>
1089
1090 <const name="Disabled" value="0"/>
1091 <const name="MenuOnly" value="1"/>
1092 <const name="MessageAndMenu" value="2"/>
1093 </enum>
1094
1095 <enum
1096 name="ProcessorFeature"
1097 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1098 >
1099 <desc>
1100 CPU features.
1101 </desc>
1102
1103 <const name="HWVirtEx" value="0"/>
1104 <const name="PAE" value="1"/>
1105 <const name="LongMode" value="2"/>
1106 <const name="NestedPaging" value="3"/>
1107 </enum>
1108
1109 <enum
1110 name="FirmwareType"
1111 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1112 >
1113 <desc>
1114 Firmware type.
1115 </desc>
1116 <const name="BIOS" value="1">
1117 <desc>BIOS Firmware.</desc>
1118 </const>
1119 <const name="EFI" value="2">
1120 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1121 </const>
1122 <const name="EFI32" value="3">
1123 <desc>Efi firmware, 32-bit.</desc>
1124 </const>
1125 <const name="EFI64" value="4">
1126 <desc>Efi firmware, 64-bit.</desc>
1127 </const>
1128 <const name="EFIDUAL" value="5">
1129 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1130 </const>
1131 </enum>
1132
1133 <enum
1134 name="PointingHidType"
1135 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1136 >
1137 <desc>
1138 Type of pointing device used in a virtual machine.
1139 </desc>
1140 <const name="None" value="1">
1141 <desc>No mouse.</desc>
1142 </const>
1143 <const name="PS2Mouse" value="2">
1144 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1145 </const>
1146 <const name="USBMouse" value="3">
1147 <desc>USB mouse (relative pointer).</desc>
1148 </const>
1149 <const name="USBTablet" value="4">
1150 <desc>USB tablet (absolute pointer).</desc>
1151 </const>
1152 <const name="ComboMouse" value="5">
1153 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1154 Using of such device can have negative performance implications. </desc>
1155 </const>
1156 </enum>
1157
1158 <enum
1159 name="KeyboardHidType"
1160 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1161 >
1162 <desc>
1163 Type of keyboard device used in a virtual machine.
1164 </desc>
1165 <const name="None" value="1">
1166 <desc>No keyboard.</desc>
1167 </const>
1168 <const name="PS2Keyboard" value="2">
1169 <desc>PS/2 keyboard.</desc>
1170 </const>
1171 <const name="USBKeyboard" value="3">
1172 <desc>USB keyboard.</desc>
1173 </const>
1174 <const name="ComboKeyboard" value="4">
1175 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1176 Using of such device can have negative performance implications. </desc>
1177 </const>
1178 </enum>
1179
1180 <enum
1181 name="IoMgrType"
1182 uuid="35567419-4d2a-4256-a74e-efcae33493a2"
1183 >
1184 <desc>
1185 Type of the I/O manager used for the image files in a virtual machine.
1186 </desc>
1187 <const name="Simple" value="1">
1188 <desc>Simple manager. Normally only used if the default one runs into an
1189 error. </desc>
1190 </const>
1191 <const name="Async" value="2">
1192 <desc>Asynchronous manager using the async I/O API on the host if present.
1193 This is the default manager.</desc>
1194 </const>
1195 </enum>
1196
1197 <enum
1198 name="IoBackendType"
1199 uuid="2a7e16d1-4e6b-4d5d-b0c9-b9bbe6c5b2ad"
1200 >
1201 <desc>
1202 Type of I/O backend used for the image files in a virtual machine.
1203 </desc>
1204 <const name="Buffered" value="1">
1205 <desc>Image files will use the host cache if possible.
1206 This type does not work with the Async I/O manager on Linux hosts.
1207 Default on all hosts except Linux.</desc>
1208 </const>
1209 <const name="Unbuffered" value="2">
1210 <desc>Image files will not use the host cache.
1211 This should be used on OS X and Linux hosts if a high I/O load is expected
1212 or many virtual machines are running to prevent I/O cache
1213 related hangs. Default on Linux hosts.</desc>
1214 </const>
1215 </enum>
1216
1217 <!--
1218 // IVirtualBoxErrorInfo
1219 /////////////////////////////////////////////////////////////////////////
1220 -->
1221
1222 <interface
1223 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1224 uuid="4b86d186-407e-4f9e-8be8-e50061be8725"
1225 supportsErrorInfo="no"
1226 wsmap="managed"
1227 >
1228 <desc>
1229 The IVirtualBoxErrorInfo interface represents extended error information.
1230
1231 Extended error information can be set by VirtualBox components after
1232 unsuccessful or partially successful method invocation. This information
1233 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1234 and then shown to the client in addition to the plain 32-bit result code.
1235
1236 In MS COM, this interface extends the IErrorInfo interface,
1237 in XPCOM, it extends the nsIException interface. In both cases,
1238 it provides a set of common attributes to retrieve error
1239 information.
1240
1241 Sometimes invocation of some component's method may involve methods of
1242 other components that may also fail (independently of this method's
1243 failure), or a series of non-fatal errors may precede a fatal error that
1244 causes method failure. In cases like that, it may be desirable to preserve
1245 information about all errors happened during method invocation and deliver
1246 it to the caller. The <link to="#next"/> attribute is intended
1247 specifically for this purpose and allows to represent a chain of errors
1248 through a single IVirtualBoxErrorInfo object set after method invocation.
1249
1250 Note that errors are stored to a chain in the reverse order, i.e. the
1251 initial error object you query right after method invocation is the last
1252 error set by the callee, the object it points to in the @a next attribute
1253 is the previous error and so on, up to the first error (which is the last
1254 in the chain).
1255 </desc>
1256
1257 <attribute name="resultCode" type="long" readonly="yes">
1258 <desc>
1259 Result code of the error.
1260 Usually, it will be the same as the result code returned
1261 by the method that provided this error information, but not
1262 always. For example, on Win32, CoCreateInstance() will most
1263 likely return E_NOINTERFACE upon unsuccessful component
1264 instantiation attempt, but not the value the component factory
1265 returned. Value is typed 'long', not 'result',
1266 to make interface usable from scripting languages.
1267 <note>
1268 In MS COM, there is no equivalent.
1269 In XPCOM, it is the same as nsIException::result.
1270 </note>
1271 </desc>
1272 </attribute>
1273
1274 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1275 <desc>
1276 UUID of the interface that defined the error.
1277 <note>
1278 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1279 data type.
1280 In XPCOM, there is no equivalent.
1281 </note>
1282 </desc>
1283 </attribute>
1284
1285 <attribute name="component" type="wstring" readonly="yes">
1286 <desc>
1287 Name of the component that generated the error.
1288 <note>
1289 In MS COM, it is the same as IErrorInfo::GetSource.
1290 In XPCOM, there is no equivalent.
1291 </note>
1292 </desc>
1293 </attribute>
1294
1295 <attribute name="text" type="wstring" readonly="yes">
1296 <desc>
1297 Text description of the error.
1298 <note>
1299 In MS COM, it is the same as IErrorInfo::GetDescription.
1300 In XPCOM, it is the same as nsIException::message.
1301 </note>
1302 </desc>
1303 </attribute>
1304
1305 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1306 <desc>
1307 Next error object if there is any, or @c null otherwise.
1308 <note>
1309 In MS COM, there is no equivalent.
1310 In XPCOM, it is the same as nsIException::inner.
1311 </note>
1312 </desc>
1313 </attribute>
1314
1315 </interface>
1316
1317 <interface
1318 name="ILocalOwner" extends="$unknown"
1319 uuid="308FF42A-DC45-49D4-A950-B1EEE5E00BB5" wsmap="suppress"
1320 >
1321 <desc>
1322 The ILocalOwner interface allows to register local objects
1323 (created without COM calls, but with new()).
1324 Once registered, calls to methods of such objects can be made
1325 from remote COM processes.
1326 The main usecase is the event callback implementation where
1327 API clients provide callback objects.
1328 </desc>
1329 <method name="setLocalObject">
1330 <desc>
1331 Set local object.
1332 </desc>
1333 <param name="object" type="$unknown" dir="in">
1334 <desc>Local object to forward requests to.
1335 If null, clears currently set local object.</desc>
1336 </param>
1337 </method>
1338 </interface>
1339
1340 <!--
1341 // IVirtualBox
1342 /////////////////////////////////////////////////////////////////////////
1343 -->
1344
1345 <interface
1346 name="IVirtualBoxCallback" extends="$unknown"
1347 uuid="9a65adf2-3ee6-406b-bca2-2b1fa05f0d0b"
1348 wsmap="suppress"
1349 >
1350
1351 <method name="onMachineStateChange">
1352 <desc>
1353 The execution state of the given machine has changed.
1354 <see>IMachine::state</see>
1355 </desc>
1356 <param name="machineId" type="uuid" mod="string" dir="in">
1357 <desc>ID of the machine this event relates to.</desc>
1358 </param>
1359 <param name="state" type="MachineState" dir="in">
1360 <desc>New execution state.</desc>
1361 </param>
1362 </method>
1363
1364 <method name="onMachineDataChange">
1365 <desc>
1366 Any of the settings of the given machine has changed.
1367 </desc>
1368 <param name="machineId" type="uuid" mod="string" dir="in">
1369 <desc>ID of the machine this event relates to.</desc>
1370 </param>
1371 </method>
1372
1373 <method name="onExtraDataCanChange">
1374 <desc>
1375 Notification when someone tries to change extra data for
1376 either the given machine or (if @c null) global extra data.
1377 This gives the chance to veto against changes.
1378 </desc>
1379 <param name="machineId" type="uuid" mod="string" dir="in">
1380 <desc>
1381 ID of the machine this event relates to
1382 (@c null ID for global extra data change requests).
1383 </desc>
1384 </param>
1385 <param name="key" type="wstring" dir="in">
1386 <desc>
1387 Extra data key for the attempted write.
1388 </desc>
1389 </param>
1390 <param name="value" type="wstring" dir="in">
1391 <desc>
1392 Extra data value for the given key.
1393 </desc>
1394 </param>
1395 <param name="error" type="wstring" dir="out">
1396 <desc>
1397 Optional error message describing the reason of the
1398 veto (ignored if this notification returns @c true).
1399 </desc>
1400 </param>
1401 <param name="allowChange" type="boolean" dir="return">
1402 <desc>
1403 Flag to indicate whether the callee agrees (@c true)
1404 or vetoes against the change (@c false).
1405 </desc>
1406 </param>
1407 </method>
1408
1409 <method name="onExtraDataChange">
1410 <desc>
1411 Notification when machine specific or global extra data
1412 has changed.
1413 </desc>
1414 <param name="machineId" type="uuid" mod="string" dir="in">
1415 <desc>
1416 ID of the machine this event relates to.
1417 Null for global extra data changes.
1418 </desc>
1419 </param>
1420 <param name="key" type="wstring" dir="in">
1421 <desc>
1422 Extra data key that has changed.
1423 </desc>
1424 </param>
1425 <param name="value" type="wstring" dir="in">
1426 <desc>
1427 Extra data value for the given key.
1428 </desc>
1429 </param>
1430 </method>
1431
1432 <method name="onMediumRegistered">
1433 <desc>
1434 The given medium was registered or unregistered
1435 within this VirtualBox installation.
1436
1437 The @a mediumType parameter describes what type of
1438 medium the specified @a mediumId refers to. Possible
1439 values are:
1440
1441 <ul>
1442 <li><link to="DeviceType_HardDisk"/>: the medium is a hard disk
1443 that, if registered, can be obtained using the
1444 <link to="IVirtualBox::getHardDisk"/> call.</li>
1445 <li><link to="DeviceType_DVD"/>: the medium is a CD/DVD image
1446 that, if registered, can be obtained using the
1447 <link to="IVirtualBox::getDVDImage"/> call.</li>
1448 <li><link to="DeviceType_Floppy"/>: the medium is a Floppy image
1449 that, if registered, can be obtained using the
1450 <link to="IVirtualBox::getFloppyImage"/> call.</li>
1451 </ul>
1452
1453 Note that if this is a deregistration notification,
1454 there is no way to access the object representing the
1455 unregistered medium. It is supposed that the
1456 application will do required cleanup based on the
1457 @a mediumId value.
1458 </desc>
1459 <param name="mediumId" type="uuid" mod="string" dir="in">
1460 <desc>ID of the medium this event relates to.</desc>
1461 </param>
1462 <param name="mediumType" type="DeviceType" dir="in">
1463 <desc>Type of the medium this event relates to.</desc>
1464 </param>
1465 <param name="registered" type="boolean" dir="in">
1466 <desc>
1467 If @c true, the medium was registered, otherwise it was
1468 unregistered.
1469 </desc>
1470 </param>
1471 </method>
1472
1473 <method name="onMachineRegistered">
1474 <desc>
1475 The given machine was registered or unregistered
1476 within this VirtualBox installation.
1477 </desc>
1478 <param name="machineId" type="uuid" mod="string" dir="in">
1479 <desc>ID of the machine this event relates to.</desc>
1480 </param>
1481 <param name="registered" type="boolean" dir="in">
1482 <desc>
1483 If @c true, the machine was registered, otherwise it was
1484 unregistered.
1485 </desc>
1486 </param>
1487 </method>
1488
1489 <method name="onSessionStateChange">
1490 <desc>
1491 The state of the session for the given machine was changed.
1492 <see>IMachine::sessionState</see>
1493 </desc>
1494 <param name="machineId" type="uuid" mod="string" dir="in">
1495 <desc>ID of the machine this event relates to.</desc>
1496 </param>
1497 <param name="state" type="SessionState" dir="in">
1498 <desc>New session state.</desc>
1499 </param>
1500 </method>
1501
1502 <method name="onSnapshotTaken">
1503 <desc>
1504 A new snapshot of the machine has been taken.
1505 <see>ISnapshot</see>
1506 </desc>
1507 <param name="machineId" type="uuid" mod="string" dir="in">
1508 <desc>ID of the machine this event relates to.</desc>
1509 </param>
1510 <param name="snapshotId" type="uuid" mod="string" dir="in">
1511 <desc>ID of the new snapshot.</desc>
1512 </param>
1513 </method>
1514
1515 <method name="onSnapshotDiscarded">
1516 <desc>
1517 Snapshot of the given machine has been discarded.
1518
1519 <note>
1520 This notification is delivered <b>after</b> the snapshot
1521 object has been uninitialized on the server (so that any
1522 attempt to call its methods will return an error).
1523 </note>
1524
1525 <see>ISnapshot</see>
1526 </desc>
1527 <param name="machineId" type="uuid" mod="string" dir="in">
1528 <desc>ID of the machine this event relates to.</desc>
1529 </param>
1530 <param name="snapshotId" type="uuid" mod="string" dir="in">
1531 <desc>
1532 ID of the discarded snapshot. @c null means the current machine
1533 state has been discarded (restored from the current snapshot).
1534 </desc>
1535 </param>
1536 </method>
1537
1538 <method name="onSnapshotChange">
1539 <desc>
1540 Snapshot properties (name and/or description) have been changed.
1541 <see>ISnapshot</see>
1542 </desc>
1543 <param name="machineId" type="uuid" mod="string" dir="in">
1544 <desc>ID of the machine this event relates to.</desc>
1545 </param>
1546 <param name="snapshotId" type="uuid" mod="string" dir="in">
1547 <desc>ID of the changed snapshot.</desc>
1548 </param>
1549 </method>
1550
1551 <method name="onGuestPropertyChange">
1552 <desc>
1553 Notification when a guest property has changed.
1554 </desc>
1555 <param name="machineId" type="uuid" mod="string" dir="in">
1556 <desc>
1557 ID of the machine this event relates to.
1558 </desc>
1559 </param>
1560 <param name="name" type="wstring" dir="in">
1561 <desc>
1562 The name of the property that has changed.
1563 </desc>
1564 </param>
1565 <param name="value" type="wstring" dir="in">
1566 <desc>
1567 The new property value.
1568 </desc>
1569 </param>
1570 <param name="flags" type="wstring" dir="in">
1571 <desc>
1572 The new property flags.
1573 </desc>
1574 </param>
1575 </method>
1576
1577 </interface>
1578
1579 <interface
1580 name="IDHCPServer" extends="$unknown"
1581 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1582 wsmap="managed"
1583 >
1584 <desc>
1585 The IDHCPServer interface represents the vbox dhcp server configuration.
1586
1587 To enumerate all the dhcp servers on the host, use the
1588 <link to="IVirtualBox::DHCPServers"/> attribute.
1589 </desc>
1590
1591 <attribute name="enabled" type="boolean">
1592 <desc>
1593 specifies if the dhcp server is enabled
1594 </desc>
1595 </attribute>
1596
1597 <attribute name="IPAddress" type="wstring" readonly="yes">
1598 <desc>
1599 specifies server IP
1600 </desc>
1601 </attribute>
1602
1603 <attribute name="networkMask" type="wstring" readonly="yes">
1604 <desc>
1605 specifies server network mask
1606 </desc>
1607 </attribute>
1608
1609 <attribute name="networkName" type="wstring" readonly="yes">
1610 <desc>
1611 specifies internal network name the server is used for
1612 </desc>
1613 </attribute>
1614
1615 <attribute name="lowerIP" type="wstring" readonly="yes">
1616 <desc>
1617 specifies from IP adrres in server address range
1618 </desc>
1619 </attribute>
1620
1621 <attribute name="upperIP" type="wstring" readonly="yes">
1622 <desc>
1623 specifies to IP adrres in server address range
1624 </desc>
1625 </attribute>
1626
1627 <method name="setConfiguration">
1628 <desc>
1629 configures the server
1630 <result name="E_INVALIDARG">
1631 invalid configuration supplied
1632 </result>
1633 </desc>
1634 <param name="IPAddress" type="wstring" dir="in">
1635 <desc>
1636 server IP address
1637 </desc>
1638 </param>
1639 <param name="networkMask" type="wstring" dir="in">
1640 <desc>
1641 server network mask
1642 </desc>
1643 </param>
1644 <param name="FromIPAddress" type="wstring" dir="in">
1645 <desc>
1646 server From IP address for address range
1647 </desc>
1648 </param>
1649 <param name="ToIPAddress" type="wstring" dir="in">
1650 <desc>
1651 server To IP address for address range
1652 </desc>
1653 </param>
1654 </method>
1655
1656 <method name="start">
1657 <desc>
1658 Starts DHCP server process.
1659 <result name="E_FAIL">
1660 Failed to start the process.
1661 </result>
1662 </desc>
1663 <param name="networkName" type="wstring" dir="in">
1664 <desc>
1665 Name of internal network DHCP server should attach to.
1666 </desc>
1667 </param>
1668 <param name="trunkName" type="wstring" dir="in">
1669 <desc>
1670 Name of internal network trunk.
1671 </desc>
1672 </param>
1673 <param name="trunkType" type="wstring" dir="in">
1674 <desc>
1675 Type of internal network trunk.
1676 </desc>
1677 </param>
1678 </method>
1679
1680 <method name="stop">
1681 <desc>
1682 Stops DHCP server process.
1683 <result name="E_FAIL">
1684 Failed to stop the process.
1685 </result>
1686 </desc>
1687 </method>
1688 </interface>
1689
1690 <interface
1691 name="IVirtualBox" extends="$unknown"
1692 uuid="3f36e024-7fed-4f20-a02c-9158a82b44e6"
1693 wsmap="managed"
1694 >
1695 <desc>
1696 The IVirtualBox interface represents the main interface exposed by the
1697 product that provides virtual machine management.
1698
1699 An instance of IVirtualBox is required for the product to do anything
1700 useful. Even though the interface does not expose this, internally,
1701 IVirtualBox is implemented as a singleton and actually lives in the
1702 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1703 IVirtualBox can track the state of all virtual machines on a particular
1704 host, regardless of which frontend started them.
1705
1706 To enumerate all the virtual machines on the host, use the
1707 <link to="IVirtualBox::machines"/> attribute.
1708 </desc>
1709
1710 <attribute name="version" type="wstring" readonly="yes">
1711 <desc>
1712 A string representing the version number of the product. The
1713 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1714 last number represents the build number and will frequently change.
1715 </desc>
1716 </attribute>
1717
1718 <attribute name="revision" type="unsigned long" readonly="yes">
1719 <desc>
1720 The internal build revision number of the product.
1721 </desc>
1722 </attribute>
1723
1724 <attribute name="packageType" type="wstring" readonly="yes">
1725 <desc>
1726 A string representing the package type of this product. The
1727 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1728 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1729 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1730 this.
1731 </desc>
1732 </attribute>
1733
1734 <attribute name="homeFolder" type="wstring" readonly="yes">
1735 <desc>
1736 Full path to the directory where the global settings file,
1737 <tt>VirtualBox.xml</tt>, is stored.
1738
1739 In this version of VirtualBox, the value of this property is
1740 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1741 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1742 as determined by the host OS), and cannot be changed.
1743
1744 This path is also used as the base to resolve relative paths in
1745 places where relative paths are allowed (unless otherwise
1746 expressly indicated).
1747 </desc>
1748 </attribute>
1749
1750 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1751 <desc>
1752 Full name of the global settings file.
1753 The value of this property corresponds to the value of
1754 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1755 </desc>
1756 </attribute>
1757
1758 <attribute name="host" type="IHost" readonly="yes">
1759 <desc>Associated host object.</desc>
1760 </attribute>
1761
1762 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1763 <desc>Associated system information object.</desc>
1764 </attribute>
1765
1766 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1767 <desc>
1768 Array of machine objects registered within this VirtualBox instance.
1769 </desc>
1770 </attribute>
1771
1772 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1773 <desc>
1774 Array of medium objects known to this VirtualBox installation.
1775
1776 This array contains only base media. All differencing
1777 media of the given base medium can be enumerated using
1778 <link to="IMedium::children"/>.
1779 </desc>
1780 </attribute>
1781
1782 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1783 <desc>
1784 Array of CD/DVD image objects registered with this VirtualBox instance.
1785 </desc>
1786 </attribute>
1787
1788 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1789 <desc>
1790 Array of floppy image objects registered with this VirtualBox instance.
1791 </desc>
1792 </attribute>
1793
1794 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1795
1796 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1797
1798 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1799 <desc>
1800 Collection of global shared folders. Global shared folders are
1801 available to all virtual machines.
1802
1803 New shared folders are added to the collection using
1804 <link to="#createSharedFolder"/>. Existing shared folders can be
1805 removed using <link to="#removeSharedFolder"/>.
1806
1807 <note>
1808 In the current version of the product, global shared folders are not
1809 implemented and therefore this collection is always empty.
1810 </note>
1811 </desc>
1812 </attribute>
1813
1814 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1815 <desc>
1816 Associated performance collector object.
1817 </desc>
1818 </attribute>
1819
1820 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1821 <desc>
1822 dhcp server settings.
1823 </desc>
1824 </attribute>
1825
1826 <method name="createMachine">
1827 <desc>
1828 Creates a new virtual machine.
1829
1830 The new machine is created unregistered, with the initial configuration
1831 set according to the specified guest OS type. A typical sequence of
1832 actions to create a new virtual machine is as follows:
1833
1834 <ol>
1835 <li>
1836 Call this method to have a new machine created. The returned machine
1837 object will be "mutable" allowing to change any machine property.
1838 </li>
1839
1840 <li>
1841 Configure the machine using the appropriate attributes and methods.
1842 </li>
1843
1844 <li>
1845 Call <link to="IMachine::saveSettings" /> to write the settings
1846 to the machine's XML settings file. The configuration of the newly
1847 created machine will not be saved to disk until this method is
1848 called.
1849 </li>
1850
1851 <li>
1852 Call <link to="#registerMachine" /> to add the machine to the list
1853 of machines known to VirtualBox.
1854 </li>
1855 </ol>
1856
1857 You should specify valid name for the newly created machine when calling
1858 this method. See the <link to="IMachine::name"/> attribute description
1859 for more details about the machine name.
1860
1861 The specified guest OS type identifier must match an ID of one of known
1862 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1863 array.
1864
1865 Every machine has a <i>settings file</i> that is used to store
1866 the machine configuration. This file is stored in a directory called the
1867 <i>machine settings subfolder</i>. Both the settings subfolder and file
1868 will have a name that corresponds to the name of the virtual machine.
1869 You can specify where to create the machine setting subfolder using the
1870 @a baseFolder argument. The base folder can be absolute (full path) or
1871 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1872 directory</link>.
1873
1874 If @a baseFolder is a @c null or empty string (which is recommended), the
1875 <link to="ISystemProperties::defaultMachineFolder">default machine
1876 settings folder</link> will be used as a base folder for the created
1877 machine. Otherwise the given base folder will be used. In either case,
1878 the full path to the resulting settings file has the following
1879 structure:
1880 <pre>
1881 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1882 </pre>
1883
1884 Note that if the resulting settings file already exists, this method
1885 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1886
1887 Optionally, you may specify an UUID of to assign to the created machine.
1888 However, this is not recommended and you should normally pass an empty
1889 (@c null) UUID to this method so that a new UUID will be automatically
1890 generated for every created machine. You can use UUID
1891 00000000-0000-0000-0000-000000000000 as @c null value.
1892
1893 <note>
1894 There is no way to change the name of the settings file or
1895 subfolder of the created machine directly.
1896 </note>
1897
1898 <result name="VBOX_E_OBJECT_NOT_FOUND">
1899 @a osTypeId is invalid.
1900 </result>
1901 <result name="VBOX_E_FILE_ERROR">
1902 Resulting settings file name is invalid or the settings file already
1903 exists or could not be created due to an I/O error.
1904 </result>
1905 <result name="E_INVALIDARG">
1906 @a name is empty or @c null.
1907 </result>
1908 </desc>
1909
1910 <param name="name" type="wstring" dir="in">
1911 <desc>Machine name.</desc>
1912 </param>
1913 <param name="osTypeId" type="wstring" dir="in">
1914 <desc>Guest OS Type ID.</desc>
1915 </param>
1916 <param name="baseFolder" type="wstring" dir="in">
1917 <desc>Base machine folder (optional).</desc>
1918 </param>
1919 <param name="id" type="uuid" mod="string" dir="in">
1920 <desc>Machine UUID (optional).</desc>
1921 </param>
1922 <param name="override" type="boolean" dir="in">
1923 <desc>Create the VM even if there are conflicting files.</desc>
1924 </param>
1925 <param name="machine" type="IMachine" dir="return">
1926 <desc>Created machine object.</desc>
1927 </param>
1928 </method>
1929
1930 <method name="createLegacyMachine">
1931 <desc>
1932 Creates a new virtual machine in "legacy" mode, using the specified
1933 settings file to store machine settings.
1934
1935 As opposed to machines created by <link to="#createMachine"/>,
1936 the settings file of the machine created in "legacy" mode is not
1937 automatically renamed when the machine name is changed -- it will always
1938 remain the same as specified in this method call.
1939
1940 The specified settings file name can be absolute (full path) or relative
1941 to the <link to="IVirtualBox::homeFolder">VirtualBox home
1942 directory</link>. If the file name doesn't contain an extension, the
1943 default extension (.xml) will be appended.
1944
1945 Note that the configuration of the newly created machine is not
1946 saved to disk (and therefore no settings file is created)
1947 until <link to="IMachine::saveSettings"/> is called. If the
1948 specified settings file already exists, this method
1949 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1950
1951 See <link to="#createMachine"/> for more information.
1952
1953 @deprecated This method may be removed later. Use <link
1954 to="IVirtualBox::createMachine"/> instead.
1955
1956 <note>
1957 There is no way to change the name of the settings file
1958 of the machine created in "legacy" mode.
1959 </note>
1960
1961 <result name="VBOX_E_OBJECT_NOT_FOUND">
1962 @a osTypeId is invalid.
1963 </result>
1964 <result name="VBOX_E_FILE_ERROR">
1965 @a settingsFile is invalid or the settings file already exists or
1966 could not be created due to an I/O error.
1967 </result>
1968 <result name="E_INVALIDARG">
1969 @a name or @a settingsFile is empty or @c null.
1970 </result>
1971 </desc>
1972
1973 <param name="name" type="wstring" dir="in">
1974 <desc>Machine name.</desc>
1975 </param>
1976 <param name="osTypeId" type="wstring" dir="in">
1977 <desc>Machine OS Type ID.</desc>
1978 </param>
1979 <param name="settingsFile" type="wstring" dir="in">
1980 <desc>Name of the machine settings file.</desc>
1981 </param>
1982 <param name="id" type="uuid" mod="string" dir="in">
1983 <desc>Machine UUID (optional).</desc>
1984 </param>
1985 <param name="machine" type="IMachine" dir="return">
1986 <desc>Created machine object.</desc>
1987 </param>
1988 </method>
1989
1990 <method name="openMachine">
1991 <desc>
1992 Opens a virtual machine from the existing settings file.
1993 The opened machine remains unregistered until you call
1994 <link to="#registerMachine"/>.
1995
1996 The specified settings file name can be absolute
1997 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1998 VirtualBox home directory</link>. This file must exist
1999 and must be a valid machine settings file whose contents
2000 will be used to construct the machine object.
2001
2002 @deprecated Will be removed soon.
2003 <result name="VBOX_E_FILE_ERROR">
2004 Settings file name invalid, not found or sharing violation.
2005 </result>
2006 </desc>
2007 <param name="settingsFile" type="wstring" dir="in">
2008 <desc>
2009 Name of the machine settings file.
2010 </desc>
2011 </param>
2012 <param name="machine" type="IMachine" dir="return">
2013 <desc>Opened machine object.</desc>
2014 </param>
2015 <note>
2016 <link to="IMachine::settingsModified"/> will return
2017 @c false for the created machine, until any of machine settings
2018 are changed.
2019 </note>
2020 </method>
2021
2022 <method name="registerMachine">
2023 <desc>
2024
2025 Registers the machine previously created using
2026 <link to="#createMachine"/> or opened using
2027 <link to="#openMachine"/> within this VirtualBox installation. After
2028 successful method invocation, the
2029 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
2030 to all registered callbacks.
2031
2032 <note>
2033 This method implicitly calls <link to="IMachine::saveSettings"/>
2034 to save all current machine settings before registering it.
2035 </note>
2036
2037 <result name="VBOX_E_OBJECT_NOT_FOUND">
2038 No matching virtual machine found.
2039 </result>
2040 <result name="VBOX_E_INVALID_OBJECT_STATE">
2041 Virtual machine was not created within this VirtualBox instance.
2042 </result>
2043
2044 </desc>
2045 <param name="machine" type="IMachine" dir="in"/>
2046 </method>
2047
2048 <method name="getMachine">
2049 <desc>
2050 Attempts to find a virtual machine given its UUID.
2051 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
2052 instead.
2053
2054 <result name="VBOX_E_OBJECT_NOT_FOUND">
2055 Could not find registered machine matching @a id.
2056 </result>
2057
2058 </desc>
2059 <param name="id" type="uuid" mod="string" dir="in"/>
2060 <param name="machine" type="IMachine" dir="return"/>
2061 </method>
2062
2063 <method name="findMachine">
2064 <desc>
2065 Attempts to find a virtual machine given its name.
2066 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
2067 instead.
2068
2069 <result name="VBOX_E_OBJECT_NOT_FOUND">
2070 Could not find registered machine matching @a name.
2071 </result>
2072
2073 </desc>
2074 <param name="name" type="wstring" dir="in"/>
2075 <param name="machine" type="IMachine" dir="return"/>
2076 </method>
2077
2078 <method name="unregisterMachine">
2079 <desc>
2080
2081 Unregisters the machine previously registered using
2082 <link to="#registerMachine"/>. After successful method invocation, the
2083 <link to="IVirtualBoxCallback::onMachineRegistered"/> signal is sent
2084 to all registered callbacks.
2085
2086 <note>
2087 The specified machine must not be in the Saved state, have an open
2088 (or a spawning) direct session associated with it, have snapshots or
2089 have any medium attached.
2090 </note>
2091
2092 <note>
2093 This method implicitly calls <link to="IMachine::saveSettings"/> to
2094 save all current machine settings before unregistering it.
2095 </note>
2096
2097 <note>
2098 If the given machine is inaccessible (see
2099 <link to="IMachine::accessible"/>), it will be unregistered and
2100 fully uninitialized right afterwards. As a result, the returned
2101 machine object will be unusable and an attempt to call
2102 <b>any</b> method will return the "Object not ready" error.
2103 </note>
2104
2105 <result name="VBOX_E_OBJECT_NOT_FOUND">
2106 Could not find registered machine matching @a id.
2107 </result>
2108 <result name="VBOX_E_INVALID_VM_STATE">
2109 Machine is in Saved state.
2110 </result>
2111 <result name="VBOX_E_INVALID_OBJECT_STATE">
2112 Machine has snapshot or open session or medium attached.
2113 </result>
2114
2115 </desc>
2116 <param name="id" type="uuid" mod="string" dir="in">
2117 <desc>UUID of the machine to unregister.</desc>
2118 </param>
2119 <param name="machine" type="IMachine" dir="return">
2120 <desc>Unregistered machine object.</desc>
2121 </param>
2122 </method>
2123
2124 <method name="createAppliance">
2125 <desc>
2126 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
2127 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
2128 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
2129 </desc>
2130 <param name="appliance" type="IAppliance" dir="return">
2131 <desc>New appliance.</desc>
2132 </param>
2133 </method>
2134
2135 <method name="createHardDisk">
2136 <desc>
2137 Creates a new base medium object that will use the given storage
2138 format and location for medium data.
2139
2140 Note that the actual storage unit is not created by this method. In
2141 order to do it, and before you are able to attach the created medium
2142 to virtual machines, you must call one of the following methods to
2143 allocate a format-specific storage unit at the specified location:
2144 <ul>
2145 <li><link to="IMedium::createBaseStorage"/></li>
2146 <li><link to="IMedium::createDiffStorage"/></li>
2147 </ul>
2148
2149 Some medium attributes, such as <link to="IMedium::id"/>, may
2150 remain uninitialized until the medium storage unit is successfully
2151 created by one of the above methods.
2152
2153 After the storage unit is successfully created, the medium gets
2154 remembered by this VirtualBox installation and will be accessible
2155 through <link to="#getHardDisk"/> and <link to="#findHardDisk"/>
2156 methods. Remembered base medium are also returned as part of
2157 the <link to="#hardDisks"/> array. See IMedium for more details.
2158
2159 The list of all storage formats supported by this VirtualBox
2160 installation can be obtained using
2161 <link to="ISystemProperties::mediumFormats"/>. If the @a format
2162 attribute is empty or @c null then the default storage format
2163 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
2164 be used for creating a storage unit of the medium.
2165
2166 Note that the format of the location string is storage format specific.
2167 See <link to="IMedium::location"/>, IMedium and
2168 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2169
2170 <result name="VBOX_E_OBJECT_NOT_FOUND">
2171 @a format identifier is invalid. See
2172 <link to="ISystemProperties::mediumFormats"/>.
2173 </result>
2174 <result name="VBOX_E_FILE_ERROR">
2175 @a location is a not valid file name (for file-based formats only).
2176 </result>
2177 </desc>
2178 <param name="format" type="wstring" dir="in">
2179 <desc>
2180 Identifier of the storage format to use for the new medium.
2181 </desc>
2182 </param>
2183 <param name="location" type="wstring" dir="in">
2184 <desc>
2185 Location of the storage unit for the new medium.
2186 </desc>
2187 </param>
2188 <param name="medium" type="IMedium" dir="return">
2189 <desc>Created medium object.</desc>
2190 </param>
2191 </method>
2192
2193 <method name="openHardDisk">
2194 <desc>
2195 Opens a medium from an existing location, optionally replacing
2196 the image UUID and/or parent UUID.
2197
2198 After the medium is successfully opened by this method, it gets
2199 remembered by (known to) this VirtualBox installation and will be
2200 accessible through <link to="#getHardDisk"/> and
2201 <link to="#findHardDisk"/> methods. Remembered base media
2202 are also returned as part of the <link to="#hardDisks"/> array and can
2203 be attached to virtual machines. See IMedium for more details.
2204
2205 If a differencing medium is to be opened by this method, the
2206 operation will succeed only if its parent medium and all ancestors,
2207 if any, are already known to this VirtualBox installation (for example,
2208 were opened by this method before).
2209
2210 This method tries to guess the storage format of the specified medium
2211 by reading medium data at the specified location.
2212
2213 If @a accessMode is ReadWrite (which it should be), the image is opened
2214 for read/write access and must have according permissions, as VirtualBox
2215 may actually write status information into the disk's metadata sections.
2216
2217 Note that write access is required for all typical image usage in VirtualBox,
2218 since VirtualBox may need to write metadata such as a UUID into the image.
2219 The only exception is opening a source image temporarily for copying and
2220 cloning when the image will quickly be closed again.
2221
2222 Note that the format of the location string is storage format specific.
2223 See <link to="IMedium::location"/>, IMedium and
2224 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
2225
2226 <result name="VBOX_E_FILE_ERROR">
2227 Invalid medium storage file location or could not find the medium
2228 at the specified location.
2229 </result>
2230 <result name="VBOX_E_IPRT_ERROR">
2231 Could not get medium storage format.
2232 </result>
2233 <result name="E_INVALIDARG">
2234 Invalid medium storage format.
2235 </result>
2236
2237 </desc>
2238 <param name="location" type="wstring" dir="in">
2239 <desc>
2240 Location of the storage unit that contains medium data in one of
2241 the supported storage formats.
2242 </desc>
2243 </param>
2244 <param name="accessMode" type="AccessMode" dir="in">
2245 <desc>
2246 Determines whether to open the image in read/write or read-only mode.
2247 </desc>
2248 </param>
2249 <param name="setImageId" type="boolean" dir="in">
2250 <desc>
2251 Select whether a new image UUID is set or not.
2252 </desc>
2253 </param>
2254 <param name="imageId" type="uuid" mod="string" dir="in">
2255 <desc>
2256 New UUID for the image. If an empty string is passed, then a new
2257 UUID is automatically created. Specifying a zero UUIDs is not valid.
2258 </desc>
2259 </param>
2260 <param name="setParentId" type="boolean" dir="in">
2261 <desc>
2262 Select whether a new parent UUID is set or not.
2263 </desc>
2264 </param>
2265 <param name="parentId" type="uuid" mod="string" dir="in">
2266 <desc>
2267 New parent UUID for the image. If an empty string is passed, then a
2268 new UUID is automatically created, provided @a setParentId is
2269 @c true. A zero UUID is valid.
2270 </desc>
2271 </param>
2272 <param name="medium" type="IMedium" dir="return">
2273 <desc>Opened medium object.</desc>
2274 </param>
2275 </method>
2276
2277 <method name="getHardDisk" const="yes">
2278 <desc>
2279 Returns a medium with the given UUID.
2280
2281 The medium with the given UUID must be known to this VirtualBox
2282 installation, i.e. it must be previously created by
2283 <link to="#createHardDisk"/> or opened by <link
2284 to="#openHardDisk"/>, or attached to some known virtual machine.
2285
2286 <result name="VBOX_E_OBJECT_NOT_FOUND">
2287 No medium object matching @a id found.
2288 </result>
2289
2290 </desc>
2291 <param name="id" type="uuid" mod="string" dir="in">
2292 <desc>UUID of the medium to look for.</desc>
2293 </param>
2294 <param name="medium" type="IMedium" dir="return">
2295 <desc>Found medium object.</desc>
2296 </param>
2297 </method>
2298
2299 <method name="findHardDisk">
2300 <desc>
2301 Returns a medium that uses the given location to store medium data.
2302
2303 The given medium must be known to this VirtualBox installation, i.e.
2304 it must be previously created by
2305 <link to="#createHardDisk"/> or opened by <link
2306 to="#openHardDisk"/>, or attached to some known virtual machine.
2307
2308 The search is done by comparing the value of the @a location argument to
2309 the <link to="IMedium::location"/> attribute of each known medium.
2310
2311 For locations represented by file names in the host's file system, the
2312 requested location can be a path relative to the
2313 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2314 only a file name without any path is given, the
2315 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
2316 folder</link> will be prepended to the file name before searching. Note
2317 that on case sensitive file systems, a case sensitive comparison is
2318 performed, otherwise the case of symbols in the file path is ignored.
2319
2320 <result name="VBOX_E_OBJECT_NOT_FOUND">
2321 No medium object matching @a location found.
2322 </result>
2323
2324 </desc>
2325 <param name="location" type="wstring" dir="in">
2326 <desc>Location string to search for.</desc>
2327 </param>
2328 <param name="medium" type="IMedium" dir="return">
2329 <desc>Found medium object.</desc>
2330 </param>
2331 </method>
2332
2333 <method name="openDVDImage">
2334 <desc>
2335 Opens a CD/DVD image contained in the specified file of the supported
2336 format and assigns it the given UUID.
2337
2338 After the image is successfully opened by this method, it gets
2339 remembered by (known to) this VirtualBox installation and will be
2340 accessible through <link to="#getDVDImage"/> and
2341 <link to="#findDVDImage"/> methods. Remembered images are also
2342 returned as part of the <link to="#DVDImages"/> array and can be mounted
2343 to virtual machines. See IMedium for more details.
2344
2345 See <link to="IMedium::location"/> to get more details about the format
2346 of the location string.
2347
2348 <note>
2349 Currently only ISO 9960 CD/DVD images are supported by VirtualBox.
2350 </note>
2351
2352 <result name="VBOX_E_FILE_ERROR">
2353 Invalid CD/DVD image file location or could not find the CD/DVD
2354 image at the specified location.
2355 </result>
2356 <result name="VBOX_E_INVALID_OBJECT_STATE">
2357 CD/DVD image already exists in the media registry.
2358 </result>
2359
2360 </desc>
2361 <param name="location" type="wstring" dir="in">
2362 <desc>
2363 Full path to the file that contains a valid CD/DVD image.
2364 </desc>
2365 </param>
2366 <param name="id" type="uuid" mod="string" dir="in">
2367 <desc>
2368 UUID to assign to the given image within this VirtualBox installation.
2369 If an empty (@c null) UUID is specified, the system will randomly
2370 generate a new UUID.
2371 </desc>
2372 </param>
2373 <param name="image" type="IMedium" dir="return">
2374 <desc>Opened CD/DVD image object.</desc>
2375 </param>
2376 </method>
2377
2378 <method name="getDVDImage">
2379 <desc>
2380 Returns a CD/DVD image with the given UUID.
2381
2382 The image with the given UUID must be known to this VirtualBox
2383 installation, i.e. it must be previously opened by <link
2384 to="#openDVDImage"/>, or mounted to some known virtual machine.
2385
2386 <result name="VBOX_E_OBJECT_NOT_FOUND">
2387 No matching DVD image found in the media registry.
2388 </result>
2389
2390 </desc>
2391 <param name="id" type="uuid" mod="string" dir="in">
2392 <desc>UUID of the image to look for.</desc>
2393 </param>
2394 <param name="image" type="IMedium" dir="return">
2395 <desc>Found CD/DVD image object.</desc>
2396 </param>
2397 </method>
2398
2399 <method name="findDVDImage">
2400 <desc>
2401 Returns a CD/DVD image with the given image location.
2402
2403 The image with the given UUID must be known to this VirtualBox
2404 installation, i.e. it must be previously opened by <link
2405 to="#openDVDImage"/>, or mounted to some known virtual machine.
2406
2407 The search is done by comparing the value of the @a location argument to
2408 the <link to="IMedium::location"/> attribute of each known CD/DVD image.
2409
2410 The requested location can be a path relative to the
2411 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2412 only a file name without any path is given, the
2413 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2414 folder</link> will be prepended to the file name before searching. Note
2415 that on case sensitive file systems, a case sensitive comparison is
2416 performed, otherwise the case in the file path is ignored.
2417
2418 <result name="VBOX_E_FILE_ERROR">
2419 Invalid image file location.
2420 </result>
2421 <result name="VBOX_E_OBJECT_NOT_FOUND">
2422 No matching DVD image found in the media registry.
2423 </result>
2424
2425 </desc>
2426 <param name="location" type="wstring" dir="in">
2427 <desc>CD/DVD image file path to look for.</desc>
2428 </param>
2429 <param name="image" type="IMedium" dir="return">
2430 <desc>Found CD/DVD image object.</desc>
2431 </param>
2432 </method>
2433
2434 <method name="openFloppyImage">
2435 <desc>
2436 Opens a floppy image contained in the specified file of the supported
2437 format and assigns it the given UUID.
2438
2439 After the image is successfully opened by this method, it gets
2440 remembered by (known to) this VirtualBox installation and will be
2441 accessible through <link to="#getFloppyImage"/> and
2442 <link to="#findFloppyImage"/> methods. Remembered images are also
2443 returned as part of the <link to="#floppyImages"/> array and can be
2444 mounted to virtual machines. See IMedium for more details.
2445
2446 See <link to="IMedium::location"/> to get more details about the format
2447 of the location string.
2448
2449 <result name="VBOX_E_FILE_ERROR">
2450 Invalid floppy image file location or could not find the floppy
2451 image at the specified location.
2452 </result>
2453 <result name="VBOX_E_INVALID_OBJECT_STATE">
2454 Floppy image already exists in the media registry.
2455 </result>
2456
2457 <note>
2458 Currently, only raw floppy images are supported by VirtualBox.
2459 </note>
2460 </desc>
2461 <param name="location" type="wstring" dir="in">
2462 <desc>
2463 Full path to the file that contains a valid floppy image.
2464 </desc>
2465 </param>
2466 <param name="id" type="uuid" mod="string" dir="in">
2467 <desc>
2468 UUID to assign to the given image file within this VirtualBox
2469 installation. If an empty (@c null) UUID is specified, the system will
2470 randomly generate a new UUID.
2471 </desc>
2472 </param>
2473 <param name="image" type="IMedium" dir="return">
2474 <desc>Opened floppy image object.</desc>
2475 </param>
2476 </method>
2477
2478 <method name="getFloppyImage">
2479 <desc>
2480 Returns a floppy image with the given UUID.
2481
2482 The image with the given UUID must be known to this VirtualBox
2483 installation, i.e. it must be previously opened by <link
2484 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2485
2486 <result name="VBOX_E_OBJECT_NOT_FOUND">
2487 No matching floppy image found in the media registry.
2488 </result>
2489
2490 </desc>
2491 <param name="id" type="uuid" mod="string" dir="in">
2492 <desc>UUID of the image to look for.</desc>
2493 </param>
2494 <param name="image" type="IMedium" dir="return">
2495 <desc>Found floppy image object.</desc>
2496 </param>
2497 </method>
2498
2499 <method name="findFloppyImage">
2500 <desc>
2501 Returns a floppy image with the given image location.
2502
2503 The image with the given UUID must be known to this VirtualBox
2504 installation, i.e. it must be previously opened by <link
2505 to="#openFloppyImage"/>, or mounted to some known virtual machine.
2506
2507 The search is done by comparing the value of the @a location argument to
2508 the <link to="IMedium::location"/> attribute of each known floppy image.
2509
2510 The requested location can be a path relative to the
2511 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
2512 only a file name without any path is given, the
2513 <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
2514 folder</link> will be prepended to the file name before searching. Note
2515 that on case sensitive file systems, a case sensitive comparison is
2516 performed, otherwise the case of symbols in the file path is ignored.
2517
2518 <result name="VBOX_E_FILE_ERROR">
2519 Invalid image file location.
2520 </result>
2521 <result name="VBOX_E_OBJECT_NOT_FOUND">
2522 No matching floppy image found in the media registry.
2523 </result>
2524
2525 </desc>
2526 <param name="location" type="wstring" dir="in">
2527 <desc>Floppy image file path to look for.</desc>
2528 </param>
2529 <param name="image" type="IMedium" dir="return">
2530 <desc>Found floppy image object.</desc>
2531 </param>
2532 </method>
2533
2534 <method name="getGuestOSType">
2535 <desc>
2536 Returns an object describing the specified guest OS type.
2537
2538 The requested guest OS type is specified using a string which is a
2539 mnemonic identifier of the guest operating system, such as
2540 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
2541 particular virtual machine can be read or set using the
2542 <link to="IMachine::OSTypeId"/> attribute.
2543
2544 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
2545 available guest OS type objects. Each object has an
2546 <link to="IGuestOSType::id"/> attribute which contains an identifier of
2547 the guest OS this object describes.
2548
2549 <result name="E_INVALIDARG">
2550 @a id is not a valid Guest OS type.
2551 </result>
2552
2553 </desc>
2554 <param name="id" type="uuid" mod="string" dir="in">
2555 <desc>Guest OS type ID string.</desc>
2556 </param>
2557 <param name="type" type="IGuestOSType" dir="return">
2558 <desc>Guest OS type object.</desc>
2559 </param>
2560 </method>
2561
2562 <method name="createSharedFolder">
2563 <desc>
2564 Creates a new global shared folder by associating the given logical
2565 name with the given host path, adds it to the collection of shared
2566 folders and starts sharing it. Refer to the description of
2567 <link to="ISharedFolder"/> to read more about logical names.
2568 <note>
2569 In the current implementation, this operation is not
2570 implemented.
2571 </note>
2572 </desc>
2573 <param name="name" type="wstring" dir="in">
2574 <desc>Unique logical name of the shared folder.</desc>
2575 </param>
2576 <param name="hostPath" type="wstring" dir="in">
2577 <desc>Full path to the shared folder in the host file system.</desc>
2578 </param>
2579 <param name="writable" type="boolean" dir="in">
2580 <desc>Whether the share is writable or readonly</desc>
2581 </param>
2582 </method>
2583
2584 <method name="removeSharedFolder">
2585 <desc>
2586 Removes the global shared folder with the given name previously
2587 created by <link to="#createSharedFolder"/> from the collection of
2588 shared folders and stops sharing it.
2589 <note>
2590 In the current implementation, this operation is not
2591 implemented.
2592 </note>
2593 </desc>
2594 <param name="name" type="wstring" dir="in">
2595 <desc>Logical name of the shared folder to remove.</desc>
2596 </param>
2597 </method>
2598
2599 <method name="getExtraDataKeys">
2600 <desc>
2601 Returns an array representing the global extra data keys which currently
2602 have values defined.
2603 </desc>
2604 <param name="value" type="wstring" dir="return" safearray="yes">
2605 <desc>Array of extra data keys.</desc>
2606 </param>
2607 </method>
2608
2609 <method name="getExtraData">
2610 <desc>
2611 Returns associated global extra data.
2612
2613 If the requested data @a key does not exist, this function will
2614 succeed and return an empty string in the @a value argument.
2615
2616 <result name="VBOX_E_FILE_ERROR">
2617 Settings file not accessible.
2618 </result>
2619 <result name="VBOX_E_XML_ERROR">
2620 Could not parse the settings file.
2621 </result>
2622
2623 </desc>
2624 <param name="key" type="wstring" dir="in">
2625 <desc>Name of the data key to get.</desc>
2626 </param>
2627 <param name="value" type="wstring" dir="return">
2628 <desc>Value of the requested data key.</desc>
2629 </param>
2630 </method>
2631
2632 <method name="setExtraData">
2633 <desc>
2634 Sets associated global extra data.
2635
2636 If you pass @c null or empty string as a key @a value, the given @a key
2637 will be deleted.
2638
2639 <note>
2640 Before performing the actual data change, this method will ask all
2641 registered callbacks using the
2642 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
2643 notification for a permission. If one of the callbacks refuses the
2644 new value, the change will not be performed.
2645 </note>
2646 <note>
2647 On success, the
2648 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
2649 is called to inform all registered callbacks about a successful data
2650 change.
2651 </note>
2652
2653 <result name="VBOX_E_FILE_ERROR">
2654 Settings file not accessible.
2655 </result>
2656 <result name="VBOX_E_XML_ERROR">
2657 Could not parse the settings file.
2658 </result>
2659 <result name="E_ACCESSDENIED">
2660 Modification request refused.
2661 </result>
2662
2663 </desc>
2664 <param name="key" type="wstring" dir="in">
2665 <desc>Name of the data key to set.</desc>
2666 </param>
2667 <param name="value" type="wstring" dir="in">
2668 <desc>Value to assign to the key.</desc>
2669 </param>
2670 </method>
2671
2672 <method name="openSession">
2673 <desc>
2674 Opens a new direct session with the given virtual machine.
2675
2676 A direct session acts as a local lock on the given VM.
2677 There can be only one direct session open at a time for every
2678 virtual machine, protecting the VM from being manipulated by
2679 conflicting actions from different processes. Only after a
2680 direct session has been opened, one can change all VM settings
2681 and execute the VM in the process space of the session object.
2682
2683 Sessions therefore can be compared to mutex semaphores that
2684 lock a given VM for modification and execution.
2685 See <link to="ISession">ISession</link> for details.
2686
2687 <note>Unless you are writing a new VM frontend, you will not
2688 want to execute a VM in the current process. To spawn a new
2689 process that executes a VM, use
2690 <link to="IVirtualBox::openRemoteSession" />
2691 instead.</note>
2692
2693 Upon successful return, the session object can be used to
2694 get access to the machine and to the VM console.
2695
2696 In VirtualBox terminology, the machine becomes "mutable" after
2697 a session has been opened. Note that the "mutable" machine
2698 object, on which you may invoke IMachine methods to change its
2699 settings, will be a different object from the immutable IMachine
2700 objects returned by various IVirtualBox methods. To obtain a
2701 mutable IMachine object (upon which you can invoke settings methods),
2702 use the <link to="ISession::machine" /> attribute.
2703
2704 One must always call <link to="ISession::close" /> to release the
2705 lock on the machine, or the machine's state will eventually be
2706 set to "Aborted".
2707
2708 In other words, to change settings on a machine, the following
2709 sequence is typically performed:
2710
2711 <ol>
2712 <li>Call this method (openSession) to have a machine locked for
2713 the current session.</li>
2714
2715 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
2716
2717 <li>Change the settings of the machine.</li>
2718
2719 <li>Call <link to="IMachine::saveSettings" />.</li>
2720
2721 <li>Close the session by calling <link to="ISession::close"/>.</li>
2722 </ol>
2723
2724 <result name="E_UNEXPECTED">
2725 Virtual machine not registered.
2726 </result>
2727 <result name="E_ACCESSDENIED">
2728 Process not started by OpenRemoteSession.
2729 </result>
2730 <result name="VBOX_E_OBJECT_NOT_FOUND">
2731 No matching virtual machine found.
2732 </result>
2733 <result name="VBOX_E_INVALID_OBJECT_STATE">
2734 Session already open or being opened.
2735 </result>
2736 <result name="VBOX_E_VM_ERROR">
2737 Failed to assign machine to session.
2738 </result>
2739
2740 </desc>
2741 <param name="session" type="ISession" dir="in">
2742 <desc>
2743 Session object that will represent the opened session after
2744 successful method invocation. This object must not represent
2745 the already open session.
2746 <note>
2747 This session will be automatically closed if the
2748 VirtualBox server is terminated for some reason.
2749 </note>
2750 </desc>
2751 </param>
2752 <param name="machineId" type="uuid" mod="string" dir="in">
2753 <desc>ID of the virtual machine to open a session with.</desc>
2754 </param>
2755 </method>
2756
2757 <method name="openRemoteSession">
2758 <desc>
2759 Spawns a new process that executes a virtual machine (called a
2760 "remote session").
2761
2762 Opening a remote session causes the VirtualBox server to start a new
2763 process that opens a direct session with the given VM. As a result, the
2764 VM is locked by that direct session in the new process, preventing
2765 conflicting changes from other processes. Since sessions act as locks
2766 that prevent conflicting changes, one cannot open a remote session
2767 for a VM that already has another open session (direct or remote), or
2768 is currently in the process of opening one (see <link
2769 to="IMachine::sessionState"/>).
2770
2771 While the remote session still provides some level of control over the
2772 VM execution to the caller (using the <link to="IConsole" /> interface),
2773 not all VM settings are available for modification within the remote
2774 session context.
2775
2776 This operation can take some time (a new VM is started in a new process,
2777 for which memory and other resources need to be set up). Because of this,
2778 an <link to="IProgress" /> is returned to allow the caller to wait for this
2779 asynchronous operation to be completed. Until then, the remote session
2780 object remains in the closed state, and accessing the machine or its
2781 console through it is invalid. It is recommended to use
2782 <link to="IProgress::waitForCompletion" /> or similar calls to wait for
2783 completion. Completion is signalled when the VM is powered on. Error
2784 messages etc. can be queried via the progress object, if available.
2785
2786 As with all <link to="ISession" /> objects, it is recommended to call
2787 <link to="ISession::close" /> on the local session object once openRemoteSession()
2788 has been called. However, the session's state (see <link to="ISession::state" />)
2789 will not return to "Closed" until the remote session has also closed (i.e.
2790 until the VM is no longer running). In that case, however, the state of
2791 the session will automatically change back to "Closed".
2792
2793 Currently supported session types (values of the @a type
2794 argument) are:
2795 <ul>
2796 <li><tt>"gui"</tt>: VirtualBox Qt GUI session</li>
2797 <li><tt>"vrdp"</tt>: VirtualBox VRDP Server session</li>
2798 <li><tt>"sdl"</tt>: VirtualBox SDL GUI session</li>
2799 </ul>
2800
2801 The @a environment argument is a string containing definitions of
2802 environment variables in the following format:
2803 @code
2804 NAME[=VALUE]\n
2805 NAME[=VALUE]\n
2806 ...
2807 @endcode
2808 where <tt>\\n</tt> is the new line character. These environment
2809 variables will be appended to the environment of the VirtualBox server
2810 process. If an environment variable exists both in the server process
2811 and in this list, the value from this list takes precedence over the
2812 server's variable. If the value of the environment variable is
2813 omitted, this variable will be removed from the resulting environment.
2814 If the environment string is @c null or empty, the server environment
2815 is inherited by the started process as is.
2816
2817 <see>openExistingSession</see>
2818
2819 <result name="E_UNEXPECTED">
2820 Virtual machine not registered.
2821 </result>
2822 <result name="E_INVALIDARG">
2823 Invalid session type @a type.
2824 </result>
2825 <result name="VBOX_E_OBJECT_NOT_FOUND">
2826 No machine matching @a machineId found.
2827 </result>
2828 <result name="VBOX_E_INVALID_OBJECT_STATE">
2829 Session already open or being opened.
2830 </result>
2831 <result name="VBOX_E_IPRT_ERROR">
2832 Launching process for machine failed.
2833 </result>
2834 <result name="VBOX_E_VM_ERROR">
2835 Failed to assign machine to session.
2836 </result>
2837
2838 </desc>
2839 <param name="session" type="ISession" dir="in">
2840 <desc>
2841 Session object that will represent the opened remote session
2842 after successful method invocation (this object must not
2843 represent an already open session).
2844 </desc>
2845 </param>
2846 <param name="machineId" type="uuid" mod="string" dir="in">
2847 <desc>ID of the virtual machine to open a session with.</desc>
2848 </param>
2849 <param name="type" type="wstring" dir="in">
2850 <desc>
2851 Type of the remote session (case sensitive).
2852 </desc>
2853 </param>
2854 <param name="environment" type="wstring" dir="in">
2855 <desc>
2856 Environment to pass to the opened session.
2857 </desc>
2858 </param>
2859 <param name="progress" type="IProgress" dir="return">
2860 <desc>Progress object to track the operation completion.</desc>
2861 </param>
2862 </method>
2863
2864 <method name="openExistingSession">
2865 <desc>
2866 Opens a new remote session with the virtual machine for
2867 which a direct session is already open.
2868
2869 The remote session provides some level of control over the VM
2870 execution (using the IConsole interface) to the caller; however,
2871 within the remote session context, not all VM settings are available
2872 for modification.
2873
2874 As opposed to <link to="#openRemoteSession"/>, the number of
2875 remote sessions opened this way is not limited by the API
2876
2877 <note>
2878 It is an error to open a remote session with the machine that
2879 doesn't have an open direct session.
2880 </note>
2881
2882 <result name="E_UNEXPECTED">
2883 Virtual machine not registered.
2884 </result>
2885 <result name="VBOX_E_OBJECT_NOT_FOUND">
2886 No machine matching @a machineId found.
2887 </result>
2888 <result name="VBOX_E_INVALID_OBJECT_STATE">
2889 Session already open or being opened.
2890 </result>
2891 <result name="VBOX_E_INVALID_SESSION_STATE">
2892 Direct session state not Open.
2893 </result>
2894 <result name="VBOX_E_VM_ERROR">
2895 Failed to get console object from direct session or assign
2896 machine to session.
2897 </result>
2898
2899 <see>openRemoteSession</see>
2900 </desc>
2901 <param name="session" type="ISession" dir="in">
2902 <desc>
2903 Session object that will represent the open remote session
2904 after successful method invocation. This object must not
2905 represent an already open session.
2906 <note>
2907 This session will be automatically closed when the peer
2908 (direct) session dies or gets closed.
2909 </note>
2910 </desc>
2911 </param>
2912 <param name="machineId" type="uuid" mod="string" dir="in">
2913 <desc>ID of the virtual machine to open a session with.</desc>
2914 </param>
2915 </method>
2916
2917 <method name="registerCallback">
2918 <desc>
2919 Registers a new global VirtualBox callback. The methods of the given
2920 callback object will be called by VirtualBox when an appropriate
2921 event occurs.
2922
2923 <result name="E_INVALIDARG">
2924 A @c null callback cannot be registered.
2925 </result>
2926
2927 </desc>
2928 <param name="callback" type="IVirtualBoxCallback" dir="in">
2929 <desc>Callback object to register.</desc>
2930 </param>
2931 </method>
2932
2933 <method name="unregisterCallback">
2934 <desc>
2935 Unregisters the previously registered global VirtualBox callback.
2936
2937 <result name="E_INVALIDARG">
2938 Specified @a callback not registered.
2939 </result>
2940
2941 </desc>
2942 <param name="callback" type="IVirtualBoxCallback" dir="in">
2943 <desc>Callback object to unregister.</desc>
2944 </param>
2945 </method>
2946
2947 <method name="waitForPropertyChange">
2948 <desc>
2949 Blocks the caller until any of the properties represented by the
2950 @a what argument changes the value or until the given timeout interval
2951 expires.
2952
2953 The @a what argument is a comma separated list of property masks that
2954 describe properties the caller is interested in. The property mask is
2955 a string in the following format:
2956
2957 <pre>
2958 [[group.]subgroup.]name
2959 </pre>
2960
2961 where @c name is the property name and @c group, @c subgroup are zero
2962 or more property group specifiers. Each element (group or name) in
2963 the property mask may be either a Latin string or an asterisk symbol
2964 (@c "*") which is used to match any string for the given element. A
2965 property mask that doesn't contain asterisk symbols represents a
2966 single fully qualified property name.
2967
2968 Groups in the fully qualified property name go from more generic (the
2969 left-most part) to more specific (the right-most part). The first
2970 element is usually a name of the object the property belongs to. The
2971 second element may be either a property name, or a child object name,
2972 or an index if the preceding element names an object which is one of
2973 many objects of the same type. This way, property names form a
2974 hierarchy of properties. Here are some examples of property names:
2975
2976 <table>
2977 <tr>
2978 <td><tt>VirtualBox.version</tt></td>
2979 <td><link to="IVirtualBox::version"/> property</td>
2980 </tr>
2981 <tr>
2982 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2983 <td><link to="IMachine::name"/> property of the machine with the
2984 given UUID</td>
2985 </tr>
2986 </table>
2987
2988 Most property names directly correspond to the properties of objects
2989 (components) provided by the VirtualBox library and may be used to
2990 track changes to these properties. However, there may be
2991 pseudo-property names that don't correspond to any existing object's
2992 property directly, as well as there may be object properties that
2993 don't have a corresponding property name that is understood by this
2994 method, and therefore changes to such properties cannot be
2995 tracked. See individual object's property descriptions to get a
2996 fully qualified property name that can be used with this method (if
2997 any).
2998
2999 There is a special property mask @c "*" (i.e. a string consisting of a
3000 single asterisk symbol) that can be used to match all properties.
3001 Below are more examples of property masks:
3002
3003 <table>
3004 <tr>
3005 <td><tt>VirtualBox.*</tt></td>
3006 <td>Track all properties of the VirtualBox object</td>
3007 </tr>
3008 <tr>
3009 <td><tt>Machine.*.name</tt></td>
3010 <td>Track changes to the <link to="IMachine::name"/> property of
3011 all registered virtual machines</td>
3012 </tr>
3013 </table>
3014
3015 <note>
3016 This function is not implemented in the current version of the
3017 product.
3018 </note>
3019 </desc>
3020 <param name="what" type="wstring" dir="in">
3021 <desc>Comma separated list of property masks.</desc>
3022 </param>
3023 <param name="timeout" type="unsigned long" dir="in">
3024 <desc>
3025 Wait timeout in milliseconds.
3026 Specify -1 for an indefinite wait.
3027 </desc>
3028 </param>
3029 <param name="changed" type="wstring" dir="out">
3030 <desc>
3031 Comma separated list of properties that have been changed and caused
3032 this method to return to the caller.
3033 </desc>
3034 </param>
3035 <param name="values" type="wstring" dir="out">
3036 <desc>Reserved, not currently used.</desc>
3037 </param>
3038 </method>
3039
3040 <!--method name="createDHCPServerForInterface">
3041 <desc>
3042 Creates a dhcp server settings to be used for the given interface
3043 <result name="E_INVALIDARG">
3044 Host network interface @a name already exists.
3045 </result>
3046 </desc>
3047 <param name="interface" type="IHostNetworkInterface" dir="in">
3048 <desc>Network Interface</desc>
3049 </param>
3050 <param name="server" type="IDHCPServer" dir="out">
3051 <desc>Dhcp server settings</desc>
3052 </param>
3053 </method-->
3054
3055 <method name="createDHCPServer">
3056 <desc>
3057 Creates a dhcp server settings to be used for the given internal network name
3058 <result name="E_INVALIDARG">
3059 Host network interface @a name already exists.
3060 </result>
3061 </desc>
3062 <param name="name" type="wstring" dir="in">
3063 <desc>server name</desc>
3064 </param>
3065 <param name="server" type="IDHCPServer" dir="return">
3066 <desc>Dhcp server settings</desc>
3067 </param>
3068 </method>
3069
3070 <method name="findDHCPServerByNetworkName">
3071 <desc>
3072 Searches a dhcp server settings to be used for the given internal network name
3073 <result name="E_INVALIDARG">
3074 Host network interface @a name already exists.
3075 </result>
3076
3077 </desc>
3078 <param name="name" type="wstring" dir="in">
3079 <desc>server name</desc>
3080 </param>
3081 <param name="server" type="IDHCPServer" dir="return">
3082 <desc>Dhcp server settings</desc>
3083 </param>
3084 </method>
3085
3086 <!--method name="findDHCPServerForInterface">
3087 <desc>
3088 Searches a dhcp server settings to be used for the given interface
3089 <result name="E_INVALIDARG">
3090 Host network interface @a name already exists.
3091 </result>
3092 </desc>
3093 <param name="interface" type="IHostNetworkInterface" dir="in">
3094 <desc>Network Interface</desc>
3095 </param>
3096 <param name="server" type="IDHCPServer" dir="out">
3097 <desc>Dhcp server settings</desc>
3098 </param>
3099 </method-->
3100
3101 <method name="removeDHCPServer">
3102 <desc>
3103 Removes the dhcp server settings
3104 <result name="E_INVALIDARG">
3105 Host network interface @a name already exists.
3106 </result>
3107 </desc>
3108 <param name="server" type="IDHCPServer" dir="in">
3109 <desc>Dhcp server settings to be removed</desc>
3110 </param>
3111 </method>
3112
3113
3114 <method name="checkFirmwarePresent">
3115 <desc>
3116 Check if this VirtualBox installation has a firmware
3117 of the given type available, either system-wide or per-user.
3118 Optionally, this may return a hint where this firmware can be
3119 downloaded from.
3120 </desc>
3121 <param name="firmwareType" type="FirmwareType" dir="in">
3122 <desc>
3123 Type of firmware to check.
3124 </desc>
3125 </param>
3126 <param name="version" type="wstring" dir="in">
3127 <desc>Expected version number, usually empty string (presently ignored).</desc>
3128 </param>
3129
3130 <param name="url" type="wstring" dir="out">
3131 <desc>
3132 Suggested URL to download this firmware from.
3133 </desc>
3134 </param>
3135
3136 <param name="file" type="wstring" dir="out">
3137 <desc>
3138 Filename of firmware, only valid if result == TRUE.
3139 </desc>
3140 </param>
3141
3142 <param name="result" type="boolean" dir="return">
3143 <desc>If firmware of this type and version is available.</desc>
3144 </param>
3145 </method>
3146
3147 </interface>
3148
3149 <!--
3150 // IVFSExplorer
3151 /////////////////////////////////////////////////////////////////////////
3152 -->
3153
3154 <enum
3155 name="VFSType"
3156 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
3157 >
3158 <desc>
3159 Virtual file systems supported by VFSExplorer.
3160 </desc>
3161
3162 <const name="File" value="1" />
3163 <const name="Cloud" value="2" />
3164 <const name="S3" value="3" />
3165 <const name="WebDav" value="4" />
3166 </enum>
3167
3168 <enum
3169 name="VFSFileType"
3170 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
3171 >
3172 <desc>
3173 File types known by VFSExplorer.
3174 </desc>
3175
3176 <const name="Unknown" value="1" />
3177 <const name="Fifo" value="2" />
3178 <const name="DevChar" value="3" />
3179 <const name="Directory" value="4" />
3180 <const name="DevBlock" value="5" />
3181 <const name="File" value="6" />
3182 <const name="SymLink" value="7" />
3183 <const name="Socket" value="8" />
3184 <const name="WhiteOut" value="9" />
3185 </enum>
3186
3187 <interface
3188 name="IVFSExplorer" extends="$unknown"
3189 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
3190 wsmap="managed"
3191 >
3192 <desc>
3193 The VFSExplorer interface unifies access to different file system
3194 types. This includes local file systems as well remote file systems like
3195 S3. For a list of supported types see <link to="VFSType" />.
3196 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
3197 </desc>
3198
3199 <attribute name="path" type="wstring" readonly="yes">
3200 <desc>Returns the current path in the virtual file system.</desc>
3201 </attribute>
3202
3203 <attribute name="type" type="VFSType" readonly="yes">
3204 <desc>Returns the file system type which is currently in use.</desc>
3205 </attribute>
3206
3207 <method name="update">
3208 <desc>Updates the internal list of files/directories from the
3209 current directory level. Use <link to="#entryList" /> to get the full list
3210 after a call to this method.</desc>
3211
3212 <param name="aProgress" type="IProgress" dir="return">
3213 <desc>Progress object to track the operation completion.</desc>
3214 </param>
3215 </method>
3216
3217 <method name="cd">
3218 <desc>Change the current directory level.</desc>
3219
3220 <param name="aDir" type="wstring" dir="in">
3221 <desc>The name of the directory to go in.</desc>
3222 </param>
3223
3224 <param name="aProgress" type="IProgress" dir="return">
3225 <desc>Progress object to track the operation completion.</desc>
3226 </param>
3227 </method>
3228
3229 <method name="cdUp">
3230 <desc>Go one directory upwards from the current directory level.</desc>
3231
3232 <param name="aProgress" type="IProgress" dir="return">
3233 <desc>Progress object to track the operation completion.</desc>
3234 </param>
3235 </method>
3236
3237 <method name="entryList">
3238 <desc>Returns a list of files/directories after a call to <link
3239 to="#update" />. The user is responsible for keeping this internal
3240 list up do date.</desc>
3241
3242 <param name="aNames" type="wstring" safearray="yes" dir="out">
3243 <desc>The list of names for the entries.</desc>
3244 </param>
3245
3246 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
3247 <desc>The list of types for the entries.</desc>
3248 </param>
3249 </method>
3250
3251 <method name="exists">
3252 <desc>Checks if the given file list exists in the current directory
3253 level.</desc>
3254
3255 <param name="aNames" type="wstring" safearray="yes" dir="in">
3256 <desc>The names to check.</desc>
3257 </param>
3258
3259 <param name="aExists" type="wstring" safearray="yes" dir="return">
3260 <desc>The names which exist.</desc>
3261 </param>
3262 </method>
3263
3264 <method name="remove">
3265 <desc>Deletes the given files in the current directory level.</desc>
3266
3267 <param name="aNames" type="wstring" safearray="yes" dir="in">
3268 <desc>The names to remove.</desc>
3269 </param>
3270
3271 <param name="aProgress" type="IProgress" dir="return">
3272 <desc>Progress object to track the operation completion.</desc>
3273 </param>
3274 </method>
3275
3276 </interface>
3277
3278 <!--
3279 // IAppliance
3280 /////////////////////////////////////////////////////////////////////////
3281 -->
3282
3283 <interface
3284 name="IAppliance" extends="$unknown"
3285 uuid="e3ba9ab9-ac2c-4266-8bd2-91c4bf721ceb"
3286 wsmap="managed"
3287 >
3288 <desc>
3289 Represents a platform-independent appliance in OVF format. An instance of this is returned
3290 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
3291 virtual machines within an appliance with VirtualBox.
3292
3293 The OVF standard suggests two different physical file formats:
3294
3295 <ol>
3296 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
3297 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
3298 this descriptor file references other files such as disk images, as OVF appliances typically
3299 do, those additional files must be in the same directory as the descriptor file.</li>
3300
3301 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
3302 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
3303 files and optionally other files.
3304
3305 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
3306 be added with a later version.</li>
3307 </ol>
3308
3309 <b>Importing</b> an OVF appliance into VirtualBox as instances of
3310 <link to="IMachine" /> involves the following sequence of API calls:
3311
3312 <ol>
3313 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
3314 </li>
3315
3316 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
3317 would like to import. So long as this file is syntactically valid, this will succeed
3318 and return an instance of IAppliance that contains the parsed data from the OVF file.
3319 </li>
3320
3321 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
3322 contents of the IAppliance attributes accordingly. These can be inspected by a
3323 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
3324 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
3325 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
3326 systems in the OVF, which in turn describe the virtual hardware prescribed by the
3327 OVF (network and hardware adapters, virtual disk images, memory size and so on).
3328 The GUI can then give the user the option to confirm and/or change these suggestions.
3329 </li>
3330
3331 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3332 virtual system to override the suggestions made by the interpret() routine.
3333 </li>
3334
3335 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
3336 VirtualBox as instances of <link to="IMachine" /> that match the information in the
3337 virtual system descriptions.
3338 </li>
3339 </ol>
3340
3341 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
3342
3343 <ol>
3344 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
3345 an empty IAppliance object.
3346 </li>
3347
3348 <li>For each machine you would like to export, call <link to="IMachine::export" />
3349 with the IAppliance object you just created. This creates an instance of
3350 <link to="IVirtualSystemDescription" /> inside the appliance.
3351 </li>
3352
3353 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
3354 virtual system to override the suggestions made by the export() routine.
3355 </li>
3356
3357 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
3358 file written.</li>
3359 </ol>
3360
3361 </desc>
3362
3363 <attribute name="path" type="wstring" readonly="yes">
3364 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
3365 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
3366 <link to="#write" /> (for export).
3367 This attribute is empty until one of these methods has been called.
3368 </desc>
3369 </attribute>
3370
3371 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
3372 <desc>
3373 Array of virtual disk definitions. One such description exists for each
3374 disk definition in the OVF; each string array item represents one such piece of
3375 disk information, with the information fields separated by tab (\t) characters.
3376
3377 The caller should be prepared for additional fields being appended to
3378 this string in future versions of VirtualBox and therefore check for
3379 the number of tabs in the strings returned.
3380
3381 In the current version, the following eight fields are returned per string
3382 in the array:
3383
3384 <ol>
3385 <li>Disk ID (unique string identifier given to disk)</li>
3386
3387 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
3388
3389 <li>Populated size (optional unsigned integer indicating the current size of the
3390 disk; can be approximate; -1 if unspecified)</li>
3391
3392 <li>Format (string identifying the disk format, typically
3393 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
3394
3395 <li>Reference (where to find the disk image, typically a file name; if empty,
3396 then the disk should be created on import)</li>
3397
3398 <li>Image size (optional unsigned integer indicating the size of the image,
3399 which need not necessarily be the same as the values specified above, since
3400 the image may be compressed or sparse; -1 if not specified)</li>
3401
3402 <li>Chunk size (optional unsigned integer if the image is split into chunks;
3403 presently unsupported and always -1)</li>
3404
3405 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
3406 </ol>
3407 </desc>
3408 </attribute>
3409
3410 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
3411 <desc> Array of virtual system descriptions. One such description is created
3412 for each virtual system found in the OVF.
3413 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
3414 (for export) has been called.
3415 </desc>
3416 </attribute>
3417
3418 <method name="read">
3419 <desc>
3420 Reads an OVF file into the appliance object.
3421
3422 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
3423 mere fact that this method returns successfully does not mean that VirtualBox supports all
3424 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
3425 </desc>
3426 <param name="file" type="wstring" dir="in">
3427 <desc>
3428 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3429 on whether the appliance is distributed as a set of files or as a single file, respectively).
3430 </desc>
3431 </param>
3432 <param name="aProgress" type="IProgress" dir="return">
3433 <desc></desc>
3434 </param>
3435 </method>
3436
3437 <method name="interpret">
3438 <desc>
3439 Interprets the OVF data that was read when the appliance was constructed. After
3440 calling this method, one can inspect the
3441 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
3442 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
3443 the appliance.
3444
3445 Calling this method is the second step of importing an appliance into VirtualBox;
3446 see <link to="IAppliance" /> for an overview.
3447
3448 After calling this method, one should call <link to="#getWarnings" /> to find out
3449 if problems were encountered during the processing which might later lead to
3450 errors.
3451 </desc>
3452 </method>
3453
3454 <method name="importMachines">
3455 <desc>
3456 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
3457 and other interfaces that match the information contained in the appliance as
3458 closely as possible, as represented by the import instructions in the
3459 <link to="#virtualSystemDescriptions" /> array.
3460
3461 Calling this method is the final step of importing an appliance into VirtualBox;
3462 see <link to="IAppliance" /> for an overview.
3463
3464 Since importing the appliance will most probably involve copying and converting
3465 disk images, which can take a long time, this method operates asynchronously and
3466 returns an IProgress object to allow the caller to monitor the progress.
3467 </desc>
3468
3469 <param name="aProgress" type="IProgress" dir="return">
3470 <desc></desc>
3471 </param>
3472 </method>
3473
3474 <method name="createVFSExplorer">
3475 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
3476
3477 <param name="aUri" type="wstring" dir="in">
3478 <desc>The URI describing the file system to use.</desc>
3479 </param>
3480
3481 <param name="aExplorer" type="IVFSExplorer" dir="return">
3482 <desc></desc>
3483 </param>
3484 </method>
3485
3486 <method name="write">
3487 <desc>
3488 Writes the contents of the appliance exports into a new OVF file.
3489
3490 Calling this method is the final step of exporting an appliance from VirtualBox;
3491 see <link to="IAppliance" /> for an overview.
3492
3493 Since exporting the appliance will most probably involve copying and converting
3494 disk images, which can take a long time, this method operates asynchronously and
3495 returns an IProgress object to allow the caller to monitor the progress.
3496 </desc>
3497 <param name="format" type="wstring" dir="in">
3498 <desc>
3499 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
3500 future versions of VirtualBox may support additional formats.
3501 </desc>
3502 </param>
3503 <param name="path" type="wstring" dir="in">
3504 <desc>
3505 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
3506 on whether the appliance is distributed as a set of files or as a single file, respectively).
3507 </desc>
3508 </param>
3509 <param name="aProgress" type="IProgress" dir="return">
3510 <desc>Progress object to track the operation completion.</desc>
3511 </param>
3512 </method>
3513
3514 <method name="getWarnings">
3515 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
3516
3517 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
3518 <desc></desc>
3519 </param>
3520 </method>
3521
3522 </interface>
3523
3524 <enum
3525 name="VirtualSystemDescriptionType"
3526 uuid="aacc58de-5b45-4f82-ae2e-dd9a824fc3b5"
3527 >
3528 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
3529 a configuration value.</desc>
3530
3531 <const name="Ignore" value="1" />
3532 <const name="OS" value="2" />
3533 <const name="Name" value="3" />
3534 <const name="Product" value="4" />
3535 <const name="Vendor" value="5" />
3536 <const name="Version" value="6" />
3537 <const name="ProductUrl" value="7" />
3538 <const name="VendorUrl" value="8" />
3539 <const name="Description" value="9" />
3540 <const name="License" value="10" />
3541 <const name="Miscellaneous" value="11" />
3542 <const name="CPU" value="12" />
3543 <const name="Memory" value="13" />
3544 <const name="HardDiskControllerIDE" value="14" />
3545 <const name="HardDiskControllerSATA" value="15" />
3546 <const name="HardDiskControllerSCSI" value="16" />
3547 <const name="HardDiskImage" value="17" />
3548 <const name="Floppy" value="18" />
3549 <const name="CDROM" value="19" />
3550 <const name="NetworkAdapter" value="20" />
3551 <const name="USBController" value="21" />
3552 <const name="SoundCard" value="22" />
3553
3554 </enum>
3555
3556 <enum
3557 name="VirtualSystemDescriptionValueType"
3558 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
3559 >
3560 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
3561 type to fetch.</desc>
3562
3563 <const name="Reference" value="1" />
3564 <const name="Original" value="2" />
3565 <const name="Auto" value="3" />
3566 <const name="ExtraConfig" value="4" />
3567
3568 </enum>
3569
3570 <interface
3571 name="IVirtualSystemDescription" extends="$unknown"
3572 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
3573 wsmap="managed"
3574 >
3575
3576 <desc>This interface is used in the <link to="IAppliance::virtualSystemDescriptions" /> array.
3577 After <link to="IAppliance::interpret" /> has been called, that array contains
3578 information about how the virtual systems described in the OVF should best be imported into VirtualBox
3579 virtual machines. See <link to="IAppliance" /> for the steps required to import an OVF
3580 into VirtualBox.
3581 </desc>
3582
3583 <attribute name="count" type="unsigned long" readonly="yes">
3584 <desc>Return the number of virtual system description entries.</desc>
3585 </attribute>
3586
3587 <method name="getDescription">
3588 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
3589 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
3590
3591 The list below identifies the value sets that are possible depending on the
3592 <link to="VirtualSystemDescriptionType" /> enum value in the array item in aTypes[]. In each case,
3593 the array item with the same index in aOvfValues[] will contain the original value as contained
3594 in the OVF file (just for informational purposes), and the corresponding item in aVBoxValues[]
3595 will contain a suggested value to be used for VirtualBox. Depending on the description type,
3596 the aExtraConfigValues[] array item may also be used.
3597
3598 <ul>
3599 <li>
3600 "OS": the guest operating system type. There must be exactly one such array item on import. The
3601 corresponding item in aVBoxValues[] contains the suggested guest operating system for VirtualBox.
3602 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
3603 item in aOvfValues[] will contain a numerical value that described the operating system in the OVF.
3604 </li>
3605 <li>
3606 "Name": the name to give to the new virtual machine. There can be at most one such array item;
3607 if none is present on import, then an automatic name will be created from the operating system
3608 type. The correponding item im aOvfValues[] will contain the suggested virtual machine name
3609 from the OVF file, and aVBoxValues[] will contain a suggestion for a unique VirtualBox
3610 <link to="IMachine" /> name that does not exist yet.
3611 </li>
3612 <li>
3613 "Description": an arbitrary description.
3614 </li>
3615 <li>
3616 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
3617 code to display such a license for agreement; the Main API does not enforce any such policy.
3618 </li>
3619 <li>
3620 Miscellaneous: reserved for future use.
3621 </li>
3622 <li>
3623 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
3624 </li>
3625 <li>
3626 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
3627 is present on import, then VirtualBox will set a meaningful default based on the operating system
3628 type.
3629 </li>
3630 <li>
3631 "HarddiskControllerIDE": an IDE hard disk controller. There can be at most one such item. This
3632 has no value in aOvfValues[] or aVBoxValues[].
3633 The matching item in the aRefs[] array will contain an integer that items of the "Harddisk"
3634 type can use to specify which hard disk controller a virtual disk should be connected to.
3635 </li>
3636 <li>
3637 "HarddiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
3638 has no value in aOvfValues[] or aVBoxValues[].
3639 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3640 </li>
3641 <li>
3642 "HarddiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
3643 The items in aOvfValues[] and aVBoxValues[] will either be "LsiLogic" or "BusLogic".
3644 The matching item in the aRefs[] array will be used as with IDE controllers (see above).
3645 </li>
3646 <li>
3647 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
3648 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
3649
3650 The array item in aOvfValues[] will contain the file specification from the OVF file (without
3651 a path since the image file should be in the same location as the OVF file itself), whereas the
3652 item in aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
3653 hard disk image. This means that on import the image will be copied and converted from the
3654 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
3655 On import, the target image will also be registered with VirtualBox.
3656
3657 The matching item in the aExtraConfigValues[] array must contain a string of the following
3658 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
3659 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
3660 the image to. That number must be the index of an array item with one of the hard disk controller
3661 types (HarddiskControllerSCSI, HarddiskControllerSATA, HarddiskControllerIDE).
3662 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
3663 this can range from 0-3 (which VirtualBox will interpret as primary master, primary slave, secondary master and
3664 secondary slave. For SATA and SCSI controllers, the channel can range from 0-29.
3665 </li>
3666 <li>
3667 "CDROM": a virtual CD-ROM drive. The matching item in aExtraConfigValue[] contains the same
3668 attachment information as with "HardDiskImage" items.
3669 </li>
3670 <li>
3671 "CDROM": a virtual floppy drive. The matching item in aExtraConfigValue[] contains the same
3672 attachment information as with "HardDiskImage" items.
3673 </li>
3674 <li>
3675 "NetworkAdapter": a network adapter. The array item in aVBoxValues[] will specify the hardware
3676 for the network adapter, whereas the array item in aExtraConfigValues[] will have a string
3677 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
3678 </li>
3679 <li>
3680 "USBController": a USB controller. There can be at most one such item. If and only if such an
3681 item ispresent, USB support will be enabled for the new virtual machine.
3682 </li>
3683 <li>
3684 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
3685 present, sound support will be enabled for the new virtual machine. Note that the virtual
3686 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
3687 may be different from the virtual soundcard expected by the appliance.
3688 </li>
3689 </ul>
3690
3691 </desc>
3692
3693 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3694 <desc></desc>
3695 </param>
3696
3697 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3698 <desc></desc>
3699 </param>
3700
3701 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3702 <desc></desc>
3703 </param>
3704
3705 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3706 <desc></desc>
3707 </param>
3708
3709 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3710 <desc></desc>
3711 </param>
3712
3713 </method>
3714
3715 <method name="getDescriptionByType">
3716 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
3717 should be returned.</desc>
3718
3719 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3720 <desc></desc>
3721 </param>
3722
3723 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
3724 <desc></desc>
3725 </param>
3726
3727 <param name="aRefs" type="wstring" dir="out" safearray="yes">
3728 <desc></desc>
3729 </param>
3730
3731 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
3732 <desc></desc>
3733 </param>
3734
3735 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
3736 <desc></desc>
3737 </param>
3738
3739 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
3740 <desc></desc>
3741 </param>
3742
3743 </method>
3744
3745 <method name="getValuesByType">
3746 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
3747 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
3748 values.</desc>
3749
3750 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3751 <desc></desc>
3752 </param>
3753
3754 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
3755 <desc></desc>
3756 </param>
3757
3758 <param name="aValues" type="wstring" dir="return" safearray="yes">
3759 <desc></desc>
3760 </param>
3761
3762 </method>
3763
3764 <method name="setFinalValues">
3765 <desc>
3766 This method allows the appliance's user to change the configuration for the virtual
3767 system descriptions. For each array item returned from <link to="#getDescription" />,
3768 you must pass in one boolean value and one configuration value.
3769
3770 Each item in the boolean array determines whether the particular configuration item
3771 should be enabled.
3772 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
3773 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
3774 and SoundCard.
3775
3776 For the "vbox" and "extra configuration" values, if you pass in the same arrays
3777 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
3778 the configuration remains unchanged. Please see the documentation for getDescription()
3779 for valid configuration values for the individual array item types. If the
3780 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
3781 </desc>
3782
3783 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
3784 <desc></desc>
3785 </param>
3786
3787 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
3788 <desc></desc>
3789 </param>
3790
3791 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
3792 <desc></desc>
3793 </param>
3794 </method>
3795
3796 <method name="addDescription">
3797 <desc>
3798 This method adds an additional description entry to the stack of already
3799 available descriptions for this virtual system. This is handy for writing
3800 values which aren't directly supported by VirtualBox. One example would
3801 be the License type of <link to="VirtualSystemDescriptionType" />.
3802 </desc>
3803
3804 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
3805 <desc></desc>
3806 </param>
3807
3808 <param name="aVBoxValue" type="wstring" dir="in">
3809 <desc></desc>
3810 </param>
3811
3812 <param name="aExtraConfigValue" type="wstring" dir="in">
3813 <desc></desc>
3814 </param>
3815 </method>
3816 </interface>
3817
3818
3819 <!--
3820 // IMachine
3821 /////////////////////////////////////////////////////////////////////////
3822 -->
3823
3824 <interface
3825 name="IInternalMachineControl" extends="$unknown"
3826 uuid="35d8d838-d066-447d-927a-fd93afdbec90"
3827 internal="yes"
3828 wsmap="suppress"
3829 >
3830 <method name="setRemoveSavedState">
3831 <desc>
3832 Updates the flag whether saved state is removed on a machine state
3833 change from Saved to PoweredOff.
3834 </desc>
3835 <param name="aRemove" type="boolean" dir="in"/>
3836 </method>
3837
3838 <method name="updateState">
3839 <desc>
3840 Updates the VM state.
3841 <note>
3842 This operation will also update the settings file with
3843 the correct information about the saved state file
3844 and delete this file from disk when appropriate.
3845 </note>
3846 </desc>
3847 <param name="state" type="MachineState" dir="in"/>
3848 </method>
3849
3850 <method name="getIPCId">
3851 <param name="id" type="wstring" dir="return"/>
3852 </method>
3853
3854 <method name="setPowerUpInfo">
3855 <desc>
3856 Transfers success (@c null) or error information for this session.
3857 This method updates the progress object to signal completion of the
3858 <link to="IVirtualBox::openRemoteSession"/> method if appropriate,
3859 which means that the progress object returned by
3860 <link to="IConsole::powerUp"/>.
3861 </desc>
3862 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
3863 </method>
3864
3865 <method name="runUSBDeviceFilters">
3866 <desc>
3867 Asks the server to run USB devices filters of the associated
3868 machine against the given USB device and tell if there is
3869 a match.
3870 <note>
3871 Intended to be used only for remote USB devices. Local
3872 ones don't require to call this method (this is done
3873 implicitly by the Host and USBProxyService).
3874 </note>
3875 </desc>
3876 <param name="device" type="IUSBDevice" dir="in"/>
3877 <param name="matched" type="boolean" dir="out"/>
3878 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3879 </method>
3880
3881 <method name="captureUSBDevice">
3882 <desc>
3883 Requests a capture of the given host USB device.
3884 When the request is completed, the VM process will
3885 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3886 notification.
3887 </desc>
3888 <param name="id" type="uuid" mod="string" dir="in"/>
3889 </method>
3890
3891 <method name="detachUSBDevice">
3892 <desc>
3893 Notification that a VM is going to detach (@a done = @c false) or has
3894 already detached (@a done = @c true) the given USB device.
3895 When the @a done = @c true request is completed, the VM process will
3896 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3897 notification.
3898 <note>
3899 In the @a done = @c true case, the server must run its own filters
3900 and filters of all VMs but this one on the detached device
3901 as if it were just attached to the host computer.
3902 </note>
3903 </desc>
3904 <param name="id" type="uuid" mod="string" dir="in"/>
3905 <param name="done" type="boolean" dir="in"/>
3906 </method>
3907
3908 <method name="autoCaptureUSBDevices">
3909 <desc>
3910 Requests a capture all matching USB devices attached to the host.
3911 When the request is completed, the VM process will
3912 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3913 notification per every captured device.
3914 </desc>
3915 </method>
3916
3917 <method name="detachAllUSBDevices">
3918 <desc>
3919 Notification that a VM that is being powered down. The done
3920 parameter indicates whether which stage of the power down
3921 we're at. When @a done = @c false the VM is announcing its
3922 intentions, while when @a done = @c true the VM is reporting
3923 what it has done.
3924 <note>
3925 In the @a done = @c true case, the server must run its own filters
3926 and filters of all VMs but this one on all detach devices as
3927 if they were just attached to the host computer.
3928 </note>
3929 </desc>
3930 <param name="done" type="boolean" dir="in"/>
3931 </method>
3932
3933 <method name="onSessionEnd">
3934 <desc>
3935 Triggered by the given session object when the session is about
3936 to close normally.
3937 </desc>
3938 <param name="session" type="ISession" dir="in">
3939 <desc>Session that is being closed</desc>
3940 </param>
3941 <param name="progress" type="IProgress" dir="return">
3942 <desc>
3943 Used to wait until the corresponding machine is actually
3944 dissociated from the given session on the server.
3945 Returned only when this session is a direct one.
3946 </desc>
3947 </param>
3948 </method>
3949
3950 <method name="beginSavingState">
3951 <desc>
3952 Called by the VM process to inform the server it wants to
3953 save the current state and stop the VM execution.
3954 </desc>
3955 <param name="progress" type="IProgress" dir="in">
3956 <desc>
3957 Progress object created by the VM process to wait until
3958 the state is saved.
3959 </desc>
3960 </param>
3961 <param name="stateFilePath" type="wstring" dir="out">
3962 <desc>
3963 File path the VM process must save the execution state to.
3964 </desc>
3965 </param>
3966 </method>
3967
3968 <method name="endSavingState">
3969 <desc>
3970 Called by the VM process to inform the server that saving
3971 the state previously requested by #beginSavingState is either
3972 successfully finished or there was a failure.
3973
3974 <result name="VBOX_E_FILE_ERROR">
3975 Settings file not accessible.
3976 </result>
3977 <result name="VBOX_E_XML_ERROR">
3978 Could not parse the settings file.
3979 </result>
3980
3981 </desc>
3982
3983 <param name="success" type="boolean" dir="in">
3984 <desc>@c true to indicate success and @c false otherwise.
3985 </desc>
3986 </param>
3987 </method>
3988
3989 <method name="adoptSavedState">
3990 <desc>
3991 Gets called by IConsole::adoptSavedState.
3992 <result name="VBOX_E_FILE_ERROR">
3993 Invalid saved state file path.
3994 </result>
3995 </desc>
3996 <param name="savedStateFile" type="wstring" dir="in">
3997 <desc>Path to the saved state file to adopt.</desc>
3998 </param>
3999 </method>
4000
4001 <method name="beginTakingSnapshot">
4002 <desc>
4003 Called from the VM process to request from the server to perform the
4004 server-side actions of creating a snapshot (creating differencing images
4005 and the snapshot object).
4006
4007 <result name="VBOX_E_FILE_ERROR">
4008 Settings file not accessible.
4009 </result>
4010 <result name="VBOX_E_XML_ERROR">
4011 Could not parse the settings file.
4012 </result>
4013 </desc>
4014 <param name="initiator" type="IConsole" dir="in">
4015 <desc>The console object that initiated this call.</desc>
4016 </param>
4017 <param name="name" type="wstring" dir="in">
4018 <desc>Snapshot name.</desc>
4019 </param>
4020 <param name="description" type="wstring" dir="in">
4021 <desc>Snapshot description.</desc>
4022 </param>
4023 <param name="consoleProgress" type="IProgress" dir="in">
4024 <desc>
4025 Progress object created by the VM process tracking the
4026 snapshot's progress. This has the following sub-operations:
4027 <ul>
4028 <li>setting up (weight 1);</li>
4029 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
4030 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
4031 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
4032 <li>finishing up (weight 1)</li>
4033 </ul>
4034 </desc>
4035 </param>
4036 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
4037 <desc>
4038 Whether this is an online snapshot (i.e. the machine is running).
4039 </desc>
4040 </param>
4041 <param name="stateFilePath" type="wstring" dir="out">
4042 <desc>
4043 File path the VM process must save the execution state to.
4044 </desc>
4045 </param>
4046 </method>
4047
4048 <method name="endTakingSnapshot">
4049 <desc>
4050 Called by the VM process to inform the server that the snapshot
4051 previously requested by #beginTakingSnapshot is either
4052 successfully taken or there was a failure.
4053 </desc>
4054
4055 <param name="success" type="boolean" dir="in">
4056 <desc>@c true to indicate success and @c false otherwise</desc>
4057 </param>
4058 </method>
4059
4060 <method name="deleteSnapshot">
4061 <desc>
4062 Gets called by IConsole::deleteSnapshot.
4063 <result name="VBOX_E_INVALID_OBJECT_STATE">
4064 Snapshot has more than one child snapshot.
4065 </result>
4066 </desc>
4067 <param name="initiator" type="IConsole" dir="in">
4068 <desc>The console object that initiated this call.</desc>
4069 </param>
4070 <param name="id" type="uuid" mod="string" dir="in">
4071 <desc>UUID of the snapshot to discard.</desc>
4072 </param>
4073 <param name="machineState" type="MachineState" dir="out">
4074 <desc>New machine state after this operation is started.</desc>
4075 </param>
4076 <param name="progress" type="IProgress" dir="return">
4077 <desc>Progress object to track the operation completion.</desc>
4078 </param>
4079 </method>
4080
4081 <method name="restoreSnapshot">
4082 <desc>
4083 Gets called by IConsole::RestoreSnapshot.
4084 </desc>
4085 <param name="initiator" type="IConsole" dir="in">
4086 <desc>The console object that initiated this call.</desc>
4087 </param>
4088 <param name="snapshot" type="ISnapshot" dir="in">
4089 <desc>The snapshot to restore the VM state from.</desc>
4090 </param>
4091 <param name="machineState" type="MachineState" dir="out">
4092 <desc>New machine state after this operation is started.</desc>
4093 </param>
4094 <param name="progress" type="IProgress" dir="return">
4095 <desc>Progress object to track the operation completion.</desc>
4096 </param>
4097 </method>
4098
4099 <method name="pullGuestProperties">
4100 <desc>
4101 Get the list of the guest properties matching a set of patterns along
4102 with their values, time stamps and flags and give responsibility for
4103 managing properties to the console.
4104 </desc>
4105 <param name="name" type="wstring" dir="out" safearray="yes">
4106 <desc>
4107 The names of the properties returned.
4108 </desc>
4109 </param>
4110 <param name="value" type="wstring" dir="out" safearray="yes">
4111 <desc>
4112 The values of the properties returned. The array entries match the
4113 corresponding entries in the @a name array.
4114 </desc>
4115 </param>
4116 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
4117 <desc>
4118 The time stamps of the properties returned. The array entries match
4119 the corresponding entries in the @a name array.
4120 </desc>
4121 </param>
4122 <param name="flags" type="wstring" dir="out" safearray="yes">
4123 <desc>
4124 The flags of the properties returned. The array entries match the
4125 corresponding entries in the @a name array.
4126 </desc>
4127 </param>
4128 </method>
4129
4130 <method name="pushGuestProperty">
4131 <desc>
4132 Update a single guest property in IMachine.
4133 </desc>
4134 <param name="name" type="wstring" dir="in">
4135 <desc>
4136 The name of the property to be updated.
4137 </desc>
4138 </param>
4139 <param name="value" type="wstring" dir="in">
4140 <desc>
4141 The value of the property.
4142 </desc>
4143 </param>
4144 <param name="timestamp" type="unsigned long long" dir="in">
4145 <desc>
4146 The timestamp of the property.
4147 </desc>
4148 </param>
4149 <param name="flags" type="wstring" dir="in">
4150 <desc>
4151 The flags of the property.
4152 </desc>
4153 </param>
4154 </method>
4155
4156 <method name="lockMedia">
4157 <desc>
4158 Locks all media attached to the machine for writing and parents of
4159 attached differencing media (if any) for reading. This operation is
4160 atomic so that if it fails no media is actually locked.
4161
4162 This method is intended to be called when the machine is in Starting or
4163 Restoring state. The locked media will be automatically unlocked when
4164 the machine is powered off or crashed.
4165 </desc>
4166 </method>
4167 <method name="unlockMedia">
4168 <desc>
4169 Unlocks all media previously locked using
4170 <link to="IInternalMachineControl::lockMedia"/>.
4171
4172 This method is intended to be used with teleportation so that it is
4173 possible to teleport between processes on the same machine.
4174 </desc>
4175 </method>
4176 </interface>
4177
4178 <interface
4179 name="IBIOSSettings" extends="$unknown"
4180 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
4181 wsmap="managed"
4182 >
4183 <desc>
4184 The IBIOSSettings interface represents BIOS settings of the virtual
4185 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
4186 </desc>
4187 <attribute name="logoFadeIn" type="boolean">
4188 <desc>Fade in flag for BIOS logo animation.</desc>
4189 </attribute>
4190
4191 <attribute name="logoFadeOut" type="boolean">
4192 <desc>Fade out flag for BIOS logo animation.</desc>
4193 </attribute>
4194
4195 <attribute name="logoDisplayTime" type="unsigned long">
4196 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
4197 </attribute>
4198
4199 <attribute name="logoImagePath" type="wstring">
4200 <desc>
4201 Local file system path for external BIOS splash image. Empty string
4202 means the default image is shown on boot.
4203 </desc>
4204 </attribute>
4205
4206 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
4207 <desc>Mode of the BIOS boot device menu.</desc>
4208 </attribute>
4209
4210 <attribute name="ACPIEnabled" type="boolean">
4211 <desc>ACPI support flag.</desc>
4212 </attribute>
4213
4214 <attribute name="IOAPICEnabled" type="boolean">
4215 <desc>
4216 IO APIC support flag. If set, VirtualBox will provide an IO APIC
4217 and support IRQs above 15.
4218 </desc>
4219 </attribute>
4220
4221 <attribute name="timeOffset" type="long long">
4222 <desc>
4223 Offset in milliseconds from the host system time. This allows for
4224 guests running with a different system date/time than the host.
4225 It is equivalent to setting the system date/time in the BIOS except
4226 it is not an absolute value but a relative one. Guest Additions
4227 time synchronization honors this offset.
4228 </desc>
4229 </attribute>
4230
4231 <attribute name="PXEDebugEnabled" type="boolean">
4232 <desc>
4233 PXE debug logging flag. If set, VirtualBox will write extensive
4234 PXE trace information to the release log.
4235 </desc>
4236 </attribute>
4237
4238 </interface>
4239
4240 <interface
4241 name="IMachine" extends="$unknown"
4242 uuid="07862b34-c068-4667-be7d-1d722f496f20"
4243 wsmap="managed"
4244 >
4245 <desc>
4246 The IMachine interface represents a virtual machine, or guest, created
4247 in VirtualBox.
4248
4249 This interface is used in two contexts. First of all, a collection of
4250 objects implementing this interface is stored in the
4251 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
4252 machines that are currently registered with this VirtualBox
4253 installation. Also, once a session has been opened for the given virtual
4254 machine (e.g. the virtual machine is running), the machine object
4255 associated with the open session can be queried from the session object;
4256 see <link to="ISession"/> for details.
4257
4258 The main role of this interface is to expose the settings of the virtual
4259 machine and provide methods to change various aspects of the virtual
4260 machine's configuration. For machine objects stored in the
4261 <link to="IVirtualBox::machines"/> collection, all attributes are
4262 read-only unless explicitly stated otherwise in individual attribute
4263 and method descriptions. In order to change a machine setting, a session
4264 for this machine must be opened using one of
4265 <link to="IVirtualBox::openSession"/>,
4266 <link to="IVirtualBox::openRemoteSession"/> or
4267 <link to="IVirtualBox::openExistingSession"/> methods. After the
4268 session has been successfully opened, a mutable machine object needs to
4269 be queried from the session object and then the desired settings changes
4270 can be applied to the returned object using IMachine attributes and
4271 methods. See the <link to="ISession"/> interface description for more
4272 information about sessions.
4273
4274 Note that IMachine does not provide methods to control virtual machine
4275 execution (such as start the machine, or power it down) -- these methods
4276 are grouped in a separate interface called <link to="IConsole" />.
4277
4278 <see>ISession, IConsole</see>
4279 </desc>
4280
4281 <attribute name="parent" type="IVirtualBox" readonly="yes">
4282 <desc>Associated parent object.</desc>
4283 </attribute>
4284
4285 <attribute name="accessible" type="boolean" readonly="yes">
4286 <desc>
4287 Whether this virtual machine is currently accessible or not.
4288
4289 A machine is always deemed accessible unless it is registered <i>and</i>
4290 its settings file cannot be read or parsed (either because the file itself
4291 is unavailable or has invalid XML contents).
4292
4293 Every time this property is read, the accessibility state of
4294 this machine is re-evaluated. If the returned value is @c false,
4295 the <link to="#accessError"/> property may be used to get the
4296 detailed error information describing the reason of
4297 inaccessibility, including XML error messages.
4298
4299 When the machine is inaccessible, only the following properties
4300 can be used on it:
4301 <ul>
4302 <li><link to="#parent"/></li>
4303 <li><link to="#id"/></li>
4304 <li><link to="#settingsFilePath"/></li>
4305 <li><link to="#accessible"/></li>
4306 <li><link to="#accessError"/></li>
4307 </ul>
4308
4309 An attempt to access any other property or method will return
4310 an error.
4311
4312 The only possible action you can perform on an inaccessible
4313 machine is to unregister it using the
4314 <link to="IVirtualBox::unregisterMachine"/> call (or, to check
4315 for the accessibility state once more by querying this
4316 property).
4317
4318 <note>
4319 In the current implementation, once this property returns
4320 @c true, the machine will never become inaccessible
4321 later, even if its settings file cannot be successfully
4322 read/written any more (at least, until the VirtualBox
4323 server is restarted). This limitation may be removed in
4324 future releases.
4325 </note>
4326 </desc>
4327 </attribute>
4328
4329 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
4330 <desc>
4331 Error information describing the reason of machine
4332 inaccessibility.
4333
4334 Reading this property is only valid after the last call to
4335 <link to="#accessible"/> returned @c false (i.e. the
4336 machine is currently unaccessible). Otherwise, a @c null
4337 IVirtualBoxErrorInfo object will be returned.
4338 </desc>
4339 </attribute>
4340
4341 <attribute name="name" type="wstring">
4342 <desc>
4343 Name of the virtual machine.
4344
4345 Besides being used for human-readable identification purposes
4346 everywhere in VirtualBox, the virtual machine name is also used
4347 as a name of the machine's settings file and as a name of the
4348 subdirectory this settings file resides in. Thus, every time you
4349 change the value of this property, the settings file will be
4350 renamed once you call <link to="#saveSettings"/> to confirm the
4351 change. The containing subdirectory will be also renamed, but
4352 only if it has exactly the same name as the settings file
4353 itself prior to changing this property (for backward compatibility
4354 with previous API releases). The above implies the following
4355 limitations:
4356 <ul>
4357 <li>The machine name cannot be empty.</li>
4358 <li>The machine name can contain only characters that are valid
4359 file name characters according to the rules of the file
4360 system used to store VirtualBox configuration.</li>
4361 <li>You cannot have two or more machines with the same name
4362 if they use the same subdirectory for storing the machine
4363 settings files.</li>
4364 <li>You cannot change the name of the machine if it is running,
4365 or if any file in the directory containing the settings file
4366 is being used by another running machine or by any other
4367 process in the host operating system at a time when
4368 <link to="#saveSettings"/> is called.
4369 </li>
4370 </ul>
4371 If any of the above limitations are hit, <link to="#saveSettings"/>
4372 will return an appropriate error message explaining the exact
4373 reason and the changes you made to this machine will not be
4374 saved.
4375 <note>
4376 For "legacy" machines created using the
4377 <link to="IVirtualBox::createLegacyMachine"/> call,
4378 the above naming limitations do not apply because the
4379 machine name does not affect the settings file name.
4380 The settings file name remains the same as it was specified
4381 during machine creation and never changes.
4382 </note>
4383 </desc>
4384 </attribute>
4385
4386 <attribute name="description" type="wstring">
4387 <desc>
4388 Description of the virtual machine.
4389
4390 The description attribute can contain any text and is
4391 typically used to describe the hardware and software
4392 configuration of the virtual machine in detail (i.e. network
4393 settings, versions of the installed software and so on).
4394 </desc>
4395 </attribute>
4396
4397 <attribute name="id" type="uuid" mod="string" readonly="yes">
4398 <desc>UUID of the virtual machine.</desc>
4399 </attribute>
4400
4401 <attribute name="OSTypeId" type="wstring">
4402 <desc>
4403 User-defined identifier of the Guest OS type.
4404 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
4405 an IGuestOSType object representing details about the given
4406 Guest OS type.
4407 <note>
4408 This value may differ from the value returned by
4409 <link to="IGuest::OSTypeId"/> if Guest Additions are
4410 installed to the guest OS.
4411 </note>
4412 </desc>
4413 </attribute>
4414
4415 <attribute name="HardwareVersion" type="wstring">
4416 <desc>Hardware version identifier. Internal use only for now.</desc>
4417 </attribute>
4418
4419 <attribute name="hardwareUUID" type="uuid" mod="string">
4420 <desc>
4421 The UUID presented to the guest via memory tables, hardware and guest
4422 properties. For most VMs this is the same as the @a id, but for VMs
4423 which have been cloned or teleported it may be the same as the source
4424 VM. This latter is because the guest shouldn't notice that it was
4425 cloned or teleported.
4426 </desc>
4427 </attribute>
4428
4429 <attribute name="CPUCount" type="unsigned long">
4430 <desc>Number of virtual CPUs in the VM.</desc>
4431 </attribute>
4432
4433 <attribute name="CPUHotPlugEnabled" type="boolean">
4434 <desc>
4435 This setting determines whether VirtualBox allows CPU
4436 hotplugging for this machine.</desc>
4437 </attribute>
4438
4439 <attribute name="memorySize" type="unsigned long">
4440 <desc>System memory size in megabytes.</desc>
4441 </attribute>
4442
4443 <attribute name="memoryBalloonSize" type="unsigned long">
4444 <desc>Initial memory balloon size in megabytes.</desc>
4445 </attribute>
4446
4447 <attribute name="statisticsUpdateInterval" type="unsigned long">
4448 <desc>Initial interval to update guest statistics in seconds.</desc>
4449 </attribute>
4450
4451 <attribute name="VRAMSize" type="unsigned long">
4452 <desc>Video memory size in megabytes.</desc>
4453 </attribute>
4454
4455 <attribute name="accelerate3DEnabled" type="boolean" default="false">
4456 <desc>
4457 This setting determines whether VirtualBox allows this machine to make
4458 use of the 3D graphics support available on the host.</desc>
4459 </attribute>
4460
4461 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
4462 <desc>
4463 This setting determines whether VirtualBox allows this machine to make
4464 use of the 2D video acceleration support available on the host.</desc>
4465 </attribute>
4466
4467 <attribute name="monitorCount" type="unsigned long">
4468 <desc>
4469 Number of virtual monitors.
4470 <note>
4471 Only effective on Windows XP and later guests with
4472 Guest Additions installed.
4473 </note>
4474 </desc>
4475 </attribute>
4476
4477 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
4478 <desc>Object containing all BIOS settings.</desc>
4479 </attribute>
4480
4481 <attribute name="firmwareType" type="FirmwareType">
4482 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
4483 bootstrap in this VM.</desc>
4484 </attribute>
4485
4486 <attribute name="pointingHidType" type="PointingHidType">
4487 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
4488 The default is typically "PS2Mouse" but can vary depending on the
4489 requirements of the guest operating system.</desc>
4490 </attribute>
4491
4492 <attribute name="keyboardHidType" type="KeyboardHidType">
4493 <desc>Type of keyboard HID used in this VM.
4494 The default is typically "PS2Keyboard" but can vary depending on the
4495 requirements of the guest operating system.</desc>
4496 </attribute>
4497
4498 <attribute name="hpetEnabled" type="boolean">
4499 <desc>This attribute controls if High Precision Event Timer (HPET) is
4500 enabled in this VM. Use this property if you want to provide guests
4501 with additional time source, or if guest requires HPET to function correctly.
4502 Default is false.</desc>
4503 </attribute>
4504
4505 <attribute name="snapshotFolder" type="wstring">
4506 <desc>
4507 Full path to the directory used to store snapshot data
4508 (differencing media and saved state files) of this machine.
4509
4510 The initial value of this property is
4511 <tt>&lt;</tt><link to="#settingsFilePath">
4512 path_to_settings_file</link><tt>&gt;/&lt;</tt>
4513 <link to="#id">machine_uuid</link>
4514 <tt>&gt;</tt>.
4515
4516 Currently, it is an error to try to change this property on
4517 a machine that has snapshots (because this would require to
4518 move possibly large files to a different location).
4519 A separate method will be available for this purpose later.
4520
4521 <note>
4522 Setting this property to @c null or to an empty string will restore
4523 the initial value.
4524 </note>
4525 <note>
4526 When setting this property, the specified path can be
4527 absolute (full path) or relative to the directory where the
4528 <link to="#settingsFilePath">machine settings file</link>
4529 is located. When reading this property, a full path is
4530 always returned.
4531 </note>
4532 <note>
4533 The specified path may not exist, it will be created
4534 when necessary.
4535 </note>
4536 </desc>
4537 </attribute>
4538
4539 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
4540 <desc>VRDP server object.</desc>
4541 </attribute>
4542
4543 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
4544 <desc>Array of media attached to this machine.</desc>
4545 </attribute>
4546
4547 <attribute name="USBController" type="IUSBController" readonly="yes">
4548 <desc>
4549 Associated USB controller object.
4550
4551 <note>
4552 If USB functionality is not available in the given edition of
4553 VirtualBox, this method will set the result code to @c E_NOTIMPL.
4554 </note>
4555 </desc>
4556 </attribute>
4557
4558 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
4559 <desc>Associated audio adapter, always present.</desc>
4560 </attribute>
4561
4562 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
4563 <desc>Array of storage controllers attached to this machine.</desc>
4564 </attribute>
4565
4566 <attribute name="settingsFilePath" type="wstring" readonly="yes">
4567 <desc>
4568 Full name of the file containing machine settings data.
4569 </desc>
4570 </attribute>
4571
4572 <attribute name="settingsModified" type="boolean" readonly="yes">
4573 <desc>
4574 Whether the settings of this machine have been modified
4575 (but neither yet saved nor discarded).
4576 <note>
4577 Reading this property is only valid on instances returned
4578 by <link to="ISession::machine"/> and on new machines
4579 created by <link to="IVirtualBox::createMachine"/> or opened
4580 by <link to="IVirtualBox::openMachine"/> but not
4581 yet registered, or on unregistered machines after calling
4582 <link to="IVirtualBox::unregisterMachine"/>. For all other
4583 cases, the settings can never be modified.
4584 </note>
4585 <note>
4586 For newly created unregistered machines, the value of this
4587 property is always @c true until <link to="#saveSettings"/>
4588 is called (no matter if any machine settings have been
4589 changed after the creation or not). For opened machines
4590 the value is set to @c false (and then follows to normal rules).
4591 </note>
4592 </desc>
4593 </attribute>
4594
4595 <attribute name="sessionState" type="SessionState" readonly="yes">
4596 <desc>Current session state for this machine.</desc>
4597 </attribute>
4598
4599 <attribute name="sessionType" type="wstring" readonly="yes">
4600 <desc>
4601 Type of the session. If <link to="#sessionState"/> is
4602 SessionSpawning or SessionOpen, this attribute contains the
4603 same value as passed to the
4604 <link to="IVirtualBox::openRemoteSession"/> method in the
4605 @a type parameter. If the session was opened directly using
4606 <link to="IVirtualBox::openSession"/>, or if
4607 <link to="#sessionState"/> is SessionClosed, the value of this
4608 attribute is an empty string.
4609 </desc>
4610 </attribute>
4611
4612 <attribute name="sessionPid" type="unsigned long" readonly="yes">
4613 <desc>
4614 Identifier of the session process. This attribute contains the
4615 platform-dependent identifier of the process that has opened a
4616 direct session for this machine using the
4617 <link to="IVirtualBox::openSession"/> call. The returned value
4618 is only valid if <link to="#sessionState"/> is SessionOpen or
4619 SessionClosing (i.e. a session is currently open or being
4620 closed) by the time this property is read.
4621 </desc>
4622 </attribute>
4623
4624 <attribute name="state" type="MachineState" readonly="yes">
4625 <desc>Current execution state of this machine.</desc>
4626 </attribute>
4627
4628 <attribute name="lastStateChange" type="long long" readonly="yes">
4629 <desc>
4630 Time stamp of the last execution state change,
4631 in milliseconds since 1970-01-01 UTC.
4632 </desc>
4633 </attribute>
4634
4635 <attribute name="stateFilePath" type="wstring" readonly="yes">
4636 <desc>
4637 Full path to the file that stores the execution state of
4638 the machine when it is in the <link to="MachineState_Saved"/> state.
4639 <note>
4640 When the machine is not in the Saved state, this attribute is
4641 an empty string.
4642 </note>
4643 </desc>
4644 </attribute>
4645
4646 <attribute name="logFolder" type="wstring" readonly="yes">
4647 <desc>
4648 Full path to the folder that stores a set of rotated log files
4649 recorded during machine execution. The most recent log file is
4650 named <tt>VBox.log</tt>, the previous log file is
4651 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
4652 in the current version).
4653 </desc>
4654 </attribute>
4655
4656 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
4657 <desc>
4658 Current snapshot of this machine. This is @c null if the machine
4659 currently has no snapshots. If it is not @c null, then it was
4660 set by one of <link to="Console::takeSnapshot" />,
4661 <link to="Console::deleteSnapshot" />
4662 or <link to="Console::restoreSnapshot" />, depending on which
4663 was called last. See <link to="ISnapshot"/> for details.
4664 </desc>
4665 </attribute>
4666
4667 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
4668 <desc>
4669 Number of snapshots taken on this machine. Zero means the
4670 machine doesn't have any snapshots.
4671 </desc>
4672 </attribute>
4673
4674 <attribute name="currentStateModified" type="boolean" readonly="yes">
4675 <desc>
4676 Returns @c true if the current state of the machine is not
4677 identical to the state stored in the current snapshot.
4678
4679 The current state is identical to the current snapshot only
4680 directly after one of the following calls are made:
4681
4682 <ul>
4683 <li><link to="IConsole::restoreSnapshot"/>
4684 </li>
4685 <li><link to="IConsole::takeSnapshot"/> (issued on a
4686 "powered off" or "saved" machine, for which
4687 <link to="#settingsModified"/> returns @c false)
4688 </li>
4689 <li><link to="IMachine::setCurrentSnapshot"/>
4690 </li>
4691 </ul>
4692
4693 The current state remains identical until one of the following
4694 happens:
4695 <ul>
4696 <li>settings of the machine are changed</li>
4697 <li>the saved state is discarded</li>
4698 <li>the current snapshot is discarded</li>
4699 <li>an attempt to execute the machine is made</li>
4700 </ul>
4701
4702 <note>
4703 For machines that don't have snapshots, this property is
4704 always @c false.
4705 </note>
4706 </desc>
4707 </attribute>
4708
4709 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
4710 <desc>
4711 Collection of shared folders for this machine (permanent shared
4712 folders). These folders are shared automatically at machine startup
4713 and available only to the guest OS installed within this machine.
4714
4715 New shared folders are added to the collection using
4716 <link to="#createSharedFolder"/>. Existing shared folders can be
4717 removed using <link to="#removeSharedFolder"/>.
4718 </desc>
4719 </attribute>
4720
4721 <attribute name="clipboardMode" type="ClipboardMode">
4722 <desc>
4723 Synchronization mode between the host OS clipboard
4724 and the guest OS clipboard.
4725 </desc>
4726 </attribute>
4727
4728 <attribute name="guestPropertyNotificationPatterns" type="wstring">
4729 <desc>
4730 A comma-separated list of simple glob patterns. Changes to guest
4731 properties whose name matches one of the patterns will generate an
4732 <link to="IVirtualBoxCallback::onGuestPropertyChange"/> signal.
4733 </desc>
4734 </attribute>
4735
4736 <attribute name="teleporterEnabled" type="boolean">
4737 <desc>
4738 When set to @a true, the virtual machine becomes a target teleporter
4739 the next time it is powered on. This can only set to @a true when the
4740 VM is in the @a PoweredOff or @a Aborted state.
4741
4742 <!-- This property is automatically set to @a false when the VM is powered
4743 on. (bird: This doesn't work yet ) -->
4744 </desc>
4745 </attribute>
4746
4747 <attribute name="teleporterPort" type="unsigned long">
4748 <desc>
4749 The TCP port the target teleporter will listen for incoming
4750 teleportations on.
4751
4752 0 means the port is automatically selected upon power on. The actual
4753 value can be read from this property while the machine is waiting for
4754 incoming teleportations.
4755 </desc>
4756 </attribute>
4757
4758 <attribute name="teleporterAddress" type="wstring">
4759 <desc>
4760 The address the target teleporter will listen on. If set to an empty
4761 string, it will listen on all addresses.
4762 </desc>
4763 </attribute>
4764
4765 <attribute name="teleporterPassword" type="wstring">
4766 <desc>
4767 The password the to check for on the target teleporter. This is just a
4768 very basic measure to prevent simple hacks and operators accidentally
4769 beaming a virtual machine to the wrong place.
4770 </desc>
4771 </attribute>
4772
4773 <attribute name="RTCUseUTC" type="boolean">
4774 <desc>
4775 When set to @a true, the RTC device of the virtual machine will run
4776 in UTC time, otherwise in local time. Especially Unix guests prefer
4777 the time in UTC.
4778 </desc>
4779 </attribute>
4780
4781 <attribute name="ioMgr" type="IoMgrType">
4782 <desc>
4783 Selects the I/O manager to use for the virtual machine.
4784 </desc>
4785 </attribute>
4786
4787 <attribute name="ioBackend" type="IoBackendType">
4788 <desc>
4789 Selects the I/O backend to use for the virtual machine.
4790 </desc>
4791 </attribute>
4792
4793 <attribute name="ioCacheEnabled" type="boolean">
4794 <desc>
4795 When set to @a true, the builtin I/O cache of the virtual machine
4796 will be enabled.
4797 </desc>
4798 </attribute>
4799
4800 <attribute name="ioCacheSize" type="unsigned long">
4801 <desc>
4802 Maximum size of the I/O cache in MB.
4803 </desc>
4804 </attribute>
4805
4806 <attribute name="ioBandwidthMax" type="unsigned long">
4807 <desc>
4808 The maximum number of MB the VM is allowed to transfer per second.
4809 0 means unlimited bandwidth.
4810 </desc>
4811 </attribute>
4812
4813 <method name="setBootOrder">
4814 <desc>
4815 Puts the given device to the specified position in
4816 the boot order.
4817
4818 To indicate that no device is associated with the given position,
4819 <link to="DeviceType_Null"/> should be used.
4820
4821 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4822
4823 <result name="E_INVALIDARG">
4824 Boot @a position out of range.
4825 </result>
4826 <result name="E_NOTIMPL">
4827 Booting from USB @a device currently not supported.
4828 </result>
4829
4830 </desc>
4831 <param name="position" type="unsigned long" dir="in">
4832 <desc>
4833 Position in the boot order (@c 1 to the total number of
4834 devices the machine can boot from, as returned by
4835 <link to="ISystemProperties::maxBootPosition"/>).
4836 </desc>
4837 </param>
4838 <param name="device" type="DeviceType" dir="in">
4839 <desc>
4840 The type of the device used to boot at the given position.
4841 </desc>
4842 </param>
4843 </method>
4844
4845 <method name="getBootOrder" const="yes">
4846 <desc>
4847 Returns the device type that occupies the specified
4848 position in the boot order.
4849
4850 @todo [remove?]
4851 If the machine can have more than one device of the returned type
4852 (such as hard disks), then a separate method should be used to
4853 retrieve the individual device that occupies the given position.
4854
4855 If here are no devices at the given position, then
4856 <link to="DeviceType_Null"/> is returned.
4857
4858 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4859
4860 <result name="E_INVALIDARG">
4861 Boot @a position out of range.
4862 </result>
4863
4864 </desc>
4865 <param name="position" type="unsigned long" dir="in">
4866 <desc>
4867 Position in the boot order (@c 1 to the total number of
4868 devices the machine can boot from, as returned by
4869 <link to="ISystemProperties::maxBootPosition"/>).
4870 </desc>
4871 </param>
4872 <param name="device" type="DeviceType" dir="return">
4873 <desc>
4874 Device at the given position.
4875 </desc>
4876 </param>
4877 </method>
4878
4879 <method name="attachDevice">
4880 <desc>
4881 Attaches a device and optionally mounts a medium to the given storage
4882 controller (<link to="IStorageController" />, identified by @a name),
4883 at the indicated port and device.
4884
4885 This method is intended for managing storage devices in general (it works
4886 for both fixed and removable media). For storage devices supporting removable
4887 media (such as DVDs and floppies), you can also use <link to="IMedium::mountMedium"/>
4888 for changing the media while the machine is running.
4889
4890 For the IDE bus, the @a controllerPort parameter can be either
4891 @c 0 or @c 1, to specify the primary or secondary IDE controller,
4892 respectively. For each of these, @a device can then be either @c 0 or @c 1,
4893 to specify the master or the slave device, respectively. (In the
4894 default configuration of virtual machines, the secondary master is
4895 used for a CD/DVD drive.)
4896
4897 For an SATA controller, @a controllerPort must be a number ranging
4898 from @c 0 to @c 29. For a SCSI controller, @a controllerPort must
4899 be a number ranging from @c 0 to @c 15.
4900
4901 For both SCSI and SATA, the @a device parameter is unused and must
4902 be @c 0.
4903
4904 For fixed media such as hard disks, the given medium identifier cannot
4905 be a zero UUID. It may be a zero UUID for removable media such as DVDs
4906 and floppies.
4907
4908 After calling this returns successfully, a new instance of
4909 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4910 attachments (<link to="IMachine::mediumAttachments"/>).
4911
4912 The specified device slot must not have a device attached to it,
4913 or this method will fail.
4914
4915 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4916 information about attaching media.
4917
4918 <note>
4919 You cannot attach a device to a running machine. Also, you cannot
4920 attach a device to a newly created machine until this machine's
4921 settings are saved to disk using <link to="#saveSettings"/>.
4922 </note>
4923 <note>
4924 If the medium is being attached indirectly, a new differencing medium
4925 will implicitly be created for it and attached instead. If the
4926 changes made to the machine settings (including this indirect
4927 attachment) are later cancelled using <link to="#discardSettings"/>,
4928 this implicitly created differencing medium will implicitly
4929 be deleted.
4930 </note>
4931
4932 <result name="E_INVALIDARG">
4933 SATA device, SATA port, IDE port or IDE slot out of range.
4934 </result>
4935 <result name="VBOX_E_INVALID_OBJECT_STATE">
4936 Attempt to attach medium to an unregistered virtual machine.
4937 </result>
4938 <result name="VBOX_E_INVALID_VM_STATE">
4939 Invalid machine state.
4940 </result>
4941 <result name="VBOX_E_OBJECT_IN_USE">
4942 Hard disk already attached to this or another virtual machine.
4943 </result>
4944
4945 </desc>
4946 <param name="name" type="wstring" dir="in">
4947 <desc>Name of the storage controller to attach the device to.</desc>
4948 </param>
4949 <param name="controllerPort" type="long" dir="in">
4950 <desc>Port to attach the device to.</desc>
4951 </param>
4952 <param name="device" type="long" dir="in">
4953 <desc>Device slot in the given port to attach the device to.</desc>
4954 </param>
4955 <param name="type" type="DeviceType" dir="in">
4956 <desc>Device type of the attached device.</desc>
4957 </param>
4958 <param name="id" type="uuid" mod="string" dir="in">
4959 <desc>UUID of the medium to mount. Zero UUID means do not mount any
4960 medium.</desc>
4961 </param>
4962 </method>
4963
4964 <method name="detachDevice">
4965 <desc>
4966 Detaches the device attached to a device slot of the specified bus.
4967
4968 Detaching the device from the virtual machine is deferred. This means
4969 that the medium remains associated with the machine when this method
4970 returns and gets actually de-associated only after a successful
4971 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4972 for more detailed information about attaching media.
4973
4974 <note>
4975 You cannot detach a device from a running machine.
4976 </note>
4977 <note>
4978 Detaching differencing media implicitly created by <link
4979 to="#attachDevice"/> for the indirect attachment using this
4980 method will <b>not</b> implicitly delete them. The
4981 <link to="IMedium::deleteStorage"/> operation should be
4982 explicitly performed by the caller after the medium is successfully
4983 detached and the settings are saved with
4984 <link to="#saveSettings"/>, if it is the desired action.
4985 </note>
4986
4987 <result name="VBOX_E_INVALID_VM_STATE">
4988 Attempt to detach medium from a running virtual machine.
4989 </result>
4990 <result name="VBOX_E_OBJECT_NOT_FOUND">
4991 No medium attached to given slot/bus.
4992 </result>
4993 <result name="VBOX_E_NOT_SUPPORTED">
4994 Medium format does not support storage deletion.
4995 </result>
4996
4997 </desc>
4998 <param name="name" type="wstring" dir="in">
4999 <desc>Name of the storage controller to detach the medium from.</desc>
5000 </param>
5001 <param name="controllerPort" type="long" dir="in">
5002 <desc>Port number to detach the medium from.</desc>
5003 </param>
5004 <param name="device" type="long" dir="in">
5005 <desc>Device slot number to detach the medium from.</desc>
5006 </param>
5007 </method>
5008
5009 <method name="passthroughDevice">
5010 <desc>
5011 Sets the passthrough mode of an existing DVD device. Changing the
5012 setting while the VM is running is forbidden. The setting is only used
5013 if at VM start the device is configured as a host DVD drive, in all
5014 other cases it is ignored. The device must already exist; see
5015 <link to="IMachine::attachDevice"/> for how to attach a new device.
5016
5017 The @a controllerPort and @a device parameters specify the device slot and
5018 have have the same meaning as with <link to="IMachine::attachDevice" />.
5019
5020 <result name="E_INVALIDARG">
5021 SATA device, SATA port, IDE port or IDE slot out of range.
5022 </result>
5023 <result name="VBOX_E_INVALID_OBJECT_STATE">
5024 Attempt to modify an unregistered virtual machine.
5025 </result>
5026 <result name="VBOX_E_INVALID_VM_STATE">
5027 Invalid machine state.
5028 </result>
5029
5030 </desc>
5031 <param name="name" type="wstring" dir="in">
5032 <desc>Name of the storage controller.</desc>
5033 </param>
5034 <param name="controllerPort" type="long" dir="in">
5035 <desc>Storage controller port.</desc>
5036 </param>
5037 <param name="device" type="long" dir="in">
5038 <desc>Device slot in the given port.</desc>
5039 </param>
5040 <param name="passthrough" type="boolean" dir="in">
5041 <desc>New value for the passthrough setting.</desc>
5042 </param>
5043 </method>
5044
5045 <method name="mountMedium">
5046 <desc>
5047 Mounts a medium (<link to="IMedium" />, identified
5048 by the given UUID @a id) to the given storage controller
5049 (<link to="IStorageController" />, identified by @a name),
5050 at the indicated port and device. The device must already exist;
5051 see <link to="IMachine::attachDevice"/> for how to attach a new device.
5052
5053 This method is intended only for managing removable media, where the
5054 device is fixed but media is changeable at runtime (such as DVDs
5055 and floppies). It cannot be used for fixed media such as hard disks.
5056
5057 The @a controllerPort and @a device parameters specify the device slot and
5058 have have the same meaning as with <link to="IMachine::attachDevice" />.
5059
5060 The specified device slot can have a medium mounted, which will be
5061 unmounted first. Specifying a zero UUID (or an empty string) for
5062 @a medium does just an unmount.
5063
5064 See <link to="IMedium"/> for more detailed information about
5065 attaching media.
5066
5067 <result name="E_INVALIDARG">
5068 SATA device, SATA port, IDE port or IDE slot out of range.
5069 </result>
5070 <result name="VBOX_E_INVALID_OBJECT_STATE">
5071 Attempt to attach medium to an unregistered virtual machine.
5072 </result>
5073 <result name="VBOX_E_INVALID_VM_STATE">
5074 Invalid machine state.
5075 </result>
5076 <result name="VBOX_E_OBJECT_IN_USE">
5077 Medium already attached to this or another virtual machine.
5078 </result>
5079
5080 </desc>
5081 <param name="name" type="wstring" dir="in">
5082 <desc>Name of the storage controller to attach the medium to.</desc>
5083 </param>
5084 <param name="controllerPort" type="long" dir="in">
5085 <desc>Port to attach the medium to.</desc>
5086 </param>
5087 <param name="device" type="long" dir="in">
5088 <desc>Device slot in the given port to attach the medium to.</desc>
5089 </param>
5090 <param name="medium" type="uuid" mod="string" dir="in">
5091 <desc>UUID of the medium to attach. A zero UUID means unmount the
5092 currently mounted medium.</desc>
5093 </param>
5094 <param name="force" type="boolean" dir="in">
5095 <desc>Allows to force unmount/mount of a medium which is locked by
5096 theDevice slot in the given port to attach the medium to.</desc>
5097 </param>
5098 </method>
5099
5100 <method name="getMedium" const="yes">
5101 <desc>
5102 Returns the virtual medium attached to a device slot of the specified
5103 bus.
5104
5105 Note that if the medium was indirectly attached by
5106 <link to="#mountMedium"/> to the given device slot then this
5107 method will return not the same object as passed to the
5108 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
5109 more detailed information about mounting a medium.
5110
5111 <result name="VBOX_E_OBJECT_NOT_FOUND">
5112 No medium attached to given slot/bus.
5113 </result>
5114
5115 </desc>
5116 <param name="name" type="wstring" dir="in">
5117 <desc>Name of the storage controller the medium is attached to.</desc>
5118 </param>
5119 <param name="controllerPort" type="long" dir="in">
5120 <desc>Port to query.</desc>
5121 </param>
5122 <param name="device" type="long" dir="in">
5123 <desc>Device slot in the given port to query.</desc>
5124 </param>
5125 <param name="medium" type="IMedium" dir="return">
5126 <desc>Attached medium object.</desc>
5127 </param>
5128 </method>
5129
5130 <method name="getMediumAttachmentsOfController" const="yes">
5131 <desc>
5132 Returns an array of medium attachments which are attached to the
5133 the controller with the given name.
5134
5135 <result name="VBOX_E_OBJECT_NOT_FOUND">
5136 A storage controller with given name doesn't exist.
5137 </result>
5138 </desc>
5139 <param name="name" type="wstring" dir="in"/>
5140 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
5141 </method>
5142
5143 <method name="getMediumAttachment" const="yes">
5144 <desc>
5145 Returns a medium attachment which corresponds to the controller with
5146 the given name, on the given port and device slot.
5147
5148 <result name="VBOX_E_OBJECT_NOT_FOUND">
5149 No attachment exists for the given controller/port/device combination.
5150 </result>
5151 </desc>
5152 <param name="name" type="wstring" dir="in"/>
5153 <param name="controllerPort" type="long" dir="in"/>
5154 <param name="device" type="long" dir="in"/>
5155 <param name="attachment" type="IMediumAttachment" dir="return"/>
5156 </method>
5157
5158 <method name="getNetworkAdapter" const="yes">
5159 <desc>
5160 Returns the network adapter associated with the given slot.
5161 Slots are numbered sequentially, starting with zero. The total
5162 number of adapters per machine is defined by the
5163 <link to="ISystemProperties::networkAdapterCount"/> property,
5164 so the maximum slot number is one less than that property's value.
5165
5166 <result name="E_INVALIDARG">
5167 Invalid @a slot number.
5168 </result>
5169
5170 </desc>
5171 <param name="slot" type="unsigned long" dir="in"/>
5172 <param name="adapter" type="INetworkAdapter" dir="return"/>
5173 </method>
5174
5175 <method name="addStorageController">
5176 <desc>
5177 Adds a new storage controller (SCSI or SATA controller) to the
5178 machine and returns it as an instance of
5179 <link to="IStorageController" />.
5180
5181 @a name identifies the controller for subsequent calls such as
5182 <link to="#getStorageControllerByName" />,
5183 <link to="#getStorageControllerByInstance" />,
5184 <link to="#removeStorageController" />,
5185 <link to="#attachDevice" /> or <link to="#mountMedium" />.
5186
5187 After the controller has been added, you can set its exact
5188 type by setting the <link to="IStorageController::controllerType" />.
5189
5190 <result name="VBOX_E_OBJECT_IN_USE">
5191 A storage controller with given name exists already.
5192 </result>
5193 <result name="E_INVALIDARG">
5194 Invalid @a controllerType.
5195 </result>
5196 </desc>
5197 <param name="name" type="wstring" dir="in"/>
5198 <param name="connectionType" type="StorageBus" dir="in"/>
5199 <param name="controller" type="IStorageController" dir="return"/>
5200 </method>
5201
5202 <method name="getStorageControllerByName" const="yes">
5203 <desc>
5204 Returns a storage controller with the given name.
5205
5206 <result name="VBOX_E_OBJECT_NOT_FOUND">
5207 A storage controller with given name doesn't exist.
5208 </result>
5209 </desc>
5210 <param name="name" type="wstring" dir="in"/>
5211 <param name="storageController" type="IStorageController" dir="return"/>
5212 </method>
5213
5214 <method name="getStorageControllerByInstance" const="yes">
5215 <desc>
5216 Returns a storage controller with the given instance number.
5217
5218 <result name="VBOX_E_OBJECT_NOT_FOUND">
5219 A storage controller with given instance number doesn't exist.
5220 </result>
5221 </desc>
5222 <param name="instance" type="unsigned long" dir="in"/>
5223 <param name="storageController" type="IStorageController" dir="return"/>
5224 </method>
5225
5226 <method name="removeStorageController">
5227 <desc>
5228 Removes a storage controller from the machine.
5229
5230 <result name="VBOX_E_OBJECT_NOT_FOUND">
5231 A storage controller with given name doesn't exist.
5232 </result>
5233 </desc>
5234 <param name="name" type="wstring" dir="in"/>
5235 </method>
5236
5237 <method name="getSerialPort" const="yes">
5238 <desc>
5239 Returns the serial port associated with the given slot.
5240 Slots are numbered sequentially, starting with zero. The total
5241 number of serial ports per machine is defined by the
5242 <link to="ISystemProperties::serialPortCount"/> property,
5243 so the maximum slot number is one less than that property's value.
5244
5245 <result name="E_INVALIDARG">
5246 Invalid @a slot number.
5247 </result>
5248
5249 </desc>
5250 <param name="slot" type="unsigned long" dir="in"/>
5251 <param name="port" type="ISerialPort" dir="return"/>
5252 </method>
5253
5254 <method name="getParallelPort" const="yes">
5255 <desc>
5256 Returns the parallel port associated with the given slot.
5257 Slots are numbered sequentially, starting with zero. The total
5258 number of parallel ports per machine is defined by the
5259 <link to="ISystemProperties::parallelPortCount"/> property,
5260 so the maximum slot number is one less than that property's value.
5261
5262 <result name="E_INVALIDARG">
5263 Invalid @a slot number.
5264 </result>
5265
5266 </desc>
5267 <param name="slot" type="unsigned long" dir="in"/>
5268 <param name="port" type="IParallelPort" dir="return"/>
5269 </method>
5270
5271 <method name="getExtraDataKeys">
5272 <desc>
5273 Returns an array representing the machine-specific extra data keys
5274 which currently have values defined.
5275 </desc>
5276 <param name="value" type="wstring" dir="return" safearray="yes">
5277 <desc>Array of extra data keys.</desc>
5278 </param>
5279 </method>
5280
5281 <method name="getExtraData">
5282 <desc>
5283 Returns associated machine-specific extra data.
5284
5285 If the requested data @a key does not exist, this function will
5286 succeed and return an empty string in the @a value argument.
5287
5288 <result name="VBOX_E_FILE_ERROR">
5289 Settings file not accessible.
5290 </result>
5291 <result name="VBOX_E_XML_ERROR">
5292 Could not parse the settings file.
5293 </result>
5294
5295 </desc>
5296 <param name="key" type="wstring" dir="in">
5297 <desc>Name of the data key to get.</desc>
5298 </param>
5299 <param name="value" type="wstring" dir="return">
5300 <desc>Value of the requested data key.</desc>
5301 </param>
5302 </method>
5303
5304 <method name="setExtraData">
5305 <desc>
5306 Sets associated machine-specific extra data.
5307
5308 If you pass @c null or an empty string as a key @a value, the given
5309 @a key will be deleted.
5310
5311 <note>
5312 Before performing the actual data change, this method will ask all
5313 registered callbacks using the
5314 <link to="IVirtualBoxCallback::onExtraDataCanChange"/>
5315 notification for a permission. If one of the callbacks refuses the
5316 new value, the change will not be performed.
5317 </note>
5318 <note>
5319 On success, the
5320 <link to="IVirtualBoxCallback::onExtraDataChange"/> notification
5321 is called to inform all registered callbacks about a successful data
5322 change.
5323 </note>
5324 <note>
5325 This method can be called outside the machine session and therefore
5326 it's a caller's responsibility to handle possible race conditions
5327 when several clients change the same key at the same time.
5328 </note>
5329
5330 <result name="VBOX_E_FILE_ERROR">
5331 Settings file not accessible.
5332 </result>
5333 <result name="VBOX_E_XML_ERROR">
5334 Could not parse the settings file.
5335 </result>
5336
5337 </desc>
5338 <param name="key" type="wstring" dir="in">
5339 <desc>Name of the data key to set.</desc>
5340 </param>
5341 <param name="value" type="wstring" dir="in">
5342 <desc>Value to assign to the key.</desc>
5343 </param>
5344 </method>
5345
5346 <method name="getCPUProperty" const="yes">
5347 <desc>
5348 Returns the virtual CPU boolean value of the specified property.
5349
5350 <result name="E_INVALIDARG">
5351 Invalid property.
5352 </result>
5353
5354 </desc>
5355 <param name="property" type="CPUPropertyType" dir="in">
5356 <desc>
5357 Property type to query.
5358 </desc>
5359 </param>
5360 <param name="value" type="boolean" dir="return">
5361 <desc>
5362 Property value.
5363 </desc>
5364 </param>
5365 </method>
5366
5367 <method name="setCPUProperty">
5368 <desc>
5369 Sets the virtual CPU boolean value of the specified property.
5370
5371 <result name="E_INVALIDARG">
5372 Invalid property.
5373 </result>
5374
5375 </desc>
5376 <param name="property" type="CPUPropertyType" dir="in">
5377 <desc>
5378 Property type to query.
5379 </desc>
5380 </param>
5381 <param name="value" type="boolean" dir="in">
5382 <desc>
5383 Property value.
5384 </desc>
5385 </param>
5386 </method>
5387
5388 <method name="getCPUIDLeaf" const="yes">
5389 <desc>
5390 Returns the virtual CPU cpuid information for the specified leaf.
5391
5392 Currently supported index values for cpuid:
5393 Standard CPUID leafs: 0 - 0xA
5394 Extended CPUID leafs: 0x80000000 - 0x8000000A
5395
5396 See the Intel and AMD programmer's manuals for detailed information
5397 about the cpuid instruction and its leafs.
5398 <result name="E_INVALIDARG">
5399 Invalid id.
5400 </result>
5401
5402 </desc>
5403 <param name="id" type="unsigned long" dir="in">
5404 <desc>
5405 CPUID leaf index.
5406 </desc>
5407 </param>
5408 <param name="valEax" type="unsigned long" dir="out">
5409 <desc>
5410 CPUID leaf value for register eax.
5411 </desc>
5412 </param>
5413 <param name="valEbx" type="unsigned long" dir="out">
5414 <desc>
5415 CPUID leaf value for register ebx.
5416 </desc>
5417 </param>
5418 <param name="valEcx" type="unsigned long" dir="out">
5419 <desc>
5420 CPUID leaf value for register ecx.
5421 </desc>
5422 </param>
5423 <param name="valEdx" type="unsigned long" dir="out">
5424 <desc>
5425 CPUID leaf value for register edx.
5426 </desc>
5427 </param>
5428 </method>
5429
5430 <method name="setCPUIDLeaf" const="yes">
5431 <desc>
5432 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
5433 are not passed unmodified. VirtualBox clears features that it doesn't support.
5434
5435 Currently supported index values for cpuid:
5436 Standard CPUID leafs: 0 - 0xA
5437 Extended CPUID leafs: 0x80000000 - 0x8000000A
5438
5439 See the Intel and AMD programmer's manuals for detailed information
5440 about the cpuid instruction and its leafs.
5441
5442 Do not use this method unless you know exactly what you're doing. Misuse can lead to
5443 random crashes inside VMs.
5444 <result name="E_INVALIDARG">
5445 Invalid id.
5446 </result>
5447
5448 </desc>
5449 <param name="id" type="unsigned long" dir="in">
5450 <desc>
5451 CPUID leaf index.
5452 </desc>
5453 </param>
5454 <param name="valEax" type="unsigned long" dir="in">
5455 <desc>
5456 CPUID leaf value for register eax.
5457 </desc>
5458 </param>
5459 <param name="valEbx" type="unsigned long" dir="in">
5460 <desc>
5461 CPUID leaf value for register ebx.
5462 </desc>
5463 </param>
5464 <param name="valEcx" type="unsigned long" dir="in">
5465 <desc>
5466 CPUID leaf value for register ecx.
5467 </desc>
5468 </param>
5469 <param name="valEdx" type="unsigned long" dir="in">
5470 <desc>
5471 CPUID leaf value for register edx.
5472 </desc>
5473 </param>
5474 </method>
5475
5476 <method name="removeCPUIDLeaf" const="yes">
5477 <desc>
5478 Removes the virtual CPU cpuid leaf for the specified index
5479
5480 <result name="E_INVALIDARG">
5481 Invalid id.
5482 </result>
5483
5484 </desc>
5485 <param name="id" type="unsigned long" dir="in">
5486 <desc>
5487 CPUID leaf index.
5488 </desc>
5489 </param>
5490 </method>
5491
5492 <method name="removeAllCPUIDLeaves" const="yes">
5493 <desc>
5494 Removes all the virtual CPU cpuid leaves
5495 </desc>
5496 </method>
5497
5498 <method name="getHWVirtExProperty" const="yes">
5499 <desc>
5500 Returns the value of the specified hardware virtualization boolean property.
5501
5502 <result name="E_INVALIDARG">
5503 Invalid property.
5504 </result>
5505
5506 </desc>
5507 <param name="property" type="HWVirtExPropertyType" dir="in">
5508 <desc>
5509 Property type to query.
5510 </desc>
5511 </param>
5512 <param name="value" type="boolean" dir="return">
5513 <desc>
5514 Property value.
5515 </desc>
5516 </param>
5517 </method>
5518
5519 <method name="setHWVirtExProperty">
5520 <desc>
5521 Sets a new value for the specified hardware virtualization boolean property.
5522
5523 <result name="E_INVALIDARG">
5524 Invalid property.
5525 </result>
5526
5527 </desc>
5528 <param name="property" type="HWVirtExPropertyType" dir="in">
5529 <desc>
5530 Property type to set.
5531 </desc>
5532 </param>
5533 <param name="value" type="boolean" dir="in">
5534 <desc>
5535 New property value.
5536 </desc>
5537 </param>
5538 </method>
5539
5540 <method name="saveSettings">
5541 <desc>
5542 Saves any changes to machine settings made since the session
5543 has been opened or a new machine has been created, or since the
5544 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
5545 For registered machines, new settings become visible to all
5546 other VirtualBox clients after successful invocation of this
5547 method.
5548 <note>
5549 The method sends <link to="IVirtualBoxCallback::onMachineDataChange"/>
5550 notification event after the configuration has been successfully
5551 saved (only for registered machines).
5552 </note>
5553 <note>
5554 Calling this method is only valid on instances returned
5555 by <link to="ISession::machine"/> and on new machines
5556 created by <link to="IVirtualBox::createMachine"/> but not
5557 yet registered, or on unregistered machines after calling
5558 <link to="IVirtualBox::unregisterMachine"/>.
5559 </note>
5560
5561 <result name="VBOX_E_FILE_ERROR">
5562 Settings file not accessible.
5563 </result>
5564 <result name="VBOX_E_XML_ERROR">
5565 Could not parse the settings file.
5566 </result>
5567 <result name="E_ACCESSDENIED">
5568 Modification request refused.
5569 </result>
5570
5571 </desc>
5572 </method>
5573
5574 <method name="discardSettings">
5575 <desc>
5576 Discards any changes to the machine settings made since the session
5577 has been opened or since the last call to <link to="#saveSettings"/>
5578 or <link to="#discardSettings"/>.
5579 <note>
5580 Calling this method is only valid on instances returned
5581 by <link to="ISession::machine"/> and on new machines
5582 created by <link to="IVirtualBox::createMachine"/> or
5583 opened by <link to="IVirtualBox::openMachine"/> but not
5584 yet registered, or on unregistered machines after calling
5585 <link to="IVirtualBox::unregisterMachine"/>.
5586 </note>
5587
5588 <result name="VBOX_E_INVALID_VM_STATE">
5589 Virtual machine is not mutable.
5590 </result>
5591
5592 </desc>
5593 </method>
5594
5595 <method name="deleteSettings">
5596 <desc>
5597 Deletes the settings file of this machine from disk.
5598 The machine must not be registered in order for this operation
5599 to succeed.
5600 <note>
5601 <link to="#settingsModified"/> will return @c true after this
5602 method successfully returns.
5603 </note>
5604 <note>
5605 Calling this method is only valid on instances returned
5606 by <link to="ISession::machine"/> and on new machines
5607 created by <link to="IVirtualBox::createMachine"/> or
5608 opened by <link to="IVirtualBox::openMachine"/> but not
5609 yet registered, or on unregistered machines after calling
5610 <link to="IVirtualBox::unregisterMachine"/>.
5611 </note>
5612 <note>
5613 The deleted machine settings file can be restored (saved again)
5614 by calling <link to="#saveSettings"/>.
5615 </note>
5616
5617 <result name="VBOX_E_INVALID_VM_STATE">
5618 Cannot delete settings of a registered machine or
5619 machine not mutable.
5620 </result>
5621 <result name="VBOX_E_IPRT_ERROR">
5622 Could not delete the settings file.
5623 </result>
5624
5625 </desc>
5626 </method>
5627
5628 <method name="export">
5629 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5630 steps required to export VirtualBox machines to OVF.
5631 </desc>
5632
5633 <param name="aAppliance" type="IAppliance" dir="in">
5634 <desc>Appliance to export this machine to.</desc>
5635 </param>
5636 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5637 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5638 </param>
5639 </method >
5640
5641 <method name="getSnapshot">
5642 <desc>
5643 Returns a snapshot of this machine with the given UUID.
5644 A @c null UUID can be used to obtain the first snapshot
5645 taken on this machine. This is useful if you want to traverse
5646 the whole tree of snapshots starting from the root.
5647
5648 <result name="VBOX_E_OBJECT_NOT_FOUND">
5649 Virtual machine has no snapshots or snapshot not found.
5650 </result>
5651
5652 </desc>
5653 <param name="id" type="uuid" mod="string" dir="in">
5654 <desc>UUID of the snapshot to get</desc>
5655 </param>
5656 <param name="snapshot" type="ISnapshot" dir="return">
5657 <desc>Snapshot object with the given UUID.</desc>
5658 </param>
5659 </method>
5660
5661 <method name="findSnapshot">
5662 <desc>
5663 Returns a snapshot of this machine with the given name.
5664
5665 <result name="VBOX_E_OBJECT_NOT_FOUND">
5666 Virtual machine has no snapshots or snapshot not found.
5667 </result>
5668
5669 </desc>
5670 <param name="name" type="wstring" dir="in">
5671 <desc>Name of the snapshot to find</desc>
5672 </param>
5673 <param name="snapshot" type="ISnapshot" dir="return">
5674 <desc>Snapshot object with the given name.</desc>
5675 </param>
5676 </method>
5677
5678 <method name="setCurrentSnapshot">
5679 <desc>
5680 Sets the current snapshot of this machine.
5681 <note>
5682 In the current implementation, this operation is not
5683 implemented.
5684 </note>
5685 </desc>
5686 <param name="id" type="uuid" mod="string" dir="in">
5687 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5688 </param>
5689 </method>
5690
5691 <method name="createSharedFolder">
5692 <desc>
5693 Creates a new permanent shared folder by associating the given logical
5694 name with the given host path, adds it to the collection of shared
5695 folders and starts sharing it. Refer to the description of
5696 <link to="ISharedFolder"/> to read more about logical names.
5697
5698 <result name="VBOX_E_OBJECT_IN_USE">
5699 Shared folder already exists.
5700 </result>
5701 <result name="VBOX_E_FILE_ERROR">
5702 Shared folder @a hostPath not accessible.
5703 </result>
5704
5705 </desc>
5706 <param name="name" type="wstring" dir="in">
5707 <desc>Unique logical name of the shared folder.</desc>
5708 </param>
5709 <param name="hostPath" type="wstring" dir="in">
5710 <desc>Full path to the shared folder in the host file system.</desc>
5711 </param>
5712 <param name="writable" type="boolean" dir="in">
5713 <desc>Whether the share is writable or readonly</desc>
5714 </param>
5715 </method>
5716
5717 <method name="removeSharedFolder">
5718 <desc>
5719 Removes the permanent shared folder with the given name previously
5720 created by <link to="#createSharedFolder"/> from the collection of
5721 shared folders and stops sharing it.
5722
5723 <result name="VBOX_E_INVALID_VM_STATE">
5724 Virtual machine is not mutable.
5725 </result>
5726 <result name="VBOX_E_OBJECT_NOT_FOUND">
5727 Shared folder @a name does not exist.
5728 </result>
5729
5730 </desc>
5731 <param name="name" type="wstring" dir="in">
5732 <desc>Logical name of the shared folder to remove.</desc>
5733 </param>
5734 </method>
5735
5736 <method name="canShowConsoleWindow">
5737 <desc>
5738 Returns @c true if the VM console process can activate the
5739 console window and bring it to foreground on the desktop of
5740 the host PC.
5741 <note>
5742 This method will fail if a session for this machine is not
5743 currently open.
5744 </note>
5745
5746 <result name="VBOX_E_INVALID_VM_STATE">
5747 Machine session is not open.
5748 </result>
5749
5750 </desc>
5751 <param name="canShow" type="boolean" dir="return">
5752 <desc>
5753 @c true if the console window can be shown and @c false otherwise.
5754 </desc>
5755 </param>
5756 </method>
5757
5758 <method name="showConsoleWindow">
5759 <desc>
5760 Activates the console window and brings it to foreground on
5761 the desktop of the host PC. Many modern window managers on
5762 many platforms implement some sort of focus stealing
5763 prevention logic, so that it may be impossible to activate
5764 a window without the help of the currently active
5765 application. In this case, this method will return a non-zero
5766 identifier that represents the top-level window of the VM
5767 console process. The caller, if it represents a currently
5768 active process, is responsible to use this identifier (in a
5769 platform-dependent manner) to perform actual window
5770 activation.
5771 <note>
5772 This method will fail if a session for this machine is not
5773 currently open.
5774 </note>
5775
5776 <result name="VBOX_E_INVALID_VM_STATE">
5777 Machine session is not open.
5778 </result>
5779
5780 </desc>
5781 <param name="winId" type="unsigned long long" dir="return">
5782 <desc>
5783 Platform-dependent identifier of the top-level VM console
5784 window, or zero if this method has performed all actions
5785 necessary to implement the <i>show window</i> semantics for
5786 the given platform and/or VirtualBox front-end.
5787 </desc>
5788 </param>
5789 </method>
5790
5791 <method name="getGuestProperty">
5792 <desc>
5793 Reads an entry from the machine's guest property store.
5794
5795 <result name="VBOX_E_INVALID_VM_STATE">
5796 Machine session is not open.
5797 </result>
5798
5799 </desc>
5800 <param name="name" type="wstring" dir="in">
5801 <desc>
5802 The name of the property to read.
5803 </desc>
5804 </param>
5805 <param name="value" type="wstring" dir="out">
5806 <desc>
5807 The value of the property. If the property does not exist then this
5808 will be empty.
5809 </desc>
5810 </param>
5811 <param name="timestamp" type="unsigned long long" dir="out">
5812 <desc>
5813 The time at which the property was last modified, as seen by the
5814 server process.
5815 </desc>
5816 </param>
5817 <param name="flags" type="wstring" dir="out">
5818 <desc>
5819 Additional property parameters, passed as a comma-separated list of
5820 "name=value" type entries.
5821 </desc>
5822 </param>
5823 </method>
5824
5825 <method name="getGuestPropertyValue">
5826 <desc>
5827 Reads a value from the machine's guest property store.
5828
5829 <result name="VBOX_E_INVALID_VM_STATE">
5830 Machine session is not open.
5831 </result>
5832
5833 </desc>
5834 <param name="property" type="wstring" dir="in">
5835 <desc>
5836 The name of the property to read.
5837 </desc>
5838 </param>
5839 <param name="value" type="wstring" dir="return">
5840 <desc>
5841 The value of the property. If the property does not exist then this
5842 will be empty.
5843 </desc>
5844 </param>
5845 </method>
5846
5847 <method name="getGuestPropertyTimestamp">
5848 <desc>
5849 Reads a property timestamp from the machine's guest property store.
5850
5851 <result name="VBOX_E_INVALID_VM_STATE">
5852 Machine session is not open.
5853 </result>
5854
5855 </desc>
5856 <param name="property" type="wstring" dir="in">
5857 <desc>
5858 The name of the property to read.
5859 </desc>
5860 </param>
5861 <param name="value" type="unsigned long long" dir="return">
5862 <desc>
5863 The timestamp. If the property does not exist then this will be
5864 empty.
5865 </desc>
5866 </param>
5867 </method>
5868
5869 <method name="setGuestProperty">
5870 <desc>
5871 Sets, changes or deletes an entry in the machine's guest property
5872 store.
5873
5874 <result name="E_ACCESSDENIED">
5875 Property cannot be changed.
5876 </result>
5877 <result name="E_INVALIDARG">
5878 Invalid @a flags.
5879 </result>
5880 <result name="VBOX_E_INVALID_VM_STATE">
5881 Virtual machine is not mutable or session not open.
5882 </result>
5883 <result name="VBOX_E_INVALID_OBJECT_STATE">
5884 Cannot set transient property when machine not running.
5885 </result>
5886
5887 </desc>
5888 <param name="property" type="wstring" dir="in">
5889 <desc>
5890 The name of the property to set, change or delete.
5891 </desc>
5892 </param>
5893 <param name="value" type="wstring" dir="in">
5894 <desc>
5895 The new value of the property to set, change or delete. If the
5896 property does not yet exist and value is non-empty, it will be
5897 created. If the value is @c null or empty, the property will be
5898 deleted if it exists.
5899 </desc>
5900 </param>
5901 <param name="flags" type="wstring" dir="in">
5902 <desc>
5903 Additional property parameters, passed as a comma-separated list of
5904 "name=value" type entries.
5905 </desc>
5906 </param>
5907 </method>
5908
5909 <method name="setGuestPropertyValue">
5910 <desc>
5911 Sets, changes or deletes a value in the machine's guest property
5912 store. The flags field will be left unchanged or created empty for a
5913 new property.
5914
5915 <result name="E_ACCESSDENIED">
5916 Property cannot be changed.
5917 </result>
5918 <result name="VBOX_E_INVALID_VM_STATE">
5919 Virtual machine is not mutable or session not open.
5920 </result>
5921 <result name="VBOX_E_INVALID_OBJECT_STATE">
5922 Cannot set transient property when machine not running.
5923 </result>
5924 </desc>
5925
5926 <param name="property" type="wstring" dir="in">
5927 <desc>
5928 The name of the property to set, change or delete.
5929 </desc>
5930 </param>
5931 <param name="value" type="wstring" dir="in">
5932 <desc>
5933 The new value of the property to set, change or delete. If the
5934 property does not yet exist and value is non-empty, it will be
5935 created. If the value is @c null or empty, the property will be
5936 deleted if it exists.
5937 </desc>
5938 </param>
5939 </method>
5940
5941 <method name="enumerateGuestProperties">
5942 <desc>
5943 Return a list of the guest properties matching a set of patterns along
5944 with their values, time stamps and flags.
5945 </desc>
5946 <param name="patterns" type="wstring" dir="in">
5947 <desc>
5948 The patterns to match the properties against, separated by '|'
5949 characters. If this is empty or @c null, all properties will match.
5950 </desc>
5951 </param>
5952 <param name="name" type="wstring" dir="out" safearray="yes">
5953 <desc>
5954 The names of the properties returned.
5955 </desc>
5956 </param>
5957 <param name="value" type="wstring" dir="out" safearray="yes">
5958 <desc>
5959 The values of the properties returned. The array entries match the
5960 corresponding entries in the @a name array.
5961 </desc>
5962 </param>
5963 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5964 <desc>
5965 The time stamps of the properties returned. The array entries match
5966 the corresponding entries in the @a name array.
5967 </desc>
5968 </param>
5969 <param name="flags" type="wstring" dir="out" safearray="yes">
5970 <desc>
5971 The flags of the properties returned. The array entries match the
5972 corresponding entries in the @a name array.
5973 </desc>
5974 </param>
5975 </method>
5976
5977 <method name="querySavedThumbnailSize">
5978 <desc>
5979 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5980 </desc>
5981 <param name="size" type="unsigned long" dir="out">
5982 <desc>
5983 Size of buffer required to store the bitmap.
5984 </desc>
5985 </param>
5986 <param name="width" type="unsigned long" dir="out">
5987 <desc>
5988 Bitmap width.
5989 </desc>
5990 </param>
5991 <param name="height" type="unsigned long" dir="out">
5992 <desc>
5993 Bitmap height.
5994 </desc>
5995 </param>
5996 </method>
5997
5998 <method name="readSavedThumbnailToArray">
5999 <desc>
6000 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
6001 </desc>
6002 <param name="BGR" type="boolean" dir="in">
6003 <desc>
6004 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
6005 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
6006 </desc>
6007 </param>
6008 <param name="width" type="unsigned long" dir="out">
6009 <desc>
6010 Bitmap width.
6011 </desc>
6012 </param>
6013 <param name="height" type="unsigned long" dir="out">
6014 <desc>
6015 Bitmap height.
6016 </desc>
6017 </param>
6018 <param name="data" type="octet" dir="return" safearray="yes">
6019 <desc>
6020 Array with resulting bitmap data.
6021 </desc>
6022 </param>
6023 </method>
6024
6025 <method name="querySavedScreenshotPNGSize">
6026 <desc>
6027 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
6028 </desc>
6029 <param name="size" type="unsigned long" dir="out">
6030 <desc>
6031 Size of buffer required to store the PNG binary data.
6032 </desc>
6033 </param>
6034 <param name="width" type="unsigned long" dir="out">
6035 <desc>
6036 Image width.
6037 </desc>
6038 </param>
6039 <param name="height" type="unsigned long" dir="out">
6040 <desc>
6041 Image height.
6042 </desc>
6043 </param>
6044 </method>
6045
6046 <method name="readSavedScreenshotPNGToArray">
6047 <desc>
6048 Screenshot in PNG format is retrieved to an array of bytes.
6049 </desc>
6050 <param name="width" type="unsigned long" dir="out">
6051 <desc>
6052 Image width.
6053 </desc>
6054 </param>
6055 <param name="height" type="unsigned long" dir="out">
6056 <desc>
6057 Image height.
6058 </desc>
6059 </param>
6060 <param name="data" type="octet" dir="return" safearray="yes">
6061 <desc>
6062 Array with resulting PNG data.
6063 </desc>
6064 </param>
6065 </method>
6066
6067 <method name="hotPlugCPU">
6068 <desc>
6069 Plugs a CPU into the machine.
6070 </desc>
6071 <param name="cpu" type="unsigned long" dir="in">
6072 <desc>
6073 The CPU id to insert.
6074 </desc>
6075 </param>
6076 </method>
6077
6078 <method name="hotUnplugCPU">
6079 <desc>
6080 Removes a CPU from the machine.
6081 </desc>
6082 <param name="cpu" type="unsigned long" dir="in">
6083 <desc>
6084 The CPU id to remove.
6085 </desc>
6086 </param>
6087 </method>
6088
6089 <method name="getCPUStatus">
6090 <desc>
6091 Returns the current status of the given CPU.
6092 </desc>
6093 <param name="cpu" type="unsigned long" dir="in">
6094 <desc>
6095 The CPU id to check for.
6096 </desc>
6097 </param>
6098 <param name="attached" type="boolean" dir="return">
6099 <desc>
6100 Status of the CPU.
6101 </desc>
6102 </param>
6103 </method>
6104
6105 <method name="readLog">
6106 <desc>
6107 Reads the VM log file. The chunk size is limited, so even if you
6108 ask for a big piece there might be less data returned.
6109 </desc>
6110 <param name="idx" type="unsigned long" dir="in">
6111 <desc>
6112 Which log file to read. 0=current log file.
6113 </desc>
6114 </param>
6115 <param name="offset" type="unsigned long long" dir="in">
6116 <desc>
6117 Offset in the log file.
6118 </desc>
6119 </param>
6120 <param name="size" type="unsigned long long" dir="in">
6121 <desc>
6122 Chunk size to read in the log file.
6123 </desc>
6124 </param>
6125 <param name="data" type="octet" dir="return" safearray="yes">
6126 <desc>
6127 Data read from the log file. A data size of 0 means end of file
6128 if the requested chunk size was not 0.
6129 </desc>
6130 </param>
6131 </method>
6132 </interface>
6133
6134 <!--
6135 // IConsole
6136 /////////////////////////////////////////////////////////////////////////
6137 -->
6138
6139 <interface
6140 name="IConsoleCallback" extends="$unknown"
6141 uuid="60703f8d-81e4-4b45-a147-dcfd07692b19"
6142 wsmap="suppress"
6143 >
6144
6145 <desc>
6146 This interface is used by a client of the Main API that need to
6147 be notified of events. For example, a graphical user interface
6148 can use this to learn about machine state changes so they can
6149 update the list of virtual machines without having to rely
6150 on polling.
6151
6152 Whenever relevant events occur in VirtualBox, the callbacks in
6153 objects of this interface are called. In order for this to be
6154 useful, a client needs to create its own subclass that implements
6155 this interface in which the methods for the relevant callbacks
6156 are overridden. An instance of this subclass interface can then
6157 be passed to <link to="IConsole::registerCallback" />.
6158 </desc>
6159
6160 <method name="onMousePointerShapeChange">
6161 <desc>
6162 Notification when the guest mouse pointer shape has
6163 changed. The new shape data is given.
6164 </desc>
6165 <param name="visible" type="boolean" dir="in">
6166 <desc>
6167 Flag whether the pointer is visible.
6168 </desc>
6169 </param>
6170 <param name="alpha" type="boolean" dir="in">
6171 <desc>
6172 Flag whether the pointer has an alpha channel.
6173 </desc>
6174 </param>
6175 <param name="xHot" type="unsigned long" dir="in">
6176 <desc>
6177 The pointer hot spot x coordinate.
6178 </desc>
6179 </param>
6180 <param name="yHot" type="unsigned long" dir="in">
6181 <desc>
6182 The pointer hot spot y coordinate.
6183 </desc>
6184 </param>
6185 <param name="width" type="unsigned long" dir="in">
6186 <desc>
6187 Width of the pointer shape in pixels.
6188 </desc>
6189 </param>
6190 <param name="height" type="unsigned long" dir="in">
6191 <desc>
6192 Height of the pointer shape in pixels.
6193 </desc>
6194 </param>
6195 <param name="shape" type="octet" mod="ptr" dir="in">
6196 <desc>
6197 Address of the shape buffer.
6198
6199 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
6200 followed by a 32-bpp XOR (color) mask.
6201
6202 For pointers without alpha channel the XOR mask pixels are 32
6203 bit values: (lsb)BGR0(msb). For pointers with alpha channel
6204 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
6205
6206 An AND mask is used for pointers with alpha channel, so if the
6207 callback does not support alpha, the pointer could be
6208 displayed as a normal color pointer.
6209
6210 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
6211 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
6212 height</tt>. The padding bits at the end of each scanline are
6213 undefined.
6214
6215 The XOR mask follows the AND mask on the next 4-byte aligned
6216 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
6217 Bytes in the gap between the AND and the XOR mask are undefined.
6218 The XOR mask scanlines have no gap between them and the size of
6219 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
6220
6221 <note>
6222 If @a shape is 0, only the pointer visibility is changed.
6223 </note>
6224 </desc>
6225 </param>
6226 </method>
6227
6228 <method name="onMouseCapabilityChange">
6229 <desc>
6230 Notification when the mouse capabilities reported by the
6231 guest have changed. The new capabilities are passed.
6232 </desc>
6233 <param name="supportsAbsolute" type="boolean" dir="in"/>
6234 <param name="supportsRelative" type="boolean" dir="in"/>
6235 <param name="needsHostCursor" type="boolean" dir="in"/>
6236 </method>
6237
6238 <method name="onKeyboardLedsChange">
6239 <desc>
6240 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
6241 to alter the state of the keyboard LEDs.
6242 </desc>
6243 <param name="numLock" type="boolean" dir="in"/>
6244 <param name="capsLock" type="boolean" dir="in"/>
6245 <param name="scrollLock" type="boolean" dir="in"/>
6246 </method>
6247
6248 <method name="onStateChange">
6249 <desc>
6250 Notification when the execution state of the machine has changed.
6251 The new state will be given.
6252 </desc>
6253 <param name="state" type="MachineState" dir="in"/>
6254 </method>
6255
6256 <method name="onAdditionsStateChange">
6257 <desc>
6258 Notification when a Guest Additions property changes.
6259 Interested callees should query IGuest attributes to
6260 find out what has changed.
6261 </desc>
6262 </method>
6263
6264 <method name="onNetworkAdapterChange">
6265 <desc>
6266 Notification when a property of one of the
6267 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
6268 changes. Interested callees should use INetworkAdapter methods and
6269 attributes to find out what has changed.
6270 </desc>
6271 <param name="networkAdapter" type="INetworkAdapter" dir="in">
6272 <desc>Network adapter that is subject to change.</desc>
6273 </param>
6274 </method>
6275
6276 <method name="onSerialPortChange">
6277 <desc>
6278 Notification when a property of one of the
6279 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
6280 Interested callees should use ISerialPort methods and attributes
6281 to find out what has changed.
6282 </desc>
6283 <param name="serialPort" type="ISerialPort" dir="in">
6284 <desc>Serial port that is subject to change.</desc>
6285 </param>
6286 </method>
6287
6288 <method name="onParallelPortChange">
6289 <desc>
6290 Notification when a property of one of the
6291 virtual <link to="IMachine::getParallelPort">parallel ports</link>
6292 changes. Interested callees should use ISerialPort methods and
6293 attributes to find out what has changed.
6294 </desc>
6295 <param name="parallelPort" type="IParallelPort" dir="in">
6296 <desc>Parallel port that is subject to change.</desc>
6297 </param>
6298 </method>
6299
6300 <method name="onStorageControllerChange">
6301 <desc>
6302 Notification when a property of one of the
6303 virtual <link to="IMachine::storageControllers">storage controllers</link>
6304 changes. Interested callees should query the corresponding collections
6305 to find out what has changed.
6306 </desc>
6307 </method>
6308
6309 <method name="onMediumChange">
6310 <desc>
6311 Notification when a
6312 <link to="IMachine::mediumAttachments">medium attachment</link>
6313 changes.
6314 </desc>
6315 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
6316 <desc>Medium attachment that is subject to change.</desc>
6317 </param>
6318 </method>
6319
6320 <method name="onCPUChange">
6321 <desc>
6322 Notification when a CPU changes.
6323 </desc>
6324 <param name="cpu" type="unsigned long" dir="in">
6325 <desc>The CPU which changed</desc>
6326 </param>
6327 <param name="add" type="boolean" dir="in">
6328 <desc>Flag whether the CPU was added or removed</desc>
6329 </param>
6330 </method>
6331
6332 <method name="onVRDPServerChange">
6333 <desc>
6334 Notification when a property of the
6335 <link to="IMachine::VRDPServer">VRDP server</link> changes.
6336 Interested callees should use IVRDPServer methods and attributes to
6337 find out what has changed.
6338 </desc>
6339 </method>
6340
6341 <method name="onRemoteDisplayInfoChange">
6342 <desc>
6343 Notification when the status of the VRDP server changes. Interested callees
6344 should use <link to="IConsole::RemoteDisplayInfo">IRemoteDisplayInfo</link>
6345 attributes to find out what is the current status.
6346 </desc>
6347 </method>
6348
6349 <method name="onUSBControllerChange">
6350 <desc>
6351 Notification when a property of the virtual
6352 <link to="IMachine::USBController">USB controller</link> changes.
6353 Interested callees should use IUSBController methods and attributes to
6354 find out what has changed.
6355 </desc>
6356 </method>
6357
6358 <method name="onUSBDeviceStateChange">
6359 <desc>
6360 Notification when a USB device is attached to or detached from
6361 the virtual USB controller.
6362
6363 This notification is sent as a result of the indirect
6364 request to attach the device because it matches one of the
6365 machine USB filters, or as a result of the direct request
6366 issued by <link to="IConsole::attachUSBDevice"/> or
6367 <link to="IConsole::detachUSBDevice"/>.
6368
6369 This notification is sent in case of both a succeeded and a
6370 failed request completion. When the request succeeds, the
6371 @a error parameter is @c null, and the given device has been
6372 already added to (when @a attached is @c true) or removed from
6373 (when @a attached is @c false) the collection represented by
6374 <link to="IConsole::USBDevices"/>. On failure, the collection
6375 doesn't change and the @a error parameter represents the error
6376 message describing the failure.
6377
6378 </desc>
6379 <param name="device" type="IUSBDevice" dir="in">
6380 <desc>Device that is subject to state change.</desc>
6381 </param>
6382 <param name="attached" type="boolean" dir="in">
6383 <desc>
6384 @c true if the device was attached and @c false otherwise.
6385 </desc>
6386 </param>
6387 <param name="error" type="IVirtualBoxErrorInfo" dir="in">
6388 <desc>
6389 @c null on success or an error message object on failure.
6390 </desc>
6391 </param>
6392 </method>
6393
6394 <method name="onSharedFolderChange">
6395 <desc>
6396 Notification when a shared folder is added or removed.
6397 The @a scope argument defines one of three scopes:
6398 <link to="IVirtualBox::sharedFolders">global shared folders</link>
6399 (<link to="Scope_Global">Global</link>),
6400 <link to="IMachine::sharedFolders">permanent shared folders</link> of
6401 the machine (<link to="Scope_Machine">Machine</link>) or <link
6402 to="IConsole::sharedFolders">transient shared folders</link> of the
6403 machine (<link to="Scope_Session">Session</link>). Interested callees
6404 should use query the corresponding collections to find out what has
6405 changed.
6406 </desc>
6407 <param name="scope" type="Scope" dir="in">
6408 <desc>Scope of the notification.</desc>
6409 </param>
6410 </method>
6411
6412 <method name="onRuntimeError">
6413 <desc>
6414 Notification when an error happens during the virtual
6415 machine execution.
6416
6417 There are three kinds of runtime errors:
6418 <ul>
6419 <li><i>fatal</i></li>
6420 <li><i>non-fatal with retry</i></li>
6421 <li><i>non-fatal warnings</i></li>
6422 </ul>
6423
6424 <b>Fatal</b> errors are indicated by the @a fatal parameter set
6425 to @c true. In case of fatal errors, the virtual machine
6426 execution is always paused before calling this notification, and
6427 the notification handler is supposed either to immediately save
6428 the virtual machine state using <link to="IConsole::saveState"/>
6429 or power it off using <link to="IConsole::powerDown"/>.
6430 Resuming the execution can lead to unpredictable results.
6431
6432 <b>Non-fatal</b> errors and warnings are indicated by the
6433 @a fatal parameter set to @c false. If the virtual machine
6434 is in the Paused state by the time the error notification is
6435 received, it means that the user can <i>try to resume</i> the machine
6436 execution after attempting to solve the problem that caused the
6437 error. In this case, the notification handler is supposed
6438 to show an appropriate message to the user (depending on the
6439 value of the @a id parameter) that offers several actions such
6440 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
6441 wants to retry, the notification handler should continue
6442 the machine execution using the <link to="IConsole::resume"/>
6443 call. If the machine execution is not Paused during this
6444 notification, then it means this notification is a <i>warning</i>
6445 (for example, about a fatal condition that can happen very soon);
6446 no immediate action is required from the user, the machine
6447 continues its normal execution.
6448
6449 Note that in either case the notification handler
6450 <b>must not</b> perform any action directly on a thread
6451 where this notification is called. Everything it is allowed to
6452 do is to post a message to another thread that will then talk
6453 to the user and take the corresponding action.
6454
6455 Currently, the following error identifiers are known:
6456 <ul>
6457 <li><tt>"HostMemoryLow"</tt></li>
6458 <li><tt>"HostAudioNotResponding"</tt></li>
6459 <li><tt>"VDIStorageFull"</tt></li>
6460 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
6461 </ul>
6462
6463 <note>
6464 This notification is not designed to be implemented by
6465 more than one callback at a time. If you have multiple
6466 IConsoleCallback instances registered on the given
6467 IConsole object, make sure you simply do nothing but
6468 return @c S_OK from all but one of them that does actual
6469 user notification and performs necessary actions.
6470 </note>
6471
6472 </desc>
6473 <param name="fatal" type="boolean" dir="in">
6474 <desc>Whether the error is fatal or not</desc>
6475 </param>
6476 <param name="id" type="wstring" dir="in">
6477 <desc>Error identifier</desc>
6478 </param>
6479 <param name="message" type="wstring" dir="in">
6480 <desc>Optional error message</desc>
6481 </param>
6482 </method>
6483
6484 <method name="onCanShowWindow">
6485 <desc>
6486 Notification when a call to
6487 <link to="IMachine::canShowConsoleWindow"/> is made by a
6488 front-end to check if a subsequent call to
6489 <link to="IMachine::showConsoleWindow"/> can succeed.
6490
6491 The callee should give an answer appropriate to the current
6492 machine state in the @a canShow argument. This answer must
6493 remain valid at least until the next
6494 <link to="IConsole::state">machine state</link> change.
6495
6496 <note>
6497 This notification is not designed to be implemented by
6498 more than one callback at a time. If you have multiple
6499 IConsoleCallback instances registered on the given
6500 IConsole object, make sure you simply do nothing but
6501 return @c true and @c S_OK from all but one of them that
6502 actually manages console window activation.
6503 </note>
6504 </desc>
6505 <param name="canShow" type="boolean" dir="return">
6506 <desc>
6507 @c true if the console window can be shown and @c false otherwise.
6508 </desc>
6509 </param>
6510 </method>
6511
6512 <method name="onShowWindow">
6513 <desc>
6514 Notification when a call to
6515 <link to="IMachine::showConsoleWindow"/>
6516 requests the console window to be activated and brought to
6517 foreground on the desktop of the host PC.
6518
6519 This notification should cause the VM console process to
6520 perform the requested action as described above. If it is
6521 impossible to do it at a time of this notification, this
6522 method should return a failure.
6523
6524 Note that many modern window managers on many platforms
6525 implement some sort of focus stealing prevention logic, so
6526 that it may be impossible to activate a window without the
6527 help of the currently active application (which is supposedly
6528 an initiator of this notification). In this case, this method
6529 must return a non-zero identifier that represents the
6530 top-level window of the VM console process. The caller, if it
6531 represents a currently active process, is responsible to use
6532 this identifier (in a platform-dependent manner) to perform
6533 actual window activation.
6534
6535 This method must set @a winId to zero if it has performed all
6536 actions necessary to complete the request and the console
6537 window is now active and in foreground, to indicate that no
6538 further action is required on the caller's side.
6539
6540 <note>
6541 This notification is not designed to be implemented by
6542 more than one callback at a time. If you have multiple
6543 IConsoleCallback instances registered on the given
6544 IConsole object, make sure you simply do nothing but
6545 return @c S_OK from all but one of them that actually
6546 manages console window activation.
6547 </note>
6548 </desc>
6549 <param name="winId" type="unsigned long long" dir="return">
6550 <desc>
6551 Platform-dependent identifier of the top-level VM console
6552 window, or zero if this method has performed all actions
6553 necessary to implement the <i>show window</i> semantics for
6554 the given platform and/or this VirtualBox front-end.
6555 </desc>
6556 </param>
6557 </method>
6558
6559 </interface>
6560
6561 <interface
6562 name="IRemoteDisplayInfo" extends="$unknown"
6563 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
6564 wsmap="struct"
6565 >
6566 <desc>
6567 Contains information about the remote display (VRDP) capabilities and status.
6568 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
6569 </desc>
6570
6571 <attribute name="active" type="boolean" readonly="yes">
6572 <desc>
6573 Whether the remote display connection is active.
6574 </desc>
6575 </attribute>
6576
6577 <attribute name="port" type="long" readonly="yes">
6578 <desc>
6579 VRDP server port number. If this property is equal to <tt>0</tt>, then
6580 the VRDP server failed to start, usually because there are no free TCP
6581 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
6582 server has not yet been started.
6583 </desc>
6584 </attribute>
6585
6586 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
6587 <desc>
6588 How many times a client connected.
6589 </desc>
6590 </attribute>
6591
6592 <attribute name="beginTime" type="long long" readonly="yes">
6593 <desc>
6594 When the last connection was established, in milliseconds since 1970-01-01 UTC.
6595 </desc>
6596 </attribute>
6597
6598 <attribute name="endTime" type="long long" readonly="yes">
6599 <desc>
6600 When the last connection was terminated or the current time, if
6601 connection is still active, in milliseconds since 1970-01-01 UTC.
6602 </desc>
6603 </attribute>
6604
6605 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
6606 <desc>
6607 How many bytes were sent in last or current, if still active, connection.
6608 </desc>
6609 </attribute>
6610
6611 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
6612 <desc>
6613 How many bytes were sent in all connections.
6614 </desc>
6615 </attribute>
6616
6617 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
6618 <desc>
6619 How many bytes were received in last or current, if still active, connection.
6620 </desc>
6621 </attribute>
6622
6623 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
6624 <desc>
6625 How many bytes were received in all connections.
6626 </desc>
6627 </attribute>
6628
6629 <attribute name="user" type="wstring" readonly="yes">
6630 <desc>
6631 Login user name supplied by the client.
6632 </desc>
6633 </attribute>
6634
6635 <attribute name="domain" type="wstring" readonly="yes">
6636 <desc>
6637 Login domain name supplied by the client.
6638 </desc>
6639 </attribute>
6640
6641 <attribute name="clientName" type="wstring" readonly="yes">
6642 <desc>
6643 The client name supplied by the client.
6644 </desc>
6645 </attribute>
6646
6647 <attribute name="clientIP" type="wstring" readonly="yes">
6648 <desc>
6649 The IP address of the client.
6650 </desc>
6651 </attribute>
6652
6653 <attribute name="clientVersion" type="unsigned long" readonly="yes">
6654 <desc>
6655 The client software version number.
6656 </desc>
6657 </attribute>
6658
6659 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
6660 <desc>
6661 Public key exchange method used when connection was established.
6662 Values: 0 - RDP4 public key exchange scheme.
6663 1 - X509 certificates were sent to client.
6664 </desc>
6665 </attribute>
6666
6667 </interface>
6668
6669 <interface
6670 name="IConsole" extends="$unknown"
6671 uuid="6375231a-c17c-464b-92cb-ae9e128d71c3"
6672 wsmap="managed"
6673 >
6674 <desc>
6675 The IConsole interface represents an interface to control virtual
6676 machine execution.
6677
6678 The console object that implements the IConsole interface is obtained
6679 from a session object after the session for the given machine has been
6680 opened using one of <link to="IVirtualBox::openSession"/>,
6681 <link to="IVirtualBox::openRemoteSession"/> or
6682 <link to="IVirtualBox::openExistingSession"/> methods.
6683
6684 Methods of the IConsole interface allow the caller to query the current
6685 virtual machine execution state, pause the machine or power it down, save
6686 the machine state or take a snapshot, attach and detach removable media
6687 and so on.
6688
6689 <see>ISession</see>
6690 </desc>
6691
6692 <attribute name="machine" type="IMachine" readonly="yes">
6693 <desc>
6694 Machine object this console is sessioned with.
6695 <note>
6696 This is a convenience property, it has the same value as
6697 <link to="ISession::machine"/> of the corresponding session
6698 object.
6699 </note>
6700 </desc>
6701 </attribute>
6702
6703 <attribute name="state" type="MachineState" readonly="yes">
6704 <desc>
6705 Current execution state of the machine.
6706 <note>
6707 This property always returns the same value as the corresponding
6708 property of the IMachine object this console is sessioned with.
6709 For the process that owns (executes) the VM, this is the
6710 preferable way of querying the VM state, because no IPC
6711 calls are made.
6712 </note>
6713 </desc>
6714 </attribute>
6715
6716 <attribute name="guest" type="IGuest" readonly="yes">
6717 <desc>Guest object.</desc>
6718 </attribute>
6719
6720 <attribute name="keyboard" type="IKeyboard" readonly="yes">
6721 <desc>
6722 Virtual keyboard object.
6723 <note>
6724 If the machine is not running, any attempt to use
6725 the returned object will result in an error.
6726 </note>
6727 </desc>
6728 </attribute>
6729
6730 <attribute name="mouse" type="IMouse" readonly="yes">
6731 <desc>
6732 Virtual mouse object.
6733 <note>
6734 If the machine is not running, any attempt to use
6735 the returned object will result in an error.
6736 </note>
6737 </desc>
6738 </attribute>
6739
6740 <attribute name="display" type="IDisplay" readonly="yes">
6741 <desc>Virtual display object.
6742 <note>
6743 If the machine is not running, any attempt to use
6744 the returned object will result in an error.
6745 </note>
6746 </desc>
6747 </attribute>
6748
6749 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
6750 <desc>Debugging interface.</desc>
6751 </attribute>
6752
6753 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
6754 <desc>
6755 Collection of USB devices currently attached to the virtual
6756 USB controller.
6757 <note>
6758 The collection is empty if the machine is not running.
6759 </note>
6760 </desc>
6761 </attribute>
6762
6763 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6764 <desc>
6765 List of USB devices currently attached to the remote VRDP client.
6766 Once a new device is physically attached to the remote host computer,
6767 it appears in this list and remains there until detached.
6768 </desc>
6769 </attribute>
6770
6771 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
6772 <desc>
6773 Collection of shared folders for the current session. These folders
6774 are called transient shared folders because they are available to the
6775 guest OS running inside the associated virtual machine only for the
6776 duration of the session (as opposed to
6777 <link to="IMachine::sharedFolders"/> which represent permanent shared
6778 folders). When the session is closed (e.g. the machine is powered down),
6779 these folders are automatically discarded.
6780
6781 New shared folders are added to the collection using
6782 <link to="#createSharedFolder"/>. Existing shared folders can be
6783 removed using <link to="#removeSharedFolder"/>.
6784 </desc>
6785 </attribute>
6786
6787 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
6788 <desc>
6789 Interface that provides information on Remote Display (VRDP) connection.
6790 </desc>
6791 </attribute>
6792
6793 <method name="powerUp">
6794 <desc>
6795 Starts the virtual machine execution using the current machine
6796 state (that is, its current execution state, current settings and
6797 current storage devices).
6798
6799 If the machine is powered off or aborted, the execution will
6800 start from the beginning (as if the real hardware were just
6801 powered on).
6802
6803 If the machine is in the <link to="MachineState_Saved"/> state,
6804 it will continue its execution the point where the state has
6805 been saved.
6806
6807 <note>
6808 Unless you are trying to write a new VirtualBox front-end that
6809 performs direct machine execution (like the VirtualBox or VBoxSDL
6810 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
6811 session opened by <link to="IVirtualBox::openSession"/> and use this
6812 session only to change virtual machine settings. If you simply want to
6813 start virtual machine execution using one of the existing front-ends
6814 (for example the VirtualBox GUI or headless server), simply use
6815 <link to="IVirtualBox::openRemoteSession"/>; these front-ends will
6816 power up the machine automatically for you.
6817 </note>
6818
6819 <see>#saveState</see>
6820 <result name="VBOX_E_INVALID_VM_STATE">
6821 Virtual machine already running.
6822 </result>
6823 <result name="VBOX_E_HOST_ERROR">
6824 Host interface does not exist or name not set.
6825 </result>
6826 <result name="VBOX_E_FILE_ERROR">
6827 Invalid saved state file.
6828 </result>
6829 </desc>
6830 <param name="progress" type="IProgress" dir="return">
6831 <desc>Progress object to track the operation completion.</desc>
6832 </param>
6833 </method>
6834
6835 <method name="powerUpPaused">
6836 <desc>
6837 Identical to powerUp except that the VM will enter the
6838 <link to="MachineState_Paused"/> state, instead of
6839 <link to="MachineState_Running"/>.
6840
6841 <see>#powerUp</see>
6842 <result name="VBOX_E_INVALID_VM_STATE">
6843 Virtual machine already running.
6844 </result>
6845 <result name="VBOX_E_HOST_ERROR">
6846 Host interface does not exist or name not set.
6847 </result>
6848 <result name="VBOX_E_FILE_ERROR">
6849 Invalid saved state file.
6850 </result>
6851 </desc>
6852 <param name="progress" type="IProgress" dir="return">
6853 <desc>Progress object to track the operation completion.</desc>
6854 </param>
6855 </method>
6856
6857 <method name="powerDown">
6858 <desc>
6859 Initiates the power down procedure to stop the virtual machine
6860 execution.
6861
6862 The completion of the power down procedure is tracked using the returned
6863 IProgress object. After the operation is complete, the machine will go
6864 to the PoweredOff state.
6865 <result name="VBOX_E_INVALID_VM_STATE">
6866 Virtual machine must be Running, Paused or Stuck to be powered down.
6867 </result>
6868 </desc>
6869 <param name="progress" type="IProgress" dir="return">
6870 <desc>Progress object to track the operation completion.</desc>
6871 </param>
6872 </method>
6873
6874 <method name="reset">
6875 <desc>Resets the virtual machine.
6876 <result name="VBOX_E_INVALID_VM_STATE">
6877 Virtual machine not in Running state.
6878 </result>
6879 <result name="VBOX_E_VM_ERROR">
6880 Virtual machine error in reset operation.
6881 </result>
6882 </desc>
6883 </method>
6884
6885 <method name="pause">
6886 <desc>Pauses the virtual machine execution.
6887 <result name="VBOX_E_INVALID_VM_STATE">
6888 Virtual machine not in Running state.
6889 </result>
6890 <result name="VBOX_E_VM_ERROR">
6891 Virtual machine error in suspend operation.
6892 </result>
6893 </desc>
6894 </method>
6895
6896 <method name="resume">
6897 <desc>Resumes the virtual machine execution.
6898 <result name="VBOX_E_INVALID_VM_STATE">
6899 Virtual machine not in Paused state.
6900 </result>
6901 <result name="VBOX_E_VM_ERROR">
6902 Virtual machine error in resume operation.
6903 </result>
6904 </desc>
6905 </method>
6906
6907 <method name="powerButton">
6908 <desc>Sends the ACPI power button event to the guest.
6909 <result name="VBOX_E_INVALID_VM_STATE">
6910 Virtual machine not in Running state.
6911 </result>
6912 <result name="VBOX_E_PDM_ERROR">
6913 Controlled power off failed.
6914 </result>
6915 </desc>
6916 </method>
6917
6918 <method name="sleepButton">
6919 <desc>Sends the ACPI sleep button event to the guest.
6920 <result name="VBOX_E_INVALID_VM_STATE">
6921 Virtual machine not in Running state.
6922 </result>
6923 <result name="VBOX_E_PDM_ERROR">
6924 Sending sleep button event failed.
6925 </result>
6926 </desc>
6927 </method>
6928
6929 <method name="getPowerButtonHandled">
6930 <desc>Checks if the last power button event was handled by guest.
6931 <result name="VBOX_E_PDM_ERROR">
6932 Checking if the event was handled by the guest OS failed.
6933 </result>
6934 </desc>
6935 <param name="handled" type="boolean" dir="return"/>
6936 </method>
6937
6938 <method name="getGuestEnteredACPIMode">
6939 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6940 G1 (sleeping). If this method returns @c false, the guest will
6941 most likely not respond to external ACPI events.
6942 <result name="VBOX_E_INVALID_VM_STATE">
6943 Virtual machine not in Running state.
6944 </result>
6945 </desc>
6946 <param name="entered" type="boolean" dir="return"/>
6947 </method>
6948
6949 <method name="saveState">
6950 <desc>
6951 Saves the current execution state of a running virtual machine
6952 and stops its execution.
6953
6954 After this operation completes, the machine will go to the
6955 Saved state. Next time it is powered up, this state will
6956 be restored and the machine will continue its execution from
6957 the place where it was saved.
6958
6959 This operation differs from taking a snapshot to the effect
6960 that it doesn't create new differencing media. Also, once
6961 the machine is powered up from the state saved using this method,
6962 the saved state is deleted, so it will be impossible to return
6963 to this state later.
6964
6965 <note>
6966 On success, this method implicitly calls
6967 <link to="IMachine::saveSettings"/> to save all current machine
6968 settings (including runtime changes to the DVD medium, etc.).
6969 Together with the impossibility to change any VM settings when it is
6970 in the Saved state, this guarantees adequate hardware
6971 configuration of the machine when it is restored from the saved
6972 state file.
6973 </note>
6974
6975 <note>
6976 The machine must be in the Running or Paused state, otherwise
6977 the operation will fail.
6978 </note>
6979 <result name="VBOX_E_INVALID_VM_STATE">
6980 Virtual machine state neither Running nor Paused.
6981 </result>
6982 <result name="VBOX_E_FILE_ERROR">
6983 Failed to create directory for saved state file.
6984 </result>
6985
6986 <see><link to="#takeSnapshot"/></see>
6987 </desc>
6988 <param name="progress" type="IProgress" dir="return">
6989 <desc>Progress object to track the operation completion.</desc>
6990 </param>
6991 </method>
6992
6993 <method name="adoptSavedState">
6994 <desc>
6995 Associates the given saved state file to the virtual machine.
6996
6997 On success, the machine will go to the Saved state. Next time it is
6998 powered up, it will be restored from the adopted saved state and
6999 continue execution from the place where the saved state file was
7000 created.
7001
7002 The specified saved state file path may be absolute or relative to the
7003 folder the VM normally saves the state to (usually,
7004 <link to="IMachine::snapshotFolder"/>).
7005
7006 <note>
7007 It's a caller's responsibility to make sure the given saved state
7008 file is compatible with the settings of this virtual machine that
7009 represent its virtual hardware (memory size, storage disk configuration
7010 etc.). If there is a mismatch, the behavior of the virtual machine
7011 is undefined.
7012 </note>
7013 <result name="VBOX_E_INVALID_VM_STATE">
7014 Virtual machine state neither PoweredOff nor Aborted.
7015 </result>
7016 </desc>
7017 <param name="savedStateFile" type="wstring" dir="in">
7018 <desc>Path to the saved state file to adopt.</desc>
7019 </param>
7020 </method>
7021
7022 <method name="forgetSavedState">
7023 <desc>
7024 Forgets the saved state of the virtual machine previously created
7025 by <link to="#saveState"/>. Next time the machine is powered up, a
7026 clean boot will occur. If @a remove is @c true the saved state file
7027 is deleted.
7028 <note>
7029 This operation is equivalent to resetting or powering off
7030 the machine without doing a proper shutdown in the guest OS.
7031 </note>
7032 <result name="VBOX_E_INVALID_VM_STATE">
7033 Virtual machine not in state Saved.
7034 </result>
7035 </desc>
7036 <param name="remove" type="boolean" dir="in">
7037 <desc>If @c true remove the saved state file.</desc>
7038 </param>
7039 </method>
7040
7041 <method name="getDeviceActivity">
7042 <desc>
7043 Gets the current activity type of a given device or device group.
7044 <result name="E_INVALIDARG">
7045 Invalid device type.
7046 </result>
7047 </desc>
7048 <param name="type" type="DeviceType" dir="in"/>
7049 <param name="activity" type="DeviceActivity" dir="return"/>
7050 </method>
7051
7052 <method name="attachUSBDevice">
7053 <desc>
7054 Attaches a host USB device with the given UUID to the
7055 USB controller of the virtual machine.
7056
7057 The device needs to be in one of the following states:
7058 <link to="USBDeviceState_Busy"/>,
7059 <link to="USBDeviceState_Available"/> or
7060 <link to="USBDeviceState_Held"/>,
7061 otherwise an error is immediately returned.
7062
7063 When the device state is
7064 <link to="USBDeviceState_Busy">Busy</link>, an error may also
7065 be returned if the host computer refuses to release it for some reason.
7066
7067 <see>IUSBController::deviceFilters, USBDeviceState</see>
7068 <result name="VBOX_E_INVALID_VM_STATE">
7069 Virtual machine state neither Running nor Paused.
7070 </result>
7071 <result name="VBOX_E_PDM_ERROR">
7072 Virtual machine does not have a USB controller.
7073 </result>
7074 </desc>
7075 <param name="id" type="uuid" mod="string" dir="in">
7076 <desc>UUID of the host USB device to attach.</desc>
7077 </param>
7078 </method>
7079
7080 <method name="detachUSBDevice">
7081 <desc>
7082 Detaches an USB device with the given UUID from the USB controller
7083 of the virtual machine.
7084
7085 After this method succeeds, the VirtualBox server re-initiates
7086 all USB filters as if the device were just physically attached
7087 to the host, but filters of this machine are ignored to avoid
7088 a possible automatic re-attachment.
7089
7090 <see>IUSBController::deviceFilters, USBDeviceState</see>
7091
7092 <result name="VBOX_E_PDM_ERROR">
7093 Virtual machine does not have a USB controller.
7094 </result>
7095 <result name="E_INVALIDARG">
7096 USB device not attached to this virtual machine.
7097 </result>
7098 </desc>
7099 <param name="id" type="uuid" mod="string" dir="in">
7100 <desc>UUID of the USB device to detach.</desc>
7101 </param>
7102 <param name="device" type="IUSBDevice" dir="return">
7103 <desc>Detached USB device.</desc>
7104 </param>
7105 </method>
7106
7107 <method name="findUSBDeviceByAddress">
7108 <desc>
7109 Searches for a USB device with the given host address.
7110
7111 <result name="VBOX_E_OBJECT_NOT_FOUND">
7112 Given @c name does not correspond to any USB device.
7113 </result>
7114
7115 <see>IUSBDevice::address</see>
7116 </desc>
7117 <param name="name" type="wstring" dir="in">
7118 <desc>
7119 Address of the USB device (as assigned by the host) to
7120 search for.
7121 </desc>
7122 </param>
7123 <param name="device" type="IUSBDevice" dir="return">
7124 <desc>Found USB device object.</desc>
7125 </param>
7126 </method>
7127
7128 <method name="findUSBDeviceById">
7129 <desc>
7130 Searches for a USB device with the given UUID.
7131
7132 <result name="VBOX_E_OBJECT_NOT_FOUND">
7133 Given @c id does not correspond to any USB device.
7134 </result>
7135
7136 <see>IUSBDevice::id</see>
7137 </desc>
7138 <param name="id" type="uuid" mod="string" dir="in">
7139 <desc>UUID of the USB device to search for.</desc>
7140 </param>
7141 <param name="device" type="IUSBDevice" dir="return">
7142 <desc>Found USB device object.</desc>
7143 </param>
7144 </method>
7145
7146 <method name="createSharedFolder">
7147 <desc>
7148 Creates a transient new shared folder by associating the given logical
7149 name with the given host path, adds it to the collection of shared
7150 folders and starts sharing it. Refer to the description of
7151 <link to="ISharedFolder"/> to read more about logical names.
7152
7153 <result name="VBOX_E_INVALID_VM_STATE">
7154 Virtual machine in Saved state or currently changing state.
7155 </result>
7156 <result name="VBOX_E_FILE_ERROR">
7157 Shared folder already exists or not accessible.
7158 </result>
7159 </desc>
7160 <param name="name" type="wstring" dir="in">
7161 <desc>Unique logical name of the shared folder.</desc>
7162 </param>
7163 <param name="hostPath" type="wstring" dir="in">
7164 <desc>Full path to the shared folder in the host file system.</desc>
7165 </param>
7166 <param name="writable" type="boolean" dir="in">
7167 <desc>Whether the share is writable or readonly</desc>
7168 </param>
7169 </method>
7170
7171 <method name="removeSharedFolder">
7172 <desc>
7173 Removes a transient shared folder with the given name previously
7174 created by <link to="#createSharedFolder"/> from the collection of
7175 shared folders and stops sharing it.
7176 <result name="VBOX_E_INVALID_VM_STATE">
7177 Virtual machine in Saved state or currently changing state.
7178 </result>
7179 <result name="VBOX_E_FILE_ERROR">
7180 Shared folder does not exists.
7181 </result>
7182 </desc>
7183 <param name="name" type="wstring" dir="in">
7184 <desc>Logical name of the shared folder to remove.</desc>
7185 </param>
7186 </method>
7187
7188 <method name="takeSnapshot">
7189 <desc>
7190 Saves the current execution state
7191 and all settings of the machine and creates differencing images
7192 for all normal (non-independent) media.
7193 See <link to="ISnapshot" /> for an introduction to snapshots.
7194
7195 This method can be called for a PoweredOff, Saved (see
7196 <link to="#saveState"/>), Running or
7197 Paused virtual machine. When the machine is PoweredOff, an
7198 offline snapshot is created. When the machine is Running a live
7199 snapshot is created, and an online snapshot is is created when Paused.
7200
7201 The taken snapshot is always based on the
7202 <link to="IMachine::currentSnapshot">current snapshot</link>
7203 of the associated virtual machine and becomes a new current snapshot.
7204
7205 <note>
7206 This method implicitly calls <link to="IMachine::saveSettings"/> to
7207 save all current machine settings before taking an offline snapshot.
7208 </note>
7209
7210 <result name="VBOX_E_INVALID_VM_STATE">
7211 Virtual machine currently changing state.
7212 </result>
7213 </desc>
7214 <param name="name" type="wstring" dir="in">
7215 <desc>Short name for the snapshot.</desc>
7216 </param>
7217 <param name="description" type="wstring" dir="in">
7218 <desc>Optional description of the snapshot.</desc>
7219 </param>
7220 <param name="progress" type="IProgress" dir="return">
7221 <desc>Progress object to track the operation completion.</desc>
7222 </param>
7223 </method>
7224
7225 <method name="deleteSnapshot">
7226 <desc>
7227 Starts deleting the specified snapshot asynchronously.
7228 See <link to="ISnapshot" /> for an introduction to snapshots.
7229
7230 The execution state and settings of the associated machine stored in
7231 the snapshot will be deleted. The contents of all differencing media of
7232 this snapshot will be merged with the contents of their dependent child
7233 media to keep the medium chain valid (in other words, all changes
7234 represented by media being discarded will be propagated to their child
7235 medium). After that, this snapshot's differencing medium will be
7236 deleted. The parent of this snapshot will become a new parent for all
7237 its child snapshots.
7238
7239 If the deleted snapshot is the current one, its parent snapshot will
7240 become a new current snapshot. The current machine state is not directly
7241 affected in this case, except that currently attached differencing
7242 media based on media of the discarded snapshot will be also merged as
7243 described above.
7244
7245 If the deleted snapshot is the first or current snapshot, then the
7246 respective IMachine attributes will be adjusted. Deleting the current
7247 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
7248 to make all current machine settings permanent.
7249
7250 Deleting a snapshot has the following preconditions:
7251
7252 <ul>
7253 <li>Child media of all normal media of the discarded snapshot
7254 must be accessible (see <link to="IMedium::state"/>) for this
7255 operation to succeed. In particular, this means that all virtual
7256 machines, whose media are directly or indirectly based on the
7257 media of discarded snapshot, must be powered off.</li>
7258
7259 <li>You cannot delete the snapshot if a medium attached to it has
7260 more than once child medium (differencing images) because otherwise
7261 merging would be impossible. This might be the case if there is
7262 more than one child snapshot or differencing images were created
7263 for other reason (e.g. implicitly because of multiple machine
7264 attachments).</li>
7265 </ul>
7266
7267
7268 The virtual machine's <link to="IMachine::state">state</link> is changed to "DeletingSnapshot"
7269 while this operation is in progress.
7270
7271 <note>
7272 Merging medium contents can be very time and disk space
7273 consuming, if these media are big in size and have many
7274 children. However, if the snapshot being discarded is the last
7275 (head) snapshot on the branch, the operation will be rather
7276 quick.
7277 </note>
7278 <result name="VBOX_E_INVALID_VM_STATE">
7279 Virtual machine is running.
7280 </result>
7281 </desc>
7282 <param name="id" type="uuid" mod="string" dir="in">
7283 <desc>UUID of the snapshot to discard.</desc>
7284 </param>
7285 <param name="progress" type="IProgress" dir="return">
7286 <desc>Progress object to track the operation completion.</desc>
7287 </param>
7288 </method>
7289
7290 <method name="restoreSnapshot">
7291 <desc>
7292 Starts resetting the machine's current state to the state contained
7293 in the given snapshot, asynchronously. All current settings of the
7294 machine will be reset and changes stored in differencing media
7295 will be lost.
7296 See <link to="ISnapshot" /> for an introduction to snapshots.
7297
7298 After this operation is successfully completed, new empty differencing
7299 media are created for all normal media of the machine.
7300
7301 If the given snapshot is an online snapshot, the machine will go to
7302 the <link to="MachineState_Saved"> saved state</link>, so that the
7303 next time it is powered on, the execution state will be restored
7304 from the state of the snapshot.
7305
7306 <note>
7307 The machine must not be running, otherwise the operation will fail.
7308 </note>
7309
7310 <note>
7311 If the machine state is <link to="MachineState_Saved">Saved</link>
7312 prior to this operation, the saved state file will be implicitly
7313 discarded (as if <link to="IConsole::forgetSavedState"/> were
7314 called).
7315 </note>
7316
7317 <result name="VBOX_E_INVALID_VM_STATE">
7318 Virtual machine is running.
7319 </result>
7320 </desc>
7321 <param name="snapshot" type="ISnapshot" dir="in">
7322 <desc>The snapshot to restore the VM state from.</desc>
7323 </param>
7324 <param name="progress" type="IProgress" dir="return">
7325 <desc>Progress object to track the operation completion.</desc>
7326 </param>
7327 </method>
7328
7329 <method name="teleport">
7330 <desc>
7331 Teleport the VM to a different host machine or process.
7332
7333 TODO explain the details.
7334
7335 <result name="VBOX_E_INVALID_VM_STATE">
7336 Virtual machine not running or paused.
7337 </result>
7338 </desc>
7339 <param name="hostname" type="wstring" dir="in">
7340 <desc>The name or IP of the host to teleport to.</desc>
7341 </param>
7342 <param name="tcpport" type="unsigned long" dir="in">
7343 <desc>The TCP port to connect to (1..65535).</desc>
7344 </param>
7345 <param name="password" type="wstring" dir="in">
7346 <desc>The password.</desc>
7347 </param>
7348 <param name="maxDowntime" type="unsigned long" dir="in">
7349 <desc>
7350 The maximum allowed downtime given as milliseconds. 0 is not a valid
7351 value. Recommended value: 250 ms.
7352
7353 The higher the value is, the greater the chance for a successful
7354 teleportation. A small value may easily result in the teleportation
7355 process taking hours and eventually fail.
7356
7357 <note>
7358 The current implementation treats this a guideline, not as an
7359 absolute rule.
7360 </note>
7361 </desc>
7362 </param>
7363 <param name="progress" type="IProgress" dir="return">
7364 <desc>Progress object to track the operation completion.</desc>
7365 </param>
7366 </method>
7367
7368 <method name="registerCallback">
7369 <desc>
7370 Registers a new console callback on this instance. The methods of the
7371 callback interface will be called by this instance when the appropriate
7372 event occurs.
7373 </desc>
7374 <param name="callback" type="IConsoleCallback" dir="in"/>
7375 </method>
7376
7377 <method name="unregisterCallback">
7378 <desc>
7379 Unregisters the console callback previously registered using
7380 <link to="#registerCallback"/>.
7381 <result name="E_INVALIDARG">
7382 Given @a callback handler is not registered.
7383 </result>
7384 </desc>
7385 <param name="callback" type="IConsoleCallback" dir="in"/>
7386 </method>
7387 </interface>
7388
7389 <!--
7390 // IHost
7391 /////////////////////////////////////////////////////////////////////////
7392 -->
7393
7394 <enum
7395 name="HostNetworkInterfaceMediumType"
7396 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
7397 >
7398 <desc>
7399 Type of encapsulation. Ethernet encapsulation includes both wired and
7400 wireless Ethernet connections.
7401 <see>IHostNetworkInterface</see>
7402 </desc>
7403
7404 <const name="Unknown" value="0">
7405 <desc>
7406 The type of interface cannot be determined.
7407 </desc>
7408 </const>
7409 <const name="Ethernet" value="1">
7410 <desc>
7411 Ethernet frame encapsulation.
7412 </desc>
7413 </const>
7414 <const name="PPP" value="2">
7415 <desc>
7416 Point-to-point protocol encapsulation.
7417 </desc>
7418 </const>
7419 <const name="SLIP" value="3">
7420 <desc>
7421 Serial line IP encapsulation.
7422 </desc>
7423 </const>
7424 </enum>
7425
7426 <enum
7427 name="HostNetworkInterfaceStatus"
7428 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
7429 >
7430 <desc>
7431 Current status of the interface.
7432 <see>IHostNetworkInterface</see>
7433 </desc>
7434
7435 <const name="Unknown" value="0">
7436 <desc>
7437 The state of interface cannot be determined.
7438 </desc>
7439 </const>
7440 <const name="Up" value="1">
7441 <desc>
7442 The interface is fully operational.
7443 </desc>
7444 </const>
7445 <const name="Down" value="2">
7446 <desc>
7447 The interface is not functioning.
7448 </desc>
7449 </const>
7450 </enum>
7451
7452 <enum
7453 name="HostNetworkInterfaceType"
7454 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
7455 >
7456 <desc>
7457 Network interface type.
7458 </desc>
7459 <const name="Bridged" value="1"/>
7460 <const name="HostOnly" value="2"/>
7461 </enum>
7462
7463 <interface
7464 name="IHostNetworkInterface" extends="$unknown"
7465 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
7466 wsmap="managed"
7467 >
7468 <desc>
7469 Represents one of host's network interfaces. IP V6 address and network
7470 mask are strings of 32 hexdecimal digits grouped by four. Groups are
7471 separated by colons.
7472 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
7473 </desc>
7474 <attribute name="name" type="wstring" readonly="yes">
7475 <desc>Returns the host network interface name.</desc>
7476 </attribute>
7477
7478 <attribute name="id" type="uuid" mod="string" readonly="yes">
7479 <desc>Returns the interface UUID.</desc>
7480 </attribute>
7481
7482 <attribute name="networkName" type="wstring" readonly="yes">
7483 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
7484 </attribute>
7485
7486 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
7487 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
7488 </attribute>
7489
7490 <attribute name="IPAddress" type="wstring" readonly="yes">
7491 <desc>Returns the IP V4 address of the interface.</desc>
7492 </attribute>
7493
7494 <attribute name="networkMask" type="wstring" readonly="yes">
7495 <desc>Returns the network mask of the interface.</desc>
7496 </attribute>
7497
7498 <attribute name="IPV6Supported" type="boolean" readonly="yes">
7499 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
7500 </attribute>
7501
7502 <attribute name="IPV6Address" type="wstring" readonly="yes">
7503 <desc>Returns the IP V6 address of the interface.</desc>
7504 </attribute>
7505
7506 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
7507 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
7508 </attribute>
7509
7510 <attribute name="hardwareAddress" type="wstring" readonly="yes">
7511 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
7512 </attribute>
7513
7514 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
7515 <desc>Type of protocol encapsulation used.</desc>
7516 </attribute>
7517
7518 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
7519 <desc>Status of the interface.</desc>
7520 </attribute>
7521
7522 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
7523 <desc>specifies the host interface type.</desc>
7524 </attribute>
7525
7526 <method name="enableStaticIpConfig">
7527 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
7528 <param name="IPAddress" type="wstring" dir="in">
7529 <desc>
7530 IP address.
7531 </desc>
7532 </param>
7533 <param name="networkMask" type="wstring" dir="in">
7534 <desc>
7535 network mask.
7536 </desc>
7537 </param>
7538 </method>
7539
7540 <method name="enableStaticIpConfigV6">
7541 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
7542 <param name="IPV6Address" type="wstring" dir="in">
7543 <desc>
7544 IP address.
7545 </desc>
7546 </param>
7547 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
7548 <desc>
7549 network mask.
7550 </desc>
7551 </param>
7552 </method>
7553
7554 <method name="enableDynamicIpConfig">
7555 <desc>enables the dynamic IP configuration.</desc>
7556 </method>
7557
7558 <method name="dhcpRediscover">
7559 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
7560 </method>
7561
7562 </interface>
7563
7564 <interface
7565 name="IHost" extends="$unknown"
7566 uuid="e380cbfc-ae65-4fa6-899e-45ded6b3132a"
7567 wsmap="managed"
7568 >
7569 <desc>
7570 The IHost interface represents the physical machine that this VirtualBox
7571 installation runs on.
7572
7573 An object implementing this interface is returned by the
7574 <link to="IVirtualBox::host" /> attribute. This interface contains
7575 read-only information about the host's physical hardware (such as what
7576 processors and disks are available, what the host operating system is,
7577 and so on) and also allows for manipulating some of the host's hardware,
7578 such as global USB device filters and host interface networking.
7579
7580 </desc>
7581 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
7582 <desc>List of DVD drives available on the host.</desc>
7583 </attribute>
7584
7585 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
7586 <desc>List of floppy drives available on the host.</desc>
7587 </attribute>
7588
7589 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
7590 <desc>
7591 List of USB devices currently attached to the host.
7592 Once a new device is physically attached to the host computer,
7593 it appears in this list and remains there until detached.
7594
7595 <note>
7596 If USB functionality is not available in the given edition of
7597 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7598 </note>
7599 </desc>
7600 </attribute>
7601
7602 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
7603 <desc>
7604 List of USB device filters in action.
7605 When a new device is physically attached to the host computer,
7606 filters from this list are applied to it (in order they are stored
7607 in the list). The first matched filter will determine the
7608 <link to="IHostUSBDeviceFilter::action">action</link>
7609 performed on the device.
7610
7611 Unless the device is ignored by these filters, filters of all
7612 currently running virtual machines
7613 (<link to="IUSBController::deviceFilters"/>) are applied to it.
7614
7615 <note>
7616 If USB functionality is not available in the given edition of
7617 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7618 </note>
7619
7620 <see>IHostUSBDeviceFilter, USBDeviceState</see>
7621 </desc>
7622 </attribute>
7623
7624 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
7625 <desc>List of host network interfaces currently defined on the host.</desc>
7626 </attribute>
7627
7628 <attribute name="processorCount" type="unsigned long" readonly="yes">
7629 <desc>Number of (logical) CPUs installed in the host system.</desc>
7630 </attribute>
7631
7632 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
7633 <desc>Number of (logical) CPUs online in the host system.</desc>
7634 </attribute>
7635
7636 <method name="getProcessorSpeed">
7637 <desc>Query the (approximate) maximum speed of a specified host CPU in
7638 Megahertz.
7639 </desc>
7640 <param name="cpuId" type="unsigned long" dir="in">
7641 <desc>
7642 Identifier of the CPU.
7643 </desc>
7644 </param>
7645 <param name="speed" type="unsigned long" dir="return">
7646 <desc>
7647 Speed value. 0 is returned if value is not known or @a cpuId is
7648 invalid.
7649 </desc>
7650 </param>
7651 </method>
7652
7653 <method name="getProcessorFeature">
7654 <desc>Query whether a CPU feature is supported or not.</desc>
7655 <param name="feature" type="ProcessorFeature" dir="in">
7656 <desc>
7657 CPU Feature identifier.
7658 </desc>
7659 </param>
7660 <param name="supported" type="boolean" dir="return">
7661 <desc>
7662 Feature is supported or not.
7663 </desc>
7664 </param>
7665 </method>
7666
7667 <method name="getProcessorDescription">
7668 <desc>Query the model string of a specified host CPU.
7669 </desc>
7670 <param name="cpuId" type="unsigned long" dir="in">
7671 <desc>
7672 Identifier of the CPU.
7673 <note>
7674 The current implementation might not necessarily return the
7675 description for this exact CPU.
7676 </note>
7677 </desc>
7678 </param>
7679 <param name="description" type="wstring" dir="return">
7680 <desc>
7681 Model string. An empty string is returned if value is not known or
7682 @a cpuId is invalid.
7683 </desc>
7684 </param>
7685 </method>
7686
7687 <method name="getProcessorCPUIDLeaf">
7688 <desc>
7689 Returns the CPU cpuid information for the specified leaf.
7690 </desc>
7691 <param name="cpuId" type="unsigned long" dir="in">
7692 <desc>
7693 Identifier of the CPU. The CPU most be online.
7694 <note>
7695 The current implementation might not necessarily return the
7696 description for this exact CPU.
7697 </note>
7698 </desc>
7699 </param>
7700 <param name="leaf" type="unsigned long" dir="in">
7701 <desc>
7702 CPUID leaf index (eax).
7703 </desc>
7704 </param>
7705 <param name="subLeaf" type="unsigned long" dir="in">
7706 <desc>
7707 CPUID leaf sub index (ecx). This currently only applies to cache
7708 information on Intel CPUs. Use 0 if retriving values for
7709 <link to="IMachine::setCPUIDLeaf"/>.
7710 </desc>
7711 </param>
7712 <param name="valEax" type="unsigned long" dir="out">
7713 <desc>
7714 CPUID leaf value for register eax.
7715 </desc>
7716 </param>
7717 <param name="valEbx" type="unsigned long" dir="out">
7718 <desc>
7719 CPUID leaf value for register ebx.
7720 </desc>
7721 </param>
7722 <param name="valEcx" type="unsigned long" dir="out">
7723 <desc>
7724 CPUID leaf value for register ecx.
7725 </desc>
7726 </param>
7727 <param name="valEdx" type="unsigned long" dir="out">
7728 <desc>
7729 CPUID leaf value for register edx.
7730 </desc>
7731 </param>
7732 </method>
7733
7734 <attribute name="memorySize" type="unsigned long" readonly="yes">
7735 <desc>Amount of system memory in megabytes installed in the host system.</desc>
7736 </attribute>
7737
7738 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
7739 <desc>Available system memory in the host system.</desc>
7740 </attribute>
7741
7742 <attribute name="operatingSystem" type="wstring" readonly="yes">
7743 <desc>Name of the host system's operating system.</desc>
7744 </attribute>
7745
7746 <attribute name="OSVersion" type="wstring" readonly="yes">
7747 <desc>Host operating system's version string.</desc>
7748 </attribute>
7749
7750 <attribute name="UTCTime" type="long long" readonly="yes">
7751 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
7752 </attribute>
7753
7754 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
7755 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
7756 </attribute>
7757
7758 <method name="createHostOnlyNetworkInterface">
7759 <desc>
7760 Creates a new adapter for Host Only Networking.
7761 <result name="E_INVALIDARG">
7762 Host network interface @a name already exists.
7763 </result>
7764 </desc>
7765 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
7766 <desc>
7767 Created host interface object.
7768 </desc>
7769 </param>
7770 <param name="progress" type="IProgress" dir="return">
7771 <desc>
7772 Progress object to track the operation completion.
7773 </desc>
7774 </param>
7775 </method>
7776
7777 <method name="removeHostOnlyNetworkInterface">
7778 <desc>
7779 Removes the given Host Only Networking interface.
7780 <result name="VBOX_E_OBJECT_NOT_FOUND">
7781 No host network interface matching @a id found.
7782 </result>
7783 </desc>
7784 <param name="id" type="uuid" mod="string" dir="in">
7785 <desc>
7786 Adapter GUID.
7787 </desc>
7788 </param>
7789 <param name="progress" type="IProgress" dir="return">
7790 <desc>
7791 Progress object to track the operation completion.
7792 </desc>
7793 </param>
7794 </method>
7795
7796 <method name="createUSBDeviceFilter">
7797 <desc>
7798 Creates a new USB device filter. All attributes except
7799 the filter name are set to empty (any match),
7800 <i>active</i> is @c false (the filter is not active).
7801
7802 The created filter can be added to the list of filters using
7803 <link to="#insertUSBDeviceFilter"/>.
7804
7805 <see>#USBDeviceFilters</see>
7806 </desc>
7807 <param name="name" type="wstring" dir="in">
7808 <desc>
7809 Filter name. See <link to="IHostUSBDeviceFilter::name"/>
7810 for more info.
7811 </desc>
7812 </param>
7813 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
7814 <desc>Created filter object.</desc>
7815 </param>
7816 </method>
7817
7818 <method name="insertUSBDeviceFilter">
7819 <desc>
7820 Inserts the given USB device to the specified position
7821 in the list of filters.
7822
7823 Positions are numbered starting from @c 0. If the specified
7824 position is equal to or greater than the number of elements in
7825 the list, the filter is added at the end of the collection.
7826
7827 <note>
7828 Duplicates are not allowed, so an attempt to insert a
7829 filter already in the list is an error.
7830 </note>
7831 <note>
7832 If USB functionality is not available in the given edition of
7833 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7834 </note>
7835
7836 <see>#USBDeviceFilters</see>
7837
7838 <result name="VBOX_E_INVALID_OBJECT_STATE">
7839 USB device filter is not created within this VirtualBox instance.
7840 </result>
7841 <result name="E_INVALIDARG">
7842 USB device filter already in list.
7843 </result>
7844
7845 </desc>
7846 <param name="position" type="unsigned long" dir="in">
7847 <desc>Position to insert the filter to.</desc>
7848 </param>
7849 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
7850 <desc>USB device filter to insert.</desc>
7851 </param>
7852 </method>
7853
7854 <method name="removeUSBDeviceFilter">
7855 <desc>
7856 Removes a USB device filter from the specified position in the
7857 list of filters.
7858
7859 Positions are numbered starting from @c 0. Specifying a
7860 position equal to or greater than the number of elements in
7861 the list will produce an error.
7862
7863 <note>
7864 If USB functionality is not available in the given edition of
7865 VirtualBox, this method will set the result code to @c E_NOTIMPL.
7866 </note>
7867
7868 <see>#USBDeviceFilters</see>
7869
7870 <result name="E_INVALIDARG">
7871 USB device filter list empty or invalid @a position.
7872 </result>
7873
7874 </desc>
7875 <param name="position" type="unsigned long" dir="in">
7876 <desc>Position to remove the filter from.</desc>
7877 </param>
7878 </method>
7879
7880 <method name="findHostDVDDrive">
7881 <desc>
7882 Searches for a host DVD drive with the given @c name.
7883
7884 <result name="VBOX_E_OBJECT_NOT_FOUND">
7885 Given @c name does not correspond to any host drive.
7886 </result>
7887
7888 </desc>
7889 <param name="name" type="wstring" dir="in">
7890 <desc>Name of the host drive to search for</desc>
7891 </param>
7892 <param name="drive" type="IMedium" dir="return">
7893 <desc>Found host drive object</desc>
7894 </param>
7895 </method>
7896
7897 <method name="findHostFloppyDrive">
7898 <desc>
7899 Searches for a host floppy drive with the given @c name.
7900
7901 <result name="VBOX_E_OBJECT_NOT_FOUND">
7902 Given @c name does not correspond to any host floppy drive.
7903 </result>
7904
7905 </desc>
7906 <param name="name" type="wstring" dir="in">
7907 <desc>Name of the host floppy drive to search for</desc>
7908 </param>
7909 <param name="drive" type="IMedium" dir="return">
7910 <desc>Found host floppy drive object</desc>
7911 </param>
7912 </method>
7913
7914 <method name="findHostNetworkInterfaceByName">
7915 <desc>
7916 Searches through all host network interfaces for an interface with
7917 the given @c name.
7918 <note>
7919 The method returns an error if the given @c name does not
7920 correspond to any host network interface.
7921 </note>
7922 </desc>
7923 <param name="name" type="wstring" dir="in">
7924 <desc>Name of the host network interface to search for.</desc>
7925 </param>
7926 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7927 <desc>Found host network interface object.</desc>
7928 </param>
7929 </method>
7930 <method name="findHostNetworkInterfaceById">
7931 <desc>
7932 Searches through all host network interfaces for an interface with
7933 the given GUID.
7934 <note>
7935 The method returns an error if the given GUID does not
7936 correspond to any host network interface.
7937 </note>
7938 </desc>
7939 <param name="id" type="uuid" mod="string" dir="in">
7940 <desc>GUID of the host network interface to search for.</desc>
7941 </param>
7942 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7943 <desc>Found host network interface object.</desc>
7944 </param>
7945 </method>
7946 <method name="findHostNetworkInterfacesOfType">
7947 <desc>
7948 Searches through all host network interfaces and returns a list of interfaces of the specified type
7949 </desc>
7950 <param name="type" type="HostNetworkInterfaceType" dir="in">
7951 <desc>type of the host network interfaces to search for.</desc>
7952 </param>
7953 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7954 <desc>Found host network interface objects.</desc>
7955 </param>
7956 </method>
7957
7958 <method name="findUSBDeviceById">
7959 <desc>
7960 Searches for a USB device with the given UUID.
7961
7962 <result name="VBOX_E_OBJECT_NOT_FOUND">
7963 Given @c id does not correspond to any USB device.
7964 </result>
7965
7966 <see>IHostUSBDevice::id</see>
7967 </desc>
7968 <param name="id" type="uuid" mod="string" dir="in">
7969 <desc>UUID of the USB device to search for.</desc>
7970 </param>
7971 <param name="device" type="IHostUSBDevice" dir="return">
7972 <desc>Found USB device object.</desc>
7973 </param>
7974 </method>
7975
7976 <method name="findUSBDeviceByAddress">
7977 <desc>
7978 Searches for a USB device with the given host address.
7979
7980 <result name="VBOX_E_OBJECT_NOT_FOUND">
7981 Given @c name does not correspond to any USB device.
7982 </result>
7983
7984 <see>IHostUSBDevice::address</see>
7985 </desc>
7986 <param name="name" type="wstring" dir="in">
7987 <desc>
7988 Address of the USB device (as assigned by the host) to
7989 search for.
7990 </desc>
7991 </param>
7992 <param name="device" type="IHostUSBDevice" dir="return">
7993 <desc>Found USB device object.</desc>
7994 </param>
7995 </method>
7996
7997 </interface>
7998
7999 <!--
8000 // ISystemProperties
8001 /////////////////////////////////////////////////////////////////////////
8002 -->
8003
8004 <interface
8005 name="ISystemProperties"
8006 extends="$unknown"
8007 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
8008 wsmap="managed"
8009 >
8010 <desc>
8011 The ISystemProperties interface represents global properties of the given
8012 VirtualBox installation.
8013
8014 These properties define limits and default values for various attributes
8015 and parameters. Most of the properties are read-only, but some can be
8016 changed by a user.
8017 </desc>
8018
8019 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
8020 <desc>Minimum guest system memory in Megabytes.</desc>
8021 </attribute>
8022
8023 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
8024 <desc>Maximum guest system memory in Megabytes.</desc>
8025 </attribute>
8026
8027 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
8028 <desc>Minimum guest video memory in Megabytes.</desc>
8029 </attribute>
8030
8031 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
8032 <desc>Maximum guest video memory in Megabytes.</desc>
8033 </attribute>
8034
8035 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
8036 <desc>Minimum CPU count.</desc>
8037 </attribute>
8038
8039 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
8040 <desc>Maximum CPU count.</desc>
8041 </attribute>
8042
8043 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
8044 <desc>Maximum of monitors which could be connected.</desc>
8045 </attribute>
8046
8047 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
8048 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
8049 </attribute>
8050
8051 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
8052 <desc>
8053 Number of network adapters associated with every
8054 <link to="IMachine"/> instance.
8055 </desc>
8056 </attribute>
8057
8058 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
8059 <desc>
8060 Number of serial ports associated with every
8061 <link to="IMachine"/> instance.
8062 </desc>
8063 </attribute>
8064
8065 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
8066 <desc>
8067 Number of parallel ports associated with every
8068 <link to="IMachine"/> instance.
8069 </desc>
8070 </attribute>
8071
8072 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
8073 <desc>
8074 Maximum device position in the boot order. This value corresponds
8075 to the total number of devices a machine can boot from, to make it
8076 possible to include all possible devices to the boot list.
8077 <see><link to="IMachine::setBootOrder"/></see>
8078 </desc>
8079 </attribute>
8080
8081 <attribute name="defaultMachineFolder" type="wstring">
8082 <desc>
8083 Full path to the default directory used to create new or open
8084 existing machines when a settings file name contains no
8085 path.
8086
8087 The initial value of this property is
8088 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
8089 VirtualBox_home</link><tt>&gt;/Machines</tt>.
8090
8091 <note>
8092 Setting this property to @c null or an empty string will restore the
8093 initial value.
8094 </note>
8095 <note>
8096 When settings this property, the specified path can be
8097 absolute (full path) or relative
8098 to the <link to="IVirtualBox::homeFolder">
8099 VirtualBox home directory</link>.
8100 When reading this property, a full path is
8101 always returned.
8102 </note>
8103 <note>
8104 The specified path may not exist, it will be created
8105 when necessary.
8106 </note>
8107
8108 <see>
8109 <link to="IVirtualBox::createMachine"/>,
8110 <link to="IVirtualBox::openMachine"/>
8111 </see>
8112 </desc>
8113 </attribute>
8114
8115 <attribute name="defaultHardDiskFolder" type="wstring">
8116 <desc>
8117 Full path to the default directory used to create new or open existing
8118 virtual disks.
8119
8120 This path is used when the storage unit of a hard disk is a regular file
8121 in the host's file system and only a file name that contains no path is
8122 given.
8123
8124 The initial value of this property is
8125 <tt>&lt;</tt>
8126 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
8127 <tt>&gt;/HardDisks</tt>.
8128
8129 <note>
8130 Setting this property to @c null or empty string will restore the
8131 initial value.
8132 </note>
8133 <note>
8134 When settings this property, the specified path can be relative
8135 to the
8136 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
8137 absolute. When reading this property, a full path is
8138 always returned.
8139 </note>
8140 <note>
8141 The specified path may not exist, it will be created
8142 when necessary.
8143 </note>
8144
8145 <see>
8146 IMedium,
8147 <link to="IVirtualBox::createHardDisk"/>,
8148 <link to="IVirtualBox::openHardDisk"/>,
8149 <link to="IMedium::location"/>
8150 </see>
8151 </desc>
8152 </attribute>
8153
8154 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
8155 <desc>
8156 List of all medium storage formats supported by this VirtualBox
8157 installation.
8158
8159 Keep in mind that the medium format identifier
8160 (<link to="IMediumFormat::id"/>) used in other API calls like
8161 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
8162 medium format is a case-insensitive string. This means that, for
8163 example, all of the following strings:
8164 <pre>
8165 "VDI"
8166 "vdi"
8167 "VdI"</pre>
8168 refer to the same medium format.
8169
8170 Note that the virtual medium framework is backend-based, therefore
8171 the list of supported formats depends on what backends are currently
8172 installed.
8173
8174 <see>
8175 <link to="IMediumFormat"/>,
8176 </see>
8177 </desc>
8178 </attribute>
8179
8180 <attribute name="defaultHardDiskFormat" type="wstring">
8181 <desc>
8182 Identifier of the default medium format used by VirtualBox.
8183
8184 The medium format set by this attribute is used by VirtualBox
8185 when the medium format was not specified explicitly. One example is
8186 <link to="IVirtualBox::createHardDisk"/> with the empty
8187 format argument. A more complex example is implicit creation of
8188 differencing media when taking a snapshot of a virtual machine:
8189 this operation will try to use a format of the parent medium first
8190 and if this format does not support differencing media the default
8191 format specified by this argument will be used.
8192
8193 The list of supported medium formats may be obtained by the
8194 <link to="#mediaFormats"/> call. Note that the default medium
8195 format must have a capability to create differencing media;
8196 otherwise operations that create media implicitly may fail
8197 unexpectedly.
8198
8199 The initial value of this property is <tt>"VDI"</tt> in the current
8200 version of the VirtualBox product, but may change in the future.
8201
8202 <note>
8203 Setting this property to @c null or empty string will restore the
8204 initial value.
8205 </note>
8206
8207 <see>
8208 <link to="#mediaFormats"/>,
8209 <link to="IMediumFormat::id"/>,
8210 <link to="IVirtualBox::createHardDisk"/>
8211 </see>
8212 </desc>
8213 </attribute>
8214
8215 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
8216 <desc>Issue a warning if the free disk space is below (or in some disk
8217 intensive operation is expected to go below) the given size in
8218 Megabytes.</desc>
8219 </attribute>
8220
8221 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
8222 <desc>Issue a warning if the free disk space is below (or in some disk
8223 intensive operation is expected to go below) the given percentage.</desc>
8224 </attribute>
8225
8226 <attribute name="freeDiskSpaceError" type="unsigned long long">
8227 <desc>Issue an error if the free disk space is below (or in some disk
8228 intensive operation is expected to go below) the given size in
8229 Megabytes.</desc>
8230 </attribute>
8231
8232 <attribute name="freeDiskSpacePercentError" type="unsigned long">
8233 <desc>Issue an error if the free disk space is below (or in some disk
8234 intensive operation is expected to go below) the given percentage.</desc>
8235 </attribute>
8236
8237 <attribute name="remoteDisplayAuthLibrary" type="wstring">
8238 <desc>
8239 Library that provides authentication for VRDP clients. The library
8240 is used if a virtual machine's authentication type is set to "external"
8241 in the VM RemoteDisplay configuration.
8242
8243 The system library extension (".DLL" or ".so") must be omitted.
8244 A full path can be specified; if not, then the library must reside on the
8245 system's default library path.
8246
8247 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
8248 of that name in one of the default VirtualBox library directories.
8249
8250 For details about VirtualBox authentication libraries and how to implement
8251 them, please refer to the VirtualBox manual.
8252
8253 <note>
8254 Setting this property to @c null or empty string will restore the
8255 initial value.
8256 </note>
8257 </desc>
8258 </attribute>
8259
8260 <attribute name="webServiceAuthLibrary" type="wstring">
8261 <desc>
8262 Library that provides authentication for webservice clients. The library
8263 is used if a virtual machine's authentication type is set to "external"
8264 in the VM RemoteDisplay configuration and will be called from
8265 within the <link to="IWebsessionManager::logon" /> implementation.
8266
8267 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
8268 there is no per-VM setting for this, as the webservice is a global
8269 resource (if it is running). Only for this setting (for the webservice),
8270 setting this value to a literal <tt>"null"</tt> string disables authentication,
8271 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
8272 no matter what user name and password are supplied.
8273
8274 The initial value of this property is <tt>"VRDPAuth"</tt>,
8275 meaning that the webservice will use the same authentication
8276 library that is used by default for VBoxVRDP (again, see
8277 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
8278 The format and calling convention of authentication libraries
8279 is the same for the webservice as it is for VBoxVRDP.
8280
8281 <note>
8282 Setting this property to @c null or empty string will restore the
8283 initial value.
8284 </note>
8285 </desc>
8286 </attribute>
8287
8288 <attribute name="LogHistoryCount" type="unsigned long">
8289 <desc>
8290 This value specifies how many old release log files are kept.
8291 </desc>
8292 </attribute>
8293
8294 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
8295 <desc>This value hold the default audio driver for the current
8296 system.</desc>
8297 </attribute>
8298
8299 <method name="getMaxDevicesPerPortForStorageBus">
8300 <desc>Returns the maximum number of devices which can be attached to a port
8301 for the given storage bus.</desc>
8302
8303 <param name="bus" type="StorageBus" dir="in">
8304 <desc>The storage bus type to get the value for.</desc>
8305 </param>
8306
8307 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
8308 <desc>The maximum number of devices which can eb attached to the port for the given
8309 storage bus.</desc>
8310 </param>
8311 </method>
8312
8313 <method name="getMinPortCountForStorageBus">
8314 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
8315
8316 <param name="bus" type="StorageBus" dir="in">
8317 <desc>The storage bus type to get the value for.</desc>
8318 </param>
8319
8320 <param name="minPortCount" type="unsigned long" dir="return">
8321 <desc>The minimum number of ports for the given storage bus.</desc>
8322 </param>
8323 </method>
8324
8325 <method name="getMaxPortCountForStorageBus">
8326 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
8327
8328 <param name="bus" type="StorageBus" dir="in">
8329 <desc>The storage bus type to get the value for.</desc>
8330 </param>
8331
8332 <param name="maxPortCount" type="unsigned long" dir="return">
8333 <desc>The maximum number of ports for the given storage bus.</desc>
8334 </param>
8335 </method>
8336
8337 <method name="getMaxInstancesOfStorageBus">
8338 <desc>Returns the maximum number of storage bus instances which
8339 can be configured for each VM. This corresponds to the number of
8340 storage controllers one can have.</desc>
8341
8342 <param name="bus" type="StorageBus" dir="in">
8343 <desc>The storage bus type to get the value for.</desc>
8344 </param>
8345
8346 <param name="maxInstances" type="unsigned long" dir="return">
8347 <desc>The maximum number of instances for the given storage bus.</desc>
8348 </param>
8349 </method>
8350
8351 <method name="getDeviceTypesForStorageBus">
8352 <desc>Returns list of all the supported device types
8353 (<link to="DeviceType"/>) for the given type of storage
8354 bus.</desc>
8355
8356 <param name="bus" type="StorageBus" dir="in">
8357 <desc>The storage bus type to get the value for.</desc>
8358 </param>
8359
8360 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
8361 <desc>The list of all supported device types for the given storage bus.</desc>
8362 </param>
8363 </method>
8364 </interface>
8365
8366 <!--
8367 // IGuest
8368 /////////////////////////////////////////////////////////////////////////
8369 -->
8370
8371 <interface
8372 name="IGuestOSType" extends="$unknown"
8373 uuid="c738a1de-3616-48d1-9ac5-8efd21e2560d"
8374 wsmap="struct"
8375 >
8376 <desc>
8377 </desc>
8378
8379 <attribute name="familyId" type="wstring" readonly="yes">
8380 <desc>Guest OS family identifier string.</desc>
8381 </attribute>
8382
8383 <attribute name="familyDescription" type="wstring" readonly="yes">
8384 <desc>Human readable description of the guest OS family.</desc>
8385 </attribute>
8386
8387 <attribute name="id" type="wstring" readonly="yes">
8388 <desc>Guest OS identifier string.</desc>
8389 </attribute>
8390
8391 <attribute name="description" type="wstring" readonly="yes">
8392 <desc>Human readable description of the guest OS.</desc>
8393 </attribute>
8394
8395 <attribute name="is64Bit" type="boolean" readonly="yes">
8396 <desc>Returns @c true if the given OS is 64-bit</desc>
8397 </attribute>
8398
8399 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
8400 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
8401 </attribute>
8402
8403 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
8404 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
8405 </attribute>
8406
8407 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
8408 <desc>Recommended RAM size in Megabytes.</desc>
8409 </attribute>
8410
8411 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
8412 <desc>Recommended video RAM size in Megabytes.</desc>
8413 </attribute>
8414
8415 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
8416 <desc>Recommended hard disk size in Megabytes.</desc>
8417 </attribute>
8418
8419 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
8420 <desc>Returns recommended network adapter for this OS type.</desc>
8421 </attribute>
8422
8423 <attribute name="recommendedPae" type="boolean" readonly="yes">
8424 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
8425 </attribute>
8426
8427 <attribute name="recommendedStorageController" type="StorageControllerType" readonly="yes">
8428 <desc>Recommended storage controller type.</desc>
8429 </attribute>
8430
8431 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
8432 <desc>Recommended firmware type.</desc>
8433 </attribute>
8434
8435 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
8436 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
8437 </attribute>
8438
8439 <attribute name="recommendedHpet" type="boolean" readonly="yes">
8440 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
8441 </attribute>
8442
8443 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
8444 <desc>Returns @c true if using USB Tablet recommended (only relevant if using USB HIDs).</desc>
8445 </attribute>
8446
8447 </interface>
8448
8449 <interface
8450 name="IGuest" extends="$unknown"
8451 uuid="a910034a-f95e-bc2c-6bae-eabc3ccd9c73"
8452 wsmap="managed"
8453 >
8454 <desc>
8455 The IGuest interface represents information about the operating system
8456 running inside the virtual machine. Used in
8457 <link to="IConsole::guest"/>.
8458
8459 IGuest provides information about the guest operating system, whether
8460 Guest Additions are installed and other OS-specific virtual machine
8461 properties.
8462 </desc>
8463
8464 <attribute name="OSTypeId" type="wstring" readonly="yes">
8465 <desc>
8466 Identifier of the Guest OS type as reported by the Guest
8467 Additions.
8468 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
8469 an IGuestOSType object representing details about the given
8470 Guest OS type.
8471 <note>
8472 If Guest Additions are not installed, this value will be
8473 the same as <link to="IMachine::OSTypeId"/>.
8474 </note>
8475 </desc>
8476 </attribute>
8477
8478 <attribute name="additionsActive" type="boolean" readonly="yes">
8479 <desc>
8480 Flag whether the Guest Additions are installed and active
8481 in which case their version will be returned by the
8482 <link to="#additionsVersion"/> property.
8483 </desc>
8484 </attribute>
8485
8486 <attribute name="additionsVersion" type="wstring" readonly="yes">
8487 <desc>
8488 Version of the Guest Additions (3 decimal numbers separated
8489 by dots) or empty when the Additions are not installed. The
8490 Additions may also report a version but yet not be active as
8491 the version might be refused by VirtualBox (incompatible) or
8492 other failures occurred.
8493 </desc>
8494 </attribute>
8495
8496 <attribute name="supportsSeamless" type="boolean" readonly="yes">
8497 <desc>
8498 Flag whether seamless guest display rendering (seamless desktop
8499 integration) is supported.
8500 </desc>
8501 </attribute>
8502
8503 <attribute name="supportsGraphics" type="boolean" readonly="yes">
8504 <desc>
8505 Flag whether the guest is in graphics mode. If it is not, then
8506 seamless rendering will not work, resize hints are not immediately
8507 acted on and guest display resizes are probably not initiated by
8508 the guest additions.
8509 </desc>
8510 </attribute>
8511
8512 <attribute name="memoryBalloonSize" type="unsigned long">
8513 <desc>Guest system memory balloon size in megabytes.</desc>
8514 </attribute>
8515
8516 <attribute name="statisticsUpdateInterval" type="unsigned long">
8517 <desc>Interval to update guest statistics in seconds.</desc>
8518 </attribute>
8519
8520 <method name="setCredentials">
8521 <desc>
8522 Store login credentials that can be queried by guest operating
8523 systems with Additions installed. The credentials are transient
8524 to the session and the guest may also choose to erase them. Note
8525 that the caller cannot determine whether the guest operating system
8526 has queried or made use of the credentials.
8527
8528 <result name="VBOX_E_VM_ERROR">
8529 VMM device is not available.
8530 </result>
8531
8532 </desc>
8533 <param name="userName" type="wstring" dir="in">
8534 <desc>User name string, can be empty</desc>
8535 </param>
8536 <param name="password" type="wstring" dir="in">
8537 <desc>Password string, can be empty</desc>
8538 </param>
8539 <param name="domain" type="wstring" dir="in">
8540 <desc>Domain name (guest logon scheme specific), can be empty</desc>
8541 </param>
8542 <param name="allowInteractiveLogon" type="boolean" dir="in">
8543 <desc>
8544 Flag whether the guest should alternatively allow the user to
8545 interactively specify different credentials. This flag might
8546 not be supported by all versions of the Additions.
8547 </desc>
8548 </param>
8549 </method>
8550
8551 <method name="getStatistic">
8552 <desc>
8553 Query specified guest statistics as reported by the VirtualBox Additions.
8554 </desc>
8555 <param name="cpuId" type="unsigned long" dir="in">
8556 <desc>Virtual CPU id; not relevant for all statistic types</desc>
8557 </param>
8558 <param name="statistic" type="GuestStatisticType" dir="in">
8559 <desc>Statistic type.</desc>
8560 </param>
8561 <param name="statVal" type="unsigned long" dir="return">
8562 <desc>Statistics value</desc>
8563 </param>
8564 </method>
8565
8566 <method name="executeProgram">
8567 <desc>
8568 Executes an existing program inside the guest VM.
8569
8570 <result name="E_NOTIMPL">
8571 Not implemented yet.
8572 </result>
8573
8574 </desc>
8575 <param name="execName" type="wstring" dir="in">
8576 <desc>Foobar</desc>
8577 </param>
8578 <param name="flags" type="unsigned long" dir="in">
8579 <desc>Foobar</desc>
8580 </param>
8581 <param name="arguments" type="wstring" dir="in">
8582 <desc>Foobar</desc>
8583 </param>
8584 <param name="environment" type="wstring" safearray="yes" dir="in">
8585 <desc>Foobar</desc>
8586 </param>
8587 <param name="stdIn" type="wstring" dir="in">
8588 <desc>Foobar</desc>
8589 </param>
8590 <param name="stdOut" type="wstring" dir="in">
8591 <desc>Foobar</desc>
8592 </param>
8593 <param name="stdErr" type="wstring" dir="in">
8594 <desc>Foobar</desc>
8595 </param>
8596 <param name="userName" type="wstring" dir="in">
8597 <desc>Foobar</desc>
8598 </param>
8599 <param name="password" type="wstring" dir="in">
8600 <desc>Foobar</desc>
8601 </param>
8602 <param name="timeoutMS" type="unsigned long" dir="in">
8603 <desc>Foobar</desc>
8604 </param>
8605 <param name="pid" type="unsigned long" dir="return">
8606 <desc>Foobar</desc>
8607 </param>
8608 </method>
8609
8610 </interface>
8611
8612
8613 <!--
8614 // IProgress
8615 /////////////////////////////////////////////////////////////////////////
8616 -->
8617
8618 <interface
8619 name="IProgress" extends="$unknown"
8620 uuid="856aa038-853f-42e2-acf7-6e7b02dbe294"
8621 wsmap="managed"
8622 >
8623 <desc>
8624 The IProgress interface is used to track and control
8625 asynchronous tasks within VirtualBox.
8626
8627 An instance of this is returned every time VirtualBox starts
8628 an asynchronous task (in other words, a separate thread) which
8629 continues to run after a method call returns. For example,
8630 <link to="IConsole::saveState" />, which saves the state of
8631 a running virtual machine, can take a long time to complete.
8632 To be able to display a progress bar, a user interface such as
8633 the VirtualBox graphical user interface can use the IProgress
8634 object returned by that method.
8635
8636 Note that IProgress is a "read-only" interface in the sense
8637 that only the VirtualBox internals behind the Main API can
8638 create and manipulate progress objects, whereas client code
8639 can only use the IProgress object to monitor a task's
8640 progress and, if <link to="#cancelable" /> is @c true,
8641 cancel the task by calling <link to="#cancel" />.
8642
8643 A task represented by IProgress consists of either one or
8644 several sub-operations that run sequentially, one by one (see
8645 <link to="#operation" /> and <link to="#operationCount" />).
8646 Every operation is identified by a number (starting from 0)
8647 and has a separate description.
8648
8649 You can find the individual percentage of completion of the current
8650 operation in <link to="#operationPercent" /> and the
8651 percentage of completion of the task as a whole
8652 in <link to="#percent" />.
8653
8654 Similarly, you can wait for the completion of a particular
8655 operation via <link to="#waitForOperationCompletion" /> or
8656 for the completion of the whole task via
8657 <link to="#waitForCompletion" />.
8658 </desc>
8659
8660 <attribute name="id" type="uuid" mod="string" readonly="yes">
8661 <desc>ID of the task.</desc>
8662 </attribute>
8663
8664 <attribute name="description" type="wstring" readonly="yes">
8665 <desc>Description of the task.</desc>
8666 </attribute>
8667
8668 <attribute name="initiator" type="$unknown" readonly="yes">
8669 <desc>Initiator of the task.</desc>
8670 </attribute>
8671
8672 <attribute name="cancelable" type="boolean" readonly="yes">
8673 <desc>Whether the task can be interrupted.</desc>
8674 </attribute>
8675
8676 <attribute name="percent" type="unsigned long" readonly="yes">
8677 <desc>
8678 Current progress value of the task as a whole, in percent.
8679 This value depends on how many operations are already complete.
8680 Returns 100 if <link to="#completed" /> is @c true.
8681 </desc>
8682 </attribute>
8683
8684 <attribute name="timeRemaining" type="long" readonly="yes">
8685 <desc>
8686 Estimated remaining time until the task completes, in
8687 seconds. Returns 0 once the task has completed; returns -1
8688 if the remaining time cannot be computed, in particular if
8689 the current progress is 0.
8690
8691 Even if a value is returned, the estimate will be unreliable
8692 for low progress values. It will become more reliable as the
8693 task progresses; it is not recommended to display an ETA
8694 before at least 20% of a task have completed.
8695 </desc>
8696 </attribute>
8697
8698 <attribute name="completed" type="boolean" readonly="yes">
8699 <desc>Whether the task has been completed.</desc>
8700 </attribute>
8701
8702 <attribute name="canceled" type="boolean" readonly="yes">
8703 <desc>Whether the task has been canceled.</desc>
8704 </attribute>
8705
8706 <attribute name="resultCode" type="long" readonly="yes">
8707 <desc>
8708 Result code of the progress task.
8709 Valid only if <link to="#completed"/> is @c true.
8710 </desc>
8711 </attribute>
8712
8713 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
8714 <desc>
8715 Extended information about the unsuccessful result of the
8716 progress operation. May be @c null if no extended information
8717 is available.
8718 Valid only if <link to="#completed"/> is @c true and
8719 <link to="#resultCode"/> indicates a failure.
8720 </desc>
8721 </attribute>
8722
8723 <attribute name="operationCount" type="unsigned long" readonly="yes">
8724 <desc>
8725 Number of sub-operations this task is divided into.
8726 Every task consists of at least one suboperation.
8727 </desc>
8728 </attribute>
8729
8730 <attribute name="operation" type="unsigned long" readonly="yes">
8731 <desc>Number of the sub-operation being currently executed.</desc>
8732 </attribute>
8733
8734 <attribute name="operationDescription" type="wstring" readonly="yes">
8735 <desc>
8736 Description of the sub-operation being currently executed.
8737 </desc>
8738 </attribute>
8739
8740 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8741 <desc>Progress value of the current sub-operation only, in percent.</desc>
8742 </attribute>
8743
8744 <attribute name="timeout" type="unsigned long">
8745 <desc>
8746 When non-zero, this specifies the number of milliseconds after which
8747 the operation will automatically be canceled. This can only be set on
8748 cancelable objects.
8749 </desc>
8750 </attribute>
8751
8752 <method name="setCurrentOperationProgress">
8753 <desc>Internal method, not to be called externally.</desc>
8754 <param name="percent" type="unsigned long" dir="in" />
8755 </method>
8756 <method name="setNextOperation">
8757 <desc>Internal method, not to be called externally.</desc>
8758 <param name="nextOperationDescription" type="wstring" dir="in" />
8759 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8760 </method>
8761
8762 <method name="waitForCompletion">
8763 <desc>
8764 Waits until the task is done (including all sub-operations)
8765 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8766
8767 <result name="VBOX_E_IPRT_ERROR">
8768 Failed to wait for task completion.
8769 </result>
8770 </desc>
8771
8772 <param name="timeout" type="long" dir="in">
8773 <desc>
8774 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8775 </desc>
8776 </param>
8777 </method>
8778
8779 <method name="waitForOperationCompletion">
8780 <desc>
8781 Waits until the given operation is done with a given timeout in
8782 milliseconds; specify -1 for an indefinite wait.
8783
8784 <result name="VBOX_E_IPRT_ERROR">
8785 Failed to wait for operation completion.
8786 </result>
8787
8788 </desc>
8789 <param name="operation" type="unsigned long" dir="in">
8790 <desc>
8791 Number of the operation to wait for.
8792 Must be less than <link to="#operationCount"/>.
8793 </desc>
8794 </param>
8795 <param name="timeout" type="long" dir="in">
8796 <desc>
8797 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8798 </desc>
8799 </param>
8800 </method>
8801
8802 <method name="cancel">
8803 <desc>
8804 Cancels the task.
8805 <note>
8806 If <link to="#cancelable"/> is @c false, then this method will fail.
8807 </note>
8808
8809 <result name="VBOX_E_INVALID_OBJECT_STATE">
8810 Operation cannot be canceled.
8811 </result>
8812
8813 </desc>
8814 </method>
8815
8816 </interface>
8817
8818
8819 <!--
8820 // ISnapshot
8821 /////////////////////////////////////////////////////////////////////////
8822 -->
8823
8824 <interface
8825 name="ISnapshot" extends="$unknown"
8826 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8827 wsmap="managed"
8828 >
8829 <desc>
8830 The ISnapshot interface represents a snapshot of the virtual
8831 machine.
8832
8833 Together with the differencing media that are created
8834 when a snapshot is taken, a machine can be brought back to
8835 the exact state it was in when the snapshot was taken.
8836
8837 The ISnapshot interface has no methods, only attributes; snapshots
8838 are controlled through methods of the <link to="IConsole" /> interface
8839 which also manage the media associated with the snapshot.
8840 The following operations exist:
8841
8842 <ul>
8843 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8844 by creating new, empty differencing images for the machine's
8845 media and saving the VM settings and (if the VM is running)
8846 the current VM state in the snapshot.
8847
8848 The differencing images will then receive all data written to
8849 the machine's media, while their parent (base) images
8850 remain unmodified after the snapshot has been taken (see
8851 <link to="IMedium" /> for details about differencing images).
8852 This simplifies restoring a machine to the state of a snapshot:
8853 only the differencing images need to be deleted.
8854
8855 The current machine state is not changed by taking a snapshot.
8856 If the machine is running, it will resume execution after the
8857 snapshot has been taken.
8858 </li>
8859
8860 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8861 a previous snapshot. This resets the machine's state to that of
8862 the previous snapshot by deleting the differencing image of each
8863 of the machine's media and setting the machine's settings
8864 and state to the state that was saved in the snapshot (if any).
8865
8866 This destroys the machine's current state.
8867 </li>
8868
8869 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8870 without affecting the current machine state.
8871
8872 This does not change the machine, but instead frees the resources
8873 allocated when the snapshot was taken: the settings and machine state
8874 is deleted (if any), and the snapshot's differencing image for each
8875 of the machine's media gets merged with its parent image.
8876
8877 Neither the current machine state nor other snapshots are affected
8878 by this operation, except that parent media will be modified
8879 to contain the disk data associated with the snapshot being deleted.
8880 </li>
8881 </ul>
8882
8883 Each snapshot contains the settings of the virtual machine (hardware
8884 configuration etc.). In addition, if the machine was running when the
8885 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState_Running"/>),
8886 the current VM state is saved in the snapshot (similarly to what happens
8887 when a VM's state is saved). The snapshot is then said to
8888 be <i>online</i> because when restoring it, the VM will be running.
8889
8890 If the machine is saved (<link to="MachineState_Saved"/>), the snapshot
8891 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8892
8893 Otherwise, if the machine was not running (<link to="MachineState_PoweredOff"/>
8894 or <link to="MachineState_Aborted"/>), the snapshot is <i>offline</i>;
8895 it then contains a so-called "zero execution state", representing a
8896 machine that is powered off.
8897
8898 <h3>Snapshot branches and the "current" snapshot</h3>
8899
8900 Snapshots can be chained, whereby every next snapshot is based on the
8901 previous one. This chaining is related to medium branching
8902 (see the <link to="IMedium"/> description) in that every time
8903 a new snapshot is created, a new differencing medium is implicitly
8904 created for all normal media attached to the machine.
8905
8906 Each virtual machine has a "current snapshot", identified by
8907 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8908 to the last snapshot in the chain. In a future version of VirtualBox,
8909 it will be possible to reset a machine's current state to that of an
8910 earlier snapshot without discarding the current state so that it will be
8911 possible to create alternative snapshot paths in a snapshot tree.
8912
8913 In the current implementation, multiple snapshot branches within one
8914 virtual machine are not allowed. Every machine has a single branch,
8915 and <link to="IConsole::takeSnapshot"/> operation adds a new
8916 snapshot to the top of that branch.
8917 </desc>
8918
8919 <attribute name="id" type="uuid" mod="string" readonly="yes">
8920 <desc>UUID of the snapshot.</desc>
8921 </attribute>
8922
8923 <attribute name="name" type="wstring">
8924 <desc>Short name of the snapshot.</desc>
8925 </attribute>
8926
8927 <attribute name="description" type="wstring">
8928 <desc>Optional description of the snapshot.</desc>
8929 </attribute>
8930
8931 <attribute name="timeStamp" type="long long" readonly="yes">
8932 <desc>
8933 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8934 </desc>
8935 </attribute>
8936
8937 <attribute name="online" type="boolean" readonly="yes">
8938 <desc>
8939 @c true if this snapshot is an online snapshot and @c false otherwise.
8940
8941 When this attribute is @c true, the
8942 <link to="IMachine::stateFilePath"/> attribute of the
8943 <link to="#machine"/> object associated with this snapshot
8944 will point to the saved state file. Otherwise, it will be
8945 an empty string.
8946 </desc>
8947 </attribute>
8948
8949 <attribute name="machine" type="IMachine" readonly="yes">
8950 <desc>
8951 Virtual machine this snapshot is taken on. This object
8952 stores all settings the machine had when taking this snapshot.
8953 <note>
8954 The returned machine object is immutable, i.e. no
8955 any settings can be changed.
8956 </note>
8957 </desc>
8958 </attribute>
8959
8960 <attribute name="parent" type="ISnapshot" readonly="yes">
8961 <desc>
8962 Parent snapshot (a snapshot this one is based on), or
8963 @c null if the snapshot has no parent (i.e. is the first snapshot).
8964 </desc>
8965 </attribute>
8966
8967 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8968 <desc>
8969 Child snapshots (all snapshots having this one as a parent).
8970 </desc>
8971 </attribute>
8972
8973 </interface>
8974
8975
8976 <!--
8977 // IMedium
8978 /////////////////////////////////////////////////////////////////////////
8979 -->
8980
8981 <enum
8982 name="MediumState"
8983 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8984 >
8985 <desc>
8986 Virtual medium state.
8987 <see>IMedium</see>
8988 </desc>
8989
8990 <const name="NotCreated" value="0">
8991 <desc>
8992 Associated medium storage does not exist (either was not created yet or
8993 was deleted).
8994 </desc>
8995 </const>
8996 <const name="Created" value="1">
8997 <desc>
8998 Associated storage exists and accessible; this gets set if the
8999 accessibility check performed by <link to="IMedium::refreshState" />
9000 was successful.
9001 </desc>
9002 </const>
9003 <const name="LockedRead" value="2">
9004 <desc>
9005 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
9006 no data modification is possible.
9007 </desc>
9008 </const>
9009 <const name="LockedWrite" value="3">
9010 <desc>
9011 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
9012 no concurrent data reading or modification is possible.
9013 </desc>
9014 </const>
9015 <const name="Inaccessible" value="4">
9016 <desc>
9017 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
9018 not yet been performed, or else, associated medium storage is not
9019 accessible. In the first case, <link to="IMedium::lastAccessError"/>
9020 is empty, in the second case, it describes the error that occured.
9021 </desc>
9022 </const>
9023 <const name="Creating" value="5">
9024 <desc>
9025 Associated medium storage is being created.
9026 </desc>
9027 </const>
9028 <const name="Deleting" value="6">
9029 <desc>
9030 Associated medium storage is being deleted.
9031 </desc>
9032 </const>
9033 </enum>
9034
9035 <enum
9036 name="MediumType"
9037 uuid="11f6f7a5-0327-409a-9d42-7db6a0cec578"
9038 >
9039 <desc>
9040 Virtual medium type.
9041 <see>IMedium</see>
9042 </desc>
9043
9044 <const name="Normal" value="0">
9045 <desc>
9046 Normal medium (attached directly or indirectly, preserved
9047 when taking snapshots).
9048 </desc>
9049 </const>
9050 <const name="Immutable" value="1">
9051 <desc>
9052 Immutable medium (attached indirectly, changes are wiped out
9053 the next time the virtual machine is started).
9054 </desc>
9055 </const>
9056 <const name="Writethrough" value="2">
9057 <desc>
9058 Write through medium (attached directly, ignored when
9059 taking snapshots).
9060 </desc>
9061 </const>
9062 </enum>
9063
9064 <enum
9065 name="MediumVariant"
9066 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
9067 >
9068 <desc>
9069 Virtual medium image variant. More than one flag may be set.
9070 <see>IMedium</see>
9071 </desc>
9072
9073 <const name="Standard" value="0">
9074 <desc>
9075 No particular variant requested, results in using the backend default.
9076 </desc>
9077 </const>
9078 <const name="VmdkSplit2G" value="0x01">
9079 <desc>
9080 VMDK image split in chunks of less than 2GByte.
9081 </desc>
9082 </const>
9083 <const name="VmdkStreamOptimized" value="0x04">
9084 <desc>
9085 VMDK streamOptimized image. Special import/export format which is
9086 read-only/append-only.
9087 </desc>
9088 </const>
9089 <const name="VmdkESX" value="0x08">
9090 <desc>
9091 VMDK format variant used on ESX products.
9092 </desc>
9093 </const>
9094 <const name="Fixed" value="0x10000">
9095 <desc>
9096 Fixed image. Only allowed for base images.
9097 </desc>
9098 </const>
9099 <const name="Diff" value="0x20000">
9100 <desc>
9101 Fixed image. Only allowed for base images.
9102 </desc>
9103 </const>
9104 </enum>
9105
9106 <interface
9107 name="IMediumAttachment" extends="$unknown"
9108 uuid="e58eb3eb-8627-428b-bdf8-34487c848de5"
9109 wsmap="struct"
9110 >
9111 <desc>
9112 The IMediumAttachment interface represents the attachment
9113 of a storage medium to a virtual machine. Each machine contains
9114 an array of its medium attachments in <link to="IMachine::mediumAttachments"/>.
9115
9116 Each medium attachment specifies a storage controller as well as a port
9117 and device number. Fixed media (hard disks) will always also specify
9118 an instance of IMedium in <link to="#medium" />, referring to the hard disk
9119 medium. For removeable media, the IMedia instance is optional; it can be
9120 @c null if no media is mounted (see <link to="IMachine::mountMedium" />).
9121 </desc>
9122
9123 <attribute name="medium" type="IMedium" readonly="yes">
9124 <desc>Medium object associated with this attachment; it
9125 can be @c null for removable devices.</desc>
9126 </attribute>
9127
9128 <attribute name="controller" type="wstring" readonly="yes">
9129 <desc>Name of the storage controller of this attachment; this
9130 refers to one of the controllers in <link to="IMachine::storageControllers" />
9131 by name.</desc>
9132 </attribute>
9133
9134 <attribute name="port" type="long" readonly="yes">
9135 <desc>Port number of this attachment.</desc>
9136 </attribute>
9137
9138 <attribute name="device" type="long" readonly="yes">
9139 <desc>Device slot number of this attachment.</desc>
9140 </attribute>
9141
9142 <attribute name="type" type="DeviceType" readonly="yes">
9143 <desc>Device type of this attachment.</desc>
9144 </attribute>
9145
9146 <attribute name="passthrough" type="boolean" readonly="yes">
9147 <desc>Pass I/O requests through to a device on the host.</desc>
9148 </attribute>
9149
9150 </interface>
9151
9152 <interface
9153 name="IMedium" extends="$unknown"
9154 uuid="aa8167ba-df72-4738-b740-9b84377ba9f1"
9155 wsmap="managed"
9156 >
9157 <desc>
9158 The IMedium interface represents virtual storage for a machine's
9159 hard disks, CD/DVD or floppy drives. It will typically represent
9160 a disk image on the host, for example a VDI or VMDK file representing
9161 a virtual hard disk, or an ISO or RAW file representing virtual
9162 removable media, but can also point to a network location (e.g.
9163 for iSCSI targets).
9164
9165 Instances of IMedium are connected to virtual machines by way of
9166 medium attachments (see <link to="IMediumAttachment" />), which link
9167 the storage medium to a particular device slot of a storage controller
9168 of the virtual machine.
9169 In the VirtualBox API, virtual storage is therefore always represented
9170 by the following chain of object links:
9171
9172 <ul>
9173 <li><link to="IMachine::storageControllers"/> contains an array of
9174 storage controllers (IDE, SATA, SCSI or a floppy controller;
9175 these are instances of <link to="IStorageController"/>).</li>
9176 <li><link to="IMachine::mediumAttachments"/> contains an array of
9177 medium attachments (instances of <link to="IMediumAttachment"/>),
9178 each containing a storage controller from the above array, a
9179 port/device specification, and an instance of IMedium representing
9180 the medium storage (image file).
9181
9182 For removable media, the storage medium is optional; a medium
9183 attachment with no medium represents a CD/DVD or floppy drive
9184 with no medium inserted. By contrast, hard disk attachments
9185 will always have an IMedium object attached.</li>
9186 <li>Each IMedium in turn points to a storage unit (such as a file
9187 on the host computer or a network resource) that holds actual
9188 data. This location is represented by the <link to="#location"/>
9189 attribute.</li>
9190 </ul>
9191
9192 Existing media are opened using the following methods, depending on the
9193 media type:
9194 <ul>
9195 <li><link to="IVirtualBox::openHardDisk"/></li>
9196 <li><link to="IVirtualBox::openDVDImage"/></li>
9197 <li><link to="IVirtualBox::openFloppyImage"/></li>
9198 </ul>
9199
9200 New hard disk media can be created with the VirtualBox API using the
9201 <link to="IVirtualBox::createHardDisk"/> method.
9202
9203 CD/DVD and floppy images (ISO and RAW files) are usually created outside
9204 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
9205 type in a regular file.
9206
9207 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
9208 drive; in that case the <link to="#id" /> attribute contains the UUID of
9209 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
9210
9211 <h3>Known media</h3>
9212
9213 When an existing medium is opened for the first time, it is automatically
9214 remembered by the given VirtualBox installation or, in other words, becomes
9215 a <i>known medium</i>. Known media are stored in the media
9216 registry transparently maintained by VirtualBox and stored in settings
9217 files so that this registry is preserved when VirtualBox is not running.
9218
9219 Newly created virtual media are remembered only when the associated
9220 storage unit is actually created.
9221
9222 All known media can be enumerated using
9223 <link to="IVirtualBox::hardDisks"/>,
9224 <link to="IVirtualBox::DVDImages"/> and
9225 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
9226 quickly found by UUID using <link to="IVirtualBox::getHardDisk"/>
9227 and similar methods or by location using
9228 <link to="IVirtualBox::findHardDisk"/> and similar methods.
9229
9230 Only known media can be attached to virtual machines.
9231
9232 Removing known media from the media registry is performed when the given
9233 medium is closed using the <link to="#close"/> method or when its
9234 associated storage unit is deleted.
9235
9236 <h3>Accessibility checks</h3>
9237
9238 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
9239 method is called explicitly on a medium. This is done to make the VirtualBox object
9240 ready for serving requests as fast as possible and let the end-user
9241 application decide if it needs to check media accessibility right away or not.
9242
9243 As a result, when VirtualBox starts up (e.g. the VirtualBox
9244 object gets created for the first time), all known media are in the
9245 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
9246 attribute is an empty string because no actual accessibility check has
9247 been made yet.
9248
9249 After calling <link to="#refreshState" />, a medium is considered
9250 <i>accessible</i> if its storage unit can be read. In that case, the
9251 <link to="#state"/> attribute has a value of "Created". If the storage
9252 unit cannot be read (for example, because it is located on a disconnected
9253 network resource, or was accidentally deleted outside VirtualBox),
9254 the medium is considered <i>inaccessible</i>, which is indicated by the
9255 "Inaccessible" state. The exact reason why the medium is inaccessible can be
9256 obtained by reading the <link to="#lastAccessError"/> attribute.
9257
9258 <h3>Medium types</h3>
9259
9260 There are three types of medium behavior (see <link to="MediumType" />):
9261 "normal", "immutable" and "writethrough", represented by the
9262 <link to="#type"/> attribute. The type of the medium defines how the
9263 medium is attached to a virtual machine and what happens when a
9264 <link to="ISnapshot">snapshot</link> of the virtual machine with the
9265 attached medium is taken. At the moment DVD and floppy media are always
9266 of type "writethrough".
9267
9268 All media can be also divided in two groups: <i>base</i> media and
9269 <i>differencing</i> media. A base medium contains all sectors of the
9270 medium data in its own storage and therefore can be used independently.
9271 In contrast, a differencing mediun is a "delta" to some other medium and
9272 contains only those sectors which differ from that other medium, which is
9273 then called a <i>parent</i>. The differencing medium is said to be
9274 <i>linked to</i> that parent. The parent may be itself a differencing
9275 medium, thus forming a chain of linked media. The last element in that
9276 chain must always be a base medium. Note that several differencing
9277 media may be linked to the same parent medium.
9278
9279 Differencing media can be distinguished from base media by querying the
9280 <link to="#parent"/> attribute: base media do not have parents they would
9281 depend on, so the value of this attribute is always @c null for them.
9282 Using this attribute, it is possible to walk up the medium tree (from the
9283 child medium to its parent). It is also possible to walk down the tree
9284 using the <link to="#children"/> attribute.
9285
9286 Note that the type of all differencing media is "Normal"; all other
9287 values are meaningless for them. Base media may be of any type.
9288
9289 <h3>Creating hard disks</h3>
9290
9291 New base hard disks are created using
9292 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
9293 opened using <link to="IVirtualBox::openHardDisk"/>. Differencing hard
9294 disks are usually implicitly created by VirtualBox when needed but may
9295 also be created explicitly using <link to="#createDiffStorage"/>.
9296
9297 After the hard disk is successfully created (including the storage unit)
9298 or opened, it becomes a known hard disk (remembered in the internal media
9299 registry). Known hard disks can be attached to a virtual machine, accessed
9300 through <link to="IVirtualBox::getHardDisk"/> and
9301 <link to="IVirtualBox::findHardDisk"/> methods or enumerated using the
9302 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
9303
9304 The following methods, besides <link to="IMedium::close"/>,
9305 automatically remove the hard disk from the media registry:
9306 <ul>
9307 <li><link to="#deleteStorage"/></li>
9308 <li><link to="#mergeTo"/></li>
9309 </ul>
9310
9311 If the storage unit of the hard disk is a regular file in the host's
9312 file system then the rules stated in the description of the
9313 <link to="IMedium::location"/> attribute apply when setting its value. In
9314 addition, a plain file name without any path may be given, in which case
9315 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
9316 folder</link> will be prepended to it.
9317
9318 <h4>Automatic composition of the file name part</h4>
9319
9320 Another extension to the <link to="IMedium::location"/> attribute is that
9321 there is a possibility to cause VirtualBox to compose a unique value for
9322 the file name part of the location using the UUID of the hard disk. This
9323 applies only to hard disks in <link to="MediumState_NotCreated"/> state,
9324 e.g. before the storage unit is created, and works as follows. You set the
9325 value of the <link to="IMedium::location"/> attribute to a location
9326 specification which only contains the path specification but not the file
9327 name part and ends with either a forward slash or a backslash character.
9328 In response, VirtualBox will generate a new UUID for the hard disk and
9329 compose the file name using the following pattern:
9330 <pre>
9331 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
9332 </pre>
9333 where <tt>&lt;path&gt;</tt> is the supplied path specification,
9334 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
9335 is the default extension for the storage format of this hard disk. After
9336 that, you may call any of the methods that create a new hard disk storage
9337 unit and they will use the generated UUID and file name.
9338
9339 <h3>Attaching Hard Disks</h3>
9340
9341 Hard disks are attached to virtual machines using the
9342 <link to="IMachine::attachDevice"/> method and detached using the
9343 <link to="IMachine::detachDevice"/> method. Depending on their
9344 <link to="#type"/>, hard disks are attached either
9345 <i>directly</i> or <i>indirectly</i>.
9346
9347 When a hard disk is being attached directly, it is associated with the
9348 virtual machine and used for hard disk operations when the machine is
9349 running. When a hard disk is being attached indirectly, a new differencing
9350 hard disk linked to it is implicitly created and this differencing hard
9351 disk is associated with the machine and used for hard disk operations.
9352 This also means that if <link to="IMachine::attachDevice"/> performs
9353 a direct attachment then the same hard disk will be returned in response
9354 to the subsequent <link to="IMachine::getMedium"/> call; however if
9355 an indirect attachment is performed then
9356 <link to="IMachine::getMedium"/> will return the implicitly created
9357 differencing hard disk, not the original one passed to <link
9358 to="IMachine::attachDevice"/>. In detail:
9359
9360 <ul>
9361 <li><b>Normal base</b> hard disks that do not have children (i.e.
9362 differencing hard disks linked to them) and that are not already
9363 attached to virtual machines in snapshots are attached <b>directly</b>.
9364 Otherwise, they are attached <b>indirectly</b> because having
9365 dependent children or being part of the snapshot makes it impossible
9366 to modify hard disk contents without breaking the integrity of the
9367 dependent party. The <link to="#readOnly"/> attribute allows to
9368 quickly determine the kind of the attachment for the given hard
9369 disk. Note that if a normal base hard disk is to be indirectly
9370 attached to a virtual machine with snapshots then a special
9371 procedure called <i>smart attachment</i> is performed (see below).</li>
9372 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
9373 they are attached <b>directly</b> if they do not have children and are
9374 not attached to virtual machines in snapshots, and <b>indirectly</b>
9375 otherwise. Note that the smart attachment procedure is never performed
9376 for differencing hard disks.</li>
9377 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
9378 they are designed to be non-writable. If an immutable hard disk is
9379 attached to a virtual machine with snapshots then a special
9380 procedure called smart attachment is performed (see below).</li>
9381 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
9382 also as designed. This also means that writethrough hard disks cannot
9383 have other hard disks linked to them at all.</li>
9384 </ul>
9385
9386 Note that the same hard disk, regardless of its type, may be attached to
9387 more than one virtual machine at a time. In this case, the machine that is
9388 started first gains exclusive access to the hard disk and attempts to
9389 start other machines having this hard disk attached will fail until the
9390 first machine is powered down.
9391
9392 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
9393 that the given hard disk remains associated with the given machine after a
9394 successful <link to="IMachine::detachDevice"/> call until
9395 <link to="IMachine::saveSettings"/> is called to save all changes to
9396 machine settings to disk. This deferring is necessary to guarantee that
9397 the hard disk configuration may be restored at any time by a call to
9398 <link to="IMachine::discardSettings"/> before the settings
9399 are saved (committed).
9400
9401 Note that if <link to="IMachine::discardSettings"/> is called after
9402 indirectly attaching some hard disks to the machine but before a call to
9403 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
9404 all differencing hard disks implicitly created by
9405 <link to="IMachine::attachDevice"/> for these indirect attachments.
9406 Such implicitly created hard disks will also be immediately deleted when
9407 detached explicitly using the <link to="IMachine::detachDevice"/>
9408 call if it is made before <link to="IMachine::saveSettings"/>. This
9409 implicit deletion is safe because newly created differencing hard
9410 disks do not contain any user data.
9411
9412 However, keep in mind that detaching differencing hard disks that were
9413 implicitly created by <link to="IMachine::attachDevice"/>
9414 before the last <link to="IMachine::saveSettings"/> call will
9415 <b>not</b> implicitly delete them as they may already contain some data
9416 (for example, as a result of virtual machine execution). If these hard
9417 disks are no more necessary, the caller can always delete them explicitly
9418 using <link to="#deleteStorage"/> after they are actually de-associated
9419 from this machine by the <link to="IMachine::saveSettings"/> call.
9420
9421 <h3>Smart Attachment</h3>
9422
9423 When normal base or immutable hard disks are indirectly attached to a
9424 virtual machine then some additional steps are performed to make sure the
9425 virtual machine will have the most recent "view" of the hard disk being
9426 attached. These steps include walking through the machine's snapshots
9427 starting from the current one and going through ancestors up to the first
9428 snapshot. Hard disks attached to the virtual machine in all
9429 of the encountered snapshots are checked whether they are descendants of
9430 the given normal base or immutable hard disk. The first found child (which
9431 is the differencing hard disk) will be used instead of the normal base or
9432 immutable hard disk as a parent for creating a new differencing hard disk
9433 that will be actually attached to the machine. And only if no descendants
9434 are found or if the virtual machine does not have any snapshots then the
9435 normal base or immutable hard disk will be used itself as a parent for
9436 this differencing hard disk.
9437
9438 It is easier to explain what smart attachment does using the
9439 following example:
9440 <pre>
9441BEFORE attaching B.vdi: AFTER attaching B.vdi:
9442
9443Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
9444 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
9445 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
9446 Snapshot 4 (none) Snapshot 4 (none)
9447 CurState (none) CurState (D3->D2.vdi)
9448
9449 NOT
9450 ...
9451 CurState (D3->B.vdi)
9452 </pre>
9453 The first column is the virtual machine configuration before the base hard
9454 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
9455 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
9456 mean that the hard disk that is actually attached to the machine is a
9457 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
9458 another hard disk, <tt>B.vdi</tt>.
9459
9460 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
9461 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
9462 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
9463 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
9464 it cannot be attached directly and needs an indirect attachment (i.e.
9465 implicit creation of a new differencing hard disk). Due to the smart
9466 attachment procedure, the new differencing hard disk
9467 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
9468 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
9469 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
9470 machine.
9471
9472 Note that if there is more than one descendant hard disk of the given base
9473 hard disk found in a snapshot, and there is an exact device, channel and
9474 bus match, then this exact match will be used. Otherwise, the youngest
9475 descendant will be picked up.
9476
9477 There is one more important aspect of the smart attachment procedure which
9478 is not related to snapshots at all. Before walking through the snapshots
9479 as described above, the backup copy of the current list of hard disk
9480 attachment is searched for descendants. This backup copy is created when
9481 the hard disk configuration is changed for the first time after the last
9482 <link to="IMachine::saveSettings"/> call and used by
9483 <link to="IMachine::discardSettings"/> to undo the recent hard disk
9484 changes. When such a descendant is found in this backup copy, it will be
9485 simply re-attached back, without creating a new differencing hard disk for
9486 it. This optimization is necessary to make it possible to re-attach the
9487 base or immutable hard disk to a different bus, channel or device slot
9488 without losing the contents of the differencing hard disk actually
9489 attached to the machine in place of it.
9490 </desc>
9491
9492 <attribute name="id" type="uuid" mod="string" readonly="yes">
9493 <desc>
9494 UUID of the medium. For a newly created medium, this value is a randomly
9495 generated UUID.
9496
9497 <note>
9498 For media in one of MediumState_NotCreated, MediumState_Creating or
9499 MediumState_Deleting states, the value of this property is undefined
9500 and will most likely be an empty UUID.
9501 </note>
9502 </desc>
9503 </attribute>
9504
9505 <attribute name="description" type="wstring">
9506 <desc>
9507 Optional description of the medium. For a newly created medium the value
9508 of this attribute is an empty string.
9509
9510 Medium types that don't support this attribute will return E_NOTIMPL in
9511 attempt to get or set this attribute's value.
9512
9513 <note>
9514 For some storage types, reading this attribute may return an outdated
9515 (last known) value when <link to="#state"/> is <link
9516 to="MediumState_Inaccessible"/> or <link
9517 to="MediumState_LockedWrite"/> because the value of this attribute is
9518 stored within the storage unit itself. Also note that changing the
9519 attribute value is not possible in such case, as well as when the
9520 medium is the <link to="MediumState_LockedRead"/> state.
9521 </note>
9522 </desc>
9523 </attribute>
9524
9525 <attribute name="state" type="MediumState" readonly="yes">
9526 <desc>
9527 Returns the current medium state, which is the last state set by
9528 the accessibility check performed by <link to="#refreshState"/>.
9529 If that method has not yet been called on the medium, the state
9530 is "Inaccessible"; as opposed to truly inaccessible media, the
9531 value of <link to="#lastAccessError"/> will be an empty string in
9532 that case.
9533
9534 <note>As of version 3.1, this no longer performs an accessibility check
9535 automatically; call <link to="#refreshState"/> for that.
9536 </note>
9537 </desc>
9538 </attribute>
9539
9540 <attribute name="location" type="wstring">
9541 <desc>
9542 Location of the storage unit holding medium data.
9543
9544 The format of the location string is medium type specific. For medium
9545 types using regular files in a host's file system, the location
9546 string is the full file name.
9547
9548 Some medium types may support changing the storage unit location by
9549 simply changing the value of this property. If this operation is not
9550 supported, the implementation will return E_NOTIMPL in attempt to set
9551 this attribute's value.
9552
9553 When setting a value of the location attribute which is a regular file
9554 in the host's file system, the given file name may be either relative to
9555 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
9556 absolute. Note that if the given location specification does not contain
9557 the file extension part then a proper default extension will be
9558 automatically appended by the implementation depending on the medium type.
9559 </desc>
9560 </attribute>
9561
9562 <attribute name="name" type="wstring" readonly="yes">
9563 <desc>
9564 Name of the storage unit holding medium data.
9565
9566 The returned string is a short version of the <link to="#location"/>
9567 attribute that is suitable for representing the medium in situations
9568 where the full location specification is too long (such as lists
9569 and comboboxes in GUI frontends). This string is also used by frontends
9570 to sort the media list alphabetically when needed.
9571
9572 For example, for locations that are regular files in the host's file
9573 system, the value of this attribute is just the file name (+ extension),
9574 without the path specification.
9575
9576 Note that as opposed to the <link to="#location"/> attribute, the name
9577 attribute will not necessary be unique for a list of media of the
9578 given type and format.
9579 </desc>
9580 </attribute>
9581
9582 <attribute name="deviceType" type="DeviceType" readonly="yes">
9583 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
9584 medium.</desc>
9585 </attribute>
9586
9587 <attribute name="hostDrive" type="boolean" readonly="yes">
9588 <desc>True if this corresponds to a drive on the host.</desc>
9589 </attribute>
9590
9591 <attribute name="size" type="unsigned long long" readonly="yes">
9592 <desc>
9593 Physical size of the storage unit used to hold medium data (in bytes).
9594
9595 <note>
9596 For media whose <link to="#state"/> is <link
9597 to="MediumState_Inaccessible"/>, the value of this property is the
9598 last known size. For <link to="MediumState_NotCreated"/> media,
9599 the returned value is zero.
9600 </note>
9601 </desc>
9602 </attribute>
9603
9604 <attribute name="format" type="wstring" readonly="yes">
9605 <desc>
9606 Storage format of this medium.
9607
9608 The value of this attribute is a string that specifies a backend used
9609 to store medium data. The storage format is defined when you create a
9610 new medium or automatically detected when you open an existing medium,
9611 and cannot be changed later.
9612
9613 The list of all storage formats supported by this VirtualBox
9614 installation can be obtained using
9615 <link to="ISystemProperties::mediumFormats"/>.
9616 </desc>
9617 </attribute>
9618
9619 <attribute name="type" type="MediumType">
9620 <desc>
9621 Type (role) of this medium.
9622
9623 The following constraints apply when changing the value of this
9624 attribute:
9625 <ul>
9626 <li>If a medium is attached to a virtual machine (either in the
9627 current state or in one of the snapshots), its type cannot be
9628 changed.
9629 </li>
9630 <li>As long as the medium has children, its type cannot be set
9631 to <link to="MediumType_Writethrough"/>.
9632 </li>
9633 <li>The type of all differencing media is
9634 <link to="MediumType_Normal"/> and cannot be changed.
9635 </li>
9636 </ul>
9637
9638 The type of a newly created or opened medium is set to
9639 <link to="MediumType_Normal"/>, except for DVD and floppy media,
9640 which have a type of <link to="MediumType_Writethrough"/>.
9641 </desc>
9642 </attribute>
9643
9644 <attribute name="parent" type="IMedium" readonly="yes">
9645 <desc>
9646 Parent of this medium (the medium this medium is directly based
9647 on).
9648
9649 Only differencing media have parents. For base (non-differencing)
9650 media, @c null is returned.
9651 </desc>
9652 </attribute>
9653
9654 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
9655 <desc>
9656 Children of this medium (all differencing media directly based
9657 on this medium). A @c null array is returned if this medium
9658 does not have any children.
9659 </desc>
9660 </attribute>
9661
9662 <attribute name="base" type="IMedium" readonly="yes">
9663 <desc>
9664 Base medium of this medium.
9665
9666 If this is a differencing medium, its base medium is the medium
9667 the given medium branch starts from. For all other types of media, this
9668 property returns the medium object itself (i.e. the same object this
9669 property is read on).
9670 </desc>
9671 </attribute>
9672
9673 <attribute name="readOnly" type="boolean" readonly="yes">
9674 <desc>
9675 Returns @c true if this medium is read-only and @c false otherwise.
9676
9677 A medium is considered to be read-only when its contents cannot be
9678 modified without breaking the integrity of other parties that depend on
9679 this medium such as its child media or snapshots of virtual machines
9680 where this medium is attached to these machines. If there are no
9681 children and no such snapshots then there is no dependency and the
9682 medium is not read-only.
9683
9684 The value of this attribute can be used to determine the kind of the
9685 attachment that will take place when attaching this medium to a
9686 virtual machine. If the value is @c false then the medium will
9687 be attached directly. If the value is @c true then the medium
9688 will be attached indirectly by creating a new differencing child
9689 medium for that. See the interface description for more information.
9690
9691 Note that all <link to="MediumType_Immutable">Immutable</link> media
9692 are always read-only while all
9693 <link to="MediumType_Writethrough">Writethrough</link> media are
9694 always not.
9695
9696 <note>
9697 The read-only condition represented by this attribute is related to
9698 the medium type and usage, not to the current
9699 <link to="IMedium::state">medium state</link> and not to the read-only
9700 state of the storage unit.
9701 </note>
9702 </desc>
9703 </attribute>
9704
9705 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9706 <desc>
9707 Logical size of this medium (in megabytes), as reported to the
9708 guest OS running inside the virtual machine this medium is
9709 attached to. The logical size is defined when the medium is created
9710 and cannot be changed later.
9711
9712 <note>
9713 Reading this property on a differencing medium will return the size
9714 of its <link to="#base"/> medium.
9715 </note>
9716 <note>
9717 For media whose state is <link to="#state"/> is <link
9718 to="MediumState_Inaccessible"/>, the value of this property is the
9719 last known logical size. For <link to="MediumaState_NotCreated"/>
9720 media, the returned value is zero.
9721 </note>
9722 </desc>
9723 </attribute>
9724
9725 <attribute name="autoReset" type="boolean">
9726 <desc>
9727 Whether this differencing medium will be automatically reset each
9728 time a virtual machine it is attached to is powered up. This
9729 attribute is automatically set to @c true for the last
9730 differencing image of an "immutable" medium (see
9731 <link to="MediumType" />).
9732
9733 See <link to="#reset"/> for more information about resetting
9734 differencing media.
9735
9736 <note>
9737 Reading this property on a base (non-differencing) medium will
9738 always @c false. Changing the value of this property in this
9739 case is not supported.
9740 </note>
9741
9742 <result name="VBOX_E_NOT_SUPPORTED">
9743 This is not a differencing medium (when changing the attribute
9744 value).
9745 </result>
9746 </desc>
9747 </attribute>
9748
9749 <attribute name="lastAccessError" type="wstring" readonly="yes">
9750 <desc>
9751 Text message that represents the result of the last accessibility
9752 check performed by <link to="#refreshState"/>.
9753
9754 An empty string is returned if the last accessibility check
9755 was successful or has not yet been called. As a result, if
9756 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9757 then <link to="#refreshState"/> has yet to be called; this is the
9758 default value of media after VirtualBox initialization.
9759 A non-empty string indicates a failure and should normally describe
9760 a reason of the failure (for example, a file read error).
9761 </desc>
9762 </attribute>
9763
9764 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9765 <desc>
9766 Array of UUIDs of all machines this medium is attached to.
9767
9768 A @c null array is returned if this medium is not attached to any
9769 machine or to any machine's snapshot.
9770
9771 <note>
9772 The returned array will include a machine even if this medium is not
9773 attached to that machine in the current state but attached to it in
9774 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9775 details.
9776 </note>
9777 </desc>
9778 </attribute>
9779
9780 <method name="refreshState">
9781 <desc>
9782 If the current medium state (see <link to="MediumState"/>) is one of
9783 "Created", "Inaccessible" or "LockedRead", then this performs an
9784 accessibility check on the medium and sets the value of the <link to="#state"/>
9785 attribute accordingly; that value is also returned for convenience.
9786
9787 For all other state values, this does not perform a refresh but returns
9788 the state only.
9789
9790 The refresh, if performed, may take a long time (several seconds or even
9791 minutes, depending on the storage unit location and format) because it performs an
9792 accessibility check of the storage unit. This check may cause a significant
9793 delay if the storage unit of the given medium is, for example, a file located
9794 on a network share which is not currently accessible due to connectivity
9795 problems. In that case, the call will not return until a timeout
9796 interval defined by the host OS for this operation expires. For this reason,
9797 it is recommended to never read this attribute on the main UI thread to avoid
9798 making the UI unresponsive.
9799
9800 If the last known state of the medium is "Created" and the accessibility
9801 check fails, then the state would be set to "Inaccessible", and
9802 <link to="#lastAccessError"/> may be used to get more details about the
9803 failure. If the state of the medium is "LockedRead", then it remains the
9804 same, and a non-empty value of <link to="#lastAccessError"/> will
9805 indicate a failed accessibility check in this case.
9806
9807 Note that not all medium states are applicable to all medium types.
9808 </desc>
9809 <param name="state" type="MediumState" dir="return">
9810 <desc>
9811 New medium state.
9812 </desc>
9813 </param>
9814 </method>
9815
9816 <method name="getSnapshotIds">
9817 <desc>
9818 Returns an array of UUIDs of all snapshots of the given machine where
9819 this medium is attached to.
9820
9821 If the medium is attached to the machine in the current state, then the
9822 first element in the array will always be the ID of the queried machine
9823 (i.e. the value equal to the @c machineId argument), followed by
9824 snapshot IDs (if any).
9825
9826 If the medium is not attached to the machine in the current state, then
9827 the array will contain only snapshot IDs.
9828
9829 The returned array may be @c null if this medium is not attached
9830 to the given machine at all, neither in the current state nor in one of
9831 the snapshots.
9832 </desc>
9833 <param name="machineId" type="uuid" mod="string" dir="in">
9834 <desc>
9835 UUID of the machine to query.
9836 </desc>
9837 </param>
9838 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9839 <desc>
9840 Array of snapshot UUIDs of the given machine using this medium.
9841 </desc>
9842 </param>
9843 </method>
9844
9845 <method name="lockRead">
9846 <desc>
9847 Locks this medium for reading.
9848
9849 A read lock is shared: many clients can simultaneously lock the
9850 same medium for reading unless it is already locked for writing (see
9851 <link to="#lockWrite"/>) in which case an error is returned.
9852
9853 When the medium is locked for reading, it cannot be modified
9854 from within VirtualBox. This means that any method that changes
9855 the properties of this medium or contents of the storage unit
9856 will return an error (unless explicitly stated otherwise). That
9857 includes an attempt to start a virtual machine that wants to
9858 write to the the medium.
9859
9860 When the virtual machine is started up, it locks for reading all
9861 media it uses in read-only mode. If some medium cannot be locked
9862 for reading, the startup procedure will fail.
9863 A medium is typically locked for reading while it is used by a running
9864 virtual machine but has a depending differencing image that receives
9865 the actual write operations. This way one base medium can have
9866 multiple child differencing images which can be written to
9867 simultaneously. Read-only media such as DVD and floppy images are
9868 also locked for reading only (so they can be in use by multiple
9869 machines simultaneously).
9870
9871 A medium is also locked for reading when it is the source of a
9872 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9873
9874 The medium locked for reading must be unlocked using the <link
9875 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9876 can be nested and must be followed by the same number of paired
9877 <link to="#unlockRead"/> calls.
9878
9879 This method sets the medium state (see <link to="#state"/>) to
9880 "LockedRead" on success. The medium's previous state must be
9881 one of "Created", "Inaccessible" or "LockedRead".
9882
9883 Locking an inaccessible medium is not an error; this method performs
9884 a logical lock that prevents modifications of this medium through
9885 the VirtualBox API, not a physical file-system lock of the underlying
9886 storage unit.
9887
9888 This method returns the current state of the medium
9889 <i>before</i> the operation.
9890
9891 <result name="VBOX_E_INVALID_OBJECT_STATE">
9892 Invalid medium state (e.g. not created, locked, inaccessible,
9893 creating, deleting).
9894 </result>
9895
9896 </desc>
9897 <param name="state" type="MediumState" dir="return">
9898 <desc>
9899 State of the medium after the operation.
9900 </desc>
9901 </param>
9902 </method>
9903
9904 <method name="unlockRead">
9905 <desc>
9906 Cancels the read lock previously set by <link to="#lockRead"/>.
9907
9908 For both success and failure, this method returns the current state
9909 of the medium <i>after</i> the operation.
9910
9911 See <link to="#lockRead"/> for more details.
9912
9913 <result name="VBOX_E_INVALID_OBJECT_STATE">
9914 Medium not locked for reading.
9915 </result>
9916
9917 </desc>
9918 <param name="state" type="MediumState" dir="return">
9919 <desc>
9920 State of the medium after the operation.
9921 </desc>
9922 </param>
9923 </method>
9924
9925 <method name="lockWrite">
9926 <desc>
9927 Locks this medium for writing.
9928
9929 A write lock, as opposed to <link to="#lockRead"/>, is
9930 exclusive: there may be only one client holding a write lock,
9931 and there may be no read locks while the write lock is held.
9932 As a result, read-locking fails if a write lock is held, and
9933 write-locking fails if either a read or another write lock is held.
9934
9935 When a medium is locked for writing, it cannot be modified
9936 from within VirtualBox, and it is not guaranteed that the values
9937 of its properties are up-to-date. Any method that changes the
9938 properties of this medium or contents of the storage unit will
9939 return an error (unless explicitly stated otherwise).
9940
9941 When a virtual machine is started up, it locks for writing all
9942 media it uses to write data to. If any medium could not be locked
9943 for writing, the startup procedure will fail. If a medium has
9944 differencing images, then while the machine is running, only
9945 the last ("leaf") differencing image is locked for writing,
9946 whereas its parents are locked for reading only.
9947
9948 A medium is also locked for writing when it is the target of a
9949 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9950
9951 The medium locked for writing must be unlocked using the <link
9952 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9953
9954 This method sets the medium state (see <link to="#state"/>) to
9955 "LockedWrite" on success. The medium's previous state must be
9956 either "Created" or "Inaccessible".
9957
9958 Locking an inaccessible medium is not an error; this method performs
9959 a logical lock that prevents modifications of this medium through
9960 the VirtualBox API, not a physical file-system lock of the underlying
9961 storage unit.
9962
9963 For both, success and failure, this method returns the current
9964 state of the medium <i>before</i> the operation.
9965
9966 <result name="VBOX_E_INVALID_OBJECT_STATE">
9967 Invalid medium state (e.g. not created, locked, inaccessible,
9968 creating, deleting).
9969 </result>
9970
9971 </desc>
9972 <param name="state" type="MediumState" dir="return">
9973 <desc>
9974 State of the medium after the operation.
9975 </desc>
9976 </param>
9977 </method>
9978
9979 <method name="unlockWrite">
9980 <desc>
9981 Cancels the write lock previously set by <link to="#lockWrite"/>.
9982
9983 For both success and failure, this method returns the current
9984 state of the medium <i>after</i> the operation.
9985
9986 See <link to="#lockWrite"/> for more details.
9987
9988 <result name="VBOX_E_INVALID_OBJECT_STATE">
9989 Medium not locked for writing.
9990 </result>
9991
9992 </desc>
9993 <param name="state" type="MediumState" dir="return">
9994 <desc>
9995 State of the medium after the operation.
9996 </desc>
9997 </param>
9998 </method>
9999
10000 <method name="close">
10001 <desc>
10002 Closes this medium.
10003
10004 The medium must not be attached to any known virtual machine
10005 and must not have any known child media, otherwise the
10006 operation will fail.
10007
10008 When the medium is successfully closed, it gets removed from
10009 the list of remembered media, but its storage unit is not
10010 deleted. In particular, this means that this medium can be
10011 later opened again using the <link
10012 to="IVirtualBox::openHardDisk"/> call.
10013
10014 Note that after this method successfully returns, the given medium
10015 object becomes uninitialized. This means that any attempt
10016 to call any of its methods or attributes will fail with the
10017 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
10018
10019 <result name="VBOX_E_INVALID_OBJECT_STATE">
10020 Invalid medium state (other than not created, created or
10021 inaccessible).
10022 </result>
10023 <result name="VBOX_E_OBJECT_IN_USE">
10024 Medium attached to virtual machine.
10025 </result>
10026 <result name="VBOX_E_FILE_ERROR">
10027 Settings file not accessible.
10028 </result>
10029 <result name="VBOX_E_XML_ERROR">
10030 Could not parse the settings file.
10031 </result>
10032
10033 </desc>
10034 </method>
10035
10036 <!-- storage methods -->
10037
10038 <method name="getProperty">
10039 <desc>
10040 Returns the value of the custom medium property with the given name.
10041
10042 The list of all properties supported by the given medium format can
10043 be obtained with <link to="IMediumFormat::describeProperties"/>.
10044
10045 Note that if this method returns an empty string in @a value, the
10046 requested property is supported but currently not assigned any value.
10047
10048 <result name="VBOX_E_OBJECT_NOT_FOUND">
10049 Requested property does not exist (not supported by the format).
10050 </result>
10051 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
10052 </desc>
10053 <param name="name" type="wstring" dir="in">
10054 <desc>Name of the property to get.</desc>
10055 </param>
10056 <param name="value" type="wstring" dir="return">
10057 <desc>Current property value.</desc>
10058 </param>
10059 </method>
10060
10061 <method name="setProperty">
10062 <desc>
10063 Sets the value of the custom medium property with the given name.
10064
10065 The list of all properties supported by the given medium format can
10066 be obtained with <link to="IMediumFormat::describeProperties"/>.
10067
10068 Note that setting the property value to @c null or an empty string is
10069 equivalent to deleting the existing value. A default value (if it is
10070 defined for this property) will be used by the format backend in this
10071 case.
10072
10073 <result name="VBOX_E_OBJECT_NOT_FOUND">
10074 Requested property does not exist (not supported by the format).
10075 </result>
10076 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
10077 </desc>
10078 <param name="name" type="wstring" dir="in">
10079 <desc>Name of the property to set.</desc>
10080 </param>
10081 <param name="value" type="wstring" dir="in">
10082 <desc>Property value to set.</desc>
10083 </param>
10084 </method>
10085
10086 <method name="getProperties">
10087 <desc>
10088 Returns values for a group of properties in one call.
10089
10090 The names of the properties to get are specified using the @a names
10091 argument which is a list of comma-separated property names or
10092 an empty string if all properties are to be returned. Note that currently
10093 the value of this argument is ignored and the method always returns all
10094 existing properties.
10095
10096 The list of all properties supported by the given medium format can
10097 be obtained with <link to="IMediumFormat::describeProperties"/>.
10098
10099 The method returns two arrays, the array of property names corresponding
10100 to the @a names argument and the current values of these properties.
10101 Both arrays have the same number of elements with each elemend at the
10102 given index in the first array corresponds to an element at the same
10103 index in the second array.
10104
10105 Note that for properties that do not have assigned values,
10106 an empty string is returned at the appropriate index in the
10107 @a returnValues array.
10108
10109 </desc>
10110 <param name="names" type="wstring" dir="in">
10111 <desc>
10112 Names of properties to get.
10113 </desc>
10114 </param>
10115 <param name="returnNames" type="wstring" safearray="yes" dir="out">
10116 <desc>Names of returned properties.</desc>
10117 </param>
10118 <param name="returnValues" type="wstring" safearray="yes" dir="return">
10119 <desc>Values of returned properties.</desc>
10120 </param>
10121 </method>
10122
10123 <method name="setProperties">
10124 <desc>
10125 Sets values for a group of properties in one call.
10126
10127 The names of the properties to set are passed in the @a names
10128 array along with the new values for them in the @a values array. Both
10129 arrays have the same number of elements with each elemend at the given
10130 index in the first array corresponding to an element at the same index
10131 in the second array.
10132
10133 If there is at least one property name in @a names that is not valid,
10134 the method will fail before changing the values of any other properties
10135 from the @a names array.
10136
10137 Using this method over <link to="#setProperty"/> is preferred if you
10138 need to set several properties at once since it will result into less
10139 IPC calls.
10140
10141 The list of all properties supported by the given medium format can
10142 be obtained with <link to="IMediumFormat::describeProperties"/>.
10143
10144 Note that setting the property value to @c null or an empty string is
10145 equivalent to deleting the existing value. A default value (if it is
10146 defined for this property) will be used by the format backend in this
10147 case.
10148 </desc>
10149 <param name="names" type="wstring" safearray="yes" dir="in">
10150 <desc>Names of properties to set.</desc>
10151 </param>
10152 <param name="values" type="wstring" safearray="yes" dir="in">
10153 <desc>Values of properties to set.</desc>
10154 </param>
10155 </method>
10156
10157 <!-- storage methods -->
10158
10159 <method name="createBaseStorage">
10160 <desc>
10161 Starts creating a hard disk storage unit (fixed/dynamic, according
10162 to the variant flags) in in the background. The previous storage unit
10163 created for this object, if any, must first be deleted using
10164 <link to="#deleteStorage"/>, otherwise the operation will fail.
10165
10166 Before the operation starts, the medium is placed in
10167 <link to="MediumState_Creating"/> state. If the create operation
10168 fails, the medium will be placed back in <link to="MediumState_NotCreated"/>
10169 state.
10170
10171 After the returned progress object reports that the operation has
10172 successfully completed, the medium state will be set to <link
10173 to="MediumState_Created"/>, the medium will be remembered by this
10174 VirtualBox installation and may be attached to virtual machines.
10175
10176 <result name="VBOX_E_NOT_SUPPORTED">
10177 The variant of storage creation operation is not supported. See <link
10178 to="IMediumFormat::capabilities"/>.
10179 </result>
10180 </desc>
10181 <param name="logicalSize" type="unsigned long long" dir="in">
10182 <desc>Maximum logical size of the medium in megabytes.</desc>
10183 </param>
10184 <param name="variant" type="MediumVariant" dir="in">
10185 <desc>Exact image variant which should be created.</desc>
10186 </param>
10187 <param name="progress" type="IProgress" dir="return">
10188 <desc>Progress object to track the operation completion.</desc>
10189 </param>
10190 </method>
10191
10192 <method name="deleteStorage">
10193 <desc>
10194 Starts deleting the storage unit of this medium.
10195
10196 The medium must not be attached to any known virtual machine and must
10197 not have any known child media, otherwise the operation will fail.
10198 It will also fail if there is no storage unit to delete or if deletion
10199 is already in progress, or if the medium is being in use (locked for
10200 read or for write) or inaccessible. Therefore, the only valid state for
10201 this operation to succeed is <link to="MediumState_Created"/>.
10202
10203 Before the operation starts, the medium is placed in
10204 <link to="MediumState_Deleting"/> state and gets removed from the list
10205 of remembered hard disks (media registry). If the delete operation
10206 fails, the medium will be remembered again and placed back to
10207 <link to="MediumState_Created"/> state.
10208
10209 After the returned progress object reports that the operation is
10210 complete, the medium state will be set to
10211 <link to="MediumState_NotCreated"/> and you will be able to use one of
10212 the storage creation methods to create it again.
10213
10214 <see>#close()</see>
10215
10216 <result name="VBOX_E_OBJECT_IN_USE">
10217 Medium is attached to a virtual machine.
10218 </result>
10219 <result name="VBOX_E_NOT_SUPPORTED">
10220 Storage deletion is not allowed because neither of storage creation
10221 operations are supported. See
10222 <link to="IMediumFormat::capabilities"/>.
10223 </result>
10224
10225 <note>
10226 If the deletion operation fails, it is not guaranteed that the storage
10227 unit still exists. You may check the <link to="IMedium::state"/> value
10228 to answer this question.
10229 </note>
10230 </desc>
10231 <param name="progress" type="IProgress" dir="return">
10232 <desc>Progress object to track the operation completion.</desc>
10233 </param>
10234 </method>
10235
10236 <!-- diff methods -->
10237
10238 <method name="createDiffStorage">
10239 <desc>
10240 Starts creating an empty differencing storage unit based on this
10241 medium in the format and at the location defined by the @a target
10242 argument.
10243
10244 The target medium must be in <link to="MediumState_NotCreated"/>
10245 state (i.e. must not have an existing storage unit). Upon successful
10246 completion, this operation will set the type of the target medium to
10247 <link to="MediumType_Normal"/> and create a storage unit necessary to
10248 represent the differencing medium data in the given format (according
10249 to the storage format of the target object).
10250
10251 After the returned progress object reports that the operation is
10252 successfully complete, the target medium gets remembered by this
10253 VirtualBox installation and may be attached to virtual machines.
10254
10255 <note>
10256 The medium will be set to <link to="MediumState_LockedRead"/>
10257 state for the duration of this operation.
10258 </note>
10259 <result name="VBOX_E_OBJECT_IN_USE">
10260 Medium not in @c NotCreated state.
10261 </result>
10262 </desc>
10263 <param name="target" type="IMedium" dir="in">
10264 <desc>Target medium.</desc>
10265 </param>
10266 <param name="variant" type="MediumVariant" dir="in">
10267 <desc>Exact image variant which should be created.</desc>
10268 </param>
10269 <param name="progress" type="IProgress" dir="return">
10270 <desc>Progress object to track the operation completion.</desc>
10271 </param>
10272 </method>
10273
10274 <method name="mergeTo">
10275 <desc>
10276 Starts merging the contents of this medium and all intermediate
10277 differencing media in the chain to the given target medium.
10278
10279 The target medium must be either a descendant of this medium or
10280 its ancestor (otherwise this method will immediately return a failure).
10281 It follows that there are two logical directions of the merge operation:
10282 from ancestor to descendant (<i>forward merge</i>) and from descendant to
10283 ancestor (<i>backward merge</i>). Let us consider the following medium
10284 chain:
10285
10286 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
10287
10288 Here, calling this method on the <tt>Base</tt> medium object with
10289 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
10290 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
10291 merge. Note that in both cases the contents of the resulting medium
10292 will be the same, the only difference is the medium object that takes
10293 the result of the merge operation. In case of the forward merge in the
10294 above example, the result will be written to <tt>Diff_2</tt>; in case of
10295 the backward merge, the result will be written to <tt>Base</tt>. In
10296 other words, the result of the operation is always stored in the target
10297 medium.
10298
10299 Upon successful operation completion, the storage units of all media in
10300 the chain between this (source) medium and the target medium, including
10301 the source medium itself, will be automatically deleted and the
10302 relevant medium objects (including this medium) will become
10303 uninitialized. This means that any attempt to call any of
10304 their methods or attributes will fail with the
10305 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
10306 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
10307 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
10308 Note that <tt>Diff_2</tt> in this case will become a base medium
10309 itself since it will no longer be based on any other medium.
10310
10311 Considering the above, all of the following conditions must be met in
10312 order for the merge operation to succeed:
10313 <ul>
10314 <li>
10315 Neither this (source) medium nor any intermediate
10316 differencing medium in the chain between it and the target
10317 medium is attached to any virtual machine.
10318 </li>
10319 <li>
10320 Neither the source medium nor the target medium is an
10321 <link to="MediumType_Immutable"/> medium.
10322 </li>
10323 <li>
10324 The part of the medium tree from the source medium to the
10325 target medium is a linear chain, i.e. all medium in this
10326 chain have exactly one child which is the next medium in this
10327 chain. The only exception from this rule is the target medium in
10328 the forward merge operation; it is allowed to have any number of
10329 child media because the merge operation will not change its
10330 logical contents (as it is seen by the guest OS or by children).
10331 </li>
10332 <li>
10333 None of the involved media are in
10334 <link to="MediumState_LockedRead"/> or
10335 <link to="MediumState_LockedWrite"/> state.
10336 </li>
10337 </ul>
10338
10339 <note>
10340 This (source) medium and all intermediates will be placed to <link
10341 to="MediumState_Deleting"/> state and the target medium will be
10342 placed to <link to="MediumState_LockedWrite"/> state and for the
10343 duration of this operation.
10344 </note>
10345 </desc>
10346 <param name="targetId" type="uuid" mod="string" dir="in">
10347 <desc>UUID of the target ancestor or descendant medium.</desc>
10348 </param>
10349 <param name="progress" type="IProgress" dir="return">
10350 <desc>Progress object to track the operation completion.</desc>
10351 </param>
10352 </method>
10353
10354 <!-- clone method -->
10355
10356 <method name="cloneTo">
10357 <desc>
10358 Starts creating a clone of this medium in the format and at the
10359 location defined by the @a target argument.
10360
10361 The target medium must be either in <link to="MediumState_NotCreated"/>
10362 state (i.e. must not have an existing storage unit) or in
10363 <link to="MediumState_Created"/> state (i.e. created and not locked, and
10364 big enough to hold the data or else the copy will be partial). Upon
10365 successful completion, the cloned medium will contain exactly the
10366 same sector data as the medium being cloned, except that in the
10367 first case a new UUID for the clone will be randomly generated, and in
10368 the second case the UUID will remain unchanged.
10369
10370 The @a parent argument defines which medium will be the parent
10371 of the clone. Passing a @c null reference indicates that the clone will
10372 be a base image, i.e. completely independent. It is possible to specify
10373 an arbitrary medium for this parameter, including the parent of the
10374 medium which is being cloned. Even cloning to a child of the source
10375 medium is possible. Note that when cloning to an existing image, the
10376 @a parent irgument is ignored.
10377
10378 After the returned progress object reports that the operation is
10379 successfully complete, the target medium gets remembered by this
10380 VirtualBox installation and may be attached to virtual machines.
10381
10382 <note>
10383 This medium will be placed to <link to="MediumState_LockedRead"/>
10384 state for the duration of this operation.
10385 </note>
10386 <result name="E_NOTIMPL">
10387 The specified cloning variant is not supported at the moment.
10388 </result>
10389 </desc>
10390 <param name="target" type="IMedium" dir="in">
10391 <desc>Target medium.</desc>
10392 </param>
10393 <param name="variant" type="MediumVariant" dir="in">
10394 <desc>Exact image variant which should be created.</desc>
10395 </param>
10396 <param name="parent" type="IMedium" dir="in">
10397 <desc>Parent of the cloned medium.</desc>
10398 </param>
10399 <param name="progress" type="IProgress" dir="return">
10400 <desc>Progress object to track the operation completion.</desc>
10401 </param>
10402 </method>
10403
10404 <!-- other methods -->
10405
10406 <method name="compact">
10407 <desc>
10408 Starts compacting of this medium. This means that the medium is
10409 transformed into a possibly more compact storage representation.
10410 This potentially creates temporary images, which can require a
10411 substantial amount of additional disk space.
10412
10413 This medium will be placed to <link to="MediumState_LockedWrite"/>
10414 state and all its parent media (if any) will be placed to
10415 <link to="MediumState_LockedRead"/> state for the duration of this
10416 operation.
10417
10418 Please note that the results can be either returned straight away,
10419 or later as the result of the background operation via the object
10420 returned via the @a progress parameter.
10421
10422 <result name="VBOX_E_NOT_SUPPORTED">
10423 Medium format does not support compacting (but potentially
10424 needs it).
10425 </result>
10426 </desc>
10427 <param name="progress" type="IProgress" dir="return">
10428 <desc>Progress object to track the operation completion.</desc>
10429 </param>
10430 </method>
10431
10432 <method name="resize">
10433 <desc>
10434 Starts resizing this medium. This means that the nominal size of the
10435 medium is set to the new value. Both increasing and decreasing the
10436 size is possible, and there are no safety checks, since VirtualBox
10437 does not make any assumptions about the medium contents.
10438
10439 Resizing usually needs additional disk space, and possibly also
10440 some temporary disk space. Note that resize does not create a full
10441 temporary copy of the medium, so the additional disk space requirement
10442 is usually much lower than using the clone operation.
10443
10444 This medium will be placed to <link to="MediumState_LockedWrite"/>
10445 state for the duration of this operation.
10446
10447 Please note that the results can be either returned straight away,
10448 or later as the result of the background operation via the object
10449 returned via the @a progress parameter.
10450
10451 <result name="VBOX_E_NOT_SUPPORTED">
10452 Medium format does not support resizing.
10453 </result>
10454 </desc>
10455 <param name="logicalSize" type="unsigned long long" dir="in">
10456 <desc>New nominal capacity of the medium in megabytes.</desc>
10457 </param>
10458 <param name="progress" type="IProgress" dir="return">
10459 <desc>Progress object to track the operation completion.</desc>
10460 </param>
10461 </method>
10462
10463 <method name="reset">
10464 <desc>
10465 Starts erasing the contents of this differencing medium.
10466
10467 This operation will reset the differencing medium to its initial
10468 state when it does not contain any sector data and any read operation is
10469 redirected to its parent medium. This automatically gets called
10470 during VM power-up for every medium whose <link to="#autoReset" />
10471 attribute is @c true.
10472
10473 The medium will be write-locked for the duration of this operation (see
10474 <link to="#lockWrite" />).
10475
10476 <result name="VBOX_E_NOT_SUPPORTED">
10477 This is not a differencing medium.
10478 </result>
10479 <result name="VBOX_E_INVALID_OBJECT_STATE">
10480 Medium is not in <link to="MediumState_Created"/> or
10481 <link to="MediumState_Inaccessible"/> state.
10482 </result>
10483 </desc>
10484 <param name="progress" type="IProgress" dir="return">
10485 <desc>Progress object to track the operation completion.</desc>
10486 </param>
10487 </method>
10488
10489 </interface>
10490
10491
10492 <!--
10493 // IMediumFormat
10494 /////////////////////////////////////////////////////////////////////////
10495 -->
10496
10497 <enum
10498 name="DataType"
10499 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
10500 >
10501 <const name="Int32" value="0"/>
10502 <const name="Int8" value="1"/>
10503 <const name="String" value="2"/>
10504 </enum>
10505
10506 <enum
10507 name="DataFlags"
10508 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
10509 >
10510 <const name="None" value="0x00"/>
10511 <const name="Mandatory" value="0x01"/>
10512 <const name="Expert" value="0x02"/>
10513 <const name="Array" value="0x04"/>
10514 <const name="FlagMask" value="0x07"/>
10515 </enum>
10516
10517 <enum
10518 name="MediumFormatCapabilities"
10519 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
10520 >
10521 <desc>
10522 Medium format capability flags.
10523 </desc>
10524
10525 <const name="Uuid" value="0x01">
10526 <desc>
10527 Supports UUIDs as expected by VirtualBox code.
10528 </desc>
10529 </const>
10530
10531 <const name="CreateFixed" value="0x02">
10532 <desc>
10533 Supports creating fixed size images, allocating all space instantly.
10534 </desc>
10535 </const>
10536
10537 <const name="CreateDynamic" value="0x04">
10538 <desc>
10539 Supports creating dynamically growing images, allocating space on
10540 demand.
10541 </desc>
10542 </const>
10543
10544 <const name="CreateSplit2G" value="0x08">
10545 <desc>
10546 Supports creating images split in chunks of a bit less than 2 GBytes.
10547 </desc>
10548 </const>
10549
10550 <const name="Differencing" value="0x10">
10551 <desc>
10552 Supports being used as a format for differencing media (see <link
10553 to="IMedium::createDiffStorage"/>).
10554 </desc>
10555 </const>
10556
10557 <const name="Asynchronous" value="0x20">
10558 <desc>
10559 Supports asynchronous I/O operations for at least some configurations.
10560 </desc>
10561 </const>
10562
10563 <const name="File" value="0x40">
10564 <desc>
10565 The format backend operates on files (the <link to="IMedium::location"/>
10566 attribute of the medium specifies a file used to store medium
10567 data; for a list of supported file extensions see
10568 <link to="IMediumFormat::fileExtensions"/>).
10569 </desc>
10570 </const>
10571
10572 <const name="Properties" value="0x80">
10573 <desc>
10574 The format backend uses the property interface to configure the storage
10575 location and properties (the <link to="IMediumFormat::describeProperties"/>
10576 method is used to get access to properties supported by the given medium format).
10577 </desc>
10578 </const>
10579
10580 <const name="CapabilityMask" value="0xFF"/>
10581 </enum>
10582
10583 <interface
10584 name="IMediumFormat" extends="$unknown"
10585 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
10586 wsmap="managed"
10587 >
10588 <desc>
10589 The IMediumFormat interface represents a medium format.
10590
10591 Each medium format has an associated backend which is used to handle
10592 media stored in this format. This interface provides information
10593 about the properties of the associated backend.
10594
10595 Each medium format is identified by a string represented by the
10596 <link to="#id"/> attribute. This string is used in calls like
10597 <link to="IVirtualBox::createHardDisk"/> to specify the desired
10598 format.
10599
10600 The list of all supported medium formats can be obtained using
10601 <link to="ISystemProperties::mediaFormats"/>.
10602
10603 <see>IMedium</see>
10604 </desc>
10605
10606 <attribute name="id" type="wstring" readonly="yes">
10607 <desc>
10608 Identifier of this format.
10609
10610 The format identifier is a non-@c null non-empty ASCII string. Note that
10611 this string is case-insensitive. This means that, for example, all of
10612 the following strings:
10613 <pre>
10614 "VDI"
10615 "vdi"
10616 "VdI"</pre>
10617 refer to the same medium format.
10618
10619 This string is used in methods of other interfaces where it is necessary
10620 to specify a medium format, such as
10621 <link to="IVirtualBox::createHardDisk"/>.
10622 </desc>
10623 </attribute>
10624
10625 <attribute name="name" type="wstring" readonly="yes">
10626 <desc>
10627 Human readable description of this format.
10628
10629 Mainly for use in file open dialogs.
10630 </desc>
10631 </attribute>
10632
10633 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
10634 <desc>
10635 Array of strings containing the supported file extensions.
10636
10637 The first extension in the array is the extension preferred by the
10638 backend. It is recommended to use this extension when specifying a
10639 location of the storage unit for a new medium.
10640
10641 Note that some backends do not work on files, so this array may be
10642 empty.
10643
10644 <see>IMediumFormat::capabilities</see>
10645 </desc>
10646 </attribute>
10647
10648 <attribute name="capabilities" type="unsigned long" readonly="yes">
10649 <desc>
10650 Capabilities of the format as a set of bit flags.
10651
10652 For the meaning of individual capability flags see
10653 <link to="MediumFormatCapabilities"/>.
10654 </desc>
10655 </attribute>
10656
10657 <method name="describeProperties">
10658 <desc>
10659 Returns several arrays describing the properties supported by this
10660 format.
10661
10662 An element with the given index in each array describes one
10663 property. Thus, the number of elements in each returned array is the
10664 same and corresponds to the number of supported properties.
10665
10666 The returned arrays are filled in only if the
10667 <link to="MediumFormatCapabilities_Properties"/> flag is set.
10668 All arguments must be non-@c null.
10669
10670 <see>DataType</see>
10671 <see>DataFlags</see>
10672 </desc>
10673
10674 <param name="names" type="wstring" safearray="yes" dir="out">
10675 <desc>Array of property names.</desc>
10676 </param>
10677 <param name="description" type="wstring" safearray="yes" dir="out">
10678 <desc>Array of property descriptions.</desc>
10679 </param>
10680 <param name="types" type="DataType" safearray="yes" dir="out">
10681 <desc>Array of property types.</desc>
10682 </param>
10683 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10684 <desc>Array of property flags.</desc>
10685 </param>
10686 <param name="defaults" type="wstring" safearray="yes" dir="out">
10687 <desc>Array of default property values.</desc>
10688 </param>
10689 </method>
10690
10691 </interface>
10692
10693
10694 <!--
10695 // IKeyboard
10696 /////////////////////////////////////////////////////////////////////////
10697 -->
10698
10699 <interface
10700 name="IKeyboard" extends="$unknown"
10701 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10702 wsmap="managed"
10703 >
10704 <desc>
10705 The IKeyboard interface represents the virtual machine's keyboard. Used
10706 in <link to="IConsole::keyboard"/>.
10707
10708 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10709 to the virtual machine.
10710
10711 </desc>
10712 <method name="putScancode">
10713 <desc>Sends a scancode to the keyboard.
10714
10715 <result name="VBOX_E_IPRT_ERROR">
10716 Could not send scan code to virtual keyboard.
10717 </result>
10718
10719 </desc>
10720 <param name="scancode" type="long" dir="in"/>
10721 </method>
10722
10723 <method name="putScancodes">
10724 <desc>Sends an array of scancodes to the keyboard.
10725
10726 <result name="VBOX_E_IPRT_ERROR">
10727 Could not send all scan codes to virtual keyboard.
10728 </result>
10729
10730 </desc>
10731 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10732 <param name="codesStored" type="unsigned long" dir="return"/>
10733 </method>
10734
10735 <method name="putCAD">
10736 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10737 function is nothing special, it is just a convenience function
10738 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10739
10740 <result name="VBOX_E_IPRT_ERROR">
10741 Could not send all scan codes to virtual keyboard.
10742 </result>
10743
10744 </desc>
10745 </method>
10746
10747 </interface>
10748
10749
10750 <!--
10751 // IMouse
10752 /////////////////////////////////////////////////////////////////////////
10753 -->
10754
10755 <enum
10756 name="MouseButtonState"
10757 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10758 >
10759 <desc>
10760 Mouse button state.
10761 </desc>
10762
10763 <const name="LeftButton" value="0x01"/>
10764 <const name="RightButton" value="0x02"/>
10765 <const name="MiddleButton" value="0x04"/>
10766 <const name="WheelUp" value="0x08"/>
10767 <const name="WheelDown" value="0x10"/>
10768 <const name="XButton1" value="0x20"/>
10769 <const name="XButton2" value="0x40"/>
10770 <const name="MouseStateMask" value="0x7F"/>
10771 </enum>
10772
10773 <interface
10774 name="IMouse" extends="$unknown"
10775 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10776 wsmap="managed"
10777 >
10778 <desc>
10779 The IMouse interface represents the virtual machine's mouse. Used in
10780 <link to="IConsole::mouse"/>.
10781
10782 Through this interface, the virtual machine's virtual mouse can be
10783 controlled.
10784 </desc>
10785
10786 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10787 <desc>
10788 Whether the guest OS supports absolute mouse pointer positioning
10789 or not.
10790 <note>
10791 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10792 callback to be instantly informed about changes of this attribute
10793 during virtual machine execution.
10794 </note>
10795 <see><link to="#putMouseEventAbsolute"/></see>
10796 </desc>
10797 </attribute>
10798
10799 <attribute name="relativeSupported" type="boolean" readonly="yes">
10800 <desc>
10801 Whether the guest OS supports relative mouse pointer positioning
10802 or not.
10803 <note>
10804 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10805 callback to be instantly informed about changes of this attribute
10806 during virtual machine execution.
10807 </note>
10808 <see><link to="#putMouseEvent"/></see>
10809 </desc>
10810 </attribute>
10811
10812 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10813 <desc>
10814 Whether the guest OS can currently switch to drawing it's own mouse
10815 cursor on demand.
10816 <note>
10817 You can use the <link to="IConsoleCallback::onMouseCapabilityChange"/>
10818 callback to be instantly informed about changes of this attribute
10819 during virtual machine execution.
10820 </note>
10821 <see><link to="#putMouseEvent"/></see>
10822 </desc>
10823 </attribute>
10824
10825 <method name="putMouseEvent">
10826 <desc>
10827 Initiates a mouse event using relative pointer movements
10828 along x and y axis.
10829
10830 <result name="E_ACCESSDENIED">
10831 Console not powered up.
10832 </result>
10833 <result name="VBOX_E_IPRT_ERROR">
10834 Could not send mouse event to virtual mouse.
10835 </result>
10836
10837 </desc>
10838
10839 <param name="dx" type="long" dir="in">
10840 <desc>
10841 Amount of pixels the mouse should move to the right.
10842 Negative values move the mouse to the left.
10843 </desc>
10844 </param>
10845 <param name="dy" type="long" dir="in">
10846 <desc>
10847 Amount of pixels the mouse should move downwards.
10848 Negative values move the mouse upwards.
10849 </desc>
10850 </param>
10851 <param name="dz" type="long" dir="in">
10852 <desc>
10853 Amount of mouse wheel moves.
10854 Positive values describe clockwise wheel rotations,
10855 negative values describe counterclockwise rotations.
10856 </desc>
10857 </param>
10858 <param name="dw" type="long" dir="in">
10859 <desc>
10860 Amount of horizontal mouse wheel moves.
10861 Positive values describe a movement to the left,
10862 negative values describe a movement to the right.
10863 </desc>
10864 </param>
10865 <param name="buttonState" type="long" dir="in">
10866 <desc>
10867 The current state of mouse buttons. Every bit represents
10868 a mouse button as follows:
10869 <table>
10870 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10871 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10872 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10873 </table>
10874 A value of <tt>1</tt> means the corresponding button is pressed.
10875 otherwise it is released.
10876 </desc>
10877 </param>
10878 </method>
10879
10880 <method name="putMouseEventAbsolute">
10881 <desc>
10882 Positions the mouse pointer using absolute x and y coordinates.
10883 These coordinates are expressed in pixels and
10884 start from <tt>[1,1]</tt> which corresponds to the top left
10885 corner of the virtual display.
10886
10887 <result name="E_ACCESSDENIED">
10888 Console not powered up.
10889 </result>
10890 <result name="VBOX_E_IPRT_ERROR">
10891 Could not send mouse event to virtual mouse.
10892 </result>
10893
10894 <note>
10895 This method will have effect only if absolute mouse
10896 positioning is supported by the guest OS.
10897 </note>
10898
10899 <see><link to="#absoluteSupported"/></see>
10900 </desc>
10901
10902 <param name="x" type="long" dir="in">
10903 <desc>
10904 X coordinate of the pointer in pixels, starting from @c 1.
10905 </desc>
10906 </param>
10907 <param name="y" type="long" dir="in">
10908 <desc>
10909 Y coordinate of the pointer in pixels, starting from @c 1.
10910 </desc>
10911 </param>
10912 <param name="dz" type="long" dir="in">
10913 <desc>
10914 Amount of mouse wheel moves.
10915 Positive values describe clockwise wheel rotations,
10916 negative values describe counterclockwise rotations.
10917 </desc>
10918 </param>
10919 <param name="dw" type="long" dir="in">
10920 <desc>
10921 Amount of horizontal mouse wheel moves.
10922 Positive values describe a movement to the left,
10923 negative values describe a movement to the right.
10924 </desc>
10925 </param>
10926 <param name="buttonState" type="long" dir="in">
10927 <desc>
10928 The current state of mouse buttons. Every bit represents
10929 a mouse button as follows:
10930 <table>
10931 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10932 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10933 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10934 </table>
10935 A value of @c 1 means the corresponding button is pressed.
10936 otherwise it is released.
10937 </desc>
10938 </param>
10939 </method>
10940
10941 </interface>
10942
10943 <!--
10944 // IDisplay
10945 /////////////////////////////////////////////////////////////////////////
10946 -->
10947
10948 <enum
10949 name="FramebufferPixelFormat"
10950 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10951 >
10952 <desc>
10953 Format of the video memory buffer. Constants represented by this enum can
10954 be used to test for particular values of <link
10955 to="IFramebuffer::pixelFormat"/>. See also <link
10956 to="IFramebuffer::requestResize"/>.
10957
10958 See also www.fourcc.org for more information about FOURCC pixel formats.
10959 </desc>
10960
10961 <const name="Opaque" value="0">
10962 <desc>
10963 Unknown buffer format (the user may not assume any particular format of
10964 the buffer).
10965 </desc>
10966 </const>
10967 <const name="FOURCC_RGB" value="0x32424752">
10968 <desc>
10969 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10970 bit layout).
10971 </desc>
10972 </const>
10973 </enum>
10974
10975 <interface
10976 name="IFramebuffer" extends="$unknown"
10977 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10978 wsmap="suppress"
10979 >
10980 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10981 <desc>Address of the start byte of the frame buffer.</desc>
10982 </attribute>
10983
10984 <attribute name="width" type="unsigned long" readonly="yes">
10985 <desc>Frame buffer width, in pixels.</desc>
10986 </attribute>
10987
10988 <attribute name="height" type="unsigned long" readonly="yes">
10989 <desc>Frame buffer height, in pixels.</desc>
10990 </attribute>
10991
10992 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10993 <desc>
10994 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10995 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, valid values
10996 are: 8, 15, 16, 24 and 32.
10997 </desc>
10998 </attribute>
10999
11000 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
11001 <desc>
11002 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
11003 to="FramebufferPixelFormat_FOURCC_RGB">FOURCC_RGB</link>, the
11004 size of the scan line must be aligned to 32 bits.
11005 </desc>
11006 </attribute>
11007
11008 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
11009 <desc>
11010 Frame buffer pixel format. It's either one of the values defined by <link
11011 to="FramebufferPixelFormat"/> or a raw FOURCC code.
11012 <note>
11013 This attribute must never return <link
11014 to="FramebufferPixelFormat_Opaque"/> -- the format of the buffer
11015 <link to="#address"/> points to must be always known.
11016 </note>
11017 </desc>
11018 </attribute>
11019
11020 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
11021 <desc>
11022 Defines whether this frame buffer uses the virtual video card's memory
11023 buffer (guest VRAM) directly or not. See <link
11024 to="IFramebuffer::requestResize"/> for more information.
11025 </desc>
11026 </attribute>
11027
11028 <attribute name="heightReduction" type="unsigned long" readonly="yes">
11029 <desc>
11030 Hint from the frame buffer about how much of the standard
11031 screen height it wants to use for itself. This information is
11032 exposed to the guest through the VESA BIOS and VMMDev interface
11033 so that it can use it for determining its video mode table. It
11034 is not guaranteed that the guest respects the value.
11035 </desc>
11036 </attribute>
11037
11038 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
11039 <desc>
11040 An alpha-blended overlay which is superposed over the frame buffer.
11041 The initial purpose is to allow the display of icons providing
11042 information about the VM state, including disk activity, in front
11043 ends which do not have other means of doing that. The overlay is
11044 designed to controlled exclusively by IDisplay. It has no locking
11045 of its own, and any changes made to it are not guaranteed to be
11046 visible until the affected portion of IFramebuffer is updated. The
11047 overlay can be created lazily the first time it is requested. This
11048 attribute can also return @c null to signal that the overlay is not
11049 implemented.
11050 </desc>
11051 </attribute>
11052
11053 <attribute name="winId" type="unsigned long long" readonly="yes">
11054 <desc>
11055 Platform-dependent identifier of the window where context of this
11056 frame buffer is drawn, or zero if there's no such window.
11057 </desc>
11058 </attribute>
11059
11060 <method name="lock">
11061 <desc>
11062 Locks the frame buffer.
11063 Gets called by the IDisplay object where this frame buffer is
11064 bound to.
11065 </desc>
11066 </method>
11067
11068 <method name="unlock">
11069 <desc>
11070 Unlocks the frame buffer.
11071 Gets called by the IDisplay object where this frame buffer is
11072 bound to.
11073 </desc>
11074 </method>
11075
11076 <method name="notifyUpdate">
11077 <desc>
11078 Informs about an update.
11079 Gets called by the display object where this buffer is
11080 registered.
11081 </desc>
11082 <param name="x" type="unsigned long" dir="in"/>
11083 <param name="y" type="unsigned long" dir="in"/>
11084 <param name="width" type="unsigned long" dir="in"/>
11085 <param name="height" type="unsigned long" dir="in"/>
11086 </method>
11087
11088 <method name="requestResize">
11089 <desc>
11090 Requests a size and pixel format change.
11091
11092 There are two modes of working with the video buffer of the virtual
11093 machine. The <i>indirect</i> mode implies that the IFramebuffer
11094 implementation allocates a memory buffer for the requested display mode
11095 and provides it to the virtual machine. In <i>direct</i> mode, the
11096 IFramebuffer implementation uses the memory buffer allocated and owned
11097 by the virtual machine. This buffer represents the video memory of the
11098 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
11099 usually faster because the implementation gets a raw pointer to the
11100 guest VRAM buffer which it can directly use for visualizing the contents
11101 of the virtual display, as opposed to the indirect mode where the
11102 contents of guest VRAM are copied to the memory buffer provided by
11103 the implementation every time a display update occurs.
11104
11105 It is important to note that the direct mode is really fast only when
11106 the implementation uses the given guest VRAM buffer directly, for
11107 example, by blitting it to the window representing the virtual machine's
11108 display, which saves at least one copy operation comparing to the
11109 indirect mode. However, using the guest VRAM buffer directly is not
11110 always possible: the format and the color depth of this buffer may be
11111 not supported by the target window, or it may be unknown (opaque) as in
11112 case of text or non-linear multi-plane VGA video modes. In this case,
11113 the indirect mode (that is always available) should be used as a
11114 fallback: when the guest VRAM contents are copied to the
11115 implementation-provided memory buffer, color and format conversion is
11116 done automatically by the underlying code.
11117
11118 The @a pixelFormat parameter defines whether the direct mode is
11119 available or not. If @a pixelFormat is <link
11120 to="FramebufferPixelFormat_Opaque"/> then direct access to the guest
11121 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
11122 @a bytesPerLine parameters must be ignored and the implementation must use
11123 the indirect mode (where it provides its own buffer in one of the
11124 supported formats). In all other cases, @a pixelFormat together with
11125 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
11126 buffer pointed to by the @a VRAM parameter and the implementation is
11127 free to choose which mode to use. To indicate that this frame buffer uses
11128 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
11129 attribute must return @c true and <link to="#address"/> must
11130 return exactly the same address that is passed in the @a VRAM parameter
11131 of this method; otherwise it is assumed that the indirect strategy is
11132 chosen.
11133
11134 The @a width and @a height parameters represent the size of the
11135 requested display mode in both modes. In case of indirect mode, the
11136 provided memory buffer should be big enough to store data of the given
11137 display mode. In case of direct mode, it is guaranteed that the given
11138 @a VRAM buffer contains enough space to represent the display mode of the
11139 given size. Note that this frame buffer's <link to="#width"/> and <link
11140 to="#height"/> attributes must return exactly the same values as
11141 passed to this method after the resize is completed (see below).
11142
11143 The @a finished output parameter determines if the implementation has
11144 finished resizing the frame buffer or not. If, for some reason, the
11145 resize cannot be finished immediately during this call, @a finished
11146 must be set to @c false, and the implementation must call
11147 <link to="IDisplay::resizeCompleted"/> after it has returned from
11148 this method as soon as possible. If @a finished is @c false, the
11149 machine will not call any frame buffer methods until
11150 <link to="IDisplay::resizeCompleted"/> is called.
11151
11152 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
11153 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
11154 this frame buffer must return exactly the same values as specified in the
11155 parameters of this method, after the resize is completed. If the
11156 indirect mode is chosen, these attributes must return values describing
11157 the format of the implementation's own memory buffer <link
11158 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
11159 value must always correlate with <link to="#pixelFormat"/>. Note that
11160 the <link to="#pixelFormat"/> attribute must never return <link
11161 to="FramebufferPixelFormat_Opaque"/> regardless of the selected mode.
11162
11163 <note>
11164 This method is called by the IDisplay object under the
11165 <link to="#lock"/> provided by this IFramebuffer
11166 implementation. If this method returns @c false in @a finished, then
11167 this lock is not released until
11168 <link to="IDisplay::resizeCompleted"/> is called.
11169 </note>
11170 </desc>
11171 <param name="screenId" type="unsigned long" dir="in">
11172 <desc>
11173 Logical screen number. Must be used in the corresponding call to
11174 <link to="IDisplay::resizeCompleted"/> if this call is made.
11175 </desc>
11176 </param>
11177 <param name="pixelFormat" type="unsigned long" dir="in">
11178 <desc>
11179 Pixel format of the memory buffer pointed to by @a VRAM.
11180 See also <link to="FramebufferPixelFormat"/>.
11181 </desc>
11182 </param>
11183 <param name="VRAM" type="octet" mod="ptr" dir="in">
11184 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
11185 </param>
11186 <param name="bitsPerPixel" type="unsigned long" dir="in">
11187 <desc>Color depth, bits per pixel.</desc>
11188 </param>
11189 <param name="bytesPerLine" type="unsigned long" dir="in">
11190 <desc>Size of one scan line, in bytes.</desc>
11191 </param>
11192 <param name="width" type="unsigned long" dir="in">
11193 <desc>Width of the guest display, in pixels.</desc>
11194 </param>
11195 <param name="height" type="unsigned long" dir="in">
11196 <desc>Height of the guest display, in pixels.</desc>
11197 </param>
11198 <param name="finished" type="boolean" dir="return">
11199 <desc>
11200 Can the VM start using the new frame buffer immediately
11201 after this method returns or it should wait for
11202 <link to="IDisplay::resizeCompleted"/>.
11203 </desc>
11204 </param>
11205 </method>
11206
11207 <method name="videoModeSupported">
11208 <desc>
11209 Returns whether the frame buffer implementation is willing to
11210 support a given video mode. In case it is not able to render
11211 the video mode (or for some reason not willing), it should
11212 return @c false. Usually this method is called when the guest
11213 asks the VMM device whether a given video mode is supported
11214 so the information returned is directly exposed to the guest.
11215 It is important that this method returns very quickly.
11216 </desc>
11217 <param name="width" type="unsigned long" dir="in"/>
11218 <param name="height" type="unsigned long" dir="in"/>
11219 <param name="bpp" type="unsigned long" dir="in"/>
11220 <param name="supported" type="boolean" dir="return"/>
11221 </method>
11222
11223 <method name="getVisibleRegion">
11224 <desc>
11225 Returns the visible region of this frame buffer.
11226
11227 If the @a rectangles parameter is @c null then the value of the
11228 @a count parameter is ignored and the number of elements necessary to
11229 describe the current visible region is returned in @a countCopied.
11230
11231 If @a rectangles is not @c null but @a count is less
11232 than the required number of elements to store region data, the method
11233 will report a failure. If @a count is equal or greater than the
11234 required number of elements, then the actual number of elements copied
11235 to the provided array will be returned in @a countCopied.
11236
11237 <note>
11238 The address of the provided array must be in the process space of
11239 this IFramebuffer object.
11240 </note>
11241 <note>
11242 Method not yet implemented.
11243 </note>
11244 </desc>
11245 <param name="rectangles" type="octet" mod="ptr" dir="in">
11246 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
11247 </param>
11248 <param name="count" type="unsigned long" dir="in">
11249 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11250 </param>
11251 <param name="countCopied" type="unsigned long" dir="return">
11252 <desc>Number of elements copied to the @a rectangles array.</desc>
11253 </param>
11254 </method>
11255
11256 <method name="setVisibleRegion">
11257 <desc>
11258 Suggests a new visible region to this frame buffer. This region
11259 represents the area of the VM display which is a union of regions of
11260 all top-level windows of the guest operating system running inside the
11261 VM (if the Guest Additions for this system support this
11262 functionality). This information may be used by the frontends to
11263 implement the seamless desktop integration feature.
11264
11265 <note>
11266 The address of the provided array must be in the process space of
11267 this IFramebuffer object.
11268 </note>
11269 <note>
11270 The IFramebuffer implementation must make a copy of the provided
11271 array of rectangles.
11272 </note>
11273 <note>
11274 Method not yet implemented.
11275 </note>
11276 </desc>
11277 <param name="rectangles" type="octet" mod="ptr" dir="in">
11278 <desc>Pointer to the @c RTRECT array.</desc>
11279 </param>
11280 <param name="count" type="unsigned long" dir="in">
11281 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
11282 </param>
11283 </method>
11284
11285 <method name="processVHWACommand">
11286 <desc>
11287 Posts a Video HW Acceleration Command to the frame buffer for processing.
11288 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
11289 are posted from quest to the host to be processed by the host hardware.
11290
11291 <note>
11292 The address of the provided command must be in the process space of
11293 this IFramebuffer object.
11294 </note>
11295 </desc>
11296
11297 <param name="command" type="octet" mod="ptr" dir="in">
11298 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
11299 </param>
11300 </method>
11301
11302 </interface>
11303
11304 <interface
11305 name="IFramebufferOverlay" extends="IFramebuffer"
11306 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
11307 wsmap="suppress"
11308 >
11309 <desc>
11310 The IFramebufferOverlay interface represents an alpha blended overlay
11311 for displaying status icons above an IFramebuffer. It is always created
11312 not visible, so that it must be explicitly shown. It only covers a
11313 portion of the IFramebuffer, determined by its width, height and
11314 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
11315 that order) format, and may be written to directly. Do re-read the
11316 width though, after setting it, as it may be adjusted (increased) to
11317 make it more suitable for the front end.
11318 </desc>
11319 <attribute name="x" type="unsigned long" readonly="yes">
11320 <desc>X position of the overlay, relative to the frame buffer.</desc>
11321 </attribute>
11322
11323 <attribute name="y" type="unsigned long" readonly="yes">
11324 <desc>Y position of the overlay, relative to the frame buffer.</desc>
11325 </attribute>
11326
11327 <attribute name="visible" type="boolean" readonly="no">
11328 <desc>
11329 Whether the overlay is currently visible.
11330 </desc>
11331 </attribute>
11332
11333 <attribute name="alpha" type="unsigned long" readonly="no">
11334 <desc>
11335 The global alpha value for the overlay. This may or may not be
11336 supported by a given front end.
11337 </desc>
11338 </attribute>
11339
11340 <method name="move">
11341 <desc>
11342 Changes the overlay's position relative to the IFramebuffer.
11343 </desc>
11344 <param name="x" type="unsigned long" dir="in"/>
11345 <param name="y" type="unsigned long" dir="in"/>
11346 </method>
11347
11348 </interface>
11349
11350 <interface
11351 name="IDisplay" extends="$unknown"
11352 uuid="e2a38ebc-d854-4a3e-bc2e-fdf5ac4a0000"
11353 wsmap="managed"
11354 >
11355 <desc>
11356 The IDisplay interface represents the virtual machine's display.
11357
11358 The object implementing this interface is contained in each
11359 <link to="IConsole::display"/> attribute and represents the visual
11360 output of the virtual machine.
11361
11362 The virtual display supports pluggable output targets represented by the
11363 IFramebuffer interface. Examples of the output target are a window on
11364 the host computer or an RDP session's display on a remote computer.
11365 </desc>
11366 <attribute name="width" type="unsigned long" readonly="yes">
11367 <desc>Current display width.</desc>
11368 </attribute>
11369
11370 <attribute name="height" type="unsigned long" readonly="yes">
11371 <desc>Current display height.</desc>
11372 </attribute>
11373
11374 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
11375 <desc>
11376 Current guest display color depth. Note that this may differ
11377 from <link to="IFramebuffer::bitsPerPixel"/>.
11378 </desc>
11379 </attribute>
11380
11381 <method name="setFramebuffer">
11382 <desc>
11383 Sets the framebuffer for given screen.
11384 </desc>
11385 <param name="screenId" type="unsigned long" dir="in"/>
11386 <param name="framebuffer" type="IFramebuffer" dir="in"/>
11387 </method>
11388
11389 <method name="getFramebuffer">
11390 <desc>
11391 Queries the framebuffer for given screen.
11392 </desc>
11393 <param name="screenId" type="unsigned long" dir="in"/>
11394 <param name="framebuffer" type="IFramebuffer" dir="out"/>
11395 <param name="xOrigin" type="long" dir="out"/>
11396 <param name="yOrigin" type="long" dir="out"/>
11397 </method>
11398
11399 <method name="setVideoModeHint">
11400 <desc>
11401 Asks VirtualBox to request the given video mode from
11402 the guest. This is just a hint and it cannot be guaranteed
11403 that the requested resolution will be used. Guest Additions
11404 are required for the request to be seen by guests. The caller
11405 should issue the request and wait for a resolution change and
11406 after a timeout retry.
11407
11408 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
11409 parameters means that the corresponding values should be taken from the
11410 current video mode (i.e. left unchanged).
11411
11412 If the guest OS supports multi-monitor configuration then the @a display
11413 parameter specifies the number of the guest display to send the hint to:
11414 @c 0 is the primary display, @c 1 is the first secondary and
11415 so on. If the multi-monitor configuration is not supported, @a display
11416 must be @c 0.
11417
11418 <result name="E_INVALIDARG">
11419 The @a display is not associated with any monitor.
11420 </result>
11421
11422 </desc>
11423 <param name="width" type="unsigned long" dir="in"/>
11424 <param name="height" type="unsigned long" dir="in"/>
11425 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
11426 <param name="display" type="unsigned long" dir="in"/>
11427 </method>
11428
11429 <method name="setSeamlessMode">
11430 <desc>
11431 Enables or disables seamless guest display rendering (seamless desktop
11432 integration) mode.
11433 <note>
11434 Calling this method has no effect if <link
11435 to="IGuest::supportsSeamless"/> returns @c false.
11436 </note>
11437 </desc>
11438 <param name="enabled" type="boolean" dir="in"/>
11439 </method>
11440
11441 <method name="takeScreenShot">
11442 <desc>
11443 Takes a screen shot of the requested size and copies it to the
11444 32-bpp buffer allocated by the caller and pointed to by @a address.
11445 A pixel consists of 4 bytes in order: B, G, R, 0.
11446
11447 <note>This API can be used only by the COM/XPCOM C++ API as it
11448 requires pointer support. Use <link to="#takeScreenShotSlow" />
11449 with other language bindings.
11450 </note>
11451
11452 <result name="E_NOTIMPL">
11453 Feature not implemented.
11454 </result>
11455 <result name="VBOX_E_IPRT_ERROR">
11456 Could not take a screenshot.
11457 </result>
11458
11459 </desc>
11460 <param name="address" type="octet" mod="ptr" dir="in"/>
11461 <param name="width" type="unsigned long" dir="in"/>
11462 <param name="height" type="unsigned long" dir="in"/>
11463 </method>
11464
11465 <method name="takeScreenShotSlow">
11466 <desc>
11467 Takes a guest screen shot of the requested size and returns it as
11468 an array of bytes in uncompressed 32-bit RGBA format.
11469 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
11470
11471 This API is slow, but could be the only option to get guest screenshot
11472 for scriptable languages not allowed to manipulate with addresses
11473 directly.
11474
11475 <result name="E_NOTIMPL">
11476 Feature not implemented.
11477 </result>
11478 <result name="VBOX_E_IPRT_ERROR">
11479 Could not take a screenshot.
11480 </result>
11481 </desc>
11482 <param name="width" type="unsigned long" dir="in">
11483 <desc>
11484 Desired image width.
11485 </desc>
11486 </param>
11487 <param name="height" type="unsigned long" dir="in">
11488 <desc>
11489 Desired image height.
11490 </desc>
11491 </param>
11492 <param name="screenData" type="octet" dir="return" safearray="yes">
11493 <desc>
11494 Array with resulting screen data.
11495 </desc>
11496 </param>
11497 </method>
11498
11499 <method name="drawToScreen">
11500 <desc>
11501 Draws a 32-bpp image of the specified size from the given buffer
11502 to the given point on the VM display.
11503
11504 <result name="E_NOTIMPL">
11505 Feature not implemented.
11506 </result>
11507 <result name="VBOX_E_IPRT_ERROR">
11508 Could not draw to screen.
11509 </result>
11510
11511 </desc>
11512 <param name="address" type="octet" mod="ptr" dir="in"/>
11513 <param name="x" type="unsigned long" dir="in"/>
11514 <param name="y" type="unsigned long" dir="in"/>
11515 <param name="width" type="unsigned long" dir="in"/>
11516 <param name="height" type="unsigned long" dir="in"/>
11517 </method>
11518
11519 <method name="invalidateAndUpdate">
11520 <desc>
11521 Does a full invalidation of the VM display and instructs the VM
11522 to update it.
11523
11524 <result name="VBOX_E_IPRT_ERROR">
11525 Could not invalidate and update screen.
11526 </result>
11527
11528 </desc>
11529 </method>
11530
11531 <method name="resizeCompleted">
11532 <desc>
11533 Signals that a framebuffer has completed the resize operation.
11534
11535 <result name="VBOX_E_NOT_SUPPORTED">
11536 Operation only valid for external frame buffers.
11537 </result>
11538
11539 </desc>
11540 <param name="screenId" type="unsigned long" dir="in"/>
11541 </method>
11542
11543 <method name="updateCompleted">
11544 <desc>
11545 Signals that a framebuffer has completed the update operation.
11546
11547 <result name="VBOX_E_NOT_SUPPORTED">
11548 Operation only valid for external frame buffers.
11549 </result>
11550
11551 </desc>
11552 </method>
11553
11554 <method name="completeVHWACommand">
11555 <desc>
11556 Signals that the Video HW Acceleration command has completed.
11557 </desc>
11558
11559 <param name="command" type="octet" mod="ptr" dir="in">
11560 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
11561 </param>
11562 </method>
11563
11564 </interface>
11565
11566 <!--
11567 // INetworkAdapter
11568 /////////////////////////////////////////////////////////////////////////
11569 -->
11570
11571 <enum
11572 name="NetworkAttachmentType"
11573 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
11574 >
11575 <desc>
11576 Network attachment type.
11577 </desc>
11578
11579 <const name="Null" value="0">
11580 <desc>Null value, also means "not attached".</desc>
11581 </const>
11582 <const name="NAT" value="1"/>
11583 <const name="Bridged" value="2"/>
11584 <const name="Internal" value="3"/>
11585 <const name="HostOnly" value="4"/>
11586 </enum>
11587
11588 <enum
11589 name="NetworkAdapterType"
11590 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
11591 >
11592 <desc>
11593 Network adapter type.
11594 </desc>
11595
11596 <const name="Null" value="0">
11597 <desc>Null value (never used by the API).</desc>
11598 </const>
11599 <const name="Am79C970A" value="1">
11600 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
11601 </const>
11602 <const name="Am79C973" value="2">
11603 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
11604 </const>
11605 <const name="I82540EM" value="3">
11606 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
11607 </const>
11608 <const name="I82543GC" value="4">
11609 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
11610 </const>
11611 <const name="I82545EM" value="5">
11612 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
11613 </const>
11614 <const name="Virtio" value="6">
11615 <desc>Virtio network device.</desc>
11616 </const>
11617 </enum>
11618
11619 <interface
11620 name="INetworkAdapter" extends="$unknown"
11621 uuid="65607a27-2b73-4d43-b4cc-0ba2c817fbde"
11622 wsmap="managed"
11623 >
11624 <desc>
11625 Represents a virtual network adapter that is attached to a virtual machine.
11626 Each virtual machine has a fixed number of network adapter slots with one
11627 instance of this attached to each of them. Call
11628 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
11629 is attached to a given slot in a given machine.
11630
11631 Each network adapter can be in one of five attachment modes, which are
11632 represented by the <link to="NetworkAttachmentType" /> enumeration;
11633 see the <link to="#attachmentType" /> attribute.
11634 </desc>
11635
11636 <attribute name="adapterType" type="NetworkAdapterType">
11637 <desc>
11638 Type of the virtual network adapter. Depending on this value,
11639 VirtualBox will provide a different virtual network hardware
11640 to the guest.
11641 </desc>
11642 </attribute>
11643
11644 <attribute name="slot" type="unsigned long" readonly="yes">
11645 <desc>
11646 Slot number this adapter is plugged into. Corresponds to
11647 the value you pass to <link to="IMachine::getNetworkAdapter"/>
11648 to obtain this instance.
11649 </desc>
11650 </attribute>
11651
11652 <attribute name="enabled" type="boolean">
11653 <desc>
11654 Flag whether the network adapter is present in the
11655 guest system. If disabled, the virtual guest hardware will
11656 not contain this network adapter. Can only be changed when
11657 the VM is not running.
11658 </desc>
11659 </attribute>
11660
11661 <attribute name="MACAddress" type="wstring">
11662 <desc>
11663 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11664 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11665 </desc>
11666 </attribute>
11667
11668 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11669
11670 <attribute name="hostInterface" type="wstring">
11671 <desc>
11672 Name of the host network interface the VM is attached to.
11673 </desc>
11674 </attribute>
11675
11676 <attribute name="internalNetwork" type="wstring">
11677 <desc>
11678 Name of the internal network the VM is attached to.
11679 </desc>
11680 </attribute>
11681
11682 <attribute name="NATNetwork" type="wstring">
11683 <desc>
11684 Name of the NAT network the VM is attached to.
11685 </desc>
11686 </attribute>
11687
11688 <attribute name="cableConnected" type="boolean">
11689 <desc>
11690 Flag whether the adapter reports the cable as connected or not.
11691 It can be used to report offline situations to a VM.
11692 </desc>
11693 </attribute>
11694
11695 <attribute name="lineSpeed" type="unsigned long">
11696 <desc>
11697 Line speed reported by custom drivers, in units of 1 kbps.
11698 </desc>
11699 </attribute>
11700
11701 <attribute name="traceEnabled" type="boolean">
11702 <desc>
11703 Flag whether network traffic from/to the network card should be traced.
11704 Can only be toggled when the VM is turned off.
11705 </desc>
11706 </attribute>
11707
11708 <attribute name="traceFile" type="wstring">
11709 <desc>
11710 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11711 will be used.
11712 </desc>
11713 </attribute>
11714
11715 <method name="attachToNAT">
11716 <desc>
11717 Attach the network adapter to the Network Address Translation (NAT) interface.
11718 </desc>
11719 </method>
11720
11721 <method name="attachToBridgedInterface">
11722 <desc>
11723 Attach the network adapter to a bridged host interface.
11724 </desc>
11725 </method>
11726
11727 <method name="attachToInternalNetwork">
11728 <desc>
11729 Attach the network adapter to an internal network.
11730 </desc>
11731 </method>
11732
11733 <method name="attachToHostOnlyInterface">
11734 <desc>
11735 Attach the network adapter to the host-only network.
11736 </desc>
11737 </method>
11738
11739 <method name="detach">
11740 <desc>
11741 Detach the network adapter
11742 </desc>
11743 </method>
11744 </interface>
11745
11746
11747 <!--
11748 // ISerialPort
11749 /////////////////////////////////////////////////////////////////////////
11750 -->
11751
11752 <enum
11753 name="PortMode"
11754 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11755 >
11756 <desc>
11757 The PortMode enumeration represents possible communication modes for
11758 the virtual serial port device.
11759 </desc>
11760
11761 <const name="Disconnected" value="0">
11762 <desc>Virtual device is not attached to any real host device.</desc>
11763 </const>
11764 <const name="HostPipe" value="1">
11765 <desc>Virtual device is attached to a host pipe.</desc>
11766 </const>
11767 <const name="HostDevice" value="2">
11768 <desc>Virtual device is attached to a host device.</desc>
11769 </const>
11770 <const name="RawFile" value="3">
11771 <desc>Virtual device is attached to a raw file.</desc>
11772 </const>
11773 </enum>
11774
11775 <interface
11776 name="ISerialPort" extends="$unknown"
11777 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11778 wsmap="managed"
11779 >
11780
11781 <desc>
11782 The ISerialPort interface represents the virtual serial port device.
11783
11784 The virtual serial port device acts like an ordinary serial port
11785 inside the virtual machine. This device communicates to the real
11786 serial port hardware in one of two modes: host pipe or host device.
11787
11788 In host pipe mode, the #path attribute specifies the path to the pipe on
11789 the host computer that represents a serial port. The #server attribute
11790 determines if this pipe is created by the virtual machine process at
11791 machine startup or it must already exist before starting machine
11792 execution.
11793
11794 In host device mode, the #path attribute specifies the name of the
11795 serial port device on the host computer.
11796
11797 There is also a third communication mode: the disconnected mode. In this
11798 mode, the guest OS running inside the virtual machine will be able to
11799 detect the serial port, but all port write operations will be discarded
11800 and all port read operations will return no data.
11801
11802 <see>IMachine::getSerialPort</see>
11803 </desc>
11804
11805 <attribute name="slot" type="unsigned long" readonly="yes">
11806 <desc>
11807 Slot number this serial port is plugged into. Corresponds to
11808 the value you pass to <link to="IMachine::getSerialPort"/>
11809 to obtain this instance.
11810 </desc>
11811 </attribute>
11812
11813 <attribute name="enabled" type="boolean">
11814 <desc>
11815 Flag whether the serial port is enabled. If disabled,
11816 the serial port will not be reported to the guest OS.
11817 </desc>
11818 </attribute>
11819
11820 <attribute name="IOBase" type="unsigned long">
11821 <desc>Base I/O address of the serial port.</desc>
11822 </attribute>
11823
11824 <attribute name="IRQ" type="unsigned long">
11825 <desc>IRQ number of the serial port.</desc>
11826 </attribute>
11827
11828 <attribute name="hostMode" type="PortMode">
11829 <desc>
11830 How is this port connected to the host.
11831 <note>
11832 Changing this attribute may fail if the conditions for
11833 <link to="#path"/> are not met.
11834 </note>
11835 </desc>
11836 </attribute>
11837
11838 <attribute name="server" type="boolean">
11839 <desc>
11840 Flag whether this serial port acts as a server (creates a new pipe on
11841 the host) or as a client (uses the existing pipe). This attribute is
11842 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11843 </desc>
11844 </attribute>
11845
11846 <attribute name="path" type="wstring">
11847 <desc>
11848 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11849 PortMode_HostPipe, or the host serial device name when
11850 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11851 cases, setting a @c null or empty string as the attribute's value
11852 is an error. Otherwise, the value of this property is ignored.
11853 </desc>
11854 </attribute>
11855
11856 </interface>
11857
11858 <!--
11859 // IParallelPort
11860 /////////////////////////////////////////////////////////////////////////
11861 -->
11862
11863 <interface
11864 name="IParallelPort" extends="$unknown"
11865 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11866 wsmap="managed"
11867 >
11868
11869 <desc>
11870 The IParallelPort interface represents the virtual parallel port device.
11871
11872 The virtual parallel port device acts like an ordinary parallel port
11873 inside the virtual machine. This device communicates to the real
11874 parallel port hardware using the name of the parallel device on the host
11875 computer specified in the #path attribute.
11876
11877 Each virtual parallel port device is assigned a base I/O address and an
11878 IRQ number that will be reported to the guest operating system and used
11879 to operate the given parallel port from within the virtual machine.
11880
11881 <see>IMachine::getParallelPort</see>
11882 </desc>
11883
11884 <attribute name="slot" type="unsigned long" readonly="yes">
11885 <desc>
11886 Slot number this parallel port is plugged into. Corresponds to
11887 the value you pass to <link to="IMachine::getParallelPort"/>
11888 to obtain this instance.
11889 </desc>
11890 </attribute>
11891
11892 <attribute name="enabled" type="boolean">
11893 <desc>
11894 Flag whether the parallel port is enabled. If disabled,
11895 the parallel port will not be reported to the guest OS.
11896 </desc>
11897 </attribute>
11898
11899 <attribute name="IOBase" type="unsigned long">
11900 <desc>Base I/O address of the parallel port.</desc>
11901 </attribute>
11902
11903 <attribute name="IRQ" type="unsigned long">
11904 <desc>IRQ number of the parallel port.</desc>
11905 </attribute>
11906
11907 <attribute name="path" type="wstring">
11908 <desc>
11909 Host parallel device name. If this parallel port is enabled, setting a
11910 @c null or an empty string as this attribute's value will result into
11911 an error.
11912 </desc>
11913 </attribute>
11914
11915 </interface>
11916
11917
11918 <!--
11919 // IMachineDebugger
11920 /////////////////////////////////////////////////////////////////////////
11921 -->
11922
11923 <interface
11924 name="IMachineDebugger" extends="$unknown"
11925 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11926 wsmap="suppress"
11927 >
11928 <method name="resetStats">
11929 <desc>
11930 Reset VM statistics.
11931 </desc>
11932 <param name="pattern" type="wstring" dir="in">
11933 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11934 </param>
11935 </method>
11936
11937 <method name="dumpStats">
11938 <desc>
11939 Dumps VM statistics.
11940 </desc>
11941 <param name="pattern" type="wstring" dir="in">
11942 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11943 </param>
11944 </method>
11945
11946 <method name="getStats">
11947 <desc>
11948 Get the VM statistics in a XMLish format.
11949 </desc>
11950 <param name="pattern" type="wstring" dir="in">
11951 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11952 </param>
11953 <param name="withDescriptions" type="boolean" dir="in">
11954 <desc>Whether to include the descriptions.</desc>
11955 </param>
11956 <param name="stats" type="wstring" dir="out">
11957 <desc>The XML document containing the statistics.</desc>
11958 </param>
11959 </method>
11960
11961 <method name="injectNMI">
11962 <desc>
11963 Inject an NMI into a running VT-x/AMD-V VM.
11964 </desc>
11965 </method>
11966
11967 <attribute name="singlestep" type="boolean">
11968 <desc>Switch for enabling singlestepping.</desc>
11969 </attribute>
11970
11971 <attribute name="recompileUser" type="boolean">
11972 <desc>Switch for forcing code recompilation for user mode code.</desc>
11973 </attribute>
11974
11975 <attribute name="recompileSupervisor" type="boolean">
11976 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11977 </attribute>
11978
11979 <attribute name="PATMEnabled" type="boolean">
11980 <desc>Switch for enabling and disabling the PATM component.</desc>
11981 </attribute>
11982
11983 <attribute name="CSAMEnabled" type="boolean">
11984 <desc>Switch for enabling and disabling the CSAM component.</desc>
11985 </attribute>
11986
11987 <attribute name="logEnabled" type="boolean">
11988 <desc>Switch for enabling and disabling logging.</desc>
11989 </attribute>
11990
11991 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11992 <desc>
11993 Flag indicating whether the VM is currently making use of CPU hardware
11994 virtualization extensions.
11995 </desc>
11996 </attribute>
11997
11998 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11999 <desc>
12000 Flag indicating whether the VM is currently making use of the nested paging
12001 CPU hardware virtualization extension.
12002 </desc>
12003 </attribute>
12004
12005 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
12006 <desc>
12007 Flag indicating whether the VM is currently making use of the VPID
12008 VT-x extension.
12009 </desc>
12010 </attribute>
12011
12012 <attribute name="PAEEnabled" type="boolean" readonly="yes">
12013 <desc>
12014 Flag indicating whether the VM is currently making use of the Physical
12015 Address Extension CPU feature.
12016 </desc>
12017 </attribute>
12018
12019 <attribute name="virtualTimeRate" type="unsigned long">
12020 <desc>
12021 The rate at which the virtual time runs expressed as a percentage.
12022 The accepted range is 2% to 20000%.
12023 </desc>
12024 </attribute>
12025
12026 <!-- @todo method for setting log flags, groups and destination! -->
12027
12028 <attribute name="VM" type="unsigned long long" readonly="yes">
12029 <desc>
12030 Gets the VM handle. This is only for internal use while
12031 we carve the details of this interface.
12032 </desc>
12033 </attribute>
12034
12035 </interface>
12036
12037 <!--
12038 // IUSBController
12039 /////////////////////////////////////////////////////////////////////////
12040 -->
12041
12042 <interface
12043 name="IUSBController" extends="$unknown"
12044 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
12045 wsmap="managed"
12046 >
12047 <attribute name="enabled" type="boolean">
12048 <desc>
12049 Flag whether the USB controller is present in the
12050 guest system. If disabled, the virtual guest hardware will
12051 not contain any USB controller. Can only be changed when
12052 the VM is powered off.
12053 </desc>
12054 </attribute>
12055
12056 <attribute name="enabledEhci" type="boolean">
12057 <desc>
12058 Flag whether the USB EHCI controller is present in the
12059 guest system. If disabled, the virtual guest hardware will
12060 not contain a USB EHCI controller. Can only be changed when
12061 the VM is powered off.
12062 </desc>
12063 </attribute>
12064
12065 <attribute name="proxyAvailable" type="boolean" readonly="yes">
12066 <desc>
12067 Flag whether there is an USB proxy available.
12068 </desc>
12069 </attribute>
12070
12071 <attribute name="USBStandard" type="unsigned short" readonly="yes">
12072 <desc>
12073 USB standard version which the controller implements.
12074 This is a BCD which means that the major version is in the
12075 high byte and minor version is in the low byte.
12076 </desc>
12077 </attribute>
12078
12079 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
12080 <desc>
12081 List of USB device filters associated with the machine.
12082
12083 If the machine is currently running, these filters are activated
12084 every time a new (supported) USB device is attached to the host
12085 computer that was not ignored by global filters
12086 (<link to="IHost::USBDeviceFilters"/>).
12087
12088 These filters are also activated when the machine is powered up.
12089 They are run against a list of all currently available USB
12090 devices (in states
12091 <link to="USBDeviceState_Available"/>,
12092 <link to="USBDeviceState_Busy"/>,
12093 <link to="USBDeviceState_Held"/>) that were not previously
12094 ignored by global filters.
12095
12096 If at least one filter matches the USB device in question, this
12097 device is automatically captured (attached to) the virtual USB
12098 controller of this machine.
12099
12100 <see>IUSBDeviceFilter, ::IUSBController</see>
12101 </desc>
12102 </attribute>
12103
12104 <method name="createDeviceFilter">
12105 <desc>
12106 Creates a new USB device filter. All attributes except
12107 the filter name are set to empty (any match),
12108 <i>active</i> is @c false (the filter is not active).
12109
12110 The created filter can then be added to the list of filters using
12111 <link to="#insertDeviceFilter"/>.
12112
12113 <result name="VBOX_E_INVALID_VM_STATE">
12114 The virtual machine is not mutable.
12115 </result>
12116
12117 <see>#deviceFilters</see>
12118 </desc>
12119 <param name="name" type="wstring" dir="in">
12120 <desc>
12121 Filter name. See <link to="IUSBDeviceFilter::name"/>
12122 for more info.
12123 </desc>
12124 </param>
12125 <param name="filter" type="IUSBDeviceFilter" dir="return">
12126 <desc>Created filter object.</desc>
12127 </param>
12128 </method>
12129
12130 <method name="insertDeviceFilter">
12131 <desc>
12132 Inserts the given USB device to the specified position
12133 in the list of filters.
12134
12135 Positions are numbered starting from <tt>0</tt>. If the specified
12136 position is equal to or greater than the number of elements in
12137 the list, the filter is added to the end of the collection.
12138
12139 <note>
12140 Duplicates are not allowed, so an attempt to insert a
12141 filter that is already in the collection, will return an
12142 error.
12143 </note>
12144
12145 <result name="VBOX_E_INVALID_VM_STATE">
12146 Virtual machine is not mutable.
12147 </result>
12148 <result name="E_INVALIDARG">
12149 USB device filter not created within this VirtualBox instance.
12150 </result>
12151 <result name="VBOX_E_INVALID_OBJECT_STATE">
12152 USB device filter already in list.
12153 </result>
12154
12155 <see>#deviceFilters</see>
12156 </desc>
12157 <param name="position" type="unsigned long" dir="in">
12158 <desc>Position to insert the filter to.</desc>
12159 </param>
12160 <param name="filter" type="IUSBDeviceFilter" dir="in">
12161 <desc>USB device filter to insert.</desc>
12162 </param>
12163 </method>
12164
12165 <method name="removeDeviceFilter">
12166 <desc>
12167 Removes a USB device filter from the specified position in the
12168 list of filters.
12169
12170 Positions are numbered starting from <tt>0</tt>. Specifying a
12171 position equal to or greater than the number of elements in
12172 the list will produce an error.
12173
12174 <see>#deviceFilters</see>
12175
12176 <result name="VBOX_E_INVALID_VM_STATE">
12177 Virtual machine is not mutable.
12178 </result>
12179 <result name="E_INVALIDARG">
12180 USB device filter list empty or invalid @a position.
12181 </result>
12182
12183 </desc>
12184 <param name="position" type="unsigned long" dir="in">
12185 <desc>Position to remove the filter from.</desc>
12186 </param>
12187 <param name="filter" type="IUSBDeviceFilter" dir="return">
12188 <desc>Removed USB device filter.</desc>
12189 </param>
12190 </method>
12191
12192 </interface>
12193
12194
12195 <!--
12196 // IUSBDevice
12197 /////////////////////////////////////////////////////////////////////////
12198 -->
12199
12200 <interface
12201 name="IUSBDevice" extends="$unknown"
12202 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
12203 wsmap="managed"
12204 >
12205 <desc>
12206 The IUSBDevice interface represents a virtual USB device attached to the
12207 virtual machine.
12208
12209 A collection of objects implementing this interface is stored in the
12210 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
12211 attached to a running virtual machine's USB controller.
12212 </desc>
12213
12214 <attribute name="id" type="uuid" mod="string" readonly="yes">
12215 <desc>
12216 Unique USB device ID. This ID is built from #vendorId,
12217 #productId, #revision and #serialNumber.
12218 </desc>
12219 </attribute>
12220
12221 <attribute name="vendorId" type="unsigned short" readonly="yes">
12222 <desc>Vendor ID.</desc>
12223 </attribute>
12224
12225 <attribute name="productId" type="unsigned short" readonly="yes">
12226 <desc>Product ID.</desc>
12227 </attribute>
12228
12229 <attribute name="revision" type="unsigned short" readonly="yes">
12230 <desc>
12231 Product revision number. This is a packed BCD represented as
12232 unsigned short. The high byte is the integer part and the low
12233 byte is the decimal.
12234 </desc>
12235 </attribute>
12236
12237 <attribute name="manufacturer" type="wstring" readonly="yes">
12238 <desc>Manufacturer string.</desc>
12239 </attribute>
12240
12241 <attribute name="product" type="wstring" readonly="yes">
12242 <desc>Product string.</desc>
12243 </attribute>
12244
12245 <attribute name="serialNumber" type="wstring" readonly="yes">
12246 <desc>Serial number string.</desc>
12247 </attribute>
12248
12249 <attribute name="address" type="wstring" readonly="yes">
12250 <desc>Host specific address of the device.</desc>
12251 </attribute>
12252
12253 <attribute name="port" type="unsigned short" readonly="yes">
12254 <desc>
12255 Host USB port number the device is physically
12256 connected to.
12257 </desc>
12258 </attribute>
12259
12260 <attribute name="version" type="unsigned short" readonly="yes">
12261 <desc>
12262 The major USB version of the device - 1 or 2.
12263 </desc>
12264 </attribute>
12265
12266 <attribute name="portVersion" type="unsigned short" readonly="yes">
12267 <desc>
12268 The major USB version of the host USB port the device is
12269 physically connected to - 1 or 2. For devices not connected to
12270 anything this will have the same value as the version attribute.
12271 </desc>
12272 </attribute>
12273
12274 <attribute name="remote" type="boolean" readonly="yes">
12275 <desc>
12276 Whether the device is physically connected to a remote VRDP
12277 client or to a local host machine.
12278 </desc>
12279 </attribute>
12280
12281 </interface>
12282
12283
12284 <!--
12285 // IUSBDeviceFilter
12286 /////////////////////////////////////////////////////////////////////////
12287 -->
12288
12289 <interface
12290 name="IUSBDeviceFilter" extends="$unknown"
12291 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
12292 wsmap="managed"
12293 >
12294 <desc>
12295 The IUSBDeviceFilter interface represents an USB device filter used
12296 to perform actions on a group of USB devices.
12297
12298 This type of filters is used by running virtual machines to
12299 automatically capture selected USB devices once they are physically
12300 attached to the host computer.
12301
12302 A USB device is matched to the given device filter if and only if all
12303 attributes of the device match the corresponding attributes of the
12304 filter (that is, attributes are joined together using the logical AND
12305 operation). On the other hand, all together, filters in the list of
12306 filters carry the semantics of the logical OR operation. So if it is
12307 desirable to create a match like "this vendor id OR this product id",
12308 one needs to create two filters and specify "any match" (see below)
12309 for unused attributes.
12310
12311 All filter attributes used for matching are strings. Each string
12312 is an expression representing a set of values of the corresponding
12313 device attribute, that will match the given filter. Currently, the
12314 following filtering expressions are supported:
12315
12316 <ul>
12317 <li><i>Interval filters</i>. Used to specify valid intervals for
12318 integer device attributes (Vendor ID, Product ID and Revision).
12319 The format of the string is:
12320
12321 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
12322
12323 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
12324 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
12325 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
12326 is omitted before a dash (<tt>-</tt>), the minimum possible integer
12327 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
12328 possible integer is assumed.
12329 </li>
12330 <li><i>Boolean filters</i>. Used to specify acceptable values for
12331 boolean device attributes. The format of the string is:
12332
12333 <tt>true|false|yes|no|0|1</tt>
12334
12335 </li>
12336 <li><i>Exact match</i>. Used to specify a single value for the given
12337 device attribute. Any string that doesn't start with <tt>int:</tt>
12338 represents the exact match. String device attributes are compared to
12339 this string including case of symbols. Integer attributes are first
12340 converted to a string (see individual filter attributes) and then
12341 compared ignoring case.
12342
12343 </li>
12344 <li><i>Any match</i>. Any value of the corresponding device attribute
12345 will match the given filter. An empty or @c null string is
12346 used to construct this type of filtering expressions.
12347
12348 </li>
12349 </ul>
12350
12351 <note>
12352 On the Windows host platform, interval filters are not currently
12353 available. Also all string filter attributes
12354 (<link to="#manufacturer"/>, <link to="#product"/>,
12355 <link to="#serialNumber"/>) are ignored, so they behave as
12356 <i>any match</i> no matter what string expression is specified.
12357 </note>
12358
12359 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
12360 </desc>
12361
12362 <attribute name="name" type="wstring">
12363 <desc>
12364 Visible name for this filter.
12365 This name is used to visually distinguish one filter from another,
12366 so it can neither be @c null nor an empty string.
12367 </desc>
12368 </attribute>
12369
12370 <attribute name="active" type="boolean">
12371 <desc>Whether this filter active or has been temporarily disabled.</desc>
12372 </attribute>
12373
12374 <attribute name="vendorId" type="wstring">
12375 <desc>
12376 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
12377 The string representation for the <i>exact matching</i>
12378 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12379 (including leading zeroes).
12380 </desc>
12381 </attribute>
12382
12383 <attribute name="productId" type="wstring">
12384 <desc>
12385 <link to="IUSBDevice::productId">Product ID</link> filter.
12386 The string representation for the <i>exact matching</i>
12387 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
12388 (including leading zeroes).
12389 </desc>
12390 </attribute>
12391
12392 <attribute name="revision" type="wstring">
12393 <desc>
12394 <link to="IUSBDevice::productId">Product revision number</link>
12395 filter. The string representation for the <i>exact matching</i>
12396 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
12397 of the integer part of the revision, and <tt>F</tt> is the
12398 decimal digit of its fractional part (including leading and
12399 trailing zeros).
12400 Note that for interval filters, it's best to use the hexadecimal
12401 form, because the revision is stored as a 16 bit packed BCD value;
12402 so the expression <tt>int:0x0100-0x0199</tt> will match any
12403 revision from <tt>1.0</tt> to <tt>1.99</tt>.
12404 </desc>
12405 </attribute>
12406
12407 <attribute name="manufacturer" type="wstring">
12408 <desc>
12409 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
12410 </desc>
12411 </attribute>
12412
12413 <attribute name="product" type="wstring">
12414 <desc>
12415 <link to="IUSBDevice::product">Product</link> filter.
12416 </desc>
12417 </attribute>
12418
12419 <attribute name="serialNumber" type="wstring">
12420 <desc>
12421 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
12422 </desc>
12423 </attribute>
12424
12425 <attribute name="port" type="wstring">
12426 <desc>
12427 <link to="IUSBDevice::port">Host USB port</link> filter.
12428 </desc>
12429 </attribute>
12430
12431 <attribute name="remote" type="wstring">
12432 <desc>
12433 <link to="IUSBDevice::remote">Remote state</link> filter.
12434 <note>
12435 This filter makes sense only for machine USB filters,
12436 i.e. it is ignored by IHostUSBDeviceFilter objects.
12437 </note>
12438 </desc>
12439 </attribute>
12440
12441 <attribute name="maskedInterfaces" type="unsigned long">
12442 <desc>
12443 This is an advanced option for hiding one or more USB interfaces
12444 from the guest. The value is a bit mask where the bits that are set
12445 means the corresponding USB interface should be hidden, masked off
12446 if you like.
12447 This feature only works on Linux hosts.
12448 </desc>
12449 </attribute>
12450
12451 </interface>
12452
12453
12454 <!--
12455 // IHostUSBDevice
12456 /////////////////////////////////////////////////////////////////////////
12457 -->
12458
12459 <enum
12460 name="USBDeviceState"
12461 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
12462 >
12463 <desc>
12464 USB device state. This enumeration represents all possible states
12465 of the USB device physically attached to the host computer regarding
12466 its state on the host computer and availability to guest computers
12467 (all currently running virtual machines).
12468
12469 Once a supported USB device is attached to the host, global USB
12470 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
12471 either ignore the device, or put it to USBDeviceState_Held state, or do
12472 nothing. Unless the device is ignored by global filters, filters of all
12473 currently running guests (<link to="IUSBController::deviceFilters"/>) are
12474 activated that can put it to USBDeviceState_Captured state.
12475
12476 If the device was ignored by global filters, or didn't match
12477 any filters at all (including guest ones), it is handled by the host
12478 in a normal way. In this case, the device state is determined by
12479 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
12480 or USBDeviceState_Available, depending on the current device usage.
12481
12482 Besides auto-capturing based on filters, the device can be manually
12483 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
12484 state is USBDeviceState_Busy, USBDeviceState_Available or
12485 USBDeviceState_Held.
12486
12487 <note>
12488 Due to differences in USB stack implementations in Linux and Win32,
12489 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
12490 only to the Linux version of the product. This also means that (<link
12491 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
12492 device state is USBDeviceState_Held.
12493 </note>
12494
12495 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
12496 </desc>
12497
12498 <const name="NotSupported" value="0">
12499 <desc>
12500 Not supported by the VirtualBox server, not available to guests.
12501 </desc>
12502 </const>
12503 <const name="Unavailable" value="1">
12504 <desc>
12505 Being used by the host computer exclusively,
12506 not available to guests.
12507 </desc>
12508 </const>
12509 <const name="Busy" value="2">
12510 <desc>
12511 Being used by the host computer, potentially available to guests.
12512 </desc>
12513 </const>
12514 <const name="Available" value="3">
12515 <desc>
12516 Not used by the host computer, available to guests (the host computer
12517 can also start using the device at any time).
12518 </desc>
12519 </const>
12520 <const name="Held" value="4">
12521 <desc>
12522 Held by the VirtualBox server (ignored by the host computer),
12523 available to guests.
12524 </desc>
12525 </const>
12526 <const name="Captured" value="5">
12527 <desc>
12528 Captured by one of the guest computers, not available
12529 to anybody else.
12530 </desc>
12531 </const>
12532 </enum>
12533
12534 <interface
12535 name="IHostUSBDevice" extends="IUSBDevice"
12536 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
12537 wsmap="managed"
12538 >
12539 <desc>
12540 The IHostUSBDevice interface represents a physical USB device attached
12541 to the host computer.
12542
12543 Besides properties inherited from IUSBDevice, this interface adds the
12544 <link to="#state"/> property that holds the current state of the USB
12545 device.
12546
12547 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
12548 </desc>
12549
12550 <attribute name="state" type="USBDeviceState" readonly="yes">
12551 <desc>
12552 Current state of the device.
12553 </desc>
12554 </attribute>
12555
12556 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
12557
12558 </interface>
12559
12560
12561 <!--
12562 // IHostUSBDeviceFilter
12563 /////////////////////////////////////////////////////////////////////////
12564 -->
12565
12566 <enum
12567 name="USBDeviceFilterAction"
12568 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
12569 >
12570 <desc>
12571 Actions for host USB device filters.
12572 <see>IHostUSBDeviceFilter, USBDeviceState</see>
12573 </desc>
12574
12575 <const name="Null" value="0">
12576 <desc>Null value (never used by the API).</desc>
12577 </const>
12578 <const name="Ignore" value="1">
12579 <desc>Ignore the matched USB device.</desc>
12580 </const>
12581 <const name="Hold" value="2">
12582 <desc>Hold the matched USB device.</desc>
12583 </const>
12584 </enum>
12585
12586 <interface
12587 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
12588 uuid="4cc70246-d74a-400f-8222-3900489c0374"
12589 wsmap="managed"
12590 >
12591 <desc>
12592 The IHostUSBDeviceFilter interface represents a global filter for a
12593 physical USB device used by the host computer. Used indirectly in
12594 <link to="IHost::USBDeviceFilters"/>.
12595
12596 Using filters of this type, the host computer determines the initial
12597 state of the USB device after it is physically attached to the
12598 host's USB controller.
12599
12600 <note>
12601 The <link to="#remote"/> attribute is ignored by this type of
12602 filters, because it makes sense only for
12603 <link to="IUSBController::deviceFilters">machine USB filters</link>.
12604 </note>
12605
12606 <see>IHost::USBDeviceFilters</see>
12607 </desc>
12608
12609 <attribute name="action" type="USBDeviceFilterAction">
12610 <desc>
12611 Action performed by the host when an attached USB device
12612 matches this filter.
12613 </desc>
12614 </attribute>
12615
12616 </interface>
12617
12618 <!--
12619 // IAudioAdapter
12620 /////////////////////////////////////////////////////////////////////////
12621 -->
12622
12623 <enum
12624 name="AudioDriverType"
12625 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12626 >
12627 <desc>
12628 Host audio driver type.
12629 </desc>
12630
12631 <const name="Null" value="0">
12632 <desc>Null value, also means "dummy audio driver".</desc>
12633 </const>
12634 <const name="WinMM" value="1">
12635 <desc>Windows multimedia (Windows hosts only).</desc>
12636 </const>
12637 <const name="OSS" value="2">
12638 <desc>Open Sound System (Linux hosts only).</desc>
12639 </const>
12640 <const name="ALSA" value="3">
12641 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12642 </const>
12643 <const name="DirectSound" value="4">
12644 <desc>DirectSound (Windows hosts only).</desc>
12645 </const>
12646 <const name="CoreAudio" value="5">
12647 <desc>CoreAudio (Mac hosts only).</desc>
12648 </const>
12649 <const name="MMPM" value="6">
12650 <desc>Reserved for historical reasons.</desc>
12651 </const>
12652 <const name="Pulse" value="7">
12653 <desc>PulseAudio (Linux hosts only).</desc>
12654 </const>
12655 <const name="SolAudio" value="8">
12656 <desc>Solaris audio (Solaris hosts only).</desc>
12657 </const>
12658 </enum>
12659
12660 <enum
12661 name="AudioControllerType"
12662 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12663 >
12664 <desc>
12665 Virtual audio controller type.
12666 </desc>
12667
12668 <const name="AC97" value="0"/>
12669 <const name="SB16" value="1"/>
12670 </enum>
12671
12672 <interface
12673 name="IAudioAdapter" extends="$unknown"
12674 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12675 wsmap="managed"
12676 >
12677 <desc>
12678 The IAudioAdapter interface represents the virtual audio adapter of
12679 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12680 </desc>
12681 <attribute name="enabled" type="boolean">
12682 <desc>
12683 Flag whether the audio adapter is present in the
12684 guest system. If disabled, the virtual guest hardware will
12685 not contain any audio adapter. Can only be changed when
12686 the VM is not running.
12687 </desc>
12688 </attribute>
12689 <attribute name="audioController" type="AudioControllerType">
12690 <desc>
12691 The audio hardware we emulate.
12692 </desc>
12693 </attribute>
12694 <attribute name="audioDriver" type="AudioDriverType">
12695 <desc>
12696 Audio driver the adapter is connected to. This setting
12697 can only be changed when the VM is not running.
12698 </desc>
12699 </attribute>
12700 </interface>
12701
12702 <!--
12703 // IVRDPServer
12704 /////////////////////////////////////////////////////////////////////////
12705 -->
12706
12707 <enum
12708 name="VRDPAuthType"
12709 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12710 >
12711 <desc>
12712 VRDP authentication type.
12713 </desc>
12714
12715 <const name="Null" value="0">
12716 <desc>Null value, also means "no authentication".</desc>
12717 </const>
12718 <const name="External" value="1"/>
12719 <const name="Guest" value="2"/>
12720 </enum>
12721
12722 <interface
12723 name="IVRDPServer" extends="$unknown"
12724 uuid="72e671bc-1712-4052-ad6b-e45e76d9d3e4"
12725 wsmap="managed"
12726 >
12727 <attribute name="enabled" type="boolean">
12728 <desc>VRDP server status.</desc>
12729 </attribute>
12730
12731 <attribute name="ports" type="wstring">
12732 <desc>
12733 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12734 <note>
12735 This is a string of comma separated TCP port numbers or port number ranges.
12736 Example <tt>5000,5010-5012,5015</tt>
12737 </note>
12738 </desc>
12739 </attribute>
12740
12741 <attribute name="netAddress" type="wstring">
12742 <desc>VRDP server address.</desc>
12743 </attribute>
12744
12745 <attribute name="authType" type="VRDPAuthType">
12746 <desc>VRDP authentication method.</desc>
12747 </attribute>
12748
12749 <attribute name="authTimeout" type="unsigned long">
12750 <desc>Timeout for guest authentication. Milliseconds.</desc>
12751 </attribute>
12752
12753 <attribute name="allowMultiConnection" type="boolean">
12754 <desc>
12755 Flag whether multiple simultaneous connections to the VM are permitted.
12756 Note that this will be replaced by a more powerful mechanism in the future.
12757 </desc>
12758 </attribute>
12759
12760 <attribute name="reuseSingleConnection" type="boolean">
12761 <desc>
12762 Flag whether the existing connection must be dropped and a new connection
12763 must be established by the VRDP server, when a new client connects in single
12764 connection mode.
12765 </desc>
12766 </attribute>
12767
12768 </interface>
12769
12770
12771 <!--
12772 // ISharedFolder
12773 /////////////////////////////////////////////////////////////////////////
12774 -->
12775
12776 <interface
12777 name="ISharedFolder" extends="$unknown"
12778 uuid="64637bb2-9e17-471c-b8f3-f8968dd9884e"
12779 wsmap="struct"
12780 >
12781 <desc>
12782 The ISharedFolder interface represents a folder in the host computer's
12783 file system accessible from the guest OS running inside a virtual
12784 machine using an associated logical name.
12785
12786 There are three types of shared folders:
12787 <ul>
12788 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12789 folders available to all virtual machines.</li>
12790 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12791 VM-specific shared folders available to the given virtual machine at
12792 startup.</li>
12793 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12794 VM-specific shared folders created in the session context (for
12795 example, when the virtual machine is running) and automatically
12796 discarded when the session is closed (the VM is powered off).</li>
12797 </ul>
12798
12799 Logical names of shared folders must be unique within the given scope
12800 (global, permanent or transient). However, they do not need to be unique
12801 across scopes. In this case, the definition of the shared folder in a
12802 more specific scope takes precedence over definitions in all other
12803 scopes. The order of precedence is (more specific to more general):
12804 <ol>
12805 <li>Transient definitions</li>
12806 <li>Permanent definitions</li>
12807 <li>Global definitions</li>
12808 </ol>
12809
12810 For example, if MyMachine has a shared folder named
12811 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12812 transient shared folder named <tt>C_DRIVE</tt> (that points
12813 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12814 of <tt>C_DRIVE</tt> in the guest OS so
12815 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12816 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12817 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12818 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12819 to <tt>C:\\</tt> if it still exists.
12820
12821 Note that permanent and transient shared folders of different machines
12822 are in different name spaces, so they don't overlap and don't need to
12823 have unique logical names.
12824
12825 <note>
12826 Global shared folders are not implemented in the current version of the
12827 product.
12828 </note>
12829 </desc>
12830
12831 <attribute name="name" type="wstring" readonly="yes">
12832 <desc>Logical name of the shared folder.</desc>
12833 </attribute>
12834
12835 <attribute name="hostPath" type="wstring" readonly="yes">
12836 <desc>Full path to the shared folder in the host file system.</desc>
12837 </attribute>
12838
12839 <attribute name="accessible" type="boolean" readonly="yes">
12840 <desc>
12841 Whether the folder defined by the host path is currently
12842 accessible or not.
12843 For example, the folder can be unaccessible if it is placed
12844 on the network share that is not available by the time
12845 this property is read.
12846 </desc>
12847 </attribute>
12848
12849 <attribute name="writable" type="boolean" readonly="yes">
12850 <desc>
12851 Whether the folder defined by the host path is writable or
12852 not.
12853 </desc>
12854 </attribute>
12855
12856 <attribute name="lastAccessError" type="wstring" readonly="yes">
12857 <desc>
12858 Text message that represents the result of the last accessibility
12859 check.
12860
12861 Accessibility checks are performed each time the <link to="#accessible"/>
12862 attribute is read. An empty string is returned if the last
12863 accessibility check was successful. A non-empty string indicates a
12864 failure and should normally describe a reason of the failure (for
12865 example, a file read error).
12866 </desc>
12867 </attribute>
12868
12869 </interface>
12870
12871 <!--
12872 // ISession
12873 /////////////////////////////////////////////////////////////////////////
12874 -->
12875
12876 <interface
12877 name="IInternalSessionControl" extends="$unknown"
12878 uuid="f9aac6d0-41b3-46b7-bea4-6370b4036de6"
12879 internal="yes"
12880 wsmap="suppress"
12881 >
12882 <method name="getPID">
12883 <desc>PID of the process that has created this Session object.
12884 </desc>
12885 <param name="pid" type="unsigned long" dir="return"/>
12886 </method>
12887
12888 <method name="getRemoteConsole">
12889 <desc>
12890 Returns the console object suitable for remote control.
12891
12892 <result name="VBOX_E_INVALID_VM_STATE">
12893 Session state prevents operation.
12894 </result>
12895 <result name="VBOX_E_INVALID_OBJECT_STATE">
12896 Session type prevents operation.
12897 </result>
12898
12899 </desc>
12900 <param name="console" type="IConsole" dir="return"/>
12901 </method>
12902
12903 <method name="assignMachine">
12904 <desc>
12905 Assigns the machine object associated with this direct-type
12906 session or informs the session that it will be a remote one
12907 (if @a machine == @c null).
12908
12909 <result name="VBOX_E_INVALID_VM_STATE">
12910 Session state prevents operation.
12911 </result>
12912 <result name="VBOX_E_INVALID_OBJECT_STATE">
12913 Session type prevents operation.
12914 </result>
12915
12916 </desc>
12917 <param name="machine" type="IMachine" dir="in"/>
12918 </method>
12919
12920 <method name="assignRemoteMachine">
12921 <desc>
12922 Assigns the machine and the (remote) console object associated with
12923 this remote-type session.
12924
12925 <result name="VBOX_E_INVALID_VM_STATE">
12926 Session state prevents operation.
12927 </result>
12928
12929 </desc>
12930 <param name="machine" type="IMachine" dir="in"/>
12931 <param name="console" type="IConsole" dir="in"/>
12932 </method>
12933
12934 <method name="updateMachineState">
12935 <desc>
12936 Updates the machine state in the VM process.
12937 Must be called only in certain cases
12938 (see the method implementation).
12939
12940 <result name="VBOX_E_INVALID_VM_STATE">
12941 Session state prevents operation.
12942 </result>
12943 <result name="VBOX_E_INVALID_OBJECT_STATE">
12944 Session type prevents operation.
12945 </result>
12946
12947 </desc>
12948 <param name="aMachineState" type="MachineState" dir="in"/>
12949 </method>
12950
12951 <method name="uninitialize">
12952 <desc>
12953 Uninitializes (closes) this session. Used by VirtualBox to close
12954 the corresponding remote session when the direct session dies
12955 or gets closed.
12956
12957 <result name="VBOX_E_INVALID_VM_STATE">
12958 Session state prevents operation.
12959 </result>
12960
12961 </desc>
12962 </method>
12963
12964 <method name="onNetworkAdapterChange">
12965 <desc>
12966 Triggered when settings of a network adapter of the
12967 associated virtual machine have changed.
12968
12969 <result name="VBOX_E_INVALID_VM_STATE">
12970 Session state prevents operation.
12971 </result>
12972 <result name="VBOX_E_INVALID_OBJECT_STATE">
12973 Session type prevents operation.
12974 </result>
12975
12976 </desc>
12977 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12978 <param name="changeAdapter" type="boolean" dir="in"/>
12979 </method>
12980
12981 <method name="onSerialPortChange">
12982 <desc>
12983 Triggered when settings of a serial port of the
12984 associated virtual machine have changed.
12985
12986 <result name="VBOX_E_INVALID_VM_STATE">
12987 Session state prevents operation.
12988 </result>
12989 <result name="VBOX_E_INVALID_OBJECT_STATE">
12990 Session type prevents operation.
12991 </result>
12992
12993 </desc>
12994 <param name="serialPort" type="ISerialPort" dir="in"/>
12995 </method>
12996
12997 <method name="onParallelPortChange">
12998 <desc>
12999 Triggered when settings of a parallel port of the
13000 associated virtual machine have changed.
13001
13002 <result name="VBOX_E_INVALID_VM_STATE">
13003 Session state prevents operation.
13004 </result>
13005 <result name="VBOX_E_INVALID_OBJECT_STATE">
13006 Session type prevents operation.
13007 </result>
13008
13009 </desc>
13010 <param name="parallelPort" type="IParallelPort" dir="in"/>
13011 </method>
13012
13013 <method name="onStorageControllerChange">
13014 <desc>
13015 Triggered when settings of a storage controller of the
13016 associated virtual machine have changed.
13017
13018 <result name="VBOX_E_INVALID_VM_STATE">
13019 Session state prevents operation.
13020 </result>
13021 <result name="VBOX_E_INVALID_OBJECT_STATE">
13022 Session type prevents operation.
13023 </result>
13024
13025 </desc>
13026 </method>
13027
13028 <method name="onMediumChange">
13029 <desc>
13030 Triggered when attached media of the
13031 associated virtual machine have changed.
13032
13033 <result name="VBOX_E_INVALID_VM_STATE">
13034 Session state prevents operation.
13035 </result>
13036 <result name="VBOX_E_INVALID_OBJECT_STATE">
13037 Session type prevents operation.
13038 </result>
13039
13040 </desc>
13041
13042 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
13043 <param name="force" type="boolean" dir="in"/>
13044 </method>
13045
13046 <method name="onCPUChange">
13047 <desc>
13048 Notification when a CPU changes.
13049 </desc>
13050 <param name="cpu" type="unsigned long" dir="in">
13051 <desc>The CPU which changed</desc>
13052 </param>
13053 <param name="add" type="boolean" dir="in">
13054 <desc>Flag whether the CPU was added or removed</desc>
13055 </param>
13056 </method>
13057
13058 <method name="onVRDPServerChange">
13059 <desc>
13060 Triggered when settings of the VRDP server object of the
13061 associated virtual machine have changed.
13062
13063 <result name="VBOX_E_INVALID_VM_STATE">
13064 Session state prevents operation.
13065 </result>
13066 <result name="VBOX_E_INVALID_OBJECT_STATE">
13067 Session type prevents operation.
13068 </result>
13069
13070 </desc>
13071 </method>
13072
13073 <method name="onUSBControllerChange">
13074 <desc>
13075 Triggered when settings of the USB controller object of the
13076 associated virtual machine have changed.
13077
13078 <result name="VBOX_E_INVALID_VM_STATE">
13079 Session state prevents operation.
13080 </result>
13081 <result name="VBOX_E_INVALID_OBJECT_STATE">
13082 Session type prevents operation.
13083 </result>
13084
13085 </desc>
13086 </method>
13087
13088 <method name="onSharedFolderChange">
13089 <desc>
13090 Triggered when a permanent (global or machine) shared folder has been
13091 created or removed.
13092 <note>
13093 We don't pass shared folder parameters in this notification because
13094 the order in which parallel notifications are delivered is not defined,
13095 therefore it could happen that these parameters were outdated by the
13096 time of processing this notification.
13097 </note>
13098
13099 <result name="VBOX_E_INVALID_VM_STATE">
13100 Session state prevents operation.
13101 </result>
13102 <result name="VBOX_E_INVALID_OBJECT_STATE">
13103 Session type prevents operation.
13104 </result>
13105
13106 </desc>
13107 <param name="global" type="boolean" dir="in"/>
13108 </method>
13109
13110 <method name="onUSBDeviceAttach">
13111 <desc>
13112 Triggered when a request to capture a USB device (as a result
13113 of matched USB filters or direct call to
13114 <link to="IConsole::attachUSBDevice"/>) has completed.
13115 A @c null @a error object means success, otherwise it
13116 describes a failure.
13117
13118 <result name="VBOX_E_INVALID_VM_STATE">
13119 Session state prevents operation.
13120 </result>
13121 <result name="VBOX_E_INVALID_OBJECT_STATE">
13122 Session type prevents operation.
13123 </result>
13124
13125 </desc>
13126 <param name="device" type="IUSBDevice" dir="in"/>
13127 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13128 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
13129 </method>
13130
13131 <method name="onUSBDeviceDetach">
13132 <desc>
13133 Triggered when a request to release the USB device (as a result
13134 of machine termination or direct call to
13135 <link to="IConsole::detachUSBDevice"/>) has completed.
13136 A @c null @a error object means success, otherwise it
13137 describes a failure.
13138
13139 <result name="VBOX_E_INVALID_VM_STATE">
13140 Session state prevents operation.
13141 </result>
13142 <result name="VBOX_E_INVALID_OBJECT_STATE">
13143 Session type prevents operation.
13144 </result>
13145
13146 </desc>
13147 <param name="id" type="uuid" mod="string" dir="in"/>
13148 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
13149 </method>
13150
13151 <method name="onShowWindow">
13152 <desc>
13153 Called by <link to="IMachine::canShowConsoleWindow"/> and by
13154 <link to="IMachine::showConsoleWindow"/> in order to notify
13155 console callbacks
13156 <link to="IConsoleCallback::onCanShowWindow"/>
13157 and <link to="IConsoleCallback::onShowWindow"/>.
13158
13159 <result name="VBOX_E_INVALID_OBJECT_STATE">
13160 Session type prevents operation.
13161 </result>
13162
13163 </desc>
13164 <param name="check" type="boolean" dir="in"/>
13165 <param name="canShow" type="boolean" dir="out"/>
13166 <param name="winId" type="unsigned long long" dir="out"/>
13167 </method>
13168
13169 <method name="accessGuestProperty">
13170 <desc>
13171 Called by <link to="IMachine::getGuestProperty"/> and by
13172 <link to="IMachine::setGuestProperty"/> in order to read and
13173 modify guest properties.
13174
13175 <result name="VBOX_E_INVALID_VM_STATE">
13176 Machine session is not open.
13177 </result>
13178 <result name="VBOX_E_INVALID_OBJECT_STATE">
13179 Session type is not direct.
13180 </result>
13181
13182 </desc>
13183 <param name="name" type="wstring" dir="in"/>
13184 <param name="value" type="wstring" dir="in"/>
13185 <param name="flags" type="wstring" dir="in"/>
13186 <param name="isSetter" type="boolean" dir="in"/>
13187 <param name="retValue" type="wstring" dir="out"/>
13188 <param name="retTimestamp" type="unsigned long long" dir="out"/>
13189 <param name="retFlags" type="wstring" dir="out"/>
13190 </method>
13191
13192 <method name="enumerateGuestProperties">
13193 <desc>
13194 Return a list of the guest properties matching a set of patterns along
13195 with their values, time stamps and flags.
13196
13197 <result name="VBOX_E_INVALID_VM_STATE">
13198 Machine session is not open.
13199 </result>
13200 <result name="VBOX_E_INVALID_OBJECT_STATE">
13201 Session type is not direct.
13202 </result>
13203
13204 </desc>
13205 <param name="patterns" type="wstring" dir="in">
13206 <desc>
13207 The patterns to match the properties against as a comma-separated
13208 string. If this is empty, all properties currently set will be
13209 returned.
13210 </desc>
13211 </param>
13212 <param name="key" type="wstring" dir="out" safearray="yes">
13213 <desc>
13214 The key names of the properties returned.
13215 </desc>
13216 </param>
13217 <param name="value" type="wstring" dir="out" safearray="yes">
13218 <desc>
13219 The values of the properties returned. The array entries match the
13220 corresponding entries in the @a key array.
13221 </desc>
13222 </param>
13223 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
13224 <desc>
13225 The time stamps of the properties returned. The array entries match
13226 the corresponding entries in the @a key array.
13227 </desc>
13228 </param>
13229 <param name="flags" type="wstring" dir="out" safearray="yes">
13230 <desc>
13231 The flags of the properties returned. The array entries match the
13232 corresponding entries in the @a key array.
13233 </desc>
13234 </param>
13235 </method>
13236
13237 </interface>
13238
13239 <interface
13240 name="ISession" extends="$unknown"
13241 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
13242 wsmap="managed"
13243 >
13244 <desc>
13245 The ISession interface represents a serialization primitive for virtual
13246 machines.
13247
13248 With VirtualBox, every time one wishes to manipulate a virtual machine
13249 (e.g. change its settings or start execution), a session object is
13250 required. Such an object must be passed to one of the session methods
13251 that open the given session, which then initiates the machine manipulation.
13252
13253 A session serves several purposes: it identifies to the inter-process VirtualBox
13254 code which process is currently working with the virtual machine, and it ensures
13255 that there are no incompatible requests from several processes for the
13256 same virtual machine. Session objects can therefore be thought of as mutex
13257 semaphores that lock virtual machines to prevent conflicting accesses from
13258 several processes.
13259
13260 How sessions objects are used depends on whether you use the Main API
13261 via COM or via the webservice:
13262
13263 <ul>
13264 <li>When using the COM API directly, an object of the Session class from the
13265 VirtualBox type library needs to be created. In regular COM C++ client code,
13266 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
13267 This object will then act as a local session object in further calls to open
13268 a session.
13269 </li>
13270
13271 <li>In the webservice, the session manager (IWebsessionManager) instead creates
13272 one session object automatically when <link to="IWebsessionManager::logon" />
13273 is called. A managed object reference to that session object can be retrieved by
13274 calling <link to="IWebsessionManager::getSessionObject" />. This session object
13275 reference can then be used to open sessions.
13276 </li>
13277 </ul>
13278
13279 Sessions are mainly used in two variations:
13280
13281 <ul>
13282 <li>
13283 To start a virtual machine in a separate process, one would call
13284 <link to="IVirtualBox::openRemoteSession"/>, which requires a session
13285 object as its first parameter. This session then identifies the caller
13286 and lets him control the started machine (for example, pause machine
13287 execution or power it down) as well as be notified about machine
13288 execution state changes.
13289 </li>
13290
13291 <li>To alter machine settings, or to start machine execution within the
13292 current process, one needs to open a direct session for the machine first by
13293 calling <link to="IVirtualBox::openSession"/>. While a direct session
13294 is open within one process, no any other process may open another direct
13295 session for the same machine. This prevents the machine from being changed
13296 by other processes while it is running or while the machine is being configured.
13297 </li>
13298 </ul>
13299
13300 One also can attach to an existing direct session already opened by
13301 another process (for example, in order to send a control request to the
13302 virtual machine such as the pause or the reset request). This is done by
13303 calling <link to="IVirtualBox::openExistingSession"/>.
13304
13305 <note>
13306 Unless you are trying to write a new VirtualBox front-end that
13307 performs direct machine execution (like the VirtualBox or VBoxSDL
13308 front-ends), don't call <link to="IConsole::powerUp"/> in a direct
13309 session opened by <link to="IVirtualBox::openSession"/> and use this
13310 session only to change virtual machine settings. If you simply want to
13311 start virtual machine execution using one of the existing front-ends
13312 (for example the VirtualBox GUI or headless server), simply use
13313 <link to="IVirtualBox::openRemoteSession"/>; these front-ends
13314 will power up the machine automatically for you.
13315 </note>
13316 </desc>
13317
13318 <attribute name="state" type="SessionState" readonly="yes">
13319 <desc>Current state of this session.</desc>
13320 </attribute>
13321
13322 <attribute name="type" type="SessionType" readonly="yes">
13323 <desc>
13324 Type of this session. The value of this attribute is valid only
13325 if the session is currently open (i.e. its #state is
13326 SessionType_SessionOpen), otherwise an error will be returned.
13327 </desc>
13328 </attribute>
13329
13330 <attribute name="machine" type="IMachine" readonly="yes">
13331 <desc>Machine object associated with this session.</desc>
13332 </attribute>
13333
13334 <attribute name="console" type="IConsole" readonly="yes">
13335 <desc>Console object associated with this session.</desc>
13336 </attribute>
13337
13338 <method name="close">
13339 <desc>
13340 Closes a session that was previously opened.
13341
13342 It is recommended that every time an "open session" method (such as
13343 <link to="IVirtualBox::openRemoteSession" /> or
13344 <link to="IVirtualBox::openSession" />) has been called to
13345 manipulate a virtual machine, the caller invoke
13346 ISession::close() when it's done doing so. Since sessions are
13347 serialization primitives much like ordinary mutexes, they are
13348 best used the same way: for each "open" call, there should be
13349 a matching "close" call, even when errors occur.
13350
13351 Otherwise, if a direct session for a machine opened with
13352 <link to="IVirtualBox::openSession"/> is not explicitly closed
13353 when the application terminates, the state of the machine will
13354 be set to <link to="MachineState_Aborted" /> on the server.
13355
13356 Generally, it is recommended to close all open sessions explicitly
13357 before terminating the application (regardless of the reason for
13358 the termination).
13359
13360 <note>
13361 Do not expect the session state (<link to="ISession::state" />
13362 to return to "Closed" immediately after you invoke
13363 ISession::close(), particularly if you have started a remote
13364 session to execute the VM in a new process. The session state will
13365 automatically return to "Closed" once the VM is no longer executing,
13366 which can of course take a very long time.
13367 </note>
13368
13369 <result name="E_UNEXPECTED">
13370 Session is not open.
13371 </result>
13372
13373 </desc>
13374 </method>
13375
13376 </interface>
13377
13378 <!--
13379 // IStorageController
13380 /////////////////////////////////////////////////////////////////////////
13381 -->
13382
13383 <enum
13384 name="StorageBus"
13385 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
13386 >
13387 <desc>
13388 The bus type of the storage controller (IDE, SATA, SCSI or Floppy);
13389 see <link to="IStorageController::bus" />.
13390 </desc>
13391 <const name="Null" value="0">
13392 <desc>@c null value. Never used by the API.</desc>
13393 </const>
13394 <const name="IDE" value="1"/>
13395 <const name="SATA" value="2"/>
13396 <const name="SCSI" value="3"/>
13397 <const name="Floppy" value="4"/>
13398 <const name="SAS" value="5"/>
13399 </enum>
13400
13401 <enum
13402 name="StorageControllerType"
13403 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
13404 >
13405 <desc>
13406 The exact variant of storage controller hardware presented
13407 to the guest; see <link to="IStorageController::controllerType" />.
13408 </desc>
13409
13410 <const name="Null" value="0">
13411 <desc>@c null value. Never used by the API.</desc>
13412 </const>
13413 <const name="LsiLogic" value="1">
13414 <desc>A SCSI controller of the LsiLogic variant.</desc>
13415 </const>
13416 <const name="BusLogic" value="2">
13417 <desc>A SCSI controller of the BusLogic variant.</desc>
13418 </const>
13419 <const name="IntelAhci" value="3">
13420 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
13421 </const>
13422 <const name="PIIX3" value="4">
13423 <desc>An IDE controller of the PIIX3 variant.</desc>
13424 </const>
13425 <const name="PIIX4" value="5">
13426 <desc>An IDE controller of the PIIX4 variant.</desc>
13427 </const>
13428 <const name="ICH6" value="6">
13429 <desc>An IDE controller of the ICH6 variant.</desc>
13430 </const>
13431 <const name="I82078" value="7">
13432 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
13433 </const>
13434 <const name="LsiLogicSas" value="8">
13435 <desc>A variant of the LsiLogic controller using SAS.</desc>
13436 </const>
13437 </enum>
13438
13439 <interface
13440 name="IStorageController" extends="$unknown"
13441 uuid="ce37b7a9-d895-4ee8-b9f8-9579bfc85813"
13442 wsmap="managed"
13443 >
13444 <desc>
13445 Represents a storage controller that is attached to a virtual machine
13446 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
13447 attached to storage controllers in a real computer, virtual drives
13448 (represented by <link to="IMediumAttachment" />) are attached to virtual
13449 storage controllers, represented by this interface.
13450
13451 As opposed to physical hardware, VirtualBox has a very generic concept
13452 of a storage controller, and for purposes of the Main API, all virtual
13453 storage is attached to virtual machines via instances of this interface.
13454 There are four types of such virtual storage controllers: IDE, SCSI, SATA
13455 and Floppy (see <link to="#bus" />). Depending on which of these four is
13456 used, certain sub-types may be available and can be selected in
13457 <link to="#controllerType" />.
13458
13459 Depending on these settings, the guest operating system might see
13460 significantly different virtual hardware.
13461 </desc>
13462
13463 <attribute name="name" type="wstring" readonly="yes">
13464 <desc>
13465 Name of the storage controller, as originally specified with
13466 <link to="IMachine::addStorageController" />. This then uniquely
13467 identifies this controller with other method calls such as
13468 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
13469 </desc>
13470 </attribute>
13471
13472 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
13473 <desc>
13474 Maximum number of devices which can be attached to one port.
13475 </desc>
13476 </attribute>
13477
13478 <attribute name="minPortCount" type="unsigned long" readonly="yes">
13479 <desc>
13480 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
13481 </desc>
13482 </attribute>
13483
13484 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
13485 <desc>
13486 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
13487 </desc>
13488 </attribute>
13489
13490 <attribute name="instance" type="unsigned long">
13491 <desc>
13492 The instance number of the device in the running VM.
13493 </desc>
13494 </attribute>
13495
13496 <attribute name="portCount" type="unsigned long">
13497 <desc>
13498 The number of currently usable ports on the controller.
13499 The minimum and maximum number of ports for one controller are
13500 stored in <link to="IStorageController::minPortCount"/>
13501 and <link to="IStorageController::maxPortCount"/>.
13502 </desc>
13503 </attribute>
13504
13505 <attribute name="bus" type="StorageBus" readonly="yes">
13506 <desc>
13507 The bus type of the storage controller (IDE, SATA, SCSI or Floppy).
13508 </desc>
13509 </attribute>
13510
13511 <attribute name="controllerType" type="StorageControllerType">
13512 <desc>
13513 The exact variant of storage controller hardware presented
13514 to the guest.
13515 Depending on this value, VirtualBox will provide a different
13516 virtual storage controller hardware to the guest.
13517 For SATA and floppy controllers, only one variant is available,
13518 but for IDE and SCSI, there are several.
13519
13520 For SCSI controllers, the default type is LsiLogic.
13521 </desc>
13522 </attribute>
13523
13524 <method name="getIDEEmulationPort">
13525 <desc>
13526 Gets the corresponding port number which is emulated as an IDE device.
13527 Works only with SATA controllers.
13528
13529 <result name="E_INVALIDARG">
13530 The @a devicePosition is not in the range 0 to 3.
13531 </result>
13532 <result name="E_NOTIMPL">
13533 The storage controller type is not SATAIntelAhci.
13534 </result>
13535
13536 </desc>
13537 <param name="devicePosition" type="long" dir="in"/>
13538 <param name="portNumber" type="long" dir="return"/>
13539 </method>
13540
13541 <method name="setIDEEmulationPort">
13542 <desc>
13543 Sets the port number which is emulated as an IDE device.
13544 Works only with SATA controllers.
13545
13546 <result name="E_INVALIDARG">
13547 The @a devicePosition is not in the range 0 to 3 or the
13548 @a portNumber is not in the range 0 to 29.
13549 </result>
13550 <result name="E_NOTIMPL">
13551 The storage controller type is not SATAIntelAhci.
13552 </result>
13553
13554 </desc>
13555 <param name="devicePosition" type="long" dir="in"/>
13556 <param name="portNumber" type="long" dir="in"/>
13557 </method>
13558
13559 </interface>
13560
13561<if target="wsdl">
13562
13563 <!--
13564 // IManagedObjectRef
13565 /////////////////////////////////////////////////////////////////////////
13566 -->
13567
13568 <interface
13569 name="IManagedObjectRef" extends="$unknown"
13570 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13571 internal="yes"
13572 wsmap="managed"
13573 wscpp="hardcoded"
13574 >
13575 <desc>
13576 Managed object reference.
13577
13578 Only within the webservice, a managed object reference (which is really
13579 an opaque number) allows a webservice client to address an object
13580 that lives in the address space of the webservice server.
13581
13582 Behind each managed object reference, there is a COM object that lives
13583 in the webservice server's address space. The COM object is not freed
13584 until the managed object reference is released, either by an explicit
13585 call to <link to="IManagedObjectRef::release" /> or by logging off from
13586 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13587 all objects created during the webservice session.
13588
13589 Whenever a method call of the VirtualBox API returns a COM object, the
13590 webservice representation of that method will instead return a
13591 managed object reference, which can then be used to invoke methods
13592 on that object.
13593 </desc>
13594
13595 <method name="getInterfaceName">
13596 <desc>
13597 Returns the name of the interface that this managed object represents,
13598 for example, "IMachine", as a string.
13599 </desc>
13600 <param name="return" type="wstring" dir="return"/>
13601 </method>
13602
13603 <method name="release">
13604 <desc>
13605 Releases this managed object reference and frees the resources that
13606 were allocated for it in the webservice server process. After calling
13607 this method, the identifier of the reference can no longer be used.
13608 </desc>
13609 </method>
13610
13611 </interface>
13612
13613 <!--
13614 // IWebsessionManager
13615 /////////////////////////////////////////////////////////////////////////
13616 -->
13617
13618 <interface
13619 name="IWebsessionManager" extends="$unknown"
13620 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13621 internal="yes"
13622 wsmap="global"
13623 wscpp="hardcoded"
13624 >
13625 <desc>
13626 Websession manager. This provides essential services
13627 to webservice clients.
13628 </desc>
13629 <method name="logon">
13630 <desc>
13631 Logs a new client onto the webservice and returns a managed object reference to
13632 the IVirtualBox instance, which the client can then use as a basis to further
13633 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13634 interface, in one way or the other.
13635 </desc>
13636 <param name="username" type="wstring" dir="in"/>
13637 <param name="password" type="wstring" dir="in"/>
13638 <param name="return" type="IVirtualBox" dir="return"/>
13639 </method>
13640
13641 <method name="getSessionObject">
13642 <desc>
13643 Returns a managed object reference to the internal ISession object that was created
13644 for this web service session when the client logged on.
13645
13646 <see>ISession</see>
13647 </desc>
13648 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13649 <param name="return" type="ISession" dir="return"/>
13650 </method>
13651
13652 <method name="logoff">
13653 <desc>
13654 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13655 and destroys all resources associated with the session (most importantly, all
13656 managed objects created in the server while the session was active).
13657 </desc>
13658 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13659 </method>
13660
13661 </interface>
13662
13663</if>
13664
13665 <!--
13666 // IPerformanceCollector & friends
13667 /////////////////////////////////////////////////////////////////////////
13668 -->
13669
13670 <interface
13671 name="IPerformanceMetric" extends="$unknown"
13672 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13673 >
13674 <desc>
13675 The IPerformanceMetric interface represents parameters of the given
13676 performance metric.
13677 </desc>
13678
13679 <attribute name="metricName" type="wstring" readonly="yes">
13680 <desc>
13681 Name of the metric.
13682 </desc>
13683 </attribute>
13684
13685 <attribute name="object" type="$unknown" readonly="yes">
13686 <desc>
13687 Object this metric belongs to.
13688 </desc>
13689 </attribute>
13690
13691 <attribute name="description" type="wstring" readonly="yes">
13692 <desc>
13693 Textual description of the metric.
13694 </desc>
13695 </attribute>
13696
13697 <attribute name="period" type="unsigned long" readonly="yes">
13698 <desc>
13699 Time interval between samples, measured in seconds.
13700 </desc>
13701 </attribute>
13702
13703 <attribute name="count" type="unsigned long" readonly="yes">
13704 <desc>
13705 Number of recent samples retained by the performance collector for this
13706 metric.
13707
13708 When the collected sample count exceeds this number, older samples
13709 are discarded.
13710 </desc>
13711 </attribute>
13712
13713 <attribute name="unit" type="wstring" readonly="yes">
13714 <desc>
13715 Unit of measurement.
13716 </desc>
13717 </attribute>
13718
13719 <attribute name="minimumValue" type="long" readonly="yes">
13720 <desc>
13721 Minimum possible value of this metric.
13722 </desc>
13723 </attribute>
13724
13725 <attribute name="maximumValue" type="long" readonly="yes">
13726 <desc>
13727 Maximum possible value of this metric.
13728 </desc>
13729 </attribute>
13730 </interface>
13731
13732 <interface
13733 name="IPerformanceCollector" extends="$unknown"
13734 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13735 wsmap="managed"
13736 >
13737 <desc>
13738 The IPerformanceCollector interface represents a service that collects and
13739 stores performance metrics data.
13740
13741 Performance metrics are associated with objects of interfaces like IHost and
13742 IMachine. Each object has a distinct set of performance metrics.
13743 The set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13744
13745 Metric data is collected at the specified intervals and is retained
13746 internally. The interval and the number of retained samples can be set
13747 with <link to="IPerformanceCollector::setupMetrics" />.
13748
13749 Metrics are organized hierarchically, with each level separated by a
13750 slash (/) character. Generally, the scheme for metric names is like this:
13751
13752 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13753
13754 "Category/Metric" together form the base metric name. A base metric is the
13755 smallest unit for which a sampling interval and the number of retained
13756 samples can be set. Only base metrics can be enabled and disabled. All
13757 sub-metrics are collected when their base metric is collected.
13758 Collected values for any set of sub-metrics can be queried with
13759 <link to="IPerformanceCollector::queryMetricsData" />.
13760
13761 For example "CPU/Load/User:avg"
13762 metric name stands for the "CPU" category, "Load" metric, "User" submetric,
13763 "average" aggregate. An aggregate function is computed over all retained
13764 data. Valid aggregate functions are:
13765
13766 <ul>
13767 <li>avg -- average</li>
13768 <li>min -- minimum</li>
13769 <li>max -- maximum</li>
13770 </ul>
13771
13772 When setting up
13773 metric parameters, querying metric data, enabling or disabling metrics
13774 wildcards can be used in metric names to specify a subset of metrics. For
13775 example, to select all CPU-related metrics use <tt>CPU/*</tt>, all
13776 averages can be queried using <tt>*:avg</tt> and so on. To query metric
13777 values without aggregates <tt>*:</tt> can be used.
13778
13779 The valid names for base metrics are:
13780
13781 <ul>
13782 <li>CPU/Load</li>
13783 <li>CPU/MHz</li>
13784 <li>RAM/Usage</li>
13785 </ul>
13786
13787 The general sequence for collecting and retrieving the metrics is:
13788 <ul>
13789 <li>
13790 Obtain an instance of IPerformanceCollector with
13791 <link to="IVirtualBox::performanceCollector" />
13792 </li>
13793 <li>
13794 Allocate and populate an array with references to objects the metrics
13795 will be collected for. Use references to IHost and IMachine objects.
13796 </li>
13797 <li>
13798 Allocate and populate an array with base metric names the data will be
13799 collected for.
13800 </li>
13801 <li>
13802 Call <link to="IPerformanceCollector::setupMetrics" />. From now on the
13803 metric data will be collected and stored.
13804 </li>
13805 <li>
13806 Wait for the data to get collected.
13807 </li>
13808 <li>
13809 Allocate and populate an array with references to objects the metric
13810 values will be queried for. You can re-use the object array used for
13811 setting base metrics.
13812 </li>
13813 <li>
13814 Allocate and populate an array with metric names the data will be
13815 collected for. Note that metric names differ from base metric names.
13816 </li>
13817 <li>
13818 Call <link to="IPerformanceCollector::queryMetricsData" />. The data that
13819 have been collected so far are returned. Note that the values are still
13820 retained internally and data collection continues.
13821 </li>
13822 </ul>
13823
13824 For an example of usage refer to the following files in VirtualBox SDK:
13825 <ul>
13826 <li>
13827 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13828 </li>
13829 <li>
13830 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13831 </li>
13832 </ul>
13833 </desc>
13834
13835 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13836 <desc>
13837 Array of unique names of metrics.
13838
13839 This array represents all metrics supported by the performance
13840 collector. Individual objects do not necessarily support all of them.
13841 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13842 list of supported metrics for a particular object.
13843 </desc>
13844 </attribute>
13845
13846 <method name="getMetrics">
13847 <desc>
13848 Returns parameters of specified metrics for a set of objects.
13849 <note>
13850 @c Null metrics array means all metrics. @c Null object array means
13851 all existing objects.
13852 </note>
13853 </desc>
13854 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13855 <desc>
13856 Metric name filter. Currently, only a comma-separated list of metrics
13857 is supported.
13858 </desc>
13859 </param>
13860 <param name="objects" type="$unknown" dir="in" safearray="yes">
13861 <desc>
13862 Set of objects to return metric parameters for.
13863 </desc>
13864 </param>
13865 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13866 <desc>
13867 Array of returned metric parameters.
13868 </desc>
13869 </param>
13870 </method>
13871
13872 <method name="setupMetrics">
13873 <desc>
13874 Sets parameters of specified base metrics for a set of objects. Returns
13875 an array of <link to="IPerformanceMetric" /> describing the metrics have
13876 been affected.
13877 <note>
13878 @c Null or empty metric name array means all metrics. @c Null or empty
13879 object array means all existing objects. If metric name array contains
13880 a single element and object array contains many, the single metric
13881 name array element is applied to each object array element to form
13882 metric/object pairs.
13883 </note>
13884 </desc>
13885 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13886 <desc>
13887 Metric name filter. Comma-separated list of metrics with wildcard
13888 support.
13889 </desc>
13890 </param>
13891 <param name="objects" type="$unknown" dir="in" safearray="yes">
13892 <desc>
13893 Set of objects to setup metric parameters for.
13894 </desc>
13895 </param>
13896 <param name="period" type="unsigned long" dir="in">
13897 <desc>
13898 Time interval in seconds between two consecutive samples of performance
13899 data.
13900 </desc>
13901 </param>
13902 <param name="count" type="unsigned long" dir="in">
13903 <desc>
13904 Number of samples to retain in performance data history. Older samples
13905 get discarded.
13906 </desc>
13907 </param>
13908 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13909 <desc>
13910 Array of metrics that have been modified by the call to this method.
13911 </desc>
13912 </param>
13913 </method>
13914
13915 <method name="enableMetrics">
13916 <desc>
13917 Turns on collecting specified base metrics. Returns an array of
13918 <link to="IPerformanceMetric" /> describing the metrics have been
13919 affected.
13920 <note>
13921 @c Null or empty metric name array means all metrics. @c Null or empty
13922 object array means all existing objects. If metric name array contains
13923 a single element and object array contains many, the single metric
13924 name array element is applied to each object array element to form
13925 metric/object pairs.
13926 </note>
13927 </desc>
13928 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13929 <desc>
13930 Metric name filter. Comma-separated list of metrics with wildcard
13931 support.
13932 </desc>
13933 </param>
13934 <param name="objects" type="$unknown" dir="in" safearray="yes">
13935 <desc>
13936 Set of objects to enable metrics for.
13937 </desc>
13938 </param>
13939 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13940 <desc>
13941 Array of metrics that have been modified by the call to this method.
13942 </desc>
13943 </param>
13944 </method>
13945
13946 <method name="disableMetrics">
13947 <desc>
13948 Turns off collecting specified base metrics. Returns an array of
13949 <link to="IPerformanceMetric" /> describing the metrics have been
13950 affected.
13951 <note>
13952 @c Null or empty metric name array means all metrics. @c Null or empty
13953 object array means all existing objects. If metric name array contains
13954 a single element and object array contains many, the single metric
13955 name array element is applied to each object array element to form
13956 metric/object pairs.
13957 </note>
13958 </desc>
13959 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13960 <desc>
13961 Metric name filter. Comma-separated list of metrics with wildcard
13962 support.
13963 </desc>
13964 </param>
13965 <param name="objects" type="$unknown" dir="in" safearray="yes">
13966 <desc>
13967 Set of objects to disable metrics for.
13968 </desc>
13969 </param>
13970 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13971 <desc>
13972 Array of metrics that have been modified by the call to this method.
13973 </desc>
13974 </param>
13975 </method>
13976
13977 <method name="queryMetricsData">
13978 <desc>
13979 Queries collected metrics data for a set of objects.
13980
13981 The data itself and related metric information are returned in seven
13982 parallel and one flattened array of arrays. Elements of
13983 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13984 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13985 the same index describe one set of values corresponding to a single
13986 metric.
13987
13988 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13989 start and length of a sub-array is indicated by
13990 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13991 value for metric <tt>metricNames[i]</tt> is at
13992 <tt>returnData[returnIndices[i]]</tt>.
13993
13994 <note>
13995 @c Null or empty metric name array means all metrics. @c Null or empty
13996 object array means all existing objects. If metric name array contains
13997 a single element and object array contains many, the single metric
13998 name array element is applied to each object array element to form
13999 metric/object pairs.
14000 </note>
14001 <note>
14002 Data collection continues behind the scenes after call to
14003 @c queryMetricsData. The return data can be seen as the snapshot of
14004 the current state at the time of @c queryMetricsData call. The
14005 internally kept metric values are not cleared by the call. This makes
14006 possible querying different subsets of metrics or aggregates with
14007 subsequent calls. If periodic querying is needed it is highly
14008 suggested to query the values with @c interval*count period to avoid
14009 confusion. This way a completely new set of data values will be
14010 provided by each query.
14011 </note>
14012 </desc>
14013 <param name="metricNames" type="wstring" dir="in" safearray="yes">
14014 <desc>
14015 Metric name filter. Comma-separated list of metrics with wildcard
14016 support.
14017 </desc>
14018 </param>
14019 <param name="objects" type="$unknown" dir="in" safearray="yes">
14020 <desc>
14021 Set of objects to query metrics for.
14022 </desc>
14023 </param>
14024 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
14025 <desc>
14026 Names of metrics returned in @c returnData.
14027 </desc>
14028 </param>
14029 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
14030 <desc>
14031 Objects associated with metrics returned in @c returnData.
14032 </desc>
14033 </param>
14034 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
14035 <desc>
14036 Units of measurement for each returned metric.
14037 </desc>
14038 </param>
14039 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
14040 <desc>
14041 Divisor that should be applied to return values in order to get
14042 floating point values. For example:
14043 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
14044 will retrieve the floating point value of i-th sample of the first
14045 metric.
14046 </desc>
14047 </param>
14048 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
14049 <desc>
14050 Sequence numbers of the first elements of value sequences of particular metrics
14051 returned in @c returnData. For aggregate metrics it is the sequence number of
14052 the sample the aggregate started calculation from.
14053 </desc>
14054 </param>
14055 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
14056 <desc>
14057 Indices of the first elements of value sequences of particular metrics
14058 returned in @c returnData.
14059 </desc>
14060 </param>
14061 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
14062 <desc>
14063 Lengths of value sequences of particular metrics.
14064 </desc>
14065 </param>
14066 <param name="returnData" type="long" dir="return" safearray="yes">
14067 <desc>
14068 Flattened array of all metric data containing sequences of values for
14069 each metric.
14070 </desc>
14071 </param>
14072 </method>
14073
14074 </interface>
14075
14076 <module name="VBoxSVC" context="LocalServer">
14077 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14078 namespace="virtualbox.org">
14079 <interface name="IVirtualBox" default="yes"/>
14080 </class>
14081 </module>
14082
14083 <module name="VBoxC" context="InprocServer" threadingModel="Free">
14084 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
14085 namespace="virtualbox.org">
14086 <interface name="ISession" default="yes"/>
14087 </class>
14088 <class name="CallbackWrapper" uuid="49EE8561-5563-4715-B18C-A4B1A490DAFE"
14089 namespace="virtualbox.org">
14090 <interface name="ILocalOwner" default="yes"/>
14091 <interface name="IVirtualBoxCallback"/>
14092 <interface name="IConsoleCallback"/>
14093 </class>
14094 </module>
14095
14096</library>
14097
14098</idl>
14099
14100<!-- 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