VirtualBox

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

Last change on this file since 31692 was 31692, checked in by vboxsync, 14 years ago

Cleaned up IGuest page fusion api

  • Property svn:eol-style set to native
File size: 556.2 KB
Line 
1<?xml version="1.0" ?>
2
3<!--
4
5 Copyright (C) 2006-2010 Oracle Corporation
6
7 This file is part of VirtualBox Open Source Edition (OSE), as
8 available from http://www.virtualbox.org. This file is free software;
9 you can redistribute it and/or modify it under the terms of the GNU
10 General Public License (GPL) as published by the Free Software
11 Foundation, in version 2 as it comes in the "COPYING" file of the
12 VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13 hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
14-->
15
16<!--
17 This is the master declaration for VirtualBox's Main API,
18 represented by COM/XPCOM and web service interfaces.
19
20 From this document, the build system generates several files
21 via XSLT that are then used during the build process.
22
23 Below is the list of XSL templates that operate on this file and
24 output files they generate. These XSL templates must be updated
25 whenever the schema of this file changes:
26
27 1. src/VBox/Main/idl/midl.xsl =>
28 out/<platform>/bin/sdk/idl/VirtualBox.idl
29 (MS COM interface definition file for Main API)
30
31 2. src/VBox/Main/idl/xpidl.xsl =>
32 out/<platform>/bin/sdk/idl/VirtualBox_XPCOM.idl
33 (XPCOM interface definition file for Main API)
34
35 3. src/VBox/Main/idl/doxygen.xsl =>
36 out/<platform>/obj/src/VBox/Main/VirtualBox.idl
37 (pseudo-IDL for Doxygen to generate the official Main API
38 documentation)
39
40 4. src/VBox/Main/webservice/*.xsl =>
41 a bunch of WSDL and C++ files
42 (VirtualBox web service sources and SOAP mappers;
43 see src/VBox/Main/webservice/Makefile.kmk for details)
44
45 5. src/VBox/Frontends/VirtualBox/include/COMWrappers.xsl =>
46 out/<platform>/obj/src/VBox/Frontends/VirtualBox/VirtualBox/include/COMWrappers.h
47 (smart Qt-based C++ wrapper classes for COM interfaces
48 of the Main API)
49
50 6. src/VBox/Installer/win32/VirtualBox_TypeLib.xsl =>
51 out/<platform>/obj/src/VBox/Installer/win32/VirtualBox_TypeLib.wxi
52 (Main API TypeLib block for the WiX installer)
53
54 7. src/VBox/Runtime/common/err/errmsgvboxcom.xsl =>
55 out/<platform>/obj/Runtime/errmsgvboxcomdata.h
56 (<result> extraction for the %Rhrc format specifier)
57-->
58
59<idl>
60
61<desc>
62 Welcome to the <b>VirtualBox Main API documentation</b>. This documentation
63 describes the so-called <i>VirtualBox Main API</i> which comprises all public
64 COM interfaces and components provided by the VirtualBox server and by the
65 VirtualBox client library.
66
67 VirtualBox employs a client-server design, meaning that whenever any part of
68 VirtualBox is running -- be it the Qt GUI, the VBoxManage command-line
69 interface or any virtual machine --, a dedicated server process named
70 VBoxSVC runs in the background. This allows multiple processes working with
71 VirtualBox to cooperate without conflicts. These processes communicate to each
72 other using inter-process communication facilities provided by the COM
73 implementation of the host computer.
74
75 On Windows platforms, the VirtualBox Main API uses Microsoft COM, a native COM
76 implementation. On all other platforms, Mozilla XPCOM, an open-source COM
77 implementation, is used.
78
79 All the parts that a typical VirtualBox user interacts with (the Qt GUI,
80 the VBoxManage command-line interface and the VBoxVRDP server) are technically
81 front-ends to the Main API and only use the interfaces that are documented
82 in this Main API documentation. This ensures that, with any given release
83 version of VirtualBox, all capabilities of the product that could be useful
84 to an external client program are always exposed by way of this API.
85
86 The VirtualBox Main API (also called the <i>VirtualBox COM library</i>)
87 contains two public component classes:
88 <tt>%VirtualBox.VirtualBox</tt> and <tt>%VirtualBox.Session</tt>, which
89 implement IVirtualBox and ISession interfaces respectively. These two classes
90 are of supreme importance and will be needed in order for any front-end
91 program to do anything useful. It is recommended to read the documentation of
92 the mentioned interfaces first.
93
94 The <tt>%VirtualBox.VirtualBox</tt> class is a singleton. This means that
95 there can be only one object of this class on the local machine at any given
96 time. This object is a parent of many other objects in the VirtualBox COM
97 library and lives in the VBoxSVC process. In fact, when you create an instance
98 of the <tt>VirtualBox.VirtualBox</tt>, the COM subsystem checks if the VBoxSVC
99 process is already running, starts it if not, and returns you a reference to
100 the <tt>VirtualBox</tt> object created in this process. When the last reference
101 to this object is released, the VBoxSVC process ends (with a 5 second delay to
102 protect from too frequent restarts).
103
104 The <tt>%VirtualBox.Session</tt> class is a regular component. You can create
105 as many <tt>Session</tt> objects as you need but all of them will live in a
106 process which issues the object instantiation call. <tt>Session</tt> objects
107 represent virtual machine sessions which are used to configure virtual
108 machines and control their execution.
109</desc>
110
111<if target="midl">
112 <cpp line="enum {"/>
113 <cpp line=" kTypeLibraryMajorVersion = 1,"/>
114 <cpp line=" kTypeLibraryMinorVersion = 0"/>
115 <cpp line="};"/>
116</if>
117
118<if target="xpidl">
119 <!-- NS_IMPL_THREADSAFE_ISUPPORTSxx_CI macros are placed here, for convenience -->
120 <cpp>
121/* currently, nsISupportsImpl.h lacks the below-like macros */
122
123#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI NS_IMPL_QUERY_INTERFACE1_CI
124#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI NS_IMPL_QUERY_INTERFACE2_CI
125#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI NS_IMPL_QUERY_INTERFACE3_CI
126#define NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI NS_IMPL_QUERY_INTERFACE4_CI
127
128
129#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_CI
130# define NS_IMPL_THREADSAFE_ISUPPORTS1_CI(_class, _interface) \
131 NS_IMPL_THREADSAFE_ADDREF(_class) \
132 NS_IMPL_THREADSAFE_RELEASE(_class) \
133 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_CI(_class, _interface) \
134 NS_IMPL_CI_INTERFACE_GETTER1(_class, _interface)
135#endif
136
137#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_CI
138# define NS_IMPL_THREADSAFE_ISUPPORTS2_CI(_class, _i1, _i2) \
139 NS_IMPL_THREADSAFE_ADDREF(_class) \
140 NS_IMPL_THREADSAFE_RELEASE(_class) \
141 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_CI(_class, _i1, _i2) \
142 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
143#endif
144
145#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_CI
146# define NS_IMPL_THREADSAFE_ISUPPORTS3_CI(_class, _i1, _i2, _i3) \
147 NS_IMPL_THREADSAFE_ADDREF(_class) \
148 NS_IMPL_THREADSAFE_RELEASE(_class) \
149 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_CI(_class, _i1, _i2, _i3) \
150 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
151#endif
152
153#ifndef NS_IMPL_THREADSAFE_ISUPPORTS4_CI
154# define NS_IMPL_THREADSAFE_ISUPPORTS4_CI(_class, _i1, _i2, _i3, _i4) \
155 NS_IMPL_THREADSAFE_ADDREF(_class) \
156 NS_IMPL_THREADSAFE_RELEASE(_class) \
157 NS_IMPL_THREADSAFE_QUERY_INTERFACE4_CI(_class, _i1, _i2, _i3, _i4) \
158 NS_IMPL_CI_INTERFACE_GETTER4(_class, _i1, _i2, _i3, _i4)
159#endif
160
161#ifndef NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
162# define NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
163 NS_INTERFACE_MAP_BEGIN(_class) \
164 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
165 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
166 NS_IMPL_QUERY_CLASSINFO(_class) \
167 NS_INTERFACE_MAP_END
168#endif
169
170#ifndef NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
171# define NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
172 _i2, _ic2) \
173 NS_INTERFACE_MAP_BEGIN(_class) \
174 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
175 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
176 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
177 NS_IMPL_QUERY_CLASSINFO(_class) \
178 NS_INTERFACE_MAP_END
179#endif
180
181#ifndef NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
182# define NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
183 _i2, _ic2, _i3, _ic3) \
184 NS_INTERFACE_MAP_BEGIN(_class) \
185 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i1, _ic1) \
186 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i2, _ic2) \
187 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(_i3, _ic3) \
188 NS_INTERFACE_MAP_ENTRY_AMBIGUOUS(nsISupports, _ic1) \
189 NS_IMPL_QUERY_CLASSINFO(_class) \
190 NS_INTERFACE_MAP_END
191#endif
192
193#define NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE1_AMBIGUOUS_CI
194#define NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE2_AMBIGUOUS_CI
195#define NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI NS_IMPL_QUERY_INTERFACE3_AMBIGUOUS_CI
196
197#ifndef NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI
198# define NS_IMPL_THREADSAFE_ISUPPORTS1_AMBIGUOUS_CI(_class, _i1, _ic1) \
199 NS_IMPL_THREADSAFE_ADDREF(_class) \
200 NS_IMPL_THREADSAFE_RELEASE(_class) \
201 NS_IMPL_THREADSAFE_QUERY_INTERFACE1_AMBIGUOUS_CI(_class, _i1, _ic1) \
202 NS_IMPL_CI_INTERFACE_GETTER1(_class, _i1)
203#endif
204
205#ifndef NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI
206# define NS_IMPL_THREADSAFE_ISUPPORTS2_AMBIGUOUS_CI(_class, _i1, _ic1, \
207 _i2, _ic2) \
208 NS_IMPL_THREADSAFE_ADDREF(_class) \
209 NS_IMPL_THREADSAFE_RELEASE(_class) \
210 NS_IMPL_THREADSAFE_QUERY_INTERFACE2_AMBIGUOUS_CI(_class, _i1, _ic1, \
211 _i2, _ic2) \
212 NS_IMPL_CI_INTERFACE_GETTER2(_class, _i1, _i2)
213#endif
214
215#ifndef NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI
216# define NS_IMPL_THREADSAFE_ISUPPORTS3_AMBIGUOUS_CI(_class, _i1, _ic1, \
217 _i2, _ic2, _i3, _ic3) \
218 NS_IMPL_THREADSAFE_ADDREF(_class) \
219 NS_IMPL_THREADSAFE_RELEASE(_class) \
220 NS_IMPL_THREADSAFE_QUERY_INTERFACE3_AMBIGUOUS_CI(_class, _i1, _ic1, \
221 _i2, _ic2, _i3, _ic3) \
222 NS_IMPL_CI_INTERFACE_GETTER3(_class, _i1, _i2, _i3)
223#endif
224
225 </cpp>
226</if>
227
228<library
229 name="VirtualBox"
230 uuid="46137EEC-703B-4fe5-AFD4-7C9BBBBA0259"
231 version="1.3"
232 desc="VirtualBox Type Library"
233 appUuid="819B4D85-9CEE-493C-B6FC-64FFE759B3C9"
234 supportsErrorInfo="yes"
235>
236
237
238 <!--
239 // COM result codes for VirtualBox
240 /////////////////////////////////////////////////////////////////////////
241 -->
242
243 <descGroup id="VirtualBox_COM_result_codes" title="VirtualBox COM result codes">
244 <desc>
245 This section describes all VirtualBox-specific COM result codes that may
246 be returned by methods of VirtualBox COM interfaces in addition to
247 standard COM result codes.
248
249 Note that along with the result code, every VirtualBox method returns
250 extended error information through the IVirtualBoxErrorInfo interface on
251 failure. This interface is a preferred way to present the error to the end
252 user because it contains a human readable description of the error. Raw
253 result codes, both standard and described in this section, are intended to
254 be used by programs to analyze the reason of a failure and select an
255 appropriate course of action without involving the end user (for example,
256 retry the operation later or make a different call).
257
258 The standard COM result codes that may originate from our methods include:
259
260 <table>
261 <tr><td>E_INVALIDARG</td>
262 <td>
263 Returned when the value of the method's argument is not within the range
264 of valid values. This should not be confused with situations when the
265 value is within the range but simply doesn't suit the current object
266 state and there is a possibility that it will be accepted later (in such
267 cases VirtualBox-specific codes are returned, for example,
268 <link to="VBOX_E_OBJECT_NOT_FOUND"/>).
269 </td>
270 </tr>
271 <tr><td>E_POINTER</td>
272 <td>
273 Returned if a memory pointer for the output argument is invalid (for
274 example, @c null). Note that when pointers representing input
275 arguments (such as strings) are invalid, E_INVALIDARG is returned.
276 </td>
277 </tr>
278 <tr><td>E_ACCESSDENIED</td>
279 <td>
280 Returned when the called object is not ready. Since the lifetime of a
281 public COM object cannot be fully controlled by the implementation,
282 VirtualBox maintains the readiness state for all objects it creates and
283 returns this code in response to any method call on the object that was
284 deactivated by VirtualBox and is not functioning any more.
285 </td>
286 </tr>
287 <tr><td>E_OUTOFMEMORY</td>
288 <td>
289 Returned when a memory allocation operation fails.
290 </td>
291 </tr>
292 </table>
293 </desc>
294 </descGroup>
295
296 <!--
297 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
298 everything in <result>/<desc> after (and including) the first dot, so express
299 the matter of the error code in the first sentence and keep it short.
300 -->
301
302 <result name="VBOX_E_OBJECT_NOT_FOUND" value="0x80BB0001">
303 <desc>
304 Object corresponding to the supplied arguments does not exist.
305 </desc>
306 </result>
307
308 <result name="VBOX_E_INVALID_VM_STATE" value="0x80BB0002">
309 <desc>
310 Current virtual machine state prevents the operation.
311 </desc>
312 </result>
313
314 <result name="VBOX_E_VM_ERROR" value="0x80BB0003">
315 <desc>
316 Virtual machine error occurred attempting the operation.
317 </desc>
318 </result>
319
320 <result name="VBOX_E_FILE_ERROR" value="0x80BB0004">
321 <desc>
322 File not accessible or erroneous file contents.
323 </desc>
324 </result>
325
326 <result name="VBOX_E_IPRT_ERROR" value="0x80BB0005">
327 <desc>
328 Runtime subsystem error.
329 </desc>
330 </result>
331
332 <result name="VBOX_E_PDM_ERROR" value="0x80BB0006">
333 <desc>
334 Pluggable Device Manager error.
335 </desc>
336 </result>
337
338 <result name="VBOX_E_INVALID_OBJECT_STATE" value="0x80BB0007">
339 <desc>
340 Current object state prohibits operation.
341 </desc>
342 </result>
343
344 <result name="VBOX_E_HOST_ERROR" value="0x80BB0008">
345 <desc>
346 Host operating system related error.
347 </desc>
348 </result>
349
350 <result name="VBOX_E_NOT_SUPPORTED" value="0x80BB0009">
351 <desc>
352 Requested operation is not supported.
353 </desc>
354 </result>
355
356 <result name="VBOX_E_XML_ERROR" value="0x80BB000A">
357 <desc>
358 Invalid XML found.
359 </desc>
360 </result>
361
362 <result name="VBOX_E_INVALID_SESSION_STATE" value="0x80BB000B">
363 <desc>
364 Current session state prohibits operation.
365 </desc>
366 </result>
367
368 <result name="VBOX_E_OBJECT_IN_USE" value="0x80BB000C">
369 <desc>
370 Object being in use prohibits operation.
371 </desc>
372 </result>
373
374 <!--
375 Note that src/VBox/Runtime/common/err/errmsgvboxcom.xsl will ignore
376 everything in <result>/<desc> after (and including) the first dot, so express
377 the matter of the error code in the first sentence and keep it short.
378 -->
379
380 <descGroup/>
381
382 <!--
383 // all common enums
384 /////////////////////////////////////////////////////////////////////////
385 -->
386
387 <enum name="SettingsVersion"
388 uuid="52bd6f5f-1adb-4493-975d-581a9c4b803f"
389 >
390 <desc>Settings version of VirtualBox settings files. This is written to
391 the "version" attribute of the root "VirtualBox" element in the settings
392 file XML and indicates which VirtualBox version wrote the file.
393 </desc>
394
395 <const name="Null" value="0">
396 <desc>Null value, indicates invalid version.</desc>
397 </const>
398 <const name="v1_0" value="1">
399 <desc>Legacy settings version, not currently supported.</desc>
400 </const>
401 <const name="v1_1" value="2">
402 <desc>Legacy settings version, not currently supported.</desc>
403 </const>
404 <const name="v1_2" value="3">
405 <desc>Legacy settings version, not currently supported.</desc>
406 </const>
407 <const name="v1_3pre" value="4">
408 <desc>Legacy settings version, not currently supported.</desc>
409 </const>
410 <const name="v1_3" value="5">
411 <desc>Settings version "1.3", written by VirtualBox 2.0.12.</desc>
412 <!--
413 Machine XML: Capitalization of Uart, Lpt elements and many attributes changed.
414 -->
415 </const>
416 <const name="v1_4" value="6">
417 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
418 <!--
419 VirtualBox.xml: big DiskRegistry -> MediaRegistry revamp, various HardDisk types merged
420 (was VirtualDiskImage, VMDKImage, VHDImage, ISCSIHardDisk, CustomHardDisk, DiffHardDisk)
421 -->
422 </const>
423 <const name="v1_5" value="7">
424 <desc>Intermediate settings version, understood by VirtualBox 2.1.x.</desc>
425 <!-- 2008-09-04: 2.0.0 released
426 2008-11-20: settings version 1.5 introduced
427 2008-12-17: 2.1.0 released
428 Machine changes:
429 guest OS identifiers changed;
430 Machine/Hardware/Display/MonitorCount renamed to monitorCount;
431 Machine/Hardware/Display/Accelerate3D renamed to accelerate3D;
432 Machine/Hardware/CPU/CPUCount/@count changed to CPU/@count
433 -->
434 </const>
435 <const name="v1_6" value="8">
436 <desc>Settings version "1.6", written by VirtualBox 2.1.4 (at least).</desc>
437 <!-- 2008-12-17: 2.1.0 released
438 2008-12-19: settings version 1.6 introduced (is in 2.1 branch)
439 2009-04-08: 2.2.0 released
440 Machine changes: remove all Machine/Hardware/Network/Adapter/HostInterface[@TAPSetup or @TAPTerminate]/ attributes (done)
441 -->
442 </const>
443 <const name="v1_7" value="9">
444 <desc>Settings version "1.7", written by VirtualBox 2.2.x and 3.0.x.</desc>
445 <!-- 2008-12-17: 2.1.0 released
446 2009-03-11: settings version 1.7 introduced (is in 2.2 branch)
447 2009-04-08: 2.2.0 released
448 VirtualBox.xml additions: NetserviceRegistry with DHCPServers (done)
449 Machine changes: HardDiskAttachments is now StorageControllers (done)
450 -->
451 </const>
452 <const name="v1_8" value="10">
453 <desc>Intermediate settings version "1.8", understood by VirtualBox 3.1.x.</desc>
454 <!-- Machine additions: Display/@accelerate2DVideo (done)
455 -->
456 </const>
457 <const name="v1_9" value="11">
458 <desc>Settings version "1.9", written by VirtualBox 3.1.x.</desc>
459 <!-- The big storage controller / DVD / Floppy rework (done)
460 -->
461 </const>
462 <const name="v1_10" value="12">
463 <desc>Settings version "1.10", written by VirtualBox 3.2.x.</desc>
464 <!-- Machine changes: RTC localOrUTC (done)
465 CPU hot-plug support
466 -->
467 </const>
468 <const name="v1_11" value="13">
469 <desc>Settings version "1.11", written by VirtualBox 3.3.x.</desc>
470 <!-- Machine changes: HD Audio controller, per-machine disk registries
471 -->
472 </const>
473 <const name="Future" value="99999">
474 <desc>Settings version greater than "1.11", written by a future VirtualBox version.</desc>
475 </const>
476 </enum>
477
478 <enum
479 name="AccessMode"
480 uuid="1da0007c-ddf7-4be8-bcac-d84a1558785f"
481 >
482 <desc>
483 Access mode for opening files.
484 </desc>
485
486 <const name="ReadOnly" value="1"/>
487 <const name="ReadWrite" value="2"/>
488 </enum>
489
490 <enum
491 name="MachineState"
492 uuid="ec6c6a9e-113d-4ff4-b44f-0b69f21c97fe"
493 >
494 <desc>
495 Virtual machine execution state.
496
497 This enumeration represents possible values of the <link
498 to="IMachine::state"/> attribute.
499
500 Below is the basic virtual machine state diagram. It shows how the state
501 changes during virtual machine execution. The text in square braces shows
502 a method of the IConsole interface that performs the given state
503 transition.
504
505 <pre>
506 +---------[powerDown()] &lt;- Stuck &lt;--[failure]-+
507 V |
508 +-&gt; PoweredOff --+--&gt;[powerUp()]--&gt; Starting --+ | +-----[resume()]-----+
509 | | | | V |
510 | Aborted -----+ +--&gt; Running --[pause()]--&gt; Paused
511 | | ^ | ^ |
512 | Saved -----------[powerUp()]--&gt; Restoring -+ | | | |
513 | ^ | | | |
514 | | +-----------------------------------------+-|-------------------+ +
515 | | | | |
516 | | +-- Saving &lt;--------[takeSnapshot()]&lt;-------+---------------------+
517 | | | |
518 | +-------- Saving &lt;--------[saveState()]&lt;----------+---------------------+
519 | | |
520 +-------------- Stopping -------[powerDown()]&lt;----------+---------------------+
521 </pre>
522
523 Note that states to the right from PoweredOff, Aborted and Saved in the
524 above diagram are called <i>online VM states</i>. These states
525 represent the virtual machine which is being executed in a dedicated
526 process (usually with a GUI window attached to it where you can see the
527 activity of the virtual machine and interact with it). There are two
528 special pseudo-states, FirstOnline and LastOnline, that can be used in
529 relational expressions to detect if the given machine state is online or
530 not:
531
532 <pre>
533 if (machine.GetState() &gt;= MachineState_FirstOnline &amp;&amp;
534 machine.GetState() &lt;= MachineState_LastOnline)
535 {
536 ...the machine is being executed...
537 }
538 </pre>
539
540 When the virtual machine is in one of the online VM states (that is, being
541 executed), only a few machine settings can be modified. Methods working
542 with such settings contain an explicit note about that. An attempt to
543 change any oter setting or perform a modifying operation during this time
544 will result in the <link to="VBOX_E_INVALID_VM_STATE"/> error.
545
546 All online states except Running, Paused and Stuck are transitional: they
547 represent temporary conditions of the virtual machine that will last as
548 long as the operation that initiated such a condition.
549
550 The Stuck state is a special case. It means that execution of the machine
551 has reached the "Guru Meditation" condition. This condition indicates an
552 internal VMM (virtual machine manager) failure which may happen as a
553 result of either an unhandled low-level virtual hardware exception or one
554 of the recompiler exceptions (such as the <i>too-many-traps</i>
555 condition).
556
557 Note also that any online VM state may transit to the Aborted state. This
558 happens if the process that is executing the virtual machine terminates
559 unexpectedly (for example, crashes). Other than that, the Aborted state is
560 equivalent to PoweredOff.
561
562 There are also a few additional state diagrams that do not deal with
563 virtual machine execution and therefore are shown separately. The states
564 shown on these diagrams are called <i>offline VM states</i> (this includes
565 PoweredOff, Aborted and Saved too).
566
567 The first diagram shows what happens when a lengthy setup operation is
568 being executed (such as <link to="IMachine::attachDevice"/>).
569
570 <pre>
571 +----------------------------------(same state as before the call)------+
572 | |
573 +-&gt; PoweredOff --+ |
574 | | |
575 |-&gt; Aborted -----+--&gt;[lengthy VM configuration call] --&gt; SettingUp -----+
576 | |
577 +-&gt; Saved -------+
578 </pre>
579
580 The next two diagrams demonstrate the process of taking a snapshot of a
581 powered off virtual machine, restoring the state to that as of a snapshot
582 or deleting a snapshot, respectively.
583
584 <pre>
585 +----------------------------------(same state as before the call)------+
586 | |
587 +-&gt; PoweredOff --+ |
588 | +--&gt;[takeSnapshot()] -------------------&gt; Saving ------+
589 +-&gt; Aborted -----+
590
591 +-&gt; PoweredOff --+
592 | |
593 | Aborted -----+--&gt;[restoreSnapshot() ]-------&gt; RestoringSnapshot -+
594 | | [deleteSnapshot() ]-------&gt; DeletingSnapshot --+
595 +-&gt; Saved -------+ |
596 | |
597 +---(Saved if restored from an online snapshot, PoweredOff otherwise)---+
598 </pre>
599
600 Note that the Saving state is present in both the offline state group and
601 online state group. Currently, the only way to determine what group is
602 assumed in a particular case is to remember the previous machine state: if
603 it was Running or Paused, then Saving is an online state, otherwise it is
604 an offline state. This inconsistency may be removed in one of the future
605 versions of VirtualBox by adding a new state.
606
607 <note internal="yes">
608 For whoever decides to touch this enum: In order to keep the
609 comparisons involving FirstOnline and LastOnline pseudo-states valid,
610 the numeric values of these states must be correspondingly updated if
611 needed: for any online VM state, the condition
612 <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
613 @c true. The same relates to transient states for which
614 the condition <tt>FirstOnline &lt;= state &lt;= LastOnline</tt> must be
615 @c true.
616 </note>
617 </desc>
618
619 <const name="Null" value="0">
620 <desc>Null value (never used by the API).</desc>
621 </const>
622 <const name="PoweredOff" value="1">
623 <desc>
624 The machine is not running and has no saved execution state; it has
625 either never been started or been shut down successfully.
626 </desc>
627 </const>
628 <const name="Saved" value="2">
629 <desc>
630 The machine is not currently running, but the execution state of the machine
631 has been saved to an external file when it was running, from where
632 it can be resumed.
633 </desc>
634 </const>
635 <const name="Teleported" value="3">
636 <desc>
637 The machine was teleported to a different host (or process) and then
638 powered off. Take care when powering it on again may corrupt resources
639 it shares with the teleportation target (e.g. disk and network).
640 </desc>
641 </const>
642 <const name="Aborted" value="4">
643 <desc>
644 The process running the machine has terminated abnormally. This may
645 indicate a crash of the VM process in host execution context, or
646 the VM process has been terminated externally.
647 </desc>
648 </const>
649 <const name="Running" value="5">
650 <desc>
651 The machine is currently being executed.
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 precede the Paused state.
656 TODO: Lift this spectacularly wonderful restriction.
657 </note>
658 </desc>
659 </const>
660 <const name="Paused" value="6">
661 <desc>
662 Execution of the machine has been paused.
663 <note internal="yes">
664 For whoever decides to touch this enum: In order to keep the
665 comparisons in the old source code valid, this state must immediately
666 follow the Running state.
667 TODO: Lift this spectacularly wonderful restriction.
668 </note>
669 </desc>
670 </const>
671 <const name="Stuck" value="7">
672 <desc>
673 Execution of the machine has reached the "Guru Meditation"
674 condition. This indicates a severe error in the hypervisor itself.
675 <note internal="yes">
676 bird: Why this uncool name? Could we rename it to "GuruMeditation" or
677 "Guru", perhaps? Or are there some other VMM states that are
678 intended to be lumped in here as well?
679 </note>
680 </desc>
681 </const>
682 <const name="Teleporting" value="8">
683 <desc>
684 The machine is about to be teleported to a different host or process.
685 It is possible to pause a machine in this state, but it will go to the
686 @c TeleportingPausedVM state and it will not be
687 possible to resume it again unless the teleportation fails.
688 </desc>
689 </const>
690 <const name="LiveSnapshotting" value="9">
691 <desc>
692 A live snapshot is being taken. The machine is running normally, but
693 some of the runtime configuration options are inaccessible. Also, if
694 paused while in this state it will transition to
695 @c Saving and it will not be resume the
696 execution until the snapshot operation has completed.
697 </desc>
698 </const>
699 <const name="Starting" value="10">
700 <desc>
701 Machine is being started after powering it on from a
702 zero execution state.
703 </desc>
704 </const>
705 <const name="Stopping" value="11">
706 <desc>
707 Machine is being normally stopped powering it off, or after the guest OS
708 has initiated a shutdown sequence.
709 </desc>
710 </const>
711 <const name="Saving" value="12">
712 <desc>
713 Machine is saving its execution state to a file, or an online
714 snapshot of the machine is being taken.
715 </desc>
716 </const>
717 <const name="Restoring" value="13">
718 <desc>
719 Execution state of the machine is being restored from a file
720 after powering it on from the saved execution state.
721 </desc>
722 </const>
723 <const name="TeleportingPausedVM" value="14">
724 <desc>
725 The machine is being teleported to another host or process, but it is
726 not running. This is the paused variant of the
727 @c state.
728 </desc>
729 </const>
730 <const name="TeleportingIn" value="15">
731 <desc>
732 Teleporting the machine state in from another host or process.
733 </desc>
734 </const>
735 <const name="FaultTolerantSyncing" value="16">
736 <desc>
737 The machine is being synced with a fault tolerant VM running elsewhere.
738 </desc>
739 </const>
740 <const name="DeletingSnapshotOnline" value="17">
741 <desc>
742 Like @c DeletingSnapshot, but the merging of media is ongoing in
743 the background while the machine is running.
744 </desc>
745 </const>
746 <const name="DeletingSnapshotPaused" value="18">
747 <desc>
748 Like @c DeletingSnapshotOnline, but the machine was paused when the
749 merging of differencing media was started.
750 </desc>
751 </const>
752 <const name="RestoringSnapshot" value="19">
753 <desc>
754 A machine snapshot is being restored; this typically does not take long.
755 </desc>
756 </const>
757 <const name="DeletingSnapshot" value="20">
758 <desc>
759 A machine snapshot is being deleted; this can take a long time since this
760 may require merging differencing media. This value indicates that the
761 machine is not running while the snapshot is being deleted.
762 </desc>
763 </const>
764 <const name="SettingUp" value="21">
765 <desc>
766 Lengthy setup operation is in progress.
767 </desc>
768 </const>
769
770 <const name="FirstOnline" value="5" wsmap="suppress"> <!-- Running -->
771 <desc>
772 Pseudo-state: first online state (for use in relational expressions).
773 </desc>
774 </const>
775 <const name="LastOnline" value="18" wsmap="suppress"> <!-- DeletingSnapshotPaused -->
776 <desc>
777 Pseudo-state: last online state (for use in relational expressions).
778 </desc>
779 </const>
780
781 <const name="FirstTransient" value="8" wsmap="suppress"> <!-- Teleporting -->
782 <desc>
783 Pseudo-state: first transient state (for use in relational expressions).
784 </desc>
785 </const>
786 <const name="LastTransient" value="21" wsmap="suppress"> <!-- SettingUp -->
787 <desc>
788 Pseudo-state: last transient state (for use in relational expressions).
789 </desc>
790 </const>
791
792 </enum>
793
794 <enum
795 name="SessionState"
796 uuid="cf2700c0-ea4b-47ae-9725-7810114b94d8"
797 >
798 <desc>
799 Session state. This enumeration represents possible values of
800 <link to="IMachine::sessionState"/> and <link to="ISession::state"/>
801 attributes.
802 </desc>
803
804 <const name="Null" value="0">
805 <desc>Null value (never used by the API).</desc>
806 </const>
807 <const name="Unlocked" value="1">
808 <desc>
809 In <link to="IMachine::sessionState"/>, this means that the machine
810 is not locked for any sessions.
811
812 In <link to="ISession::state"/>, this means that no machine is
813 currently locked for this session.
814 </desc>
815 </const>
816 <const name="Locked" value="2">
817 <desc>
818 In <link to="IMachine::sessionState"/>, this means that the machine
819 is currently locked for a session, whose process identifier can
820 then be found in the <link to="IMachine::sessionPid" /> attribute.
821
822 In <link to="ISession::state"/>, this means that a machine is
823 currently locked for this session, and the mutable machine object
824 can be found in the <link to="ISession::machine"/> attribute
825 (see <link to="IMachine::lockMachine" /> for details).
826 </desc>
827 </const>
828 <const name="Spawning" value="3">
829 <desc>
830 A new process is being spawned for the machine as a result of
831 <link to="IMachine::launchVMProcess"/> call. This state also occurs
832 as a short transient state during an <link to="IMachine::lockMachine"/>
833 call.
834 </desc>
835 </const>
836 <const name="Unlocking" value="4">
837 <desc>
838 The session is being unlocked.
839 </desc>
840 </const>
841 </enum>
842
843 <enum
844 name="CPUPropertyType"
845 uuid="24d356a6-2f45-4abd-b977-1cbe9c4701f5"
846 >
847 <desc>
848 Virtual CPU property type. This enumeration represents possible values of the
849 IMachine get- and setCPUProperty methods.
850 </desc>
851 <const name="Null" value="0">
852 <desc>Null value (never used by the API).</desc>
853 </const>
854 <const name="PAE" value="1">
855 <desc>
856 This setting determines whether VirtualBox will expose the Physical Address
857 Extension (PAE) feature of the host CPU to the guest. Note that in case PAE
858 is not available, it will not be reported.
859 </desc>
860 </const>
861 <const name="Synthetic" value="2">
862 <desc>
863 This setting determines whether VirtualBox will expose a synthetic CPU to the guest to allow
864 teleporting between host systems that differ significantly.
865 </desc>
866 </const>
867 </enum>
868
869
870 <enum
871 name="HWVirtExPropertyType"
872 uuid="ce81dfdd-d2b8-4a90-bbea-40ee8b7ffcee"
873 >
874 <desc>
875 Hardware virtualization property type. This enumeration represents possible values
876 for the <link to="IMachine::getHWVirtExProperty"/> and
877 <link to="IMachine::setHWVirtExProperty"/> methods.
878 </desc>
879 <const name="Null" value="0">
880 <desc>Null value (never used by the API).</desc>
881 </const>
882 <const name="Enabled" value="1">
883 <desc>
884 Whether hardware virtualization (VT-x/AMD-V) is enabled at all. If
885 such extensions are not available, they will not be used.
886 </desc>
887 </const>
888 <const name="Exclusive" value="2">
889 <desc>
890 Whether hardware virtualization is used exclusively by VirtualBox. When enabled,
891 VirtualBox assumes it can acquire full and exclusive access to the VT-x or AMD-V
892 feature of the host. To share these with other hypervisors, you must disable this property.
893 </desc>
894 </const>
895 <const name="VPID" value="3">
896 <desc>
897 Whether VT-x VPID is enabled. If this extension is not available, it will not be used.
898 </desc>
899 </const>
900 <const name="NestedPaging" value="4">
901 <desc>
902 Whether Nested Paging is enabled. If this extension is not available, it will not be used.
903 </desc>
904 </const>
905 <const name="LargePages" value="5">
906 <desc>
907 Whether large page allocation is enabled; requires nested paging and a 64 bits host.
908 </desc>
909 </const>
910 </enum>
911
912 <enum
913 name="FaultToleranceState"
914 uuid="05f65593-743e-4862-8700-57bf6cc48f3f"
915 >
916 <desc>
917 Used with <link to="IMachine::faultToleranceState" />.
918 </desc>
919 <const name="Inactive" value="1">
920 <desc>No fault tolerance enabled.</desc>
921 </const>
922 <const name="Source" value="2">
923 <desc>Fault tolerant source VM.</desc>
924 </const>
925 <const name="Target" value="3">
926 <desc>Fault tolerant target VM.</desc>
927 </const>
928 </enum>
929
930 <enum
931 name="LockType"
932 uuid="138b53f8-db4b-47c5-b32b-4ef52f769413"
933 >
934 <desc>
935 Used with <link to="IMachine::lockMachine" />.
936 </desc>
937 <const name="Write" value="2">
938 <desc>Lock the machine for writing.</desc>
939 </const>
940 <const name="Shared" value="1">
941 <desc>Request only a shared read lock for remote-controlling the machine.</desc>
942 </const>
943 </enum>
944
945 <enum
946 name="SessionType"
947 uuid="A13C02CB-0C2C-421E-8317-AC0E8AAA153A"
948 >
949 <desc>
950 Session type. This enumeration represents possible values of the
951 <link to="ISession::type"/> attribute.
952 </desc>
953
954 <const name="Null" value="0">
955 <desc>Null value (never used by the API).</desc>
956 </const>
957 <const name="WriteLock" value="1">
958 <desc>
959 Session has acquired an exclusive write lock on a machine
960 using <link to="IMachine::lockMachine"/>.
961 </desc>
962 </const>
963 <const name="Remote" value="2">
964 <desc>
965 Session has launched a VM process using
966 <link to="IMachine::launchVMProcess"/>
967 </desc>
968 </const>
969 <const name="Shared" value="3">
970 <desc>
971 Session has obtained a link to another session using
972 <link to="IMachine::lockMachine"/>
973 </desc>
974 </const>
975 </enum>
976
977 <enum
978 name="DeviceType"
979 uuid="6d9420f7-0b56-4636-99f9-7346f1b01e57"
980 >
981 <desc>
982 Device type.
983 </desc>
984 <const name="Null" value="0">
985 <desc>
986 Null value, may also mean "no device" (not allowed for
987 <link to="IConsole::getDeviceActivity"/>).
988 </desc>
989 </const>
990 <const name="Floppy" value="1">
991 <desc>Floppy device.</desc>
992 </const>
993 <const name="DVD" value="2">
994 <desc>CD/DVD-ROM device.</desc>
995 </const>
996 <const name="HardDisk" value="3">
997 <desc>Hard disk device.</desc>
998 </const>
999 <const name="Network" value="4">
1000 <desc>Network device.</desc>
1001 </const>
1002 <const name="USB" value="5">
1003 <desc>USB device.</desc>
1004 </const>
1005 <const name="SharedFolder" value="6">
1006 <desc>Shared folder device.</desc>
1007 </const>
1008 </enum>
1009
1010 <enum
1011 name="DeviceActivity"
1012 uuid="6FC8AEAA-130A-4eb5-8954-3F921422D707"
1013 >
1014 <desc>
1015 Device activity for <link to="IConsole::getDeviceActivity"/>.
1016 </desc>
1017
1018 <const name="Null" value="0"/>
1019 <const name="Idle" value="1"/>
1020 <const name="Reading" value="2"/>
1021 <const name="Writing" value="3"/>
1022 </enum>
1023
1024 <enum
1025 name="ClipboardMode"
1026 uuid="33364716-4008-4701-8f14-be0fa3d62950"
1027 >
1028 <desc>
1029 Host-Guest clipboard interchange mode.
1030 </desc>
1031
1032 <const name="Disabled" value="0"/>
1033 <const name="HostToGuest" value="1"/>
1034 <const name="GuestToHost" value="2"/>
1035 <const name="Bidirectional" value="3"/>
1036 </enum>
1037
1038 <enum
1039 name="Scope"
1040 uuid="7c91096e-499e-4eca-9f9b-9001438d7855"
1041 >
1042 <desc>
1043 Scope of the operation.
1044
1045 A generic enumeration used in various methods to define the action or
1046 argument scope.
1047 </desc>
1048
1049 <const name="Global" value="0"/>
1050 <const name="Machine" value="1"/>
1051 <const name="Session" value="2"/>
1052 </enum>
1053
1054 <enum
1055 name="BIOSBootMenuMode"
1056 uuid="ae4fb9f7-29d2-45b4-b2c7-d579603135d5"
1057 >
1058 <desc>
1059 BIOS boot menu mode.
1060 </desc>
1061
1062 <const name="Disabled" value="0"/>
1063 <const name="MenuOnly" value="1"/>
1064 <const name="MessageAndMenu" value="2"/>
1065 </enum>
1066
1067 <enum
1068 name="ProcessorFeature"
1069 uuid="64c38e6b-8bcf-45ad-ac03-9b406287c5bf"
1070 >
1071 <desc>
1072 CPU features.
1073 </desc>
1074
1075 <const name="HWVirtEx" value="0"/>
1076 <const name="PAE" value="1"/>
1077 <const name="LongMode" value="2"/>
1078 <const name="NestedPaging" value="3"/>
1079 </enum>
1080
1081 <enum
1082 name="FirmwareType"
1083 uuid="b903f264-c230-483e-ac74-2b37ce60d371"
1084 >
1085 <desc>
1086 Firmware type.
1087 </desc>
1088 <const name="BIOS" value="1">
1089 <desc>BIOS Firmware.</desc>
1090 </const>
1091 <const name="EFI" value="2">
1092 <desc>EFI Firmware, bitness detetced basing on OS type.</desc>
1093 </const>
1094 <const name="EFI32" value="3">
1095 <desc>Efi firmware, 32-bit.</desc>
1096 </const>
1097 <const name="EFI64" value="4">
1098 <desc>Efi firmware, 64-bit.</desc>
1099 </const>
1100 <const name="EFIDUAL" value="5">
1101 <desc>Efi firmware, combined 32 and 64-bit.</desc>
1102 </const>
1103 </enum>
1104
1105 <enum
1106 name="PointingHidType"
1107 uuid="0d3c17a2-821a-4b2e-ae41-890c6c60aa97"
1108 >
1109 <desc>
1110 Type of pointing device used in a virtual machine.
1111 </desc>
1112 <const name="None" value="1">
1113 <desc>No mouse.</desc>
1114 </const>
1115 <const name="PS2Mouse" value="2">
1116 <desc>PS/2 auxillary device, a.k.a. mouse.</desc>
1117 </const>
1118 <const name="USBMouse" value="3">
1119 <desc>USB mouse (relative pointer).</desc>
1120 </const>
1121 <const name="USBTablet" value="4">
1122 <desc>USB tablet (absolute pointer).</desc>
1123 </const>
1124 <const name="ComboMouse" value="5">
1125 <desc>Combined device, working as PS/2 or USB mouse, depending on guest behavior.
1126 Using of such device can have negative performance implications. </desc>
1127 </const>
1128 </enum>
1129
1130 <enum
1131 name="KeyboardHidType"
1132 uuid="5a5b0996-3a3e-44bb-9019-56979812cbcc"
1133 >
1134 <desc>
1135 Type of keyboard device used in a virtual machine.
1136 </desc>
1137 <const name="None" value="1">
1138 <desc>No keyboard.</desc>
1139 </const>
1140 <const name="PS2Keyboard" value="2">
1141 <desc>PS/2 keyboard.</desc>
1142 </const>
1143 <const name="USBKeyboard" value="3">
1144 <desc>USB keyboard.</desc>
1145 </const>
1146 <const name="ComboKeyboard" value="4">
1147 <desc>Combined device, working as PS/2 or USB keyboard, depending on guest behavior.
1148 Using of such device can have negative performance implications. </desc>
1149 </const>
1150 </enum>
1151
1152 <!--
1153 // IVirtualBoxErrorInfo
1154 /////////////////////////////////////////////////////////////////////////
1155 -->
1156
1157 <interface
1158 name="IVirtualBoxErrorInfo" extends="$errorinfo"
1159 uuid="e053d3c0-f493-491b-a735-3a9f0b1feed4"
1160 supportsErrorInfo="no"
1161 wsmap="managed"
1162 >
1163 <desc>
1164 The IVirtualBoxErrorInfo interface represents extended error information.
1165
1166 Extended error information can be set by VirtualBox components after
1167 unsuccessful or partially successful method invocation. This information
1168 can be retrieved by the calling party as an IVirtualBoxErrorInfo object
1169 and then shown to the client in addition to the plain 32-bit result code.
1170
1171 In MS COM, this interface extends the IErrorInfo interface,
1172 in XPCOM, it extends the nsIException interface. In both cases,
1173 it provides a set of common attributes to retrieve error
1174 information.
1175
1176 Sometimes invocation of some component's method may involve methods of
1177 other components that may also fail (independently of this method's
1178 failure), or a series of non-fatal errors may precede a fatal error that
1179 causes method failure. In cases like that, it may be desirable to preserve
1180 information about all errors happened during method invocation and deliver
1181 it to the caller. The <link to="#next"/> attribute is intended
1182 specifically for this purpose and allows to represent a chain of errors
1183 through a single IVirtualBoxErrorInfo object set after method invocation.
1184
1185 Note that errors are stored to a chain in the reverse order, i.e. the
1186 initial error object you query right after method invocation is the last
1187 error set by the callee, the object it points to in the @a next attribute
1188 is the previous error and so on, up to the first error (which is the last
1189 in the chain).
1190 </desc>
1191
1192 <attribute name="resultCode" type="long" readonly="yes">
1193 <desc>
1194 Result code of the error.
1195 Usually, it will be the same as the result code returned
1196 by the method that provided this error information, but not
1197 always. For example, on Win32, CoCreateInstance() will most
1198 likely return E_NOINTERFACE upon unsuccessful component
1199 instantiation attempt, but not the value the component factory
1200 returned. Value is typed 'long', not 'result',
1201 to make interface usable from scripting languages.
1202 <note>
1203 In MS COM, there is no equivalent.
1204 In XPCOM, it is the same as nsIException::result.
1205 </note>
1206 </desc>
1207 </attribute>
1208
1209 <attribute name="interfaceID" type="uuid" mod="string" readonly="yes">
1210 <desc>
1211 UUID of the interface that defined the error.
1212 <note>
1213 In MS COM, it is the same as IErrorInfo::GetGUID, except for the
1214 data type.
1215 In XPCOM, there is no equivalent.
1216 </note>
1217 </desc>
1218 </attribute>
1219
1220 <attribute name="component" type="wstring" readonly="yes">
1221 <desc>
1222 Name of the component that generated the error.
1223 <note>
1224 In MS COM, it is the same as IErrorInfo::GetSource.
1225 In XPCOM, there is no equivalent.
1226 </note>
1227 </desc>
1228 </attribute>
1229
1230 <attribute name="text" type="wstring" readonly="yes">
1231 <desc>
1232 Text description of the error.
1233 <note>
1234 In MS COM, it is the same as IErrorInfo::GetDescription.
1235 In XPCOM, it is the same as nsIException::message.
1236 </note>
1237 </desc>
1238 </attribute>
1239
1240 <attribute name="next" type="IVirtualBoxErrorInfo" readonly="yes">
1241 <desc>
1242 Next error object if there is any, or @c null otherwise.
1243 <note>
1244 In MS COM, there is no equivalent.
1245 In XPCOM, it is the same as nsIException::inner.
1246 </note>
1247 </desc>
1248 </attribute>
1249
1250 </interface>
1251
1252 <!--
1253 // IVirtualBox
1254 /////////////////////////////////////////////////////////////////////////
1255 -->
1256
1257 <interface
1258 name="IDHCPServer" extends="$unknown"
1259 uuid="6cfe387c-74fb-4ca7-bff6-973bec8af7a3"
1260 wsmap="managed"
1261 >
1262 <desc>
1263 The IDHCPServer interface represents the vbox dhcp server configuration.
1264
1265 To enumerate all the dhcp servers on the host, use the
1266 <link to="IVirtualBox::DHCPServers"/> attribute.
1267 </desc>
1268
1269 <attribute name="enabled" type="boolean">
1270 <desc>
1271 specifies if the dhcp server is enabled
1272 </desc>
1273 </attribute>
1274
1275 <attribute name="IPAddress" type="wstring" readonly="yes">
1276 <desc>
1277 specifies server IP
1278 </desc>
1279 </attribute>
1280
1281 <attribute name="networkMask" type="wstring" readonly="yes">
1282 <desc>
1283 specifies server network mask
1284 </desc>
1285 </attribute>
1286
1287 <attribute name="networkName" type="wstring" readonly="yes">
1288 <desc>
1289 specifies internal network name the server is used for
1290 </desc>
1291 </attribute>
1292
1293 <attribute name="lowerIP" type="wstring" readonly="yes">
1294 <desc>
1295 specifies from IP adrres in server address range
1296 </desc>
1297 </attribute>
1298
1299 <attribute name="upperIP" type="wstring" readonly="yes">
1300 <desc>
1301 specifies to IP adrres in server address range
1302 </desc>
1303 </attribute>
1304
1305 <method name="setConfiguration">
1306 <desc>
1307 configures the server
1308 <result name="E_INVALIDARG">
1309 invalid configuration supplied
1310 </result>
1311 </desc>
1312 <param name="IPAddress" type="wstring" dir="in">
1313 <desc>
1314 server IP address
1315 </desc>
1316 </param>
1317 <param name="networkMask" type="wstring" dir="in">
1318 <desc>
1319 server network mask
1320 </desc>
1321 </param>
1322 <param name="FromIPAddress" type="wstring" dir="in">
1323 <desc>
1324 server From IP address for address range
1325 </desc>
1326 </param>
1327 <param name="ToIPAddress" type="wstring" dir="in">
1328 <desc>
1329 server To IP address for address range
1330 </desc>
1331 </param>
1332 </method>
1333
1334 <method name="start">
1335 <desc>
1336 Starts DHCP server process.
1337 <result name="E_FAIL">
1338 Failed to start the process.
1339 </result>
1340 </desc>
1341 <param name="networkName" type="wstring" dir="in">
1342 <desc>
1343 Name of internal network DHCP server should attach to.
1344 </desc>
1345 </param>
1346 <param name="trunkName" type="wstring" dir="in">
1347 <desc>
1348 Name of internal network trunk.
1349 </desc>
1350 </param>
1351 <param name="trunkType" type="wstring" dir="in">
1352 <desc>
1353 Type of internal network trunk.
1354 </desc>
1355 </param>
1356 </method>
1357
1358 <method name="stop">
1359 <desc>
1360 Stops DHCP server process.
1361 <result name="E_FAIL">
1362 Failed to stop the process.
1363 </result>
1364 </desc>
1365 </method>
1366 </interface>
1367
1368 <interface
1369 name="IVirtualBox" extends="$unknown"
1370 uuid="ec6cc7e7-06a2-4c5d-8993-1e3619c53817"
1371 wsmap="managed"
1372 >
1373 <desc>
1374 The IVirtualBox interface represents the main interface exposed by the
1375 product that provides virtual machine management.
1376
1377 An instance of IVirtualBox is required for the product to do anything
1378 useful. Even though the interface does not expose this, internally,
1379 IVirtualBox is implemented as a singleton and actually lives in the
1380 process of the VirtualBox server (VBoxSVC.exe). This makes sure that
1381 IVirtualBox can track the state of all virtual machines on a particular
1382 host, regardless of which frontend started them.
1383
1384 To enumerate all the virtual machines on the host, use the
1385 <link to="IVirtualBox::machines"/> attribute.
1386 </desc>
1387
1388 <attribute name="version" type="wstring" readonly="yes">
1389 <desc>
1390 A string representing the version number of the product. The
1391 format is 3 integer numbers divided by dots (e.g. 1.0.1). The
1392 last number represents the build number and will frequently change.
1393 </desc>
1394 </attribute>
1395
1396 <attribute name="revision" type="unsigned long" readonly="yes">
1397 <desc>
1398 The internal build revision number of the product.
1399 </desc>
1400 </attribute>
1401
1402 <attribute name="packageType" type="wstring" readonly="yes">
1403 <desc>
1404 A string representing the package type of this product. The
1405 format is OS_ARCH_DIST where OS is either WINDOWS, LINUX,
1406 SOLARIS, DARWIN. ARCH is either 32BITS or 64BITS. DIST
1407 is either GENERIC, UBUNTU_606, UBUNTU_710, or something like
1408 this.
1409 </desc>
1410 </attribute>
1411
1412 <attribute name="homeFolder" type="wstring" readonly="yes">
1413 <desc>
1414 Full path to the directory where the global settings file,
1415 <tt>VirtualBox.xml</tt>, is stored.
1416
1417 In this version of VirtualBox, the value of this property is
1418 always <tt>&lt;user_dir&gt;/.VirtualBox</tt> (where
1419 <tt>&lt;user_dir&gt;</tt> is the path to the user directory,
1420 as determined by the host OS), and cannot be changed.
1421
1422 This path is also used as the base to resolve relative paths in
1423 places where relative paths are allowed (unless otherwise
1424 expressly indicated).
1425 </desc>
1426 </attribute>
1427
1428 <attribute name="settingsFilePath" type="wstring" readonly="yes">
1429 <desc>
1430 Full name of the global settings file.
1431 The value of this property corresponds to the value of
1432 <link to="#homeFolder"/> plus <tt>/VirtualBox.xml</tt>.
1433 </desc>
1434 </attribute>
1435
1436 <attribute name="host" type="IHost" readonly="yes">
1437 <desc>Associated host object.</desc>
1438 </attribute>
1439
1440 <attribute name="systemProperties" type="ISystemProperties" readonly="yes">
1441 <desc>Associated system information object.</desc>
1442 </attribute>
1443
1444 <attribute name="machines" type="IMachine" readonly="yes" safearray="yes">
1445 <desc>
1446 Array of machine objects registered within this VirtualBox instance.
1447 </desc>
1448 </attribute>
1449
1450 <attribute name="hardDisks" type="IMedium" readonly="yes" safearray="yes">
1451 <desc>
1452 Array of medium objects known to this VirtualBox installation.
1453
1454 This array contains only base media. All differencing
1455 media of the given base medium can be enumerated using
1456 <link to="IMedium::children"/>.
1457 </desc>
1458 </attribute>
1459
1460 <attribute name="DVDImages" type="IMedium" readonly="yes" safearray="yes">
1461 <desc>
1462 Array of CD/DVD image objects currently in use by this VirtualBox instance.
1463 </desc>
1464 </attribute>
1465
1466 <attribute name="floppyImages" type="IMedium" readonly="yes" safearray="yes">
1467 <desc>
1468 Array of floppy image objects currently in use by this VirtualBox instance.
1469 </desc>
1470 </attribute>
1471
1472 <attribute name="progressOperations" type="IProgress" readonly="yes" safearray="yes"/>
1473
1474 <attribute name="guestOSTypes" type="IGuestOSType" readonly="yes" safearray="yes"/>
1475
1476 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
1477 <desc>
1478 Collection of global shared folders. Global shared folders are
1479 available to all virtual machines.
1480
1481 New shared folders are added to the collection using
1482 <link to="#createSharedFolder"/>. Existing shared folders can be
1483 removed using <link to="#removeSharedFolder"/>.
1484
1485 <note>
1486 In the current version of the product, global shared folders are not
1487 implemented and therefore this collection is always empty.
1488 </note>
1489 </desc>
1490 </attribute>
1491
1492 <attribute name="performanceCollector" type="IPerformanceCollector" readonly="yes">
1493 <desc>
1494 Associated performance collector object.
1495 </desc>
1496 </attribute>
1497
1498 <attribute name="DHCPServers" type="IDHCPServer" safearray="yes" readonly="yes">
1499 <desc>
1500 dhcp server settings.
1501 </desc>
1502 </attribute>
1503
1504 <attribute name="eventSource" type="IEventSource" readonly="yes">
1505 <desc>
1506 Event source for VirtualBox events.
1507 </desc>
1508 </attribute>
1509
1510
1511 <method name="createMachine">
1512 <desc>
1513 Creates a new virtual machine.
1514
1515 The new machine is created unregistered, with the initial configuration
1516 set according to the specified guest OS type. A typical sequence of
1517 actions to create a new virtual machine is as follows:
1518
1519 <ol>
1520 <li>
1521 Call this method to have a new machine created. The returned machine
1522 object will be "mutable" allowing to change any machine property.
1523 </li>
1524
1525 <li>
1526 Configure the machine using the appropriate attributes and methods.
1527 </li>
1528
1529 <li>
1530 Call <link to="IMachine::saveSettings" /> to write the settings
1531 to the machine's XML settings file. The configuration of the newly
1532 created machine will not be saved to disk until this method is
1533 called.
1534 </li>
1535
1536 <li>
1537 Call <link to="#registerMachine" /> to add the machine to the list
1538 of machines known to VirtualBox.
1539 </li>
1540 </ol>
1541
1542 You should specify valid name for the newly created machine when calling
1543 this method. See the <link to="IMachine::name"/> attribute description
1544 for more details about the machine name.
1545
1546 The specified guest OS type identifier must match an ID of one of known
1547 guest OS types listed in the <link to="IVirtualBox::guestOSTypes"/>
1548 array.
1549
1550 Every machine has a <i>settings file</i> that is used to store
1551 the machine configuration. This file is stored in a directory called the
1552 <i>machine settings subfolder</i>. Both the settings subfolder and file
1553 will have a name that corresponds to the name of the virtual machine.
1554 You can specify where to create the machine setting subfolder using the
1555 @a baseFolder argument. The base folder can be absolute (full path) or
1556 relative to the <link to="IVirtualBox::homeFolder">VirtualBox home
1557 directory</link>.
1558
1559 If @a baseFolder is a @c null or empty string (which is recommended), the
1560 <link to="ISystemProperties::defaultMachineFolder">default machine
1561 settings folder</link> will be used as a base folder for the created
1562 machine. Otherwise the given base folder will be used. In either case,
1563 the full path to the resulting settings file has the following
1564 structure:
1565 <pre>
1566 &lt;base_folder&gt;/&lt;machine_name&gt;/&lt;machine_name&gt;.xml
1567 </pre>
1568
1569 Note that if the resulting settings file already exists, this method
1570 will fail with <link to="VBOX_E_FILE_ERROR"/>.
1571
1572 Optionally, you may specify an UUID of to assign to the created machine.
1573 However, this is not recommended and you should normally pass an empty
1574 (@c null) UUID to this method so that a new UUID will be automatically
1575 generated for every created machine. You can use UUID
1576 00000000-0000-0000-0000-000000000000 as @c null value.
1577
1578 <note>
1579 There is no way to change the name of the settings file or
1580 subfolder of the created machine directly.
1581 </note>
1582
1583 <result name="VBOX_E_OBJECT_NOT_FOUND">
1584 @a osTypeId is invalid.
1585 </result>
1586 <result name="VBOX_E_FILE_ERROR">
1587 Resulting settings file name is invalid or the settings file already
1588 exists or could not be created due to an I/O error.
1589 </result>
1590 <result name="E_INVALIDARG">
1591 @a name is empty or @c null.
1592 </result>
1593 </desc>
1594
1595 <param name="name" type="wstring" dir="in">
1596 <desc>Machine name.</desc>
1597 </param>
1598 <param name="osTypeId" type="wstring" dir="in">
1599 <desc>Guest OS Type ID.</desc>
1600 </param>
1601 <param name="baseFolder" type="wstring" dir="in">
1602 <desc>Base machine folder (optional).</desc>
1603 </param>
1604 <param name="id" type="uuid" mod="string" dir="in">
1605 <desc>Machine UUID (optional).</desc>
1606 </param>
1607 <param name="override" type="boolean" dir="in">
1608 <desc>Create the VM even if there are conflicting files.</desc>
1609 </param>
1610 <param name="machine" type="IMachine" dir="return">
1611 <desc>Created machine object.</desc>
1612 </param>
1613 </method>
1614
1615 <method name="openMachine">
1616 <desc>
1617 Opens a virtual machine from the existing settings file.
1618 The opened machine remains unregistered until you call
1619 <link to="#registerMachine"/>.
1620
1621 The specified settings file name can be absolute
1622 (full path) or relative to the <link to="IVirtualBox::homeFolder">
1623 VirtualBox home directory</link>. This file must exist
1624 and must be a valid machine settings file whose contents
1625 will be used to construct the machine object.
1626
1627 <result name="VBOX_E_FILE_ERROR">
1628 Settings file name invalid, not found or sharing violation.
1629 </result>
1630 </desc>
1631 <param name="settingsFile" type="wstring" dir="in">
1632 <desc>
1633 Name of the machine settings file.
1634 </desc>
1635 </param>
1636 <param name="machine" type="IMachine" dir="return">
1637 <desc>Opened machine object.</desc>
1638 </param>
1639 <note>
1640 <link to="IMachine::settingsModified"/> will return
1641 @c false for the created machine, until any of machine settings
1642 are changed.
1643 </note>
1644 </method>
1645
1646 <method name="registerMachine">
1647 <desc>
1648
1649 Registers the machine previously created using
1650 <link to="#createMachine"/> or opened using
1651 <link to="#openMachine"/> within this VirtualBox installation. After
1652 successful method invocation, the
1653 <link to="IMachineRegisteredEvent"/> event is fired.
1654
1655 <note>
1656 This method implicitly calls <link to="IMachine::saveSettings"/>
1657 to save all current machine settings before registering it.
1658 </note>
1659
1660 <result name="VBOX_E_OBJECT_NOT_FOUND">
1661 No matching virtual machine found.
1662 </result>
1663 <result name="VBOX_E_INVALID_OBJECT_STATE">
1664 Virtual machine was not created within this VirtualBox instance.
1665 </result>
1666
1667 </desc>
1668 <param name="machine" type="IMachine" dir="in"/>
1669 </method>
1670
1671 <method name="getMachine">
1672 <desc>
1673 Attempts to find a virtual machine given its UUID.
1674 To look up a machine by name, use <link to="IVirtualBox::findMachine" />
1675 instead.
1676
1677 <result name="VBOX_E_OBJECT_NOT_FOUND">
1678 Could not find registered machine matching @a id.
1679 </result>
1680
1681 </desc>
1682 <param name="id" type="uuid" mod="string" dir="in"/>
1683 <param name="machine" type="IMachine" dir="return"/>
1684 </method>
1685
1686 <method name="findMachine">
1687 <desc>
1688 Attempts to find a virtual machine given its name.
1689 To look up a machine by UUID, use <link to="IVirtualBox::getMachine" />
1690 instead.
1691
1692 <result name="VBOX_E_OBJECT_NOT_FOUND">
1693 Could not find registered machine matching @a name.
1694 </result>
1695
1696 </desc>
1697 <param name="name" type="wstring" dir="in"/>
1698 <param name="machine" type="IMachine" dir="return"/>
1699 </method>
1700
1701 <method name="createAppliance">
1702 <desc>
1703 Creates a new appliance object, which represents an appliance in the Open Virtual Machine
1704 Format (OVF). This can then be used to import an OVF appliance into VirtualBox or to export
1705 machines as an OVF appliance; see the documentation for <link to="IAppliance" /> for details.
1706 </desc>
1707 <param name="appliance" type="IAppliance" dir="return">
1708 <desc>New appliance.</desc>
1709 </param>
1710 </method>
1711
1712 <method name="createHardDisk">
1713 <desc>
1714 Creates a new base medium object that will use the given storage
1715 format and location for medium data.
1716
1717 Note that the actual storage unit is not created by this method. In
1718 order to do it, and before you are able to attach the created medium
1719 to virtual machines, you must call one of the following methods to
1720 allocate a format-specific storage unit at the specified location:
1721 <ul>
1722 <li><link to="IMedium::createBaseStorage"/></li>
1723 <li><link to="IMedium::createDiffStorage"/></li>
1724 </ul>
1725
1726 Some medium attributes, such as <link to="IMedium::id"/>, may
1727 remain uninitialized until the medium storage unit is successfully
1728 created by one of the above methods.
1729
1730 After the storage unit is successfully created, it will be
1731 accessible through the <link to="#findMedium"/> method and can
1732 be found in the <link to="#hardDisks"/> array.
1733
1734 The list of all storage formats supported by this VirtualBox
1735 installation can be obtained using
1736 <link to="ISystemProperties::mediumFormats"/>. If the @a format
1737 attribute is empty or @c null then the default storage format
1738 specified by <link to="ISystemProperties::defaultHardDiskFormat"/> will
1739 be used for creating a storage unit of the medium.
1740
1741 Note that the format of the location string is storage format specific.
1742 See <link to="IMedium::location"/>, IMedium and
1743 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1744
1745 <result name="VBOX_E_OBJECT_NOT_FOUND">
1746 @a format identifier is invalid. See
1747 <link to="ISystemProperties::mediumFormats"/>.
1748 </result>
1749 <result name="VBOX_E_FILE_ERROR">
1750 @a location is a not valid file name (for file-based formats only).
1751 </result>
1752 </desc>
1753 <param name="format" type="wstring" dir="in">
1754 <desc>
1755 Identifier of the storage format to use for the new medium.
1756 </desc>
1757 </param>
1758 <param name="location" type="wstring" dir="in">
1759 <desc>
1760 Location of the storage unit for the new medium.
1761 </desc>
1762 </param>
1763 <param name="medium" type="IMedium" dir="return">
1764 <desc>Created medium object.</desc>
1765 </param>
1766 </method>
1767
1768 <method name="openMedium">
1769 <desc>
1770 Opens a medium from an existing storage location.
1771
1772 Once a medium has been opened, it can be passed to other VirtualBox
1773 methods, in particular to <link to="IMachine::attachDevice" />.
1774
1775 Depending on the given device type, the file at the storage location
1776 must be in one of the media formats understood by VirtualBox:
1777
1778 <ul>
1779 <li>With a "HardDisk" device type, the file must be a hard disk image
1780 in one of the formats supported by VirtualBox (see
1781 <link to="ISystemProperties::mediumFormats" />).
1782 After this method succeeds, if the medium is a base medium, it
1783 will be added to the <link to="#hardDisks"/> array attribute. </li>
1784 <li>With a "DVD" device type, the file must be an ISO 9960 CD/DVD image.
1785 After this method succeeds, the medium will be added to the
1786 <link to="#DVDImages"/> array attribute.</li>
1787 <li>With a "Floppy" device type, the file must be an RAW floppy image.
1788 After this method succeeds, the medium will be added to the
1789 <link to="#floppyImages"/> array attribute.</li>
1790 </ul>
1791
1792 After having been opened, the medium can be found by the <link to="#findMedium"/>
1793 method and can be attached to virtual machines. See <link to="IMedium" /> for more details.
1794
1795 The UUID of the newly opened medium will either be retrieved from the
1796 storage location, if the format supports it (e.g. for hard disk images),
1797 or a new UUID will be randomly generated (e.g. for ISO and RAW files).
1798 If for some reason you need to change the medium's UUID, use
1799 <link to="IMedium::setIDs" />.
1800
1801 If a differencing hard disk medium is to be opened by this method, the
1802 operation will succeed only if its parent medium and all ancestors,
1803 if any, are already known to this VirtualBox installation (for example,
1804 were opened by this method before).
1805
1806 This method attempts to guess the storage format of the specified medium
1807 by reading medium data at the specified location.
1808
1809 If @a accessMode is ReadWrite (which it should be for hard disks and floppies),
1810 the image is opened for read/write access and must have according permissions,
1811 as VirtualBox may actually write status information into the disk's metadata
1812 sections.
1813
1814 Note that write access is required for all typical hard disk usage in VirtualBox,
1815 since VirtualBox may need to write metadata such as a UUID into the image.
1816 The only exception is opening a source image temporarily for copying and
1817 cloning (see <link to="IMedium::cloneTo" /> when the image will be closed
1818 again soon.
1819
1820 The format of the location string is storage format specific. See
1821 <link to="IMedium::location"/>, IMedium and
1822 <link to="ISystemProperties::defaultHardDiskFolder"/> for more details.
1823
1824 Prior to VirtualBox 3.3, opening a medium added it to a global media
1825 registry in the VirtualBox.xml file, which was shared between
1826 all machines and made transporting machines and their media from one
1827 host to another difficult.
1828
1829 Starting with VirtualBox 3.3, media are only added to a registry when
1830 they are attached to a machine. Machines created with VirtualBox 3.3
1831 or later can have their own media registry. As a result, a medium attached
1832 to such a machine will be remembered in that machine's XML settings file.
1833 Media attached to older machines will continue to be added to the global
1834 registry.
1835
1836 <result name="VBOX_E_FILE_ERROR">
1837 Invalid medium storage file location or could not find the medium
1838 at the specified location.
1839 </result>
1840 <result name="VBOX_E_IPRT_ERROR">
1841 Could not get medium storage format.
1842 </result>
1843 <result name="E_INVALIDARG">
1844 Invalid medium storage format.
1845 </result>
1846 <result name="VBOX_E_INVALID_OBJECT_STATE">
1847 Medium has already been added to a media registry.
1848 </result>
1849 </desc>
1850 <param name="location" type="wstring" dir="in">
1851 <desc>
1852 Location of the storage unit that contains medium data in one of
1853 the supported storage formats.
1854 </desc>
1855 </param>
1856 <param name="deviceType" type="DeviceType" dir="in">
1857 <desc>
1858 Must be one of "HardDisk", "DVD" or "Floppy".
1859 </desc>
1860 </param>
1861 <param name="accessMode" type="AccessMode" dir="in">
1862 <desc>Whether to open the image in read/write or read-only mode. For
1863 a "DVD" device type, this is ignored and read-only mode is always assumed.</desc>
1864 </param>
1865 <param name="medium" type="IMedium" dir="return">
1866 <desc>Opened medium object.</desc>
1867 </param>
1868 </method>
1869
1870 <method name="findMedium">
1871 <desc>
1872 Returns a medium of the given type that uses the given location or
1873 UUID to store medium data.
1874
1875 The given medium must be known to this VirtualBox installation, i.e.
1876 it must be previously created by <link to="#createHardDisk"/> or opened
1877 by <link to="#openMedium"/>.
1878
1879 The search is done by comparing the value of the @a location argument to
1880 the <link to="IMedium::location"/> and <link to="IMedium::id" />
1881 attributes of each known medium.
1882
1883 For locations represented by file names in the host's file system, the
1884 requested location can be a path relative to the
1885 <link to="IVirtualBox::homeFolder">VirtualBox home folder</link>. If
1886 only a file name without any path is given, the
1887 <link to="ISystemProperties::defaultHardDiskFolder"> default medium
1888 folder</link> will be prepended to the file name before searching. Note
1889 that on case sensitive file systems, a case sensitive comparison is
1890 performed, otherwise the case of symbols in the file path is ignored.
1891
1892 <result name="VBOX_E_OBJECT_NOT_FOUND">
1893 No medium object matching @a location found.
1894 </result>
1895 </desc>
1896 <param name="location" type="wstring" dir="in">
1897 <desc>What to search for. This can either be the UUID or the location string of an open medium.</desc>
1898 </param>
1899 <param name="type" type="DeviceType" dir="in">
1900 <desc>Device type (must be HardDisk, DVD or Floppy)</desc>
1901 </param>
1902 <param name="medium" type="IMedium" dir="return">
1903 <desc>Medium object, if found.</desc>
1904 </param>
1905 </method>
1906
1907 <method name="getGuestOSType">
1908 <desc>
1909 Returns an object describing the specified guest OS type.
1910
1911 The requested guest OS type is specified using a string which is a
1912 mnemonic identifier of the guest operating system, such as
1913 <tt>"win31"</tt> or <tt>"ubuntu"</tt>. The guest OS type ID of a
1914 particular virtual machine can be read or set using the
1915 <link to="IMachine::OSTypeId"/> attribute.
1916
1917 The <link to="IVirtualBox::guestOSTypes"/> collection contains all
1918 available guest OS type objects. Each object has an
1919 <link to="IGuestOSType::id"/> attribute which contains an identifier of
1920 the guest OS this object describes.
1921
1922 <result name="E_INVALIDARG">
1923 @a id is not a valid Guest OS type.
1924 </result>
1925
1926 </desc>
1927 <param name="id" type="uuid" mod="string" dir="in">
1928 <desc>Guest OS type ID string.</desc>
1929 </param>
1930 <param name="type" type="IGuestOSType" dir="return">
1931 <desc>Guest OS type object.</desc>
1932 </param>
1933 </method>
1934
1935 <method name="createSharedFolder">
1936 <desc>
1937 Creates a new global shared folder by associating the given logical
1938 name with the given host path, adds it to the collection of shared
1939 folders and starts sharing it. Refer to the description of
1940 <link to="ISharedFolder"/> to read more about logical names.
1941 <note>
1942 In the current implementation, this operation is not
1943 implemented.
1944 </note>
1945 </desc>
1946 <param name="name" type="wstring" dir="in">
1947 <desc>Unique logical name of the shared folder.</desc>
1948 </param>
1949 <param name="hostPath" type="wstring" dir="in">
1950 <desc>Full path to the shared folder in the host file system.</desc>
1951 </param>
1952 <param name="writable" type="boolean" dir="in">
1953 <desc>Whether the share is writable or readonly</desc>
1954 </param>
1955 <param name="automount" type="boolean" dir="in">
1956 <desc>Whether the share gets automatically mounted by the guest
1957 or not.</desc>
1958 </param>
1959 </method>
1960
1961 <method name="removeSharedFolder">
1962 <desc>
1963 Removes the global shared folder with the given name previously
1964 created by <link to="#createSharedFolder"/> from the collection of
1965 shared folders and stops sharing it.
1966 <note>
1967 In the current implementation, this operation is not
1968 implemented.
1969 </note>
1970 </desc>
1971 <param name="name" type="wstring" dir="in">
1972 <desc>Logical name of the shared folder to remove.</desc>
1973 </param>
1974 </method>
1975
1976 <method name="getExtraDataKeys">
1977 <desc>
1978 Returns an array representing the global extra data keys which currently
1979 have values defined.
1980 </desc>
1981 <param name="value" type="wstring" dir="return" safearray="yes">
1982 <desc>Array of extra data keys.</desc>
1983 </param>
1984 </method>
1985
1986 <method name="getExtraData">
1987 <desc>
1988 Returns associated global extra data.
1989
1990 If the requested data @a key does not exist, this function will
1991 succeed and return an empty string in the @a value argument.
1992
1993 <result name="VBOX_E_FILE_ERROR">
1994 Settings file not accessible.
1995 </result>
1996 <result name="VBOX_E_XML_ERROR">
1997 Could not parse the settings file.
1998 </result>
1999
2000 </desc>
2001 <param name="key" type="wstring" dir="in">
2002 <desc>Name of the data key to get.</desc>
2003 </param>
2004 <param name="value" type="wstring" dir="return">
2005 <desc>Value of the requested data key.</desc>
2006 </param>
2007 </method>
2008
2009 <method name="setExtraData">
2010 <desc>
2011 Sets associated global extra data.
2012
2013 If you pass @c null or empty string as a key @a value, the given @a key
2014 will be deleted.
2015
2016 <note>
2017 Before performing the actual data change, this method will ask all
2018 registered event listener using the
2019 <link to="IExtraDataCanChangeEvent"/>
2020 notification for a permission. If one of the listeners refuses the
2021 new value, the change will not be performed.
2022 </note>
2023 <note>
2024 On success, the
2025 <link to="IExtraDataChangedEvent"/> notification
2026 is called to inform all registered listeners about a successful data
2027 change.
2028 </note>
2029
2030 <result name="VBOX_E_FILE_ERROR">
2031 Settings file not accessible.
2032 </result>
2033 <result name="VBOX_E_XML_ERROR">
2034 Could not parse the settings file.
2035 </result>
2036 <result name="E_ACCESSDENIED">
2037 Modification request refused.
2038 </result>
2039
2040 </desc>
2041 <param name="key" type="wstring" dir="in">
2042 <desc>Name of the data key to set.</desc>
2043 </param>
2044 <param name="value" type="wstring" dir="in">
2045 <desc>Value to assign to the key.</desc>
2046 </param>
2047 </method>
2048
2049 <method name="waitForPropertyChange">
2050 <desc>
2051 Blocks the caller until any of the properties represented by the
2052 @a what argument changes the value or until the given timeout interval
2053 expires.
2054
2055 The @a what argument is a comma separated list of property masks that
2056 describe properties the caller is interested in. The property mask is
2057 a string in the following format:
2058
2059 <pre>
2060 [[group.]subgroup.]name
2061 </pre>
2062
2063 where @c name is the property name and @c group, @c subgroup are zero
2064 or more property group specifiers. Each element (group or name) in
2065 the property mask may be either a Latin string or an asterisk symbol
2066 (@c "*") which is used to match any string for the given element. A
2067 property mask that doesn't contain asterisk symbols represents a
2068 single fully qualified property name.
2069
2070 Groups in the fully qualified property name go from more generic (the
2071 left-most part) to more specific (the right-most part). The first
2072 element is usually a name of the object the property belongs to. The
2073 second element may be either a property name, or a child object name,
2074 or an index if the preceding element names an object which is one of
2075 many objects of the same type. This way, property names form a
2076 hierarchy of properties. Here are some examples of property names:
2077
2078 <table>
2079 <tr>
2080 <td><tt>VirtualBox.version</tt></td>
2081 <td><link to="IVirtualBox::version"/> property</td>
2082 </tr>
2083 <tr>
2084 <td><tt>Machine.&lt;UUID&gt;.name</tt></td>
2085 <td><link to="IMachine::name"/> property of the machine with the
2086 given UUID</td>
2087 </tr>
2088 </table>
2089
2090 Most property names directly correspond to the properties of objects
2091 (components) provided by the VirtualBox library and may be used to
2092 track changes to these properties. However, there may be
2093 pseudo-property names that don't correspond to any existing object's
2094 property directly, as well as there may be object properties that
2095 don't have a corresponding property name that is understood by this
2096 method, and therefore changes to such properties cannot be
2097 tracked. See individual object's property descriptions to get a
2098 fully qualified property name that can be used with this method (if
2099 any).
2100
2101 There is a special property mask @c "*" (i.e. a string consisting of a
2102 single asterisk symbol) that can be used to match all properties.
2103 Below are more examples of property masks:
2104
2105 <table>
2106 <tr>
2107 <td><tt>VirtualBox.*</tt></td>
2108 <td>Track all properties of the VirtualBox object</td>
2109 </tr>
2110 <tr>
2111 <td><tt>Machine.*.name</tt></td>
2112 <td>Track changes to the <link to="IMachine::name"/> property of
2113 all registered virtual machines</td>
2114 </tr>
2115 </table>
2116
2117 <note>
2118 This function is not implemented in the current version of the
2119 product.
2120 </note>
2121 </desc>
2122 <param name="what" type="wstring" dir="in">
2123 <desc>Comma separated list of property masks.</desc>
2124 </param>
2125 <param name="timeout" type="unsigned long" dir="in">
2126 <desc>
2127 Wait timeout in milliseconds.
2128 Specify -1 for an indefinite wait.
2129 </desc>
2130 </param>
2131 <param name="changed" type="wstring" dir="out">
2132 <desc>
2133 Comma separated list of properties that have been changed and caused
2134 this method to return to the caller.
2135 </desc>
2136 </param>
2137 <param name="values" type="wstring" dir="out">
2138 <desc>Reserved, not currently used.</desc>
2139 </param>
2140 </method>
2141
2142 <!--method name="createDHCPServerForInterface">
2143 <desc>
2144 Creates a dhcp server settings to be used for the given interface
2145 <result name="E_INVALIDARG">
2146 Host network interface @a name already exists.
2147 </result>
2148 </desc>
2149 <param name="interface" type="IHostNetworkInterface" dir="in">
2150 <desc>Network Interface</desc>
2151 </param>
2152 <param name="server" type="IDHCPServer" dir="out">
2153 <desc>Dhcp server settings</desc>
2154 </param>
2155 </method-->
2156
2157 <method name="createDHCPServer">
2158 <desc>
2159 Creates a dhcp server settings to be used for the given internal network name
2160 <result name="E_INVALIDARG">
2161 Host network interface @a name already exists.
2162 </result>
2163 </desc>
2164 <param name="name" type="wstring" dir="in">
2165 <desc>server name</desc>
2166 </param>
2167 <param name="server" type="IDHCPServer" dir="return">
2168 <desc>Dhcp server settings</desc>
2169 </param>
2170 </method>
2171
2172 <method name="findDHCPServerByNetworkName">
2173 <desc>
2174 Searches a dhcp server settings to be used for the given internal network name
2175 <result name="E_INVALIDARG">
2176 Host network interface @a name already exists.
2177 </result>
2178
2179 </desc>
2180 <param name="name" type="wstring" dir="in">
2181 <desc>server name</desc>
2182 </param>
2183 <param name="server" type="IDHCPServer" dir="return">
2184 <desc>Dhcp server settings</desc>
2185 </param>
2186 </method>
2187
2188 <!--method name="findDHCPServerForInterface">
2189 <desc>
2190 Searches a dhcp server settings to be used for the given interface
2191 <result name="E_INVALIDARG">
2192 Host network interface @a name already exists.
2193 </result>
2194 </desc>
2195 <param name="interface" type="IHostNetworkInterface" dir="in">
2196 <desc>Network Interface</desc>
2197 </param>
2198 <param name="server" type="IDHCPServer" dir="out">
2199 <desc>Dhcp server settings</desc>
2200 </param>
2201 </method-->
2202
2203 <method name="removeDHCPServer">
2204 <desc>
2205 Removes the dhcp server settings
2206 <result name="E_INVALIDARG">
2207 Host network interface @a name already exists.
2208 </result>
2209 </desc>
2210 <param name="server" type="IDHCPServer" dir="in">
2211 <desc>Dhcp server settings to be removed</desc>
2212 </param>
2213 </method>
2214
2215
2216 <method name="checkFirmwarePresent">
2217 <desc>
2218 Check if this VirtualBox installation has a firmware
2219 of the given type available, either system-wide or per-user.
2220 Optionally, this may return a hint where this firmware can be
2221 downloaded from.
2222 </desc>
2223 <param name="firmwareType" type="FirmwareType" dir="in">
2224 <desc>
2225 Type of firmware to check.
2226 </desc>
2227 </param>
2228 <param name="version" type="wstring" dir="in">
2229 <desc>Expected version number, usually empty string (presently ignored).</desc>
2230 </param>
2231
2232 <param name="url" type="wstring" dir="out">
2233 <desc>
2234 Suggested URL to download this firmware from.
2235 </desc>
2236 </param>
2237
2238 <param name="file" type="wstring" dir="out">
2239 <desc>
2240 Filename of firmware, only valid if result == TRUE.
2241 </desc>
2242 </param>
2243
2244 <param name="result" type="boolean" dir="return">
2245 <desc>If firmware of this type and version is available.</desc>
2246 </param>
2247 </method>
2248
2249 </interface>
2250
2251 <!--
2252 // IVFSExplorer
2253 /////////////////////////////////////////////////////////////////////////
2254 -->
2255
2256 <enum
2257 name="VFSType"
2258 uuid="813999ba-b949-48a8-9230-aadc6285e2f2"
2259 >
2260 <desc>
2261 Virtual file systems supported by VFSExplorer.
2262 </desc>
2263
2264 <const name="File" value="1" />
2265 <const name="Cloud" value="2" />
2266 <const name="S3" value="3" />
2267 <const name="WebDav" value="4" />
2268 </enum>
2269
2270 <enum
2271 name="VFSFileType"
2272 uuid="714333cd-44e2-415f-a245-d378fa9b1242"
2273 >
2274 <desc>
2275 File types known by VFSExplorer.
2276 </desc>
2277
2278 <const name="Unknown" value="1" />
2279 <const name="Fifo" value="2" />
2280 <const name="DevChar" value="3" />
2281 <const name="Directory" value="4" />
2282 <const name="DevBlock" value="5" />
2283 <const name="File" value="6" />
2284 <const name="SymLink" value="7" />
2285 <const name="Socket" value="8" />
2286 <const name="WhiteOut" value="9" />
2287 </enum>
2288
2289 <interface
2290 name="IVFSExplorer" extends="$unknown"
2291 uuid="2bb864a1-02a3-4474-a1d4-fb5f23b742e1"
2292 wsmap="managed"
2293 >
2294 <desc>
2295 The VFSExplorer interface unifies access to different file system
2296 types. This includes local file systems as well remote file systems like
2297 S3. For a list of supported types see <link to="VFSType" />.
2298 An instance of this is returned by <link to="IAppliance::createVFSExplorer" />.
2299 </desc>
2300
2301 <attribute name="path" type="wstring" readonly="yes">
2302 <desc>Returns the current path in the virtual file system.</desc>
2303 </attribute>
2304
2305 <attribute name="type" type="VFSType" readonly="yes">
2306 <desc>Returns the file system type which is currently in use.</desc>
2307 </attribute>
2308
2309 <method name="update">
2310 <desc>Updates the internal list of files/directories from the
2311 current directory level. Use <link to="#entryList" /> to get the full list
2312 after a call to this method.</desc>
2313
2314 <param name="aProgress" type="IProgress" dir="return">
2315 <desc>Progress object to track the operation completion.</desc>
2316 </param>
2317 </method>
2318
2319 <method name="cd">
2320 <desc>Change the current directory level.</desc>
2321
2322 <param name="aDir" type="wstring" dir="in">
2323 <desc>The name of the directory to go in.</desc>
2324 </param>
2325
2326 <param name="aProgress" type="IProgress" dir="return">
2327 <desc>Progress object to track the operation completion.</desc>
2328 </param>
2329 </method>
2330
2331 <method name="cdUp">
2332 <desc>Go one directory upwards from the current directory level.</desc>
2333
2334 <param name="aProgress" type="IProgress" dir="return">
2335 <desc>Progress object to track the operation completion.</desc>
2336 </param>
2337 </method>
2338
2339 <method name="entryList">
2340 <desc>Returns a list of files/directories after a call to <link
2341 to="#update" />. The user is responsible for keeping this internal
2342 list up do date.</desc>
2343
2344 <param name="aNames" type="wstring" safearray="yes" dir="out">
2345 <desc>The list of names for the entries.</desc>
2346 </param>
2347
2348 <param name="aTypes" type="unsigned long" safearray="yes" dir="out">
2349 <desc>The list of types for the entries.</desc>
2350 </param>
2351 </method>
2352
2353 <method name="exists">
2354 <desc>Checks if the given file list exists in the current directory
2355 level.</desc>
2356
2357 <param name="aNames" type="wstring" safearray="yes" dir="in">
2358 <desc>The names to check.</desc>
2359 </param>
2360
2361 <param name="aExists" type="wstring" safearray="yes" dir="return">
2362 <desc>The names which exist.</desc>
2363 </param>
2364 </method>
2365
2366 <method name="remove">
2367 <desc>Deletes the given files in the current directory level.</desc>
2368
2369 <param name="aNames" type="wstring" safearray="yes" dir="in">
2370 <desc>The names to remove.</desc>
2371 </param>
2372
2373 <param name="aProgress" type="IProgress" dir="return">
2374 <desc>Progress object to track the operation completion.</desc>
2375 </param>
2376 </method>
2377
2378 </interface>
2379
2380 <!--
2381 // IAppliance
2382 /////////////////////////////////////////////////////////////////////////
2383 -->
2384
2385 <interface
2386 name="IAppliance" extends="$unknown"
2387 uuid="fb61a4fc-57e7-48d6-859b-71f37d484cf2"
2388 wsmap="managed"
2389 >
2390 <desc>
2391 Represents a platform-independent appliance in OVF format. An instance of this is returned
2392 by <link to="IVirtualBox::createAppliance" />, which can then be used to import and export
2393 virtual machines within an appliance with VirtualBox.
2394
2395 The OVF standard suggests two different physical file formats:
2396
2397 <ol>
2398 <li>If the appliance is distributed as a set of files, there must be at least one XML descriptor
2399 file that conforms to the OVF standard and carries an <tt>.ovf</tt> file extension. If
2400 this descriptor file references other files such as disk images, as OVF appliances typically
2401 do, those additional files must be in the same directory as the descriptor file.</li>
2402
2403 <li>If the appliance is distributed as a single file, it must be in TAR format and have the
2404 <tt>.ova</tt> file extension. This TAR file must then contain at least the OVF descriptor
2405 files and optionally other files.
2406
2407 At this time, VirtualBox does not not yet support the packed (TAR) variant; support will
2408 be added with a later version.</li>
2409 </ol>
2410
2411 <b>Importing</b> an OVF appliance into VirtualBox as instances of
2412 <link to="IMachine" /> involves the following sequence of API calls:
2413
2414 <ol>
2415 <li>Call <link to="IVirtualBox::createAppliance" />. This will create an empty IAppliance object.
2416 </li>
2417
2418 <li>On the new object, call <link to="#read" /> with the full path of the OVF file you
2419 would like to import. So long as this file is syntactically valid, this will succeed
2420 and fill the appliance object with the parsed data from the OVF file.
2421 </li>
2422
2423 <li>Next, call <link to="#interpret" />, which analyzes the OVF data and sets up the
2424 contents of the IAppliance attributes accordingly. These can be inspected by a
2425 VirtualBox front-end such as the GUI, and the suggestions can be displayed to the
2426 user. In particular, the <link to="#virtualSystemDescriptions" /> array contains
2427 instances of <link to="IVirtualSystemDescription" /> which represent the virtual
2428 systems (machines) in the OVF, which in turn describe the virtual hardware prescribed
2429 by the OVF (network and hardware adapters, virtual disk images, memory size and so on).
2430 The GUI can then give the user the option to confirm and/or change these suggestions.
2431 </li>
2432
2433 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2434 virtual system (machine) to override the suggestions made by the interpret() routine.
2435 </li>
2436
2437 <li>Finally, call <link to="#importMachines" /> to create virtual machines in
2438 VirtualBox as instances of <link to="IMachine" /> that match the information in the
2439 virtual system descriptions. After this call suceeded, the UUIDs of the machines created
2440 can be found in the <link to="#machines" /> array attribute.
2441 </li>
2442 </ol>
2443
2444 <b>Exporting</b> VirtualBox machines into an OVF appliance involves the following steps:
2445
2446 <ol>
2447 <li>As with importing, first call <link to="IVirtualBox::createAppliance" /> to create
2448 an empty IAppliance object.
2449 </li>
2450
2451 <li>For each machine you would like to export, call <link to="IMachine::export" />
2452 with the IAppliance object you just created. Each such call creates one instance of
2453 <link to="IVirtualSystemDescription" /> inside the appliance.
2454 </li>
2455
2456 <li>If desired, call <link to="IVirtualSystemDescription::setFinalValues" /> for each
2457 virtual system (machine) to override the suggestions made by the export() routine.
2458 </li>
2459
2460 <li>Finally, call <link to="#write" /> with a path specification to have the OVF
2461 file written.</li>
2462 </ol>
2463
2464 </desc>
2465
2466 <attribute name="path" type="wstring" readonly="yes">
2467 <desc>Path to the main file of the OVF appliance, which is either the <tt>.ovf</tt> or
2468 the <tt>.ova</tt> file passed to <link to="#read" /> (for import) or
2469 <link to="#write" /> (for export).
2470 This attribute is empty until one of these methods has been called.
2471 </desc>
2472 </attribute>
2473
2474 <attribute name="disks" type="wstring" readonly="yes" safearray="yes">
2475 <desc>
2476 Array of virtual disk definitions. One such description exists for each
2477 disk definition in the OVF; each string array item represents one such piece of
2478 disk information, with the information fields separated by tab (\t) characters.
2479
2480 The caller should be prepared for additional fields being appended to
2481 this string in future versions of VirtualBox and therefore check for
2482 the number of tabs in the strings returned.
2483
2484 In the current version, the following eight fields are returned per string
2485 in the array:
2486
2487 <ol>
2488 <li>Disk ID (unique string identifier given to disk)</li>
2489
2490 <li>Capacity (unsigned integer indicating the maximum capacity of the disk)</li>
2491
2492 <li>Populated size (optional unsigned integer indicating the current size of the
2493 disk; can be approximate; -1 if unspecified)</li>
2494
2495 <li>Format (string identifying the disk format, typically
2496 "http://www.vmware.com/specifications/vmdk.html#sparse")</li>
2497
2498 <li>Reference (where to find the disk image, typically a file name; if empty,
2499 then the disk should be created on import)</li>
2500
2501 <li>Image size (optional unsigned integer indicating the size of the image,
2502 which need not necessarily be the same as the values specified above, since
2503 the image may be compressed or sparse; -1 if not specified)</li>
2504
2505 <li>Chunk size (optional unsigned integer if the image is split into chunks;
2506 presently unsupported and always -1)</li>
2507
2508 <li>Compression (optional string equalling "gzip" if the image is gzip-compressed)</li>
2509 </ol>
2510 </desc>
2511 </attribute>
2512
2513 <attribute name="virtualSystemDescriptions" type="IVirtualSystemDescription" readonly="yes" safearray="yes">
2514 <desc> Array of virtual system descriptions. One such description is created
2515 for each virtual system (machine) found in the OVF.
2516 This array is empty until either <link to="#interpret" /> (for import) or <link to="IMachine::export" />
2517 (for export) has been called.
2518 </desc>
2519 </attribute>
2520
2521 <attribute name="machines" type="wstring" readonly="yes" safearray="yes">
2522 <desc>
2523 Contains the UUIDs of the machines created from the information in this appliances. This is only
2524 relevant for the import case, and will only contain data after a call to <link to="#importMachines" />
2525 succeeded.
2526 </desc>
2527 </attribute>
2528
2529 <method name="read">
2530 <desc>
2531 Reads an OVF file into the appliance object.
2532
2533 This method succeeds if the OVF is syntactically valid and, by itself, without errors. The
2534 mere fact that this method returns successfully does not mean that VirtualBox supports all
2535 features requested by the appliance; this can only be examined after a call to <link to="#interpret" />.
2536 </desc>
2537 <param name="file" type="wstring" dir="in">
2538 <desc>
2539 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2540 on whether the appliance is distributed as a set of files or as a single file, respectively).
2541 </desc>
2542 </param>
2543 <param name="aProgress" type="IProgress" dir="return">
2544 <desc>Progress object to track the operation completion.</desc>
2545 </param>
2546 </method>
2547
2548 <method name="interpret">
2549 <desc>
2550 Interprets the OVF data that was read when the appliance was constructed. After
2551 calling this method, one can inspect the
2552 <link to="#virtualSystemDescriptions" /> array attribute, which will then contain
2553 one <link to="IVirtualSystemDescription" /> for each virtual machine found in
2554 the appliance.
2555
2556 Calling this method is the second step of importing an appliance into VirtualBox;
2557 see <link to="IAppliance" /> for an overview.
2558
2559 After calling this method, one should call <link to="#getWarnings" /> to find out
2560 if problems were encountered during the processing which might later lead to
2561 errors.
2562 </desc>
2563 </method>
2564
2565 <method name="importMachines">
2566 <desc>
2567 Imports the appliance into VirtualBox by creating instances of <link to="IMachine" />
2568 and other interfaces that match the information contained in the appliance as
2569 closely as possible, as represented by the import instructions in the
2570 <link to="#virtualSystemDescriptions" /> array.
2571
2572 Calling this method is the final step of importing an appliance into VirtualBox;
2573 see <link to="IAppliance" /> for an overview.
2574
2575 Since importing the appliance will most probably involve copying and converting
2576 disk images, which can take a long time, this method operates asynchronously and
2577 returns an IProgress object to allow the caller to monitor the progress.
2578
2579 After the import succeeded, the UUIDs of the IMachine instances created can be
2580 retrieved from the <link to="#machines" /> array attribute.
2581 </desc>
2582
2583 <param name="aProgress" type="IProgress" dir="return">
2584 <desc>Progress object to track the operation completion.</desc>
2585 </param>
2586 </method>
2587
2588 <method name="createVFSExplorer">
2589 <desc>Returns a <link to="IVFSExplorer" /> object for the given URI.</desc>
2590
2591 <param name="aUri" type="wstring" dir="in">
2592 <desc>The URI describing the file system to use.</desc>
2593 </param>
2594
2595 <param name="aExplorer" type="IVFSExplorer" dir="return">
2596 <desc></desc>
2597 </param>
2598 </method>
2599
2600 <method name="write">
2601 <desc>
2602 Writes the contents of the appliance exports into a new OVF file.
2603
2604 Calling this method is the final step of exporting an appliance from VirtualBox;
2605 see <link to="IAppliance" /> for an overview.
2606
2607 Since exporting the appliance will most probably involve copying and converting
2608 disk images, which can take a long time, this method operates asynchronously and
2609 returns an IProgress object to allow the caller to monitor the progress.
2610 </desc>
2611 <param name="format" type="wstring" dir="in">
2612 <desc>
2613 Output format, as a string. Currently supported formats are "ovf-0.9" and "ovf-1.0";
2614 future versions of VirtualBox may support additional formats.
2615 </desc>
2616 </param>
2617 <param name="path" type="wstring" dir="in">
2618 <desc>
2619 Name of appliance file to open (either with an <tt>.ovf</tt> or <tt>.ova</tt> extension, depending
2620 on whether the appliance is distributed as a set of files or as a single file, respectively).
2621 </desc>
2622 </param>
2623 <param name="aProgress" type="IProgress" dir="return">
2624 <desc>Progress object to track the operation completion.</desc>
2625 </param>
2626 </method>
2627
2628 <method name="getWarnings">
2629 <desc>Returns textual warnings which occured during execution of <link to="#interpret" />.</desc>
2630
2631 <param name="aWarnings" type="wstring" dir="return" safearray="yes">
2632 <desc></desc>
2633 </param>
2634 </method>
2635
2636 </interface>
2637
2638 <enum
2639 name="VirtualSystemDescriptionType"
2640 uuid="c0f8f135-3a1d-417d-afa6-b38b95a91f90"
2641 >
2642 <desc>Used with <link to="IVirtualSystemDescription" /> to describe the type of
2643 a configuration value.</desc>
2644
2645 <const name="Ignore" value="1" />
2646 <const name="OS" value="2" />
2647 <const name="Name" value="3" />
2648 <const name="Product" value="4" />
2649 <const name="Vendor" value="5" />
2650 <const name="Version" value="6" />
2651 <const name="ProductUrl" value="7" />
2652 <const name="VendorUrl" value="8" />
2653 <const name="Description" value="9" />
2654 <const name="License" value="10" />
2655 <const name="Miscellaneous" value="11" />
2656 <const name="CPU" value="12" />
2657 <const name="Memory" value="13" />
2658 <const name="HardDiskControllerIDE" value="14" />
2659 <const name="HardDiskControllerSATA" value="15" />
2660 <const name="HardDiskControllerSCSI" value="16" />
2661 <const name="HardDiskControllerSAS" value="17" />
2662 <const name="HardDiskImage" value="18" />
2663 <const name="Floppy" value="19" />
2664 <const name="CDROM" value="20" />
2665 <const name="NetworkAdapter" value="21" />
2666 <const name="USBController" value="22" />
2667 <const name="SoundCard" value="23" />
2668
2669 </enum>
2670
2671 <enum
2672 name="VirtualSystemDescriptionValueType"
2673 uuid="56d9403f-3425-4118-9919-36f2a9b8c77c"
2674 >
2675 <desc>Used with <link to="IVirtualSystemDescription::getValuesByType" /> to describe the value
2676 type to fetch.</desc>
2677
2678 <const name="Reference" value="1" />
2679 <const name="Original" value="2" />
2680 <const name="Auto" value="3" />
2681 <const name="ExtraConfig" value="4" />
2682
2683 </enum>
2684
2685 <interface
2686 name="IVirtualSystemDescription" extends="$unknown"
2687 uuid="d7525e6c-531a-4c51-8e04-41235083a3d8"
2688 wsmap="managed"
2689 >
2690
2691 <desc>Represents one virtual system (machine) in an appliance. This interface is used in
2692 the <link to="IAppliance::virtualSystemDescriptions" /> array. After
2693 <link to="IAppliance::interpret" /> has been called, that array contains information
2694 about how the virtual systems described in the OVF should best be imported into
2695 VirtualBox virtual machines. See <link to="IAppliance" /> for the steps required to
2696 import an OVF into VirtualBox.
2697 </desc>
2698
2699 <attribute name="count" type="unsigned long" readonly="yes">
2700 <desc>Return the number of virtual system description entries.</desc>
2701 </attribute>
2702
2703 <method name="getDescription">
2704 <desc>Returns information about the virtual system as arrays of instruction items. In each array, the
2705 items with the same indices correspond and jointly represent an import instruction for VirtualBox.
2706
2707 The list below identifies the value sets that are possible depending on the
2708 <link to="VirtualSystemDescriptionType" /> enum value in the array item in @a aTypes[]. In each case,
2709 the array item with the same index in @a aOvfValues[] will contain the original value as contained
2710 in the OVF file (just for informational purposes), and the corresponding item in @a aVBoxValues[]
2711 will contain a suggested value to be used for VirtualBox. Depending on the description type,
2712 the @a aExtraConfigValues[] array item may also be used.
2713
2714 <ul>
2715 <li>
2716 "OS": the guest operating system type. There must be exactly one such array item on import. The
2717 corresponding item in @a aVBoxValues[] contains the suggested guest operating system for VirtualBox.
2718 This will be one of the values listed in <link to="IVirtualBox::guestOSTypes" />. The corresponding
2719 item in @a aOvfValues[] will contain a numerical value that described the operating system in the OVF.
2720 </li>
2721 <li>
2722 "Name": the name to give to the new virtual machine. There can be at most one such array item;
2723 if none is present on import, then an automatic name will be created from the operating system
2724 type. The correponding item im @a aOvfValues[] will contain the suggested virtual machine name
2725 from the OVF file, and @a aVBoxValues[] will contain a suggestion for a unique VirtualBox
2726 <link to="IMachine" /> name that does not exist yet.
2727 </li>
2728 <li>
2729 "Description": an arbitrary description.
2730 </li>
2731 <li>
2732 "License": the EULA section from the OVF, if present. It is the responsibility of the calling
2733 code to display such a license for agreement; the Main API does not enforce any such policy.
2734 </li>
2735 <li>
2736 Miscellaneous: reserved for future use.
2737 </li>
2738 <li>
2739 "CPU": the number of CPUs. There can be at most one such item, which will presently be ignored.
2740 </li>
2741 <li>
2742 "Memory": the amount of guest RAM, in bytes. There can be at most one such array item; if none
2743 is present on import, then VirtualBox will set a meaningful default based on the operating system
2744 type.
2745 </li>
2746 <li>
2747 "HardDiskControllerIDE": an IDE hard disk controller. There can be at most two such items.
2748 An optional value in @a aOvfValues[] and @a aVBoxValues[] can be "PIIX3" or "PIIX4" to specify
2749 the type of IDE controller; this corresponds to the ResourceSubType element which VirtualBox
2750 writes into the OVF.
2751 The matching item in the @a aRefs[] array will contain an integer that items of the "Harddisk"
2752 type can use to specify which hard disk controller a virtual disk should be connected to.
2753 Note that in OVF, an IDE controller has two channels, corresponding to "master" and "slave"
2754 in traditional terminology, whereas the IDE storage controller that VirtualBox supports in
2755 its virtual machines supports four channels (primary master, primary slave, secondary master,
2756 secondary slave) and thus maps to two IDE controllers in the OVF sense.
2757 </li>
2758 <li>
2759 "HardDiskControllerSATA": an SATA hard disk controller. There can be at most one such item. This
2760 has no value in @a aOvfValues[] or @a aVBoxValues[].
2761 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2762 </li>
2763 <li>
2764 "HardDiskControllerSCSI": a SCSI hard disk controller. There can be at most one such item.
2765 The items in @a aOvfValues[] and @a aVBoxValues[] will either be "LsiLogic", "BusLogic" or
2766 "LsiLogicSas". (Note that in OVF, the LsiLogicSas controller is treated as a SCSI controller
2767 whereas VirtualBox considers it a class of storage controllers of its own; see
2768 <link to="StorageControllerType" />).
2769 The matching item in the @a aRefs[] array will be used as with IDE controllers (see above).
2770 </li>
2771 <li>
2772 "HardDiskImage": a virtual hard disk, most probably as a reference to an image file. There can be an
2773 arbitrary number of these items, one for each virtual disk image that accompanies the OVF.
2774
2775 The array item in @a aOvfValues[] will contain the file specification from the OVF file (without
2776 a path since the image file should be in the same location as the OVF file itself), whereas the
2777 item in @a aVBoxValues[] will contain a qualified path specification to where VirtualBox uses the
2778 hard disk image. This means that on import the image will be copied and converted from the
2779 "ovf" location to the "vbox" location; on export, this will be handled the other way round.
2780
2781 The matching item in the @a aExtraConfigValues[] array must contain a string of the following
2782 format: "controller=&lt;index&gt;;channel=&lt;c&gt;"
2783 In this string, &lt;index&gt; must be an integer specifying the hard disk controller to connect
2784 the image to. That number must be the index of an array item with one of the hard disk controller
2785 types (HardDiskControllerSCSI, HardDiskControllerSATA, HardDiskControllerIDE).
2786 In addition, &lt;c&gt; must specify the channel to use on that controller. For IDE controllers,
2787 this can be 0 or 1 for master or slave, respectively. For compatibility with VirtualBox versions
2788 before 3.2, the values 2 and 3 (for secondary master and secondary slave) are also supported, but
2789 no longer exported. For SATA and SCSI controllers, the channel can range from 0-29.
2790 </li>
2791 <li>
2792 "CDROM": a virtual CD-ROM drive. The matching item in @a aExtraConfigValue[] contains the same
2793 attachment information as with "HardDiskImage" items.
2794 </li>
2795 <li>
2796 "CDROM": a virtual floppy drive. The matching item in @a aExtraConfigValue[] contains the same
2797 attachment information as with "HardDiskImage" items.
2798 </li>
2799 <li>
2800 "NetworkAdapter": a network adapter. The array item in @a aVBoxValues[] will specify the hardware
2801 for the network adapter, whereas the array item in @a aExtraConfigValues[] will have a string
2802 of the "type=&lt;X&gt;" format, where &lt;X&gt; must be either "NAT" or "Bridged".
2803 </li>
2804 <li>
2805 "USBController": a USB controller. There can be at most one such item. If and only if such an
2806 item ispresent, USB support will be enabled for the new virtual machine.
2807 </li>
2808 <li>
2809 "SoundCard": a sound card. There can be at most one such item. If and only if such an item is
2810 present, sound support will be enabled for the new virtual machine. Note that the virtual
2811 machine in VirtualBox will always be presented with the standard VirtualBox soundcard, which
2812 may be different from the virtual soundcard expected by the appliance.
2813 </li>
2814 </ul>
2815
2816 </desc>
2817
2818 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2819 <desc></desc>
2820 </param>
2821
2822 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2823 <desc></desc>
2824 </param>
2825
2826 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2827 <desc></desc>
2828 </param>
2829
2830 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2831 <desc></desc>
2832 </param>
2833
2834 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2835 <desc></desc>
2836 </param>
2837
2838 </method>
2839
2840 <method name="getDescriptionByType">
2841 <desc>This is the same as <link to="#getDescription" /> except that you can specify which types
2842 should be returned.</desc>
2843
2844 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2845 <desc></desc>
2846 </param>
2847
2848 <param name="aTypes" type="VirtualSystemDescriptionType" dir="out" safearray="yes">
2849 <desc></desc>
2850 </param>
2851
2852 <param name="aRefs" type="wstring" dir="out" safearray="yes">
2853 <desc></desc>
2854 </param>
2855
2856 <param name="aOvfValues" type="wstring" dir="out" safearray="yes">
2857 <desc></desc>
2858 </param>
2859
2860 <param name="aVBoxValues" type="wstring" dir="out" safearray="yes">
2861 <desc></desc>
2862 </param>
2863
2864 <param name="aExtraConfigValues" type="wstring" dir="out" safearray="yes">
2865 <desc></desc>
2866 </param>
2867
2868 </method>
2869
2870 <method name="getValuesByType">
2871 <desc>This is the same as <link to="#getDescriptionByType" /> except that you can specify which
2872 value types should be returned. See <link to="VirtualSystemDescriptionValueType" /> for possible
2873 values.</desc>
2874
2875 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2876 <desc></desc>
2877 </param>
2878
2879 <param name="aWhich" type="VirtualSystemDescriptionValueType" dir="in">
2880 <desc></desc>
2881 </param>
2882
2883 <param name="aValues" type="wstring" dir="return" safearray="yes">
2884 <desc></desc>
2885 </param>
2886
2887 </method>
2888
2889 <method name="setFinalValues">
2890 <desc>
2891 This method allows the appliance's user to change the configuration for the virtual
2892 system descriptions. For each array item returned from <link to="#getDescription" />,
2893 you must pass in one boolean value and one configuration value.
2894
2895 Each item in the boolean array determines whether the particular configuration item
2896 should be enabled.
2897 You can only disable items of the types HardDiskControllerIDE, HardDiskControllerSATA,
2898 HardDiskControllerSCSI, HardDiskImage, CDROM, Floppy, NetworkAdapter, USBController
2899 and SoundCard.
2900
2901 For the "vbox" and "extra configuration" values, if you pass in the same arrays
2902 as returned in the aVBoxValues and aExtraConfigValues arrays from getDescription(),
2903 the configuration remains unchanged. Please see the documentation for getDescription()
2904 for valid configuration values for the individual array item types. If the
2905 corresponding item in the aEnabled array is @c false, the configuration value is ignored.
2906 </desc>
2907
2908 <param name="aEnabled" type="boolean" dir="in" safearray="yes">
2909 <desc></desc>
2910 </param>
2911
2912 <param name="aVBoxValues" type="wstring" dir="in" safearray="yes">
2913 <desc></desc>
2914 </param>
2915
2916 <param name="aExtraConfigValues" type="wstring" dir="in" safearray="yes">
2917 <desc></desc>
2918 </param>
2919 </method>
2920
2921 <method name="addDescription">
2922 <desc>
2923 This method adds an additional description entry to the stack of already
2924 available descriptions for this virtual system. This is handy for writing
2925 values which aren't directly supported by VirtualBox. One example would
2926 be the License type of <link to="VirtualSystemDescriptionType" />.
2927 </desc>
2928
2929 <param name="aType" type="VirtualSystemDescriptionType" dir="in">
2930 <desc></desc>
2931 </param>
2932
2933 <param name="aVBoxValue" type="wstring" dir="in">
2934 <desc></desc>
2935 </param>
2936
2937 <param name="aExtraConfigValue" type="wstring" dir="in">
2938 <desc></desc>
2939 </param>
2940 </method>
2941 </interface>
2942
2943
2944 <!--
2945 // IMachine
2946 /////////////////////////////////////////////////////////////////////////
2947 -->
2948
2949 <interface
2950 name="IInternalMachineControl" extends="$unknown"
2951 uuid="e2da8b1a-2ad1-490e-b29e-c33a144791b6"
2952 internal="yes"
2953 wsmap="suppress"
2954 >
2955 <method name="setRemoveSavedStateFile">
2956 <desc>
2957 Updates the flag whether the saved state file is removed on a
2958 machine state change from Saved to PoweredOff.
2959 </desc>
2960 <param name="aRemove" type="boolean" dir="in"/>
2961 </method>
2962
2963 <method name="updateState">
2964 <desc>
2965 Updates the VM state.
2966 <note>
2967 This operation will also update the settings file with the correct
2968 information about the saved state file and delete this file from disk
2969 when appropriate.
2970 </note>
2971 </desc>
2972 <param name="state" type="MachineState" dir="in"/>
2973 </method>
2974
2975 <method name="getIPCId">
2976 <param name="id" type="wstring" dir="return"/>
2977 </method>
2978
2979 <method name="beginPowerUp">
2980 <desc>
2981 Tells VBoxSVC that <link to="IConsole::powerUp"/> is under ways and
2982 gives it the progress object that should be part of any pending
2983 <link to="IMachine::launchVMProcess"/> operations. The progress
2984 object may be called back to reflect an early cancelation, so some care
2985 have to be taken with respect to any cancelation callbacks. The console
2986 object will call <link to="IInternalMachineControl::endPowerUp"/>
2987 to signal the completion of the progress object.
2988 </desc>
2989 <param name="aProgress" type="IProgress" dir="in" />
2990 </method>
2991
2992 <method name="endPowerUp">
2993 <desc>
2994 Tells VBoxSVC that <link to="IConsole::powerUp"/> has completed.
2995 This method may query status information from the progress object it
2996 received in <link to="IInternalMachineControl::beginPowerUp"/> and copy
2997 it over to any in-progress <link to="IMachine::launchVMProcess"/>
2998 call in order to complete that progress object.
2999 </desc>
3000 <param name="result" type="long" dir="in"/>
3001 </method>
3002
3003 <method name="runUSBDeviceFilters">
3004 <desc>
3005 Asks the server to run USB devices filters of the associated
3006 machine against the given USB device and tell if there is
3007 a match.
3008 <note>
3009 Intended to be used only for remote USB devices. Local
3010 ones don't require to call this method (this is done
3011 implicitly by the Host and USBProxyService).
3012 </note>
3013 </desc>
3014 <param name="device" type="IUSBDevice" dir="in"/>
3015 <param name="matched" type="boolean" dir="out"/>
3016 <param name="maskedInterfaces" type="unsigned long" dir="out"/>
3017 </method>
3018
3019 <method name="captureUSBDevice">
3020 <desc>
3021 Requests a capture of the given host USB device.
3022 When the request is completed, the VM process will
3023 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3024 notification.
3025 </desc>
3026 <param name="id" type="uuid" mod="string" dir="in"/>
3027 </method>
3028
3029 <method name="detachUSBDevice">
3030 <desc>
3031 Notification that a VM is going to detach (@a done = @c false) or has
3032 already detached (@a done = @c true) the given USB device.
3033 When the @a done = @c true request is completed, the VM process will
3034 get a <link to="IInternalSessionControl::onUSBDeviceDetach"/>
3035 notification.
3036 <note>
3037 In the @a done = @c true case, the server must run its own filters
3038 and filters of all VMs but this one on the detached device
3039 as if it were just attached to the host computer.
3040 </note>
3041 </desc>
3042 <param name="id" type="uuid" mod="string" dir="in"/>
3043 <param name="done" type="boolean" dir="in"/>
3044 </method>
3045
3046 <method name="autoCaptureUSBDevices">
3047 <desc>
3048 Requests a capture all matching USB devices attached to the host.
3049 When the request is completed, the VM process will
3050 get a <link to="IInternalSessionControl::onUSBDeviceAttach"/>
3051 notification per every captured device.
3052 </desc>
3053 </method>
3054
3055 <method name="detachAllUSBDevices">
3056 <desc>
3057 Notification that a VM that is being powered down. The done
3058 parameter indicates whether which stage of the power down
3059 we're at. When @a done = @c false the VM is announcing its
3060 intentions, while when @a done = @c true the VM is reporting
3061 what it has done.
3062 <note>
3063 In the @a done = @c true case, the server must run its own filters
3064 and filters of all VMs but this one on all detach devices as
3065 if they were just attached to the host computer.
3066 </note>
3067 </desc>
3068 <param name="done" type="boolean" dir="in"/>
3069 </method>
3070
3071 <method name="onSessionEnd">
3072 <desc>
3073 Triggered by the given session object when the session is about
3074 to close normally.
3075 </desc>
3076 <param name="session" type="ISession" dir="in">
3077 <desc>Session that is being closed</desc>
3078 </param>
3079 <param name="progress" type="IProgress" dir="return">
3080 <desc>
3081 Used to wait until the corresponding machine is actually
3082 dissociated from the given session on the server.
3083 Returned only when this session is a direct one.
3084 </desc>
3085 </param>
3086 </method>
3087
3088 <method name="beginSavingState">
3089 <desc>
3090 Called by the VM process to inform the server it wants to
3091 save the current state and stop the VM execution.
3092 </desc>
3093 <param name="progress" type="IProgress" dir="in">
3094 <desc>
3095 Progress object created by the VM process to wait until
3096 the state is saved.
3097 </desc>
3098 </param>
3099 <param name="stateFilePath" type="wstring" dir="out">
3100 <desc>
3101 File path the VM process must save the execution state to.
3102 </desc>
3103 </param>
3104 </method>
3105
3106 <method name="endSavingState">
3107 <desc>
3108 Called by the VM process to inform the server that saving
3109 the state previously requested by #beginSavingState is either
3110 successfully finished or there was a failure.
3111
3112 <result name="VBOX_E_FILE_ERROR">
3113 Settings file not accessible.
3114 </result>
3115 <result name="VBOX_E_XML_ERROR">
3116 Could not parse the settings file.
3117 </result>
3118
3119 </desc>
3120
3121 <param name="success" type="boolean" dir="in">
3122 <desc>@c true to indicate success and @c false otherwise.
3123 </desc>
3124 </param>
3125 </method>
3126
3127 <method name="adoptSavedState">
3128 <desc>
3129 Gets called by IConsole::adoptSavedState.
3130 <result name="VBOX_E_FILE_ERROR">
3131 Invalid saved state file path.
3132 </result>
3133 </desc>
3134 <param name="savedStateFile" type="wstring" dir="in">
3135 <desc>Path to the saved state file to adopt.</desc>
3136 </param>
3137 </method>
3138
3139 <method name="beginTakingSnapshot">
3140 <desc>
3141 Called from the VM process to request from the server to perform the
3142 server-side actions of creating a snapshot (creating differencing images
3143 and the snapshot object).
3144
3145 <result name="VBOX_E_FILE_ERROR">
3146 Settings file not accessible.
3147 </result>
3148 <result name="VBOX_E_XML_ERROR">
3149 Could not parse the settings file.
3150 </result>
3151 </desc>
3152 <param name="initiator" type="IConsole" dir="in">
3153 <desc>The console object that initiated this call.</desc>
3154 </param>
3155 <param name="name" type="wstring" dir="in">
3156 <desc>Snapshot name.</desc>
3157 </param>
3158 <param name="description" type="wstring" dir="in">
3159 <desc>Snapshot description.</desc>
3160 </param>
3161 <param name="consoleProgress" type="IProgress" dir="in">
3162 <desc>
3163 Progress object created by the VM process tracking the
3164 snapshot's progress. This has the following sub-operations:
3165 <ul>
3166 <li>setting up (weight 1);</li>
3167 <li>one for each medium attachment that needs a differencing image (weight 1 each);</li>
3168 <li>another one to copy the VM state (if offline with saved state, weight is VM memory size in MB);</li>
3169 <li>another one to save the VM state (if online, weight is VM memory size in MB);</li>
3170 <li>finishing up (weight 1)</li>
3171 </ul>
3172 </desc>
3173 </param>
3174 <param name="fTakingSnapshotOnline" type="boolean" dir="in">
3175 <desc>
3176 Whether this is an online snapshot (i.e. the machine is running).
3177 </desc>
3178 </param>
3179 <param name="stateFilePath" type="wstring" dir="out">
3180 <desc>
3181 File path the VM process must save the execution state to.
3182 </desc>
3183 </param>
3184 </method>
3185
3186 <method name="endTakingSnapshot">
3187 <desc>
3188 Called by the VM process to inform the server that the snapshot
3189 previously requested by #beginTakingSnapshot is either
3190 successfully taken or there was a failure.
3191 </desc>
3192
3193 <param name="success" type="boolean" dir="in">
3194 <desc>@c true to indicate success and @c false otherwise</desc>
3195 </param>
3196 </method>
3197
3198 <method name="deleteSnapshot">
3199 <desc>
3200 Gets called by IConsole::deleteSnapshot.
3201 <result name="VBOX_E_INVALID_OBJECT_STATE">
3202 Snapshot has more than one child snapshot.
3203 </result>
3204 </desc>
3205 <param name="initiator" type="IConsole" dir="in">
3206 <desc>The console object that initiated this call.</desc>
3207 </param>
3208 <param name="id" type="uuid" mod="string" dir="in">
3209 <desc>UUID of the snapshot to delete.</desc>
3210 </param>
3211 <param name="machineState" type="MachineState" dir="out">
3212 <desc>New machine state after this operation is started.</desc>
3213 </param>
3214 <param name="progress" type="IProgress" dir="return">
3215 <desc>Progress object to track the operation completion.</desc>
3216 </param>
3217 </method>
3218
3219 <method name="finishOnlineMergeMedium">
3220 <desc>
3221 Gets called by IConsole::onlineMergeMedium.
3222 </desc>
3223 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
3224 <desc>The medium attachment which needs to be cleaned up.</desc>
3225 </param>
3226 <param name="source" type="IMedium" dir="in">
3227 <desc>Merge source medium.</desc>
3228 </param>
3229 <param name="target" type="IMedium" dir="in">
3230 <desc>Merge target medium.</desc>
3231 </param>
3232 <param name="mergeForward" type="boolean" dir="in">
3233 <desc>Merge direction.</desc>
3234 </param>
3235 <param name="parentForTarget" type="IMedium" dir="in">
3236 <desc>For forward merges: new parent for target medium.</desc>
3237 </param>
3238 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
3239 <desc>For backward merges: list of media which need their parent UUID
3240 updated.</desc>
3241 </param>
3242 </method>
3243
3244 <method name="restoreSnapshot">
3245 <desc>
3246 Gets called by IConsole::RestoreSnapshot.
3247 </desc>
3248 <param name="initiator" type="IConsole" dir="in">
3249 <desc>The console object that initiated this call.</desc>
3250 </param>
3251 <param name="snapshot" type="ISnapshot" dir="in">
3252 <desc>The snapshot to restore the VM state from.</desc>
3253 </param>
3254 <param name="machineState" type="MachineState" dir="out">
3255 <desc>New machine state after this operation is started.</desc>
3256 </param>
3257 <param name="progress" type="IProgress" dir="return">
3258 <desc>Progress object to track the operation completion.</desc>
3259 </param>
3260 </method>
3261
3262 <method name="pullGuestProperties">
3263 <desc>
3264 Get the list of the guest properties matching a set of patterns along
3265 with their values, time stamps and flags and give responsibility for
3266 managing properties to the console.
3267 </desc>
3268 <param name="name" type="wstring" dir="out" safearray="yes">
3269 <desc>
3270 The names of the properties returned.
3271 </desc>
3272 </param>
3273 <param name="value" type="wstring" dir="out" safearray="yes">
3274 <desc>
3275 The values of the properties returned. The array entries match the
3276 corresponding entries in the @a name array.
3277 </desc>
3278 </param>
3279 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
3280 <desc>
3281 The time stamps of the properties returned. The array entries match
3282 the corresponding entries in the @a name array.
3283 </desc>
3284 </param>
3285 <param name="flags" type="wstring" dir="out" safearray="yes">
3286 <desc>
3287 The flags of the properties returned. The array entries match the
3288 corresponding entries in the @a name array.
3289 </desc>
3290 </param>
3291 </method>
3292
3293 <method name="pushGuestProperty">
3294 <desc>
3295 Update a single guest property in IMachine.
3296 </desc>
3297 <param name="name" type="wstring" dir="in">
3298 <desc>
3299 The name of the property to be updated.
3300 </desc>
3301 </param>
3302 <param name="value" type="wstring" dir="in">
3303 <desc>
3304 The value of the property.
3305 </desc>
3306 </param>
3307 <param name="timestamp" type="unsigned long long" dir="in">
3308 <desc>
3309 The timestamp of the property.
3310 </desc>
3311 </param>
3312 <param name="flags" type="wstring" dir="in">
3313 <desc>
3314 The flags of the property.
3315 </desc>
3316 </param>
3317 </method>
3318
3319 <method name="lockMedia">
3320 <desc>
3321 Locks all media attached to the machine for writing and parents of
3322 attached differencing media (if any) for reading. This operation is
3323 atomic so that if it fails no media is actually locked.
3324
3325 This method is intended to be called when the machine is in Starting or
3326 Restoring state. The locked media will be automatically unlocked when
3327 the machine is powered off or crashed.
3328 </desc>
3329 </method>
3330 <method name="unlockMedia">
3331 <desc>
3332 Unlocks all media previously locked using
3333 <link to="IInternalMachineControl::lockMedia"/>.
3334
3335 This method is intended to be used with teleportation so that it is
3336 possible to teleport between processes on the same machine.
3337 </desc>
3338 </method>
3339 </interface>
3340
3341 <interface
3342 name="IBIOSSettings" extends="$unknown"
3343 uuid="38b54279-dc35-4f5e-a431-835b867c6b5e"
3344 wsmap="managed"
3345 >
3346 <desc>
3347 The IBIOSSettings interface represents BIOS settings of the virtual
3348 machine. This is used only in the <link to="IMachine::BIOSSettings" /> attribute.
3349 </desc>
3350 <attribute name="logoFadeIn" type="boolean">
3351 <desc>Fade in flag for BIOS logo animation.</desc>
3352 </attribute>
3353
3354 <attribute name="logoFadeOut" type="boolean">
3355 <desc>Fade out flag for BIOS logo animation.</desc>
3356 </attribute>
3357
3358 <attribute name="logoDisplayTime" type="unsigned long">
3359 <desc>BIOS logo display time in milliseconds (0 = default).</desc>
3360 </attribute>
3361
3362 <attribute name="logoImagePath" type="wstring">
3363 <desc>
3364 Local file system path for external BIOS splash image. Empty string
3365 means the default image is shown on boot.
3366 </desc>
3367 </attribute>
3368
3369 <attribute name="bootMenuMode" type="BIOSBootMenuMode">
3370 <desc>Mode of the BIOS boot device menu.</desc>
3371 </attribute>
3372
3373 <attribute name="ACPIEnabled" type="boolean">
3374 <desc>ACPI support flag.</desc>
3375 </attribute>
3376
3377 <attribute name="IOAPICEnabled" type="boolean">
3378 <desc>
3379 IO APIC support flag. If set, VirtualBox will provide an IO APIC
3380 and support IRQs above 15.
3381 </desc>
3382 </attribute>
3383
3384 <attribute name="timeOffset" type="long long">
3385 <desc>
3386 Offset in milliseconds from the host system time. This allows for
3387 guests running with a different system date/time than the host.
3388 It is equivalent to setting the system date/time in the BIOS except
3389 it is not an absolute value but a relative one. Guest Additions
3390 time synchronization honors this offset.
3391 </desc>
3392 </attribute>
3393
3394 <attribute name="PXEDebugEnabled" type="boolean">
3395 <desc>
3396 PXE debug logging flag. If set, VirtualBox will write extensive
3397 PXE trace information to the release log.
3398 </desc>
3399 </attribute>
3400
3401 </interface>
3402
3403 <enum name="CleanupMode"
3404 uuid="67897c50-7cca-47a9-83f6-ce8fd8eb5441">
3405 <desc>Cleanup mode, used with <link to="IMachine::unregister" />.
3406 </desc>
3407 <const name="UnregisterOnly" value="1">
3408 <desc>Unregister only the machine, but neither delete snapshots nor detach media.</desc>
3409 </const>
3410 <const name="DetachAllReturnNone" value="2">
3411 <desc>Delete all snapshots and detach all media but return none; this will keep all media registered.</desc>
3412 </const>
3413 <const name="DetachAllReturnHardDisksOnly" value="3">
3414 <desc>Delete all snapshots, detach all media and return hard disks for closing, but not removeable media.</desc>
3415 </const>
3416 <const name="Full" value="4">
3417 <desc>Delete all snapshots, detach all media and return all media for closing.</desc>
3418 </const>
3419 </enum>
3420
3421 <interface
3422 name="IMachine" extends="$unknown"
3423 uuid="7315c8f6-5010-4e2a-9242-c84ead390d55"
3424 wsmap="managed"
3425 >
3426 <desc>
3427 The IMachine interface represents a virtual machine, or guest, created
3428 in VirtualBox.
3429
3430 This interface is used in two contexts. First of all, a collection of
3431 objects implementing this interface is stored in the
3432 <link to="IVirtualBox::machines"/> attribute which lists all the virtual
3433 machines that are currently registered with this VirtualBox
3434 installation. Also, once a session has been opened for the given virtual
3435 machine (e.g. the virtual machine is running), the machine object
3436 associated with the open session can be queried from the session object;
3437 see <link to="ISession"/> for details.
3438
3439 The main role of this interface is to expose the settings of the virtual
3440 machine and provide methods to change various aspects of the virtual
3441 machine's configuration. For machine objects stored in the
3442 <link to="IVirtualBox::machines"/> collection, all attributes are
3443 read-only unless explicitly stated otherwise in individual attribute
3444 and method descriptions.
3445
3446 In order to change a machine setting, a session for this machine must be
3447 opened using one of the <link to="IMachine::lockMachine" /> or
3448 <link to="IMachine::launchVMProcess"/> methods. After the
3449 machine has been successfully locked for a session, a mutable machine object
3450 needs to be queried from the session object and then the desired settings
3451 changes can be applied to the returned object using IMachine attributes and
3452 methods. See the <link to="ISession"/> interface description for more
3453 information about sessions.
3454
3455 Note that IMachine does not provide methods to control virtual machine
3456 execution (such as start the machine, or power it down) -- these methods
3457 are grouped in a separate interface called <link to="IConsole" />.
3458
3459 <see>ISession, IConsole</see>
3460 </desc>
3461
3462 <attribute name="parent" type="IVirtualBox" readonly="yes">
3463 <desc>Associated parent object.</desc>
3464 </attribute>
3465
3466 <attribute name="accessible" type="boolean" readonly="yes">
3467 <desc>
3468 Whether this virtual machine is currently accessible or not.
3469
3470 A machine is always deemed accessible unless it is registered <i>and</i>
3471 its settings file cannot be read or parsed (either because the file itself
3472 is unavailable or has invalid XML contents).
3473
3474 Every time this property is read, the accessibility state of
3475 this machine is re-evaluated. If the returned value is @c false,
3476 the <link to="#accessError"/> property may be used to get the
3477 detailed error information describing the reason of
3478 inaccessibility, including XML error messages.
3479
3480 When the machine is inaccessible, only the following properties
3481 can be used on it:
3482 <ul>
3483 <li><link to="#parent"/></li>
3484 <li><link to="#id"/></li>
3485 <li><link to="#settingsFilePath"/></li>
3486 <li><link to="#accessible"/></li>
3487 <li><link to="#accessError"/></li>
3488 </ul>
3489
3490 An attempt to access any other property or method will return
3491 an error.
3492
3493 The only possible action you can perform on an inaccessible
3494 machine is to unregister it using the
3495 <link to="IMachine::unregister"/> call (or, to check
3496 for the accessibility state once more by querying this
3497 property).
3498
3499 <note>
3500 In the current implementation, once this property returns
3501 @c true, the machine will never become inaccessible
3502 later, even if its settings file cannot be successfully
3503 read/written any more (at least, until the VirtualBox
3504 server is restarted). This limitation may be removed in
3505 future releases.
3506 </note>
3507 </desc>
3508 </attribute>
3509
3510 <attribute name="accessError" type="IVirtualBoxErrorInfo" readonly="yes">
3511 <desc>
3512 Error information describing the reason of machine
3513 inaccessibility.
3514
3515 Reading this property is only valid after the last call to
3516 <link to="#accessible"/> returned @c false (i.e. the
3517 machine is currently unaccessible). Otherwise, a @c null
3518 IVirtualBoxErrorInfo object will be returned.
3519 </desc>
3520 </attribute>
3521
3522 <attribute name="name" type="wstring">
3523 <desc>
3524 Name of the virtual machine.
3525
3526 Besides being used for human-readable identification purposes
3527 everywhere in VirtualBox, the virtual machine name is also used
3528 as a name of the machine's settings file and as a name of the
3529 subdirectory this settings file resides in. Thus, every time you
3530 change the value of this property, the settings file will be
3531 renamed once you call <link to="#saveSettings"/> to confirm the
3532 change. The containing subdirectory will be also renamed, but
3533 only if it has exactly the same name as the settings file
3534 itself prior to changing this property (for backward compatibility
3535 with previous API releases). The above implies the following
3536 limitations:
3537 <ul>
3538 <li>The machine name cannot be empty.</li>
3539 <li>The machine name can contain only characters that are valid
3540 file name characters according to the rules of the file
3541 system used to store VirtualBox configuration.</li>
3542 <li>You cannot have two or more machines with the same name
3543 if they use the same subdirectory for storing the machine
3544 settings files.</li>
3545 <li>You cannot change the name of the machine if it is running,
3546 or if any file in the directory containing the settings file
3547 is being used by another running machine or by any other
3548 process in the host operating system at a time when
3549 <link to="#saveSettings"/> is called.
3550 </li>
3551 </ul>
3552 If any of the above limitations are hit, <link to="#saveSettings"/>
3553 will return an appropriate error message explaining the exact
3554 reason and the changes you made to this machine will not be saved.
3555 </desc>
3556 </attribute>
3557
3558 <attribute name="description" type="wstring">
3559 <desc>
3560 Description of the virtual machine.
3561
3562 The description attribute can contain any text and is
3563 typically used to describe the hardware and software
3564 configuration of the virtual machine in detail (i.e. network
3565 settings, versions of the installed software and so on).
3566 </desc>
3567 </attribute>
3568
3569 <attribute name="id" type="uuid" mod="string" readonly="yes">
3570 <desc>UUID of the virtual machine.</desc>
3571 </attribute>
3572
3573 <attribute name="OSTypeId" type="wstring">
3574 <desc>
3575 User-defined identifier of the Guest OS type.
3576 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
3577 an IGuestOSType object representing details about the given
3578 Guest OS type.
3579 <note>
3580 This value may differ from the value returned by
3581 <link to="IGuest::OSTypeId"/> if Guest Additions are
3582 installed to the guest OS.
3583 </note>
3584 </desc>
3585 </attribute>
3586
3587 <attribute name="HardwareVersion" type="wstring">
3588 <desc>Hardware version identifier. Internal use only for now.</desc>
3589 </attribute>
3590
3591 <attribute name="hardwareUUID" type="uuid" mod="string">
3592 <desc>
3593 The UUID presented to the guest via memory tables, hardware and guest
3594 properties. For most VMs this is the same as the @a id, but for VMs
3595 which have been cloned or teleported it may be the same as the source
3596 VM. This latter is because the guest shouldn't notice that it was
3597 cloned or teleported.
3598 </desc>
3599 </attribute>
3600
3601 <attribute name="CPUCount" type="unsigned long">
3602 <desc>Number of virtual CPUs in the VM.</desc>
3603 </attribute>
3604
3605 <attribute name="CPUHotPlugEnabled" type="boolean">
3606 <desc>
3607 This setting determines whether VirtualBox allows CPU
3608 hotplugging for this machine.</desc>
3609 </attribute>
3610
3611 <attribute name="CPUPriority" type="unsigned long">
3612 <desc>
3613 Priority of the virtual CPUs. Means to limit the number of CPU cycles
3614 a guest can use. The unit is percentage of host CPU cycles per second.
3615 The valid range is 1 - 100. 100 (the default) implies no limit.
3616 </desc>
3617 </attribute>
3618
3619 <attribute name="memorySize" type="unsigned long">
3620 <desc>System memory size in megabytes.</desc>
3621 </attribute>
3622
3623 <attribute name="memoryBalloonSize" type="unsigned long">
3624 <desc>Memory balloon size in megabytes.</desc>
3625 </attribute>
3626
3627 <attribute name="PageFusionEnabled" type="boolean">
3628 <desc>
3629 This setting determines whether VirtualBox allows page
3630 fusion for this machine (64 bits host only).
3631 </desc>
3632 </attribute>
3633
3634 <attribute name="VRAMSize" type="unsigned long">
3635 <desc>Video memory size in megabytes.</desc>
3636 </attribute>
3637
3638 <attribute name="accelerate3DEnabled" type="boolean" default="false">
3639 <desc>
3640 This setting determines whether VirtualBox allows this machine to make
3641 use of the 3D graphics support available on the host.</desc>
3642 </attribute>
3643
3644 <attribute name="accelerate2DVideoEnabled" type="boolean" default="false">
3645 <desc>
3646 This setting determines whether VirtualBox allows this machine to make
3647 use of the 2D video acceleration support available on the host.</desc>
3648 </attribute>
3649
3650 <attribute name="monitorCount" type="unsigned long">
3651 <desc>
3652 Number of virtual monitors.
3653 <note>
3654 Only effective on Windows XP and later guests with
3655 Guest Additions installed.
3656 </note>
3657 </desc>
3658 </attribute>
3659
3660 <attribute name="BIOSSettings" type="IBIOSSettings" readonly="yes">
3661 <desc>Object containing all BIOS settings.</desc>
3662 </attribute>
3663
3664 <attribute name="firmwareType" type="FirmwareType">
3665 <desc>Type of firmware (such as legacy BIOS or EFI), used for initial
3666 bootstrap in this VM.</desc>
3667 </attribute>
3668
3669 <attribute name="pointingHidType" type="PointingHidType">
3670 <desc>Type of pointing HID (such as mouse or tablet) used in this VM.
3671 The default is typically "PS2Mouse" but can vary depending on the
3672 requirements of the guest operating system.</desc>
3673 </attribute>
3674
3675 <attribute name="keyboardHidType" type="KeyboardHidType">
3676 <desc>Type of keyboard HID used in this VM.
3677 The default is typically "PS2Keyboard" but can vary depending on the
3678 requirements of the guest operating system.</desc>
3679 </attribute>
3680
3681 <attribute name="hpetEnabled" type="boolean">
3682 <desc>This attribute controls if High Precision Event Timer (HPET) is
3683 enabled in this VM. Use this property if you want to provide guests
3684 with additional time source, or if guest requires HPET to function correctly.
3685 Default is false.</desc>
3686 </attribute>
3687
3688 <attribute name="snapshotFolder" type="wstring">
3689 <desc>
3690 Full path to the directory used to store snapshot data
3691 (differencing media and saved state files) of this machine.
3692
3693 The initial value of this property is
3694 <tt>&lt;</tt><link to="#settingsFilePath">
3695 path_to_settings_file</link><tt>&gt;/&lt;</tt>
3696 <link to="#id">machine_uuid</link>
3697 <tt>&gt;</tt>.
3698
3699 Currently, it is an error to try to change this property on
3700 a machine that has snapshots (because this would require to
3701 move possibly large files to a different location).
3702 A separate method will be available for this purpose later.
3703
3704 <note>
3705 Setting this property to @c null or to an empty string will restore
3706 the initial value.
3707 </note>
3708 <note>
3709 When setting this property, the specified path can be
3710 absolute (full path) or relative to the directory where the
3711 <link to="#settingsFilePath">machine settings file</link>
3712 is located. When reading this property, a full path is
3713 always returned.
3714 </note>
3715 <note>
3716 The specified path may not exist, it will be created
3717 when necessary.
3718 </note>
3719 </desc>
3720 </attribute>
3721
3722 <attribute name="VRDPServer" type="IVRDPServer" readonly="yes">
3723 <desc>VRDP server object.</desc>
3724 </attribute>
3725
3726 <attribute name="mediumAttachments" type="IMediumAttachment" readonly="yes" safearray="yes">
3727 <desc>Array of media attached to this machine.</desc>
3728 </attribute>
3729
3730 <attribute name="USBController" type="IUSBController" readonly="yes">
3731 <desc>
3732 Associated USB controller object.
3733
3734 <note>
3735 If USB functionality is not available in the given edition of
3736 VirtualBox, this method will set the result code to @c E_NOTIMPL.
3737 </note>
3738 </desc>
3739 </attribute>
3740
3741 <attribute name="audioAdapter" type="IAudioAdapter" readonly="yes">
3742 <desc>Associated audio adapter, always present.</desc>
3743 </attribute>
3744
3745 <attribute name="storageControllers" type="IStorageController" readonly="yes" safearray="yes">
3746 <desc>Array of storage controllers attached to this machine.</desc>
3747 </attribute>
3748
3749 <attribute name="settingsFilePath" type="wstring" readonly="yes">
3750 <desc>
3751 Full name of the file containing machine settings data.
3752 </desc>
3753 </attribute>
3754
3755 <attribute name="settingsModified" type="boolean" readonly="yes">
3756 <desc>
3757 Whether the settings of this machine have been modified
3758 (but neither yet saved nor discarded).
3759 <note>
3760 Reading this property is only valid on instances returned
3761 by <link to="ISession::machine"/> and on new machines
3762 created by <link to="IVirtualBox::createMachine"/> or opened
3763 by <link to="IVirtualBox::openMachine"/> but not
3764 yet registered, or on unregistered machines after calling
3765 <link to="IMachine::unregister"/>. For all other
3766 cases, the settings can never be modified.
3767 </note>
3768 <note>
3769 For newly created unregistered machines, the value of this
3770 property is always @c true until <link to="#saveSettings"/>
3771 is called (no matter if any machine settings have been
3772 changed after the creation or not). For opened machines
3773 the value is set to @c false (and then follows to normal rules).
3774 </note>
3775 </desc>
3776 </attribute>
3777
3778 <attribute name="sessionState" type="SessionState" readonly="yes">
3779 <desc>Current session state for this machine.</desc>
3780 </attribute>
3781
3782 <attribute name="sessionType" type="wstring" readonly="yes">
3783 <desc>
3784 Type of the session. If <link to="#sessionState"/> is
3785 Spawning or Locked, this attribute contains the
3786 same value as passed to the
3787 <link to="IMachine::launchVMProcess"/> method in the
3788 @a type parameter. If the session was used with
3789 <link to="IMachine::lockMachine" />, or if
3790 <link to="#sessionState"/> is SessionClosed, the value of this
3791 attribute is an empty string.
3792 </desc>
3793 </attribute>
3794
3795 <attribute name="sessionPid" type="unsigned long" readonly="yes">
3796 <desc>
3797 Identifier of the session process. This attribute contains the
3798 platform-dependent identifier of the process whose session was
3799 used with <link to="IMachine::lockMachine" /> call. The returned
3800 value is only valid if <link to="#sessionState"/> is Locked or
3801 Unlocking by the time this property is read.
3802 </desc>
3803 </attribute>
3804
3805 <attribute name="state" type="MachineState" readonly="yes">
3806 <desc>Current execution state of this machine.</desc>
3807 </attribute>
3808
3809 <attribute name="lastStateChange" type="long long" readonly="yes">
3810 <desc>
3811 Time stamp of the last execution state change,
3812 in milliseconds since 1970-01-01 UTC.
3813 </desc>
3814 </attribute>
3815
3816 <attribute name="stateFilePath" type="wstring" readonly="yes">
3817 <desc>
3818 Full path to the file that stores the execution state of
3819 the machine when it is in the <link to="MachineState::Saved"/> state.
3820 <note>
3821 When the machine is not in the Saved state, this attribute is
3822 an empty string.
3823 </note>
3824 </desc>
3825 </attribute>
3826
3827 <attribute name="logFolder" type="wstring" readonly="yes">
3828 <desc>
3829 Full path to the folder that stores a set of rotated log files
3830 recorded during machine execution. The most recent log file is
3831 named <tt>VBox.log</tt>, the previous log file is
3832 named <tt>VBox.log.1</tt> and so on (up to <tt>VBox.log.3</tt>
3833 in the current version).
3834 </desc>
3835 </attribute>
3836
3837 <attribute name="currentSnapshot" type="ISnapshot" readonly="yes">
3838 <desc>
3839 Current snapshot of this machine. This is @c null if the machine
3840 currently has no snapshots. If it is not @c null, then it was
3841 set by one of <link to="IConsole::takeSnapshot" />,
3842 <link to="IConsole::deleteSnapshot" />
3843 or <link to="IConsole::restoreSnapshot" />, depending on which
3844 was called last. See <link to="ISnapshot"/> for details.
3845 </desc>
3846 </attribute>
3847
3848 <attribute name="snapshotCount" type="unsigned long" readonly="yes">
3849 <desc>
3850 Number of snapshots taken on this machine. Zero means the
3851 machine doesn't have any snapshots.
3852 </desc>
3853 </attribute>
3854
3855 <attribute name="currentStateModified" type="boolean" readonly="yes">
3856 <desc>
3857 Returns @c true if the current state of the machine is not
3858 identical to the state stored in the current snapshot.
3859
3860 The current state is identical to the current snapshot only
3861 directly after one of the following calls are made:
3862
3863 <ul>
3864 <li><link to="IConsole::restoreSnapshot"/>
3865 </li>
3866 <li><link to="IConsole::takeSnapshot"/> (issued on a
3867 "powered off" or "saved" machine, for which
3868 <link to="#settingsModified"/> returns @c false)
3869 </li>
3870 <li><link to="IMachine::setCurrentSnapshot"/>
3871 </li>
3872 </ul>
3873
3874 The current state remains identical until one of the following
3875 happens:
3876 <ul>
3877 <li>settings of the machine are changed</li>
3878 <li>the saved state is deleted</li>
3879 <li>the current snapshot is deleted</li>
3880 <li>an attempt to execute the machine is made</li>
3881 </ul>
3882
3883 <note>
3884 For machines that don't have snapshots, this property is
3885 always @c false.
3886 </note>
3887 </desc>
3888 </attribute>
3889
3890 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
3891 <desc>
3892 Collection of shared folders for this machine (permanent shared
3893 folders). These folders are shared automatically at machine startup
3894 and available only to the guest OS installed within this machine.
3895
3896 New shared folders are added to the collection using
3897 <link to="#createSharedFolder"/>. Existing shared folders can be
3898 removed using <link to="#removeSharedFolder"/>.
3899 </desc>
3900 </attribute>
3901
3902 <attribute name="clipboardMode" type="ClipboardMode">
3903 <desc>
3904 Synchronization mode between the host OS clipboard
3905 and the guest OS clipboard.
3906 </desc>
3907 </attribute>
3908
3909 <attribute name="guestPropertyNotificationPatterns" type="wstring">
3910 <desc>
3911 A comma-separated list of simple glob patterns. Changes to guest
3912 properties whose name matches one of the patterns will generate an
3913 <link to="IGuestPropertyChangedEvent"/> signal.
3914 </desc>
3915 </attribute>
3916
3917 <attribute name="teleporterEnabled" type="boolean">
3918 <desc>
3919 When set to @a true, the virtual machine becomes a target teleporter
3920 the next time it is powered on. This can only set to @a true when the
3921 VM is in the @a PoweredOff or @a Aborted state.
3922
3923 <!-- This property is automatically set to @a false when the VM is powered
3924 on. (bird: This doesn't work yet ) -->
3925 </desc>
3926 </attribute>
3927
3928 <attribute name="teleporterPort" type="unsigned long">
3929 <desc>
3930 The TCP port the target teleporter will listen for incoming
3931 teleportations on.
3932
3933 0 means the port is automatically selected upon power on. The actual
3934 value can be read from this property while the machine is waiting for
3935 incoming teleportations.
3936 </desc>
3937 </attribute>
3938
3939 <attribute name="teleporterAddress" type="wstring">
3940 <desc>
3941 The address the target teleporter will listen on. If set to an empty
3942 string, it will listen on all addresses.
3943 </desc>
3944 </attribute>
3945
3946 <attribute name="teleporterPassword" type="wstring">
3947 <desc>
3948 The password the to check for on the target teleporter. This is just a
3949 very basic measure to prevent simple hacks and operators accidentally
3950 beaming a virtual machine to the wrong place.
3951 </desc>
3952 </attribute>
3953
3954 <attribute name="faultToleranceState" type="FaultToleranceState">
3955 <desc>
3956 Fault tolerance state; disabled, source or target.
3957 This property can be changed at any time. If you change it for a running
3958 VM, then the fault tolerance address and port must be set beforehand.
3959 </desc>
3960 </attribute>
3961
3962 <attribute name="faultTolerancePort" type="unsigned long">
3963 <desc>
3964 The TCP port the fault tolerance source or target will use for
3965 communication.
3966 </desc>
3967 </attribute>
3968
3969 <attribute name="faultToleranceAddress" type="wstring">
3970 <desc>
3971 The address the fault tolerance source or target.
3972 </desc>
3973 </attribute>
3974
3975 <attribute name="faultToleranceSyncInterval" type="unsigned long">
3976 <desc>
3977 The interval in ms used for syncing the state between source and target.
3978 </desc>
3979 </attribute>
3980
3981 <attribute name="RTCUseUTC" type="boolean">
3982 <desc>
3983 When set to @a true, the RTC device of the virtual machine will run
3984 in UTC time, otherwise in local time. Especially Unix guests prefer
3985 the time in UTC.
3986 </desc>
3987 </attribute>
3988
3989 <attribute name="ioCacheEnabled" type="boolean">
3990 <desc>
3991 When set to @a true, the builtin I/O cache of the virtual machine
3992 will be enabled.
3993 </desc>
3994 </attribute>
3995
3996 <attribute name="ioCacheSize" type="unsigned long">
3997 <desc>
3998 Maximum size of the I/O cache in MB.
3999 </desc>
4000 </attribute>
4001
4002 <method name="lockMachine">
4003 <desc>
4004 Locks the machine for the given session to enable the caller
4005 to make changes to the machine or start the VM or control
4006 VM execution.
4007
4008 There are two ways to lock a machine for such uses:
4009
4010 <ul>
4011 <li>If you want to make changes to the machine settings,
4012 you must obtain an exclusive write lock on the machine
4013 by setting @a lockType to @c Write.
4014
4015 This will only succeed if no other process has locked
4016 the machine to prevent conflicting changes. Only after
4017 an exclusive write lock has been obtained using this method, one
4018 can change all VM settings or execute the VM in the process
4019 space of the session object. (Note that the latter is only of
4020 interest if you actually want to write a new front-end for
4021 virtual machines; but this API gets called internally by
4022 the existing front-ends such as VBoxHeadless and the VirtualBox
4023 GUI to acquire a write lock on the machine that they are running.)
4024
4025 On success, write-locking the machine for a session creates
4026 a second copy of the IMachine object. It is this second object
4027 upon which changes can be made; in VirtualBox terminology, the
4028 second copy is "mutable". It is only this second, mutable machine
4029 object upon which you can call methods that change the
4030 machine state. After having called this method, you can
4031 obtain this second, mutable machine object using the
4032 <link to="ISession::machine" /> attribute.
4033 </li>
4034 <li>If you only want to check the machine state or control
4035 machine execution without actually changing machine
4036 settings (e.g. to get access to VM statistics or take
4037 a snapshot or save the machine state), then set the
4038 @a lockType argument to @c Shared.
4039
4040 If no other session has obtained a lock, you will obtain an
4041 exclusive write lock as described above. However, if another
4042 session has already obtained such a lock, then a link to that
4043 existing session will be established which allows you
4044 to control that existing session.
4045
4046 To find out which type of lock was obtained, you can
4047 inspect <link to="ISession::type" />, which will have been
4048 set to either @c WriteLock or @c Shared.
4049 </li>
4050 </ul>
4051
4052 In either case, you can get access to the <link to="IConsole" />
4053 object which controls VM execution.
4054
4055 Also in all of the above cases, one must always call
4056 <link to="ISession::unlockMachine" /> to release the lock on the machine, or
4057 the machine's state will eventually be set to "Aborted".
4058
4059 To change settings on a machine, the following sequence is typically
4060 performed:
4061
4062 <ol>
4063 <li>Call this method to obtain an exclusive write lock for the current session.</li>
4064
4065 <li>Obtain a mutable IMachine object from <link to="ISession::machine" />.</li>
4066
4067 <li>Change the settings of the machine by invoking IMachine methods.</li>
4068
4069 <li>Call <link to="IMachine::saveSettings" />.</li>
4070
4071 <li>Release the write lock by calling <link to="ISession::unlockMachine"/>.</li>
4072 </ol>
4073
4074 <result name="E_UNEXPECTED">
4075 Virtual machine not registered.
4076 </result>
4077 <result name="E_ACCESSDENIED">
4078 Process not started by OpenRemoteSession.
4079 </result>
4080 <result name="VBOX_E_INVALID_OBJECT_STATE">
4081 Session already open or being opened.
4082 </result>
4083 <result name="VBOX_E_VM_ERROR">
4084 Failed to assign machine to session.
4085 </result>
4086 </desc>
4087 <param name="session" type="ISession" dir="in">
4088 <desc>
4089 Session object for which the machine will be locked.
4090 </desc>
4091 </param>
4092 <param name="lockType" type="LockType" dir="in">
4093 <desc>
4094 If set to @c Write, then attempt to acquire an exclusive write lock or fail.
4095 If set to @c Shared, then either acquire an exclusive write lock or establish
4096 a link to an existing session.
4097 </desc>
4098 </param>
4099 </method>
4100
4101 <method name="launchVMProcess">
4102 <desc>
4103 Spawns a new process that will execute the virtual machine and obtains a shared
4104 lock on the machine for the calling session.
4105
4106 If launching the VM succeeds, the new VM process will create its own session
4107 and write-lock the machine for it, preventing conflicting changes from other
4108 processes. If the machine is already locked (because it is already running or
4109 because another session has a write lock), launching the VM process will therefore
4110 fail. Reversely, future attempts to obtain a write lock will also fail while the
4111 machine is running.
4112
4113 The caller's session object remains separate from the session opened by the new
4114 VM process. It receives its own <link to="IConsole" /> object which can be used
4115 to control machine execution, but it cannot be used to change all VM settings
4116 which would be available after a <link to="#lockMachine" /> call.
4117
4118 The caller must eventually release the session's shared lock by calling
4119 <link to="ISession::unlockMachine" /> on the local session object once this call
4120 has returned. However, the session's state (see <link to="ISession::state" />)
4121 will not return to "Unlocked" until the remote session has also unlocked
4122 the machine (i.e. the machine has stopped running).
4123
4124 Lauching a VM process can take some time (a new VM is started in a new process,
4125 for which memory and other resources need to be set up). Because of this,
4126 an <link to="IProgress" /> object is returned to allow the caller to wait
4127 for this asynchronous operation to be completed. Until then, the caller's
4128 session object remains in the "Unlocked" state, and its <link to="ISession::machine" />
4129 and <link to="ISession::console" /> attributes cannot be accessed.
4130 It is recommended to use <link to="IProgress::waitForCompletion" /> or
4131 similar calls to wait for completion. Completion is signalled when the VM
4132 is powered on. If launching the VM fails, error messages can be queried
4133 via the progress object, if available.
4134
4135 The progress object will have at least 2 sub-operations. The first
4136 operation covers the period up to the new VM process calls powerUp.
4137 The subsequent operations mirror the <link to="IConsole::powerUp"/>
4138 progress object. Because <link to="IConsole::powerUp"/> may require
4139 some extra sub-operations, the <link to="IProgress::operationCount"/>
4140 may change at the completion of operation.
4141
4142 For details on the teleportation progress operation, see
4143 <link to="IConsole::powerUp"/>.
4144
4145 The @a environment argument is a string containing definitions of
4146 environment variables in the following format:
4147 @code
4148 NAME[=VALUE]\n
4149 NAME[=VALUE]\n
4150 ...
4151 @endcode
4152 where <tt>\\n</tt> is the new line character. These environment
4153 variables will be appended to the environment of the VirtualBox server
4154 process. If an environment variable exists both in the server process
4155 and in this list, the value from this list takes precedence over the
4156 server's variable. If the value of the environment variable is
4157 omitted, this variable will be removed from the resulting environment.
4158 If the environment string is @c null or empty, the server environment
4159 is inherited by the started process as is.
4160
4161 <result name="E_UNEXPECTED">
4162 Virtual machine not registered.
4163 </result>
4164 <result name="E_INVALIDARG">
4165 Invalid session type @a type.
4166 </result>
4167 <result name="VBOX_E_OBJECT_NOT_FOUND">
4168 No machine matching @a machineId found.
4169 </result>
4170 <result name="VBOX_E_INVALID_OBJECT_STATE">
4171 Session already open or being opened.
4172 </result>
4173 <result name="VBOX_E_IPRT_ERROR">
4174 Launching process for machine failed.
4175 </result>
4176 <result name="VBOX_E_VM_ERROR">
4177 Failed to assign machine to session.
4178 </result>
4179 </desc>
4180 <param name="session" type="ISession" dir="in">
4181 <desc>
4182 Client session object to which the VM process will be connected (this
4183 must be in "Unlocked" state).
4184 </desc>
4185 </param>
4186 <param name="type" type="wstring" dir="in">
4187 <desc>
4188 Front-end to use for the new VM process. The following are currently supported:
4189 <ul>
4190 <li><tt>"gui"</tt>: VirtualBox Qt GUI front-end</li>
4191 <li><tt>"vrdp"</tt>: VBoxHeadless (VRDP Server) front-end</li>
4192 <li><tt>"sdl"</tt>: VirtualBox SDL front-end</li>
4193 </ul>
4194 </desc>
4195 </param>
4196 <param name="environment" type="wstring" dir="in">
4197 <desc>
4198 Environment to pass to the VM process.
4199 </desc>
4200 </param>
4201 <param name="progress" type="IProgress" dir="return">
4202 <desc>Progress object to track the operation completion.</desc>
4203 </param>
4204 </method>
4205
4206 <method name="setBootOrder">
4207 <desc>
4208 Puts the given device to the specified position in
4209 the boot order.
4210
4211 To indicate that no device is associated with the given position,
4212 <link to="DeviceType::Null"/> should be used.
4213
4214 @todo setHardDiskBootOrder(), setNetworkBootOrder()
4215
4216 <result name="E_INVALIDARG">
4217 Boot @a position out of range.
4218 </result>
4219 <result name="E_NOTIMPL">
4220 Booting from USB @a device currently not supported.
4221 </result>
4222
4223 </desc>
4224 <param name="position" type="unsigned long" dir="in">
4225 <desc>
4226 Position in the boot order (@c 1 to the total number of
4227 devices the machine can boot from, as returned by
4228 <link to="ISystemProperties::maxBootPosition"/>).
4229 </desc>
4230 </param>
4231 <param name="device" type="DeviceType" dir="in">
4232 <desc>
4233 The type of the device used to boot at the given position.
4234 </desc>
4235 </param>
4236 </method>
4237
4238 <method name="getBootOrder" const="yes">
4239 <desc>
4240 Returns the device type that occupies the specified
4241 position in the boot order.
4242
4243 @todo [remove?]
4244 If the machine can have more than one device of the returned type
4245 (such as hard disks), then a separate method should be used to
4246 retrieve the individual device that occupies the given position.
4247
4248 If here are no devices at the given position, then
4249 <link to="DeviceType::Null"/> is returned.
4250
4251 @todo getHardDiskBootOrder(), getNetworkBootOrder()
4252
4253 <result name="E_INVALIDARG">
4254 Boot @a position out of range.
4255 </result>
4256
4257 </desc>
4258 <param name="position" type="unsigned long" dir="in">
4259 <desc>
4260 Position in the boot order (@c 1 to the total number of
4261 devices the machine can boot from, as returned by
4262 <link to="ISystemProperties::maxBootPosition"/>).
4263 </desc>
4264 </param>
4265 <param name="device" type="DeviceType" dir="return">
4266 <desc>
4267 Device at the given position.
4268 </desc>
4269 </param>
4270 </method>
4271
4272 <method name="attachDevice">
4273 <desc>
4274 Attaches a device and optionally mounts a medium to the given storage
4275 controller (<link to="IStorageController" />, identified by @a name),
4276 at the indicated port and device.
4277
4278 This method is intended for managing storage devices in general while a
4279 machine is powered off. It can be used to attach and detach fixed
4280 and removeable media. The following kind of media can be attached
4281 to a machine:
4282
4283 <ul>
4284 <li>For fixed and removable media, you can pass in a medium that was
4285 previously opened using <link to="IVirtualBox::openMedium" />.
4286 </li>
4287
4288 <li>Only for storage devices supporting removable media (such as
4289 DVDs and floppies), you can also specify a null pointer to
4290 indicate an empty drive or one of the medium objects listed
4291 in the <link to="IHost::DVDDrives" /> and <link to="IHost::floppyDrives"/>
4292 arrays to indicate a host drive.
4293 For removeable devices, you can also use <link to="IMachine::mountMedium"/>
4294 to change the media while the machine is running.
4295 </li>
4296 </ul>
4297
4298 In a VM's default configuration of virtual machines, the secondary
4299 master of the IDE controller is used for a CD/DVD drive.
4300
4301 After calling this returns successfully, a new instance of
4302 <link to="IMediumAttachment"/> will appear in the machine's list of medium
4303 attachments (see <link to="IMachine::mediumAttachments"/>).
4304
4305 See <link to="IMedium"/> and <link to="IMediumAttachment"/> for more
4306 information about attaching media.
4307
4308 The specified device slot must not have a device attached to it,
4309 or this method will fail.
4310
4311 <note>
4312 You cannot attach a device to a newly created machine until
4313 this machine's settings are saved to disk using
4314 <link to="#saveSettings"/>.
4315 </note>
4316 <note>
4317 If the medium is being attached indirectly, a new differencing medium
4318 will implicitly be created for it and attached instead. If the
4319 changes made to the machine settings (including this indirect
4320 attachment) are later cancelled using <link to="#discardSettings"/>,
4321 this implicitly created differencing medium will implicitly
4322 be deleted.
4323 </note>
4324
4325 <result name="E_INVALIDARG">
4326 SATA device, SATA port, IDE port or IDE slot out of range, or
4327 file or UUID not found.
4328 </result>
4329 <result name="VBOX_E_INVALID_OBJECT_STATE">
4330 Machine must be registered before media can be attached.
4331 </result>
4332 <result name="VBOX_E_INVALID_VM_STATE">
4333 Invalid machine state.
4334 </result>
4335 <result name="VBOX_E_OBJECT_IN_USE">
4336 A medium is already attached to this or another virtual machine.
4337 </result>
4338
4339 </desc>
4340 <param name="name" type="wstring" dir="in">
4341 <desc>Name of the storage controller to attach the device to.</desc>
4342 </param>
4343 <param name="controllerPort" type="long" dir="in">
4344 <desc>Port to attach the device to. For an IDE controller, 0 specifies
4345 the primary controller and 1 specifies the secondary controller.
4346 For a SCSI controller, this must range from 0 to 15; for a SATA controller,
4347 from 0 to 29; for an SAS controller, from 0 to 7.</desc>
4348 </param>
4349 <param name="device" type="long" dir="in">
4350 <desc>Device slot in the given port to attach the device to. This is only
4351 relevant for IDE controllers, for which 0 specifies the master device and
4352 1 specifies the slave device. For all other controller types, this must
4353 be 0.</desc>
4354 </param>
4355 <param name="type" type="DeviceType" dir="in">
4356 <desc>Device type of the attached device. For media opened by
4357 <link to="IVirtualBox::openMedium" />, this must match the device type
4358 specified there.</desc>
4359 </param>
4360 <param name="medium" type="IMedium" dir="in">
4361 <desc>Medium to mount or NULL for an empty drive.</desc>
4362 </param>
4363 </method>
4364
4365 <method name="detachDevice">
4366 <desc>
4367 Detaches the device attached to a device slot of the specified bus.
4368
4369 Detaching the device from the virtual machine is deferred. This means
4370 that the medium remains associated with the machine when this method
4371 returns and gets actually de-associated only after a successful
4372 <link to="#saveSettings"/> call. See <link to="IMedium"/>
4373 for more detailed information about attaching media.
4374
4375 <note>
4376 You cannot detach a device from a running machine.
4377 </note>
4378 <note>
4379 Detaching differencing media implicitly created by <link
4380 to="#attachDevice"/> for the indirect attachment using this
4381 method will <b>not</b> implicitly delete them. The
4382 <link to="IMedium::deleteStorage"/> operation should be
4383 explicitly performed by the caller after the medium is successfully
4384 detached and the settings are saved with
4385 <link to="#saveSettings"/>, if it is the desired action.
4386 </note>
4387
4388 <result name="VBOX_E_INVALID_VM_STATE">
4389 Attempt to detach medium from a running virtual machine.
4390 </result>
4391 <result name="VBOX_E_OBJECT_NOT_FOUND">
4392 No medium attached to given slot/bus.
4393 </result>
4394 <result name="VBOX_E_NOT_SUPPORTED">
4395 Medium format does not support storage deletion.
4396 </result>
4397
4398 </desc>
4399 <param name="name" type="wstring" dir="in">
4400 <desc>Name of the storage controller to detach the medium from.</desc>
4401 </param>
4402 <param name="controllerPort" type="long" dir="in">
4403 <desc>Port number to detach the medium from.</desc>
4404 </param>
4405 <param name="device" type="long" dir="in">
4406 <desc>Device slot number to detach the medium from.</desc>
4407 </param>
4408 </method>
4409
4410 <method name="passthroughDevice">
4411 <desc>
4412 Sets the passthrough mode of an existing DVD device. Changing the
4413 setting while the VM is running is forbidden. The setting is only used
4414 if at VM start the device is configured as a host DVD drive, in all
4415 other cases it is ignored. The device must already exist; see
4416 <link to="IMachine::attachDevice"/> for how to attach a new device.
4417
4418 The @a controllerPort and @a device parameters specify the device slot and
4419 have have the same meaning as with <link to="IMachine::attachDevice" />.
4420
4421 <result name="E_INVALIDARG">
4422 SATA device, SATA port, IDE port or IDE slot out of range.
4423 </result>
4424 <result name="VBOX_E_INVALID_OBJECT_STATE">
4425 Attempt to modify an unregistered virtual machine.
4426 </result>
4427 <result name="VBOX_E_INVALID_VM_STATE">
4428 Invalid machine state.
4429 </result>
4430
4431 </desc>
4432 <param name="name" type="wstring" dir="in">
4433 <desc>Name of the storage controller.</desc>
4434 </param>
4435 <param name="controllerPort" type="long" dir="in">
4436 <desc>Storage controller port.</desc>
4437 </param>
4438 <param name="device" type="long" dir="in">
4439 <desc>Device slot in the given port.</desc>
4440 </param>
4441 <param name="passthrough" type="boolean" dir="in">
4442 <desc>New value for the passthrough setting.</desc>
4443 </param>
4444 </method>
4445
4446 <method name="mountMedium">
4447 <desc>
4448 Mounts a medium (<link to="IMedium" />, identified
4449 by the given UUID @a id) to the given storage controller
4450 (<link to="IStorageController" />, identified by @a name),
4451 at the indicated port and device. The device must already exist;
4452 see <link to="IMachine::attachDevice"/> for how to attach a new device.
4453
4454 This method is intended only for managing removable media, where the
4455 device is fixed but media is changeable at runtime (such as DVDs
4456 and floppies). It cannot be used for fixed media such as hard disks.
4457
4458 The @a controllerPort and @a device parameters specify the device slot and
4459 have have the same meaning as with <link to="IMachine::attachDevice" />.
4460
4461 The specified device slot can have a medium mounted, which will be
4462 unmounted first. Specifying a zero UUID (or an empty string) for
4463 @a medium does just an unmount.
4464
4465 See <link to="IMedium"/> for more detailed information about
4466 attaching media.
4467
4468 <result name="E_INVALIDARG">
4469 SATA device, SATA port, IDE port or IDE slot out of range.
4470 </result>
4471 <result name="VBOX_E_INVALID_OBJECT_STATE">
4472 Attempt to attach medium to an unregistered virtual machine.
4473 </result>
4474 <result name="VBOX_E_INVALID_VM_STATE">
4475 Invalid machine state.
4476 </result>
4477 <result name="VBOX_E_OBJECT_IN_USE">
4478 Medium already attached to this or another virtual machine.
4479 </result>
4480
4481 </desc>
4482 <param name="name" type="wstring" dir="in">
4483 <desc>Name of the storage controller to attach the medium to.</desc>
4484 </param>
4485 <param name="controllerPort" type="long" dir="in">
4486 <desc>Port to attach the medium to.</desc>
4487 </param>
4488 <param name="device" type="long" dir="in">
4489 <desc>Device slot in the given port to attach the medium to.</desc>
4490 </param>
4491 <param name="medium" type="uuid" mod="string" dir="in">
4492 <desc>UUID of the medium to attach. A zero UUID means unmount the
4493 currently mounted medium.</desc>
4494 </param>
4495 <param name="force" type="boolean" dir="in">
4496 <desc>Allows to force unmount/mount of a medium which is locked by
4497 theDevice slot in the given port to attach the medium to.</desc>
4498 </param>
4499 </method>
4500
4501 <method name="getMedium" const="yes">
4502 <desc>
4503 Returns the virtual medium attached to a device slot of the specified
4504 bus.
4505
4506 Note that if the medium was indirectly attached by
4507 <link to="#mountMedium"/> to the given device slot then this
4508 method will return not the same object as passed to the
4509 <link to="#mountMedium"/> call. See <link to="IMedium"/> for
4510 more detailed information about mounting a medium.
4511
4512 <result name="VBOX_E_OBJECT_NOT_FOUND">
4513 No medium attached to given slot/bus.
4514 </result>
4515
4516 </desc>
4517 <param name="name" type="wstring" dir="in">
4518 <desc>Name of the storage controller the medium is attached to.</desc>
4519 </param>
4520 <param name="controllerPort" type="long" dir="in">
4521 <desc>Port to query.</desc>
4522 </param>
4523 <param name="device" type="long" dir="in">
4524 <desc>Device slot in the given port to query.</desc>
4525 </param>
4526 <param name="medium" type="IMedium" dir="return">
4527 <desc>Attached medium object.</desc>
4528 </param>
4529 </method>
4530
4531 <method name="getMediumAttachmentsOfController" const="yes">
4532 <desc>
4533 Returns an array of medium attachments which are attached to the
4534 the controller with the given name.
4535
4536 <result name="VBOX_E_OBJECT_NOT_FOUND">
4537 A storage controller with given name doesn't exist.
4538 </result>
4539 </desc>
4540 <param name="name" type="wstring" dir="in"/>
4541 <param name="mediumAttachments" type="IMediumAttachment" safearray="yes" dir="return"/>
4542 </method>
4543
4544 <method name="getMediumAttachment" const="yes">
4545 <desc>
4546 Returns a medium attachment which corresponds to the controller with
4547 the given name, on the given port and device slot.
4548
4549 <result name="VBOX_E_OBJECT_NOT_FOUND">
4550 No attachment exists for the given controller/port/device combination.
4551 </result>
4552 </desc>
4553 <param name="name" type="wstring" dir="in"/>
4554 <param name="controllerPort" type="long" dir="in"/>
4555 <param name="device" type="long" dir="in"/>
4556 <param name="attachment" type="IMediumAttachment" dir="return"/>
4557 </method>
4558
4559 <method name="getNetworkAdapter" const="yes">
4560 <desc>
4561 Returns the network adapter associated with the given slot.
4562 Slots are numbered sequentially, starting with zero. The total
4563 number of adapters per machine is defined by the
4564 <link to="ISystemProperties::networkAdapterCount"/> property,
4565 so the maximum slot number is one less than that property's value.
4566
4567 <result name="E_INVALIDARG">
4568 Invalid @a slot number.
4569 </result>
4570
4571 </desc>
4572 <param name="slot" type="unsigned long" dir="in"/>
4573 <param name="adapter" type="INetworkAdapter" dir="return"/>
4574 </method>
4575
4576 <method name="addStorageController">
4577 <desc>
4578 Adds a new storage controller (SCSI, SAS or SATA controller) to the
4579 machine and returns it as an instance of
4580 <link to="IStorageController" />.
4581
4582 @a name identifies the controller for subsequent calls such as
4583 <link to="#getStorageControllerByName" />,
4584 <link to="#getStorageControllerByInstance" />,
4585 <link to="#removeStorageController" />,
4586 <link to="#attachDevice" /> or <link to="#mountMedium" />.
4587
4588 After the controller has been added, you can set its exact
4589 type by setting the <link to="IStorageController::controllerType" />.
4590
4591 <result name="VBOX_E_OBJECT_IN_USE">
4592 A storage controller with given name exists already.
4593 </result>
4594 <result name="E_INVALIDARG">
4595 Invalid @a controllerType.
4596 </result>
4597 </desc>
4598 <param name="name" type="wstring" dir="in"/>
4599 <param name="connectionType" type="StorageBus" dir="in"/>
4600 <param name="controller" type="IStorageController" dir="return"/>
4601 </method>
4602
4603 <method name="getStorageControllerByName" const="yes">
4604 <desc>
4605 Returns a storage controller with the given name.
4606
4607 <result name="VBOX_E_OBJECT_NOT_FOUND">
4608 A storage controller with given name doesn't exist.
4609 </result>
4610 </desc>
4611 <param name="name" type="wstring" dir="in"/>
4612 <param name="storageController" type="IStorageController" dir="return"/>
4613 </method>
4614
4615 <method name="getStorageControllerByInstance" const="yes">
4616 <desc>
4617 Returns a storage controller with the given instance number.
4618
4619 <result name="VBOX_E_OBJECT_NOT_FOUND">
4620 A storage controller with given instance number doesn't exist.
4621 </result>
4622 </desc>
4623 <param name="instance" type="unsigned long" dir="in"/>
4624 <param name="storageController" type="IStorageController" dir="return"/>
4625 </method>
4626
4627 <method name="removeStorageController">
4628 <desc>
4629 Removes a storage controller from the machine.
4630
4631 <result name="VBOX_E_OBJECT_NOT_FOUND">
4632 A storage controller with given name doesn't exist.
4633 </result>
4634 </desc>
4635 <param name="name" type="wstring" dir="in"/>
4636 </method>
4637
4638 <method name="getSerialPort" const="yes">
4639 <desc>
4640 Returns the serial port associated with the given slot.
4641 Slots are numbered sequentially, starting with zero. The total
4642 number of serial ports per machine is defined by the
4643 <link to="ISystemProperties::serialPortCount"/> property,
4644 so the maximum slot number is one less than that property's value.
4645
4646 <result name="E_INVALIDARG">
4647 Invalid @a slot number.
4648 </result>
4649
4650 </desc>
4651 <param name="slot" type="unsigned long" dir="in"/>
4652 <param name="port" type="ISerialPort" dir="return"/>
4653 </method>
4654
4655 <method name="getParallelPort" const="yes">
4656 <desc>
4657 Returns the parallel port associated with the given slot.
4658 Slots are numbered sequentially, starting with zero. The total
4659 number of parallel ports per machine is defined by the
4660 <link to="ISystemProperties::parallelPortCount"/> property,
4661 so the maximum slot number is one less than that property's value.
4662
4663 <result name="E_INVALIDARG">
4664 Invalid @a slot number.
4665 </result>
4666
4667 </desc>
4668 <param name="slot" type="unsigned long" dir="in"/>
4669 <param name="port" type="IParallelPort" dir="return"/>
4670 </method>
4671
4672 <method name="getExtraDataKeys">
4673 <desc>
4674 Returns an array representing the machine-specific extra data keys
4675 which currently have values defined.
4676 </desc>
4677 <param name="value" type="wstring" dir="return" safearray="yes">
4678 <desc>Array of extra data keys.</desc>
4679 </param>
4680 </method>
4681
4682 <method name="getExtraData">
4683 <desc>
4684 Returns associated machine-specific extra data.
4685
4686 If the requested data @a key does not exist, this function will
4687 succeed and return an empty string in the @a value argument.
4688
4689 <result name="VBOX_E_FILE_ERROR">
4690 Settings file not accessible.
4691 </result>
4692 <result name="VBOX_E_XML_ERROR">
4693 Could not parse the settings file.
4694 </result>
4695
4696 </desc>
4697 <param name="key" type="wstring" dir="in">
4698 <desc>Name of the data key to get.</desc>
4699 </param>
4700 <param name="value" type="wstring" dir="return">
4701 <desc>Value of the requested data key.</desc>
4702 </param>
4703 </method>
4704
4705 <method name="setExtraData">
4706 <desc>
4707 Sets associated machine-specific extra data.
4708
4709 If you pass @c null or an empty string as a key @a value, the given
4710 @a key will be deleted.
4711
4712 <note>
4713 Before performing the actual data change, this method will ask all
4714 registered listeners using the
4715 <link to="IExtraDataCanChangeEvent"/>
4716 notification for a permission. If one of the listeners refuses the
4717 new value, the change will not be performed.
4718 </note>
4719 <note>
4720 On success, the
4721 <link to="IExtraDataChangedEvent"/> notification
4722 is called to inform all registered listeners about a successful data
4723 change.
4724 </note>
4725 <note>
4726 This method can be called outside the machine session and therefore
4727 it's a caller's responsibility to handle possible race conditions
4728 when several clients change the same key at the same time.
4729 </note>
4730
4731 <result name="VBOX_E_FILE_ERROR">
4732 Settings file not accessible.
4733 </result>
4734 <result name="VBOX_E_XML_ERROR">
4735 Could not parse the settings file.
4736 </result>
4737
4738 </desc>
4739 <param name="key" type="wstring" dir="in">
4740 <desc>Name of the data key to set.</desc>
4741 </param>
4742 <param name="value" type="wstring" dir="in">
4743 <desc>Value to assign to the key.</desc>
4744 </param>
4745 </method>
4746
4747 <method name="getCPUProperty" const="yes">
4748 <desc>
4749 Returns the virtual CPU boolean value of the specified property.
4750
4751 <result name="E_INVALIDARG">
4752 Invalid property.
4753 </result>
4754
4755 </desc>
4756 <param name="property" type="CPUPropertyType" dir="in">
4757 <desc>
4758 Property type to query.
4759 </desc>
4760 </param>
4761 <param name="value" type="boolean" dir="return">
4762 <desc>
4763 Property value.
4764 </desc>
4765 </param>
4766 </method>
4767
4768 <method name="setCPUProperty">
4769 <desc>
4770 Sets the virtual CPU boolean value of the specified property.
4771
4772 <result name="E_INVALIDARG">
4773 Invalid property.
4774 </result>
4775
4776 </desc>
4777 <param name="property" type="CPUPropertyType" dir="in">
4778 <desc>
4779 Property type to query.
4780 </desc>
4781 </param>
4782 <param name="value" type="boolean" dir="in">
4783 <desc>
4784 Property value.
4785 </desc>
4786 </param>
4787 </method>
4788
4789 <method name="getCPUIDLeaf" const="yes">
4790 <desc>
4791 Returns the virtual CPU cpuid information for the specified leaf.
4792
4793 Currently supported index values for cpuid:
4794 Standard CPUID leafs: 0 - 0xA
4795 Extended CPUID leafs: 0x80000000 - 0x8000000A
4796
4797 See the Intel and AMD programmer's manuals for detailed information
4798 about the cpuid instruction and its leafs.
4799 <result name="E_INVALIDARG">
4800 Invalid id.
4801 </result>
4802
4803 </desc>
4804 <param name="id" type="unsigned long" dir="in">
4805 <desc>
4806 CPUID leaf index.
4807 </desc>
4808 </param>
4809 <param name="valEax" type="unsigned long" dir="out">
4810 <desc>
4811 CPUID leaf value for register eax.
4812 </desc>
4813 </param>
4814 <param name="valEbx" type="unsigned long" dir="out">
4815 <desc>
4816 CPUID leaf value for register ebx.
4817 </desc>
4818 </param>
4819 <param name="valEcx" type="unsigned long" dir="out">
4820 <desc>
4821 CPUID leaf value for register ecx.
4822 </desc>
4823 </param>
4824 <param name="valEdx" type="unsigned long" dir="out">
4825 <desc>
4826 CPUID leaf value for register edx.
4827 </desc>
4828 </param>
4829 </method>
4830
4831 <method name="setCPUIDLeaf">
4832 <desc>
4833 Sets the virtual CPU cpuid information for the specified leaf. Note that these values
4834 are not passed unmodified. VirtualBox clears features that it doesn't support.
4835
4836 Currently supported index values for cpuid:
4837 Standard CPUID leafs: 0 - 0xA
4838 Extended CPUID leafs: 0x80000000 - 0x8000000A
4839
4840 See the Intel and AMD programmer's manuals for detailed information
4841 about the cpuid instruction and its leafs.
4842
4843 Do not use this method unless you know exactly what you're doing. Misuse can lead to
4844 random crashes inside VMs.
4845 <result name="E_INVALIDARG">
4846 Invalid id.
4847 </result>
4848
4849 </desc>
4850 <param name="id" type="unsigned long" dir="in">
4851 <desc>
4852 CPUID leaf index.
4853 </desc>
4854 </param>
4855 <param name="valEax" type="unsigned long" dir="in">
4856 <desc>
4857 CPUID leaf value for register eax.
4858 </desc>
4859 </param>
4860 <param name="valEbx" type="unsigned long" dir="in">
4861 <desc>
4862 CPUID leaf value for register ebx.
4863 </desc>
4864 </param>
4865 <param name="valEcx" type="unsigned long" dir="in">
4866 <desc>
4867 CPUID leaf value for register ecx.
4868 </desc>
4869 </param>
4870 <param name="valEdx" type="unsigned long" dir="in">
4871 <desc>
4872 CPUID leaf value for register edx.
4873 </desc>
4874 </param>
4875 </method>
4876
4877 <method name="removeCPUIDLeaf">
4878 <desc>
4879 Removes the virtual CPU cpuid leaf for the specified index
4880
4881 <result name="E_INVALIDARG">
4882 Invalid id.
4883 </result>
4884
4885 </desc>
4886 <param name="id" type="unsigned long" dir="in">
4887 <desc>
4888 CPUID leaf index.
4889 </desc>
4890 </param>
4891 </method>
4892
4893 <method name="removeAllCPUIDLeaves">
4894 <desc>
4895 Removes all the virtual CPU cpuid leaves
4896 </desc>
4897 </method>
4898
4899 <method name="getHWVirtExProperty" const="yes">
4900 <desc>
4901 Returns the value of the specified hardware virtualization boolean property.
4902
4903 <result name="E_INVALIDARG">
4904 Invalid property.
4905 </result>
4906
4907 </desc>
4908 <param name="property" type="HWVirtExPropertyType" dir="in">
4909 <desc>
4910 Property type to query.
4911 </desc>
4912 </param>
4913 <param name="value" type="boolean" dir="return">
4914 <desc>
4915 Property value.
4916 </desc>
4917 </param>
4918 </method>
4919
4920 <method name="setHWVirtExProperty">
4921 <desc>
4922 Sets a new value for the specified hardware virtualization boolean property.
4923
4924 <result name="E_INVALIDARG">
4925 Invalid property.
4926 </result>
4927
4928 </desc>
4929 <param name="property" type="HWVirtExPropertyType" dir="in">
4930 <desc>
4931 Property type to set.
4932 </desc>
4933 </param>
4934 <param name="value" type="boolean" dir="in">
4935 <desc>
4936 New property value.
4937 </desc>
4938 </param>
4939 </method>
4940
4941 <method name="saveSettings">
4942 <desc>
4943 Saves any changes to machine settings made since the session
4944 has been opened or a new machine has been created, or since the
4945 last call to <link to="#saveSettings"/> or <link to="#discardSettings"/>.
4946 For registered machines, new settings become visible to all
4947 other VirtualBox clients after successful invocation of this
4948 method.
4949 <note>
4950 The method sends <link to="IMachineDataChangedEvent"/>
4951 notification event after the configuration has been successfully
4952 saved (only for registered machines).
4953 </note>
4954 <note>
4955 Calling this method is only valid on instances returned
4956 by <link to="ISession::machine"/> and on new machines
4957 created by <link to="IVirtualBox::createMachine"/> but not
4958 yet registered, or on unregistered machines after calling
4959 <link to="IMachine::unregister"/>.
4960 </note>
4961
4962 <result name="VBOX_E_FILE_ERROR">
4963 Settings file not accessible.
4964 </result>
4965 <result name="VBOX_E_XML_ERROR">
4966 Could not parse the settings file.
4967 </result>
4968 <result name="E_ACCESSDENIED">
4969 Modification request refused.
4970 </result>
4971
4972 </desc>
4973 </method>
4974
4975 <method name="discardSettings">
4976 <desc>
4977 Discards any changes to the machine settings made since the session
4978 has been opened or since the last call to <link to="#saveSettings"/>
4979 or <link to="#discardSettings"/>.
4980 <note>
4981 Calling this method is only valid on instances returned
4982 by <link to="ISession::machine"/> and on new machines
4983 created by <link to="IVirtualBox::createMachine"/> or
4984 opened by <link to="IVirtualBox::openMachine"/> but not
4985 yet registered, or on unregistered machines after calling
4986 <link to="IMachine::unregister"/>.
4987 </note>
4988
4989 <result name="VBOX_E_INVALID_VM_STATE">
4990 Virtual machine is not mutable.
4991 </result>
4992
4993 </desc>
4994 </method>
4995
4996 <method name="unregister">
4997 <desc>
4998 Unregisters the machine, which must have been previously registered using
4999 <link to="IVirtualBox::registerMachine"/>, and optionally do additional
5000 cleanup before the machine is unregistered.
5001
5002 This method does not delete any files. It only changes the machine configuration and
5003 the list of registered machines in the VirtualBox object. To delete the files which
5004 belonged to the machine, including the XML file of the machine itself, call
5005 <link to="#delete"/>, optionally with the array of IMedium objects which was returned
5006 from this method.
5007
5008 How thoroughly this method cleans up the machine configuration before unregistering
5009 the machine depends on the @a cleanupMode argument.
5010
5011 <ul>
5012 <li>With "UnregisterOnly", the machine will only be unregistered, but no additional
5013 cleanup will be performed. The call will fail if the machine is in "Saved" state
5014 or has any snapshots or any media attached (see <link to="IMediumAttachment" />.
5015 It is the responsibility of the caller to delete all such configuration in this mode.
5016 In this mode, the API behaves like the former @c IVirtualBox::unregisterMachine() API
5017 which it replaces.</li>
5018 <li>With "DetachAllReturnNone", the call will succeed even if the machine is in "Saved"
5019 state or if it has snapshots or media attached. All media attached to the current machine
5020 state or in snapshots will be detached. No medium objects will be returned; all of the
5021 machine's media will remain open.</li>
5022 <li>With "DetachAllReturnHardDisksOnly", the call will behave like with "DetachAllReturnNone",
5023 except that all the hard disk medium objects which were detached from the machine will
5024 be returned as an array. This allows for quickly passing them to the <link to="#delete" />
5025 API for closing and deletion.</li>
5026 <li>With "Full", the call will behave like with "DetachAllReturnHardDisksOnly", except
5027 that all media will be returned in the array, including removeable media like DVDs and
5028 floppies. This might be useful if the user wants to inspect in detail which media were
5029 attached to the machine. Be careful when passing the media array to <link to="#delete" />
5030 in that case because users will typically want to preserve ISO and RAW image files.</li>
5031 </ul>
5032
5033 This API does not verify whether the media files returned in the array are still
5034 attached to other machines (i.e. shared between several machines). If such a shared
5035 image is passed to <link to="#delete" /> however, closing the image will fail there
5036 and the image will be silently skipped.
5037
5038 A typical implementation will use "DetachAllReturnHardDisksOnly" and then pass the
5039 resulting IMedia array to <link to="#delete"/>. This way, the machine is completely
5040 deleted with all its saved states and hard disk images, but images for removeable
5041 drives (such as ISO and RAW files) will remain on disk.
5042
5043 The call will fail if the machine is currently locked (see <link to="ISession" />).
5044 It implicitly calls <link to="#saveSettings"/> to save all current machine settings
5045 before unregistering it.
5046
5047 After successful method invocation, the <link to="IMachineRegisteredEvent"/> event
5048 is fired.
5049
5050 <note>
5051 If the given machine is inaccessible (see <link to="#accessible"/>), it
5052 will be unregistered and fully uninitialized right afterwards. As a result,
5053 the returned machine object will be unusable and an attempt to call
5054 <b>any</b> method will return the "Object not ready" error.
5055 </note>
5056
5057 <result name="VBOX_E_INVALID_OBJECT_STATE">
5058 Machine is currently locked for a session.
5059 </result>
5060 </desc>
5061
5062 <param name="cleanupMode" type="CleanupMode" dir="in">
5063 <desc>How to clean up after the machine has been unregistered.</desc>
5064 </param>
5065 <param name="aMedia" type="IMedium" safearray="yes" dir="return">
5066 <desc>List of media detached from the machine, depending on the @a cleanupMode parameter.</desc>
5067 </param>
5068 </method>
5069
5070 <method name="delete">
5071 <desc>
5072 Deletes the files associated with this machine from disk. If medium objects are passed
5073 in with the @a aMedia argument, they are closed and, if closing was succesful, their
5074 storage files are deleted as well. For convenience, this array of media files can be
5075 the same as the one returned from a previous <link to="#unregister" /> call.
5076
5077 This method must only be called on machines which are either write-locked (i.e. on instances
5078 returned by <link to="ISession::machine"/>) or on unregistered machines (i.e. not yet
5079 registered machines created by <link to="IVirtualBox::createMachine"/> or opened by
5080 <link to="IVirtualBox::openMachine"/>, or after having called <link to="#unregister"/>).
5081
5082 The following files will be deleted by this method:
5083 <ul>
5084 <li>If <link to="#unregister" /> had been previously called with a @a cleanupMode
5085 argument other than "UnregisterOnly", this will delete all saved state files that
5086 the machine had in use; possibly one if the machine was in "Saved" state and one
5087 for each online snapshot that the machine had.</li>
5088 <li>On each medium object passed in the @a aMedia array, this will call
5089 <link to="IMedium::close" />. If that succeeds, this will attempt to delete the
5090 medium's storage on disk. Since the close() call will fail if the medium is still
5091 in use, e.g. because it is still attached to a second machine; in that case the
5092 storage will not be deleted.</li>
5093 <li>Finally, the machine's own XML file will be deleted.</li>
5094 </ul>
5095
5096 Since deleting large disk image files can be a time-consuming I/O operation, this
5097 method operates asynchronously and returns an IProgress object to allow the caller
5098 to monitor the progress. There will be one sub-operation for each file that is
5099 being deleted (saved state or medium storage file).
5100
5101 <note>
5102 <link to="#settingsModified"/> will return @c true after this
5103 method successfully returns.
5104 </note>
5105
5106 <result name="VBOX_E_INVALID_VM_STATE">
5107 Machine is registered but not write-locked.
5108 </result>
5109 <result name="VBOX_E_IPRT_ERROR">
5110 Could not delete the settings file.
5111 </result>
5112 </desc>
5113 <param name="aMedia" type="IMedium" safearray="yes" dir="in">
5114 <desc>List of media to be closed and whose storage files will be deleted.</desc>
5115 </param>
5116 <param name="aProgress" type="IProgress" dir="return">
5117 <desc>Progress object to track the operation completion.</desc>
5118 </param>
5119 </method>
5120
5121 <method name="export">
5122 <desc>Exports the machine to an OVF appliance. See <link to="IAppliance" /> for the
5123 steps required to export VirtualBox machines to OVF.
5124 </desc>
5125
5126 <param name="aAppliance" type="IAppliance" dir="in">
5127 <desc>Appliance to export this machine to.</desc>
5128 </param>
5129 <param name="aDescription" type="IVirtualSystemDescription" dir="return">
5130 <desc>VirtualSystemDescription object which is created for this machine.</desc>
5131 </param>
5132 </method >
5133
5134 <method name="getSnapshot">
5135 <desc>
5136 Returns a snapshot of this machine with the given UUID.
5137 A @c null UUID can be used to obtain the first snapshot
5138 taken on this machine. This is useful if you want to traverse
5139 the whole tree of snapshots starting from the root.
5140
5141 <result name="VBOX_E_OBJECT_NOT_FOUND">
5142 Virtual machine has no snapshots or snapshot not found.
5143 </result>
5144
5145 </desc>
5146 <param name="id" type="uuid" mod="string" dir="in">
5147 <desc>UUID of the snapshot to get</desc>
5148 </param>
5149 <param name="snapshot" type="ISnapshot" dir="return">
5150 <desc>Snapshot object with the given UUID.</desc>
5151 </param>
5152 </method>
5153
5154 <method name="findSnapshot">
5155 <desc>
5156 Returns a snapshot of this machine with the given name.
5157
5158 <result name="VBOX_E_OBJECT_NOT_FOUND">
5159 Virtual machine has no snapshots or snapshot not found.
5160 </result>
5161
5162 </desc>
5163 <param name="name" type="wstring" dir="in">
5164 <desc>Name of the snapshot to find</desc>
5165 </param>
5166 <param name="snapshot" type="ISnapshot" dir="return">
5167 <desc>Snapshot object with the given name.</desc>
5168 </param>
5169 </method>
5170
5171 <method name="setCurrentSnapshot">
5172 <desc>
5173 Sets the current snapshot of this machine.
5174 <note>
5175 In the current implementation, this operation is not
5176 implemented.
5177 </note>
5178 </desc>
5179 <param name="id" type="uuid" mod="string" dir="in">
5180 <desc>UUID of the snapshot to set as the current snapshot.</desc>
5181 </param>
5182 </method>
5183
5184 <method name="createSharedFolder">
5185 <desc>
5186 Creates a new permanent shared folder by associating the given logical
5187 name with the given host path, adds it to the collection of shared
5188 folders and starts sharing it. Refer to the description of
5189 <link to="ISharedFolder"/> to read more about logical names.
5190
5191 <result name="VBOX_E_OBJECT_IN_USE">
5192 Shared folder already exists.
5193 </result>
5194 <result name="VBOX_E_FILE_ERROR">
5195 Shared folder @a hostPath not accessible.
5196 </result>
5197
5198 </desc>
5199 <param name="name" type="wstring" dir="in">
5200 <desc>Unique logical name of the shared folder.</desc>
5201 </param>
5202 <param name="hostPath" type="wstring" dir="in">
5203 <desc>Full path to the shared folder in the host file system.</desc>
5204 </param>
5205 <param name="writable" type="boolean" dir="in">
5206 <desc>Whether the share is writable or readonly.</desc>
5207 </param>
5208 <param name="automount" type="boolean" dir="in">
5209 <desc>Whether the share gets automatically mounted by the guest
5210 or not.</desc>
5211 </param>
5212 </method>
5213
5214 <method name="removeSharedFolder">
5215 <desc>
5216 Removes the permanent shared folder with the given name previously
5217 created by <link to="#createSharedFolder"/> from the collection of
5218 shared folders and stops sharing it.
5219
5220 <result name="VBOX_E_INVALID_VM_STATE">
5221 Virtual machine is not mutable.
5222 </result>
5223 <result name="VBOX_E_OBJECT_NOT_FOUND">
5224 Shared folder @a name does not exist.
5225 </result>
5226
5227 </desc>
5228 <param name="name" type="wstring" dir="in">
5229 <desc>Logical name of the shared folder to remove.</desc>
5230 </param>
5231 </method>
5232
5233 <method name="canShowConsoleWindow">
5234 <desc>
5235 Returns @c true if the VM console process can activate the
5236 console window and bring it to foreground on the desktop of
5237 the host PC.
5238 <note>
5239 This method will fail if a session for this machine is not
5240 currently open.
5241 </note>
5242
5243 <result name="VBOX_E_INVALID_VM_STATE">
5244 Machine session is not open.
5245 </result>
5246
5247 </desc>
5248 <param name="canShow" type="boolean" dir="return">
5249 <desc>
5250 @c true if the console window can be shown and @c false otherwise.
5251 </desc>
5252 </param>
5253 </method>
5254
5255 <method name="showConsoleWindow">
5256 <desc>
5257 Activates the console window and brings it to foreground on
5258 the desktop of the host PC. Many modern window managers on
5259 many platforms implement some sort of focus stealing
5260 prevention logic, so that it may be impossible to activate
5261 a window without the help of the currently active
5262 application. In this case, this method will return a non-zero
5263 identifier that represents the top-level window of the VM
5264 console process. The caller, if it represents a currently
5265 active process, is responsible to use this identifier (in a
5266 platform-dependent manner) to perform actual window
5267 activation.
5268 <note>
5269 This method will fail if a session for this machine is not
5270 currently open.
5271 </note>
5272
5273 <result name="VBOX_E_INVALID_VM_STATE">
5274 Machine session is not open.
5275 </result>
5276
5277 </desc>
5278 <param name="winId" type="unsigned long long" dir="return">
5279 <desc>
5280 Platform-dependent identifier of the top-level VM console
5281 window, or zero if this method has performed all actions
5282 necessary to implement the <i>show window</i> semantics for
5283 the given platform and/or VirtualBox front-end.
5284 </desc>
5285 </param>
5286 </method>
5287
5288 <method name="getGuestProperty" const="yes">
5289 <desc>
5290 Reads an entry from the machine's guest property store.
5291
5292 <result name="VBOX_E_INVALID_VM_STATE">
5293 Machine session is not open.
5294 </result>
5295
5296 </desc>
5297 <param name="name" type="wstring" dir="in">
5298 <desc>
5299 The name of the property to read.
5300 </desc>
5301 </param>
5302 <param name="value" type="wstring" dir="out">
5303 <desc>
5304 The value of the property. If the property does not exist then this
5305 will be empty.
5306 </desc>
5307 </param>
5308 <param name="timestamp" type="unsigned long long" dir="out">
5309 <desc>
5310 The time at which the property was last modified, as seen by the
5311 server process.
5312 </desc>
5313 </param>
5314 <param name="flags" type="wstring" dir="out">
5315 <desc>
5316 Additional property parameters, passed as a comma-separated list of
5317 "name=value" type entries.
5318 </desc>
5319 </param>
5320 </method>
5321
5322 <method name="getGuestPropertyValue" const="yes">
5323 <desc>
5324 Reads a value from the machine's guest property store.
5325
5326 <result name="VBOX_E_INVALID_VM_STATE">
5327 Machine session is not open.
5328 </result>
5329
5330 </desc>
5331 <param name="property" type="wstring" dir="in">
5332 <desc>
5333 The name of the property to read.
5334 </desc>
5335 </param>
5336 <param name="value" type="wstring" dir="return">
5337 <desc>
5338 The value of the property. If the property does not exist then this
5339 will be empty.
5340 </desc>
5341 </param>
5342 </method>
5343
5344 <method name="getGuestPropertyTimestamp" const="yes">
5345 <desc>
5346 Reads a property timestamp from the machine's guest property store.
5347
5348 <result name="VBOX_E_INVALID_VM_STATE">
5349 Machine session is not open.
5350 </result>
5351
5352 </desc>
5353 <param name="property" type="wstring" dir="in">
5354 <desc>
5355 The name of the property to read.
5356 </desc>
5357 </param>
5358 <param name="value" type="unsigned long long" dir="return">
5359 <desc>
5360 The timestamp. If the property does not exist then this will be
5361 empty.
5362 </desc>
5363 </param>
5364 </method>
5365
5366 <method name="setGuestProperty">
5367 <desc>
5368 Sets, changes or deletes an entry in the machine's guest property
5369 store.
5370
5371 <result name="E_ACCESSDENIED">
5372 Property cannot be changed.
5373 </result>
5374 <result name="E_INVALIDARG">
5375 Invalid @a flags.
5376 </result>
5377 <result name="VBOX_E_INVALID_VM_STATE">
5378 Virtual machine is not mutable or session not open.
5379 </result>
5380 <result name="VBOX_E_INVALID_OBJECT_STATE">
5381 Cannot set transient property when machine not running.
5382 </result>
5383
5384 </desc>
5385 <param name="property" type="wstring" dir="in">
5386 <desc>
5387 The name of the property to set, change or delete.
5388 </desc>
5389 </param>
5390 <param name="value" type="wstring" dir="in">
5391 <desc>
5392 The new value of the property to set, change or delete. If the
5393 property does not yet exist and value is non-empty, it will be
5394 created. If the value is @c null or empty, the property will be
5395 deleted if it exists.
5396 </desc>
5397 </param>
5398 <param name="flags" type="wstring" dir="in">
5399 <desc>
5400 Additional property parameters, passed as a comma-separated list of
5401 "name=value" type entries.
5402 </desc>
5403 </param>
5404 </method>
5405
5406 <method name="setGuestPropertyValue">
5407 <desc>
5408 Sets, changes or deletes a value in the machine's guest property
5409 store. The flags field will be left unchanged or created empty for a
5410 new property.
5411
5412 <result name="E_ACCESSDENIED">
5413 Property cannot be changed.
5414 </result>
5415 <result name="VBOX_E_INVALID_VM_STATE">
5416 Virtual machine is not mutable or session not open.
5417 </result>
5418 <result name="VBOX_E_INVALID_OBJECT_STATE">
5419 Cannot set transient property when machine not running.
5420 </result>
5421 </desc>
5422
5423 <param name="property" type="wstring" dir="in">
5424 <desc>
5425 The name of the property to set, change or delete.
5426 </desc>
5427 </param>
5428 <param name="value" type="wstring" dir="in">
5429 <desc>
5430 The new value of the property to set, change or delete. If the
5431 property does not yet exist and value is non-empty, it will be
5432 created. If the value is @c null or empty, the property will be
5433 deleted if it exists.
5434 </desc>
5435 </param>
5436 </method>
5437
5438 <method name="enumerateGuestProperties">
5439 <desc>
5440 Return a list of the guest properties matching a set of patterns along
5441 with their values, time stamps and flags.
5442 </desc>
5443 <param name="patterns" type="wstring" dir="in">
5444 <desc>
5445 The patterns to match the properties against, separated by '|'
5446 characters. If this is empty or @c null, all properties will match.
5447 </desc>
5448 </param>
5449 <param name="name" type="wstring" dir="out" safearray="yes">
5450 <desc>
5451 The names of the properties returned.
5452 </desc>
5453 </param>
5454 <param name="value" type="wstring" dir="out" safearray="yes">
5455 <desc>
5456 The values of the properties returned. The array entries match the
5457 corresponding entries in the @a name array.
5458 </desc>
5459 </param>
5460 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
5461 <desc>
5462 The time stamps of the properties returned. The array entries match
5463 the corresponding entries in the @a name array.
5464 </desc>
5465 </param>
5466 <param name="flags" type="wstring" dir="out" safearray="yes">
5467 <desc>
5468 The flags of the properties returned. The array entries match the
5469 corresponding entries in the @a name array.
5470 </desc>
5471 </param>
5472 </method>
5473
5474 <method name="querySavedThumbnailSize">
5475 <desc>
5476 Returns size in bytes and dimensions in pixels of a saved thumbnail bitmap from saved state.
5477 </desc>
5478 <param name="screenId" type="unsigned long" dir="in">
5479 <desc>
5480 Saved guest screen to query info from.
5481 </desc>
5482 </param>
5483 <param name="size" type="unsigned long" dir="out">
5484 <desc>
5485 Size of buffer required to store the bitmap.
5486 </desc>
5487 </param>
5488 <param name="width" type="unsigned long" dir="out">
5489 <desc>
5490 Bitmap width.
5491 </desc>
5492 </param>
5493 <param name="height" type="unsigned long" dir="out">
5494 <desc>
5495 Bitmap height.
5496 </desc>
5497 </param>
5498 </method>
5499
5500 <method name="readSavedThumbnailToArray">
5501 <desc>
5502 Thumbnail is retrieved to an array of bytes in uncompressed 32-bit BGRA or RGBA format.
5503 </desc>
5504 <param name="screenId" type="unsigned long" dir="in">
5505 <desc>
5506 Saved guest screen to read from.
5507 </desc>
5508 </param>
5509 <param name="BGR" type="boolean" dir="in">
5510 <desc>
5511 How to order bytes in the pixel. A pixel consists of 4 bytes. If this parameter is true, then
5512 bytes order is: B, G, R, 0xFF. If this parameter is false, then bytes order is: R, G, B, 0xFF.
5513 </desc>
5514 </param>
5515 <param name="width" type="unsigned long" dir="out">
5516 <desc>
5517 Bitmap width.
5518 </desc>
5519 </param>
5520 <param name="height" type="unsigned long" dir="out">
5521 <desc>
5522 Bitmap height.
5523 </desc>
5524 </param>
5525 <param name="data" type="octet" safearray="yes" dir="return">
5526 <desc>
5527 Array with resulting bitmap data.
5528 </desc>
5529 </param>
5530 </method>
5531
5532 <method name="querySavedScreenshotPNGSize">
5533 <desc>
5534 Returns size in bytes and dimensions of a saved PNG image of screenshot from saved state.
5535 </desc>
5536 <param name="screenId" type="unsigned long" dir="in">
5537 <desc>
5538 Saved guest screen to query info from.
5539 </desc>
5540 </param>
5541 <param name="size" type="unsigned long" dir="out">
5542 <desc>
5543 Size of buffer required to store the PNG binary data.
5544 </desc>
5545 </param>
5546 <param name="width" type="unsigned long" dir="out">
5547 <desc>
5548 Image width.
5549 </desc>
5550 </param>
5551 <param name="height" type="unsigned long" dir="out">
5552 <desc>
5553 Image height.
5554 </desc>
5555 </param>
5556 </method>
5557
5558 <method name="readSavedScreenshotPNGToArray">
5559 <desc>
5560 Screenshot in PNG format is retrieved to an array of bytes.
5561 </desc>
5562 <param name="screenId" type="unsigned long" dir="in">
5563 <desc>
5564 Saved guest screen to read from.
5565 </desc>
5566 </param>
5567 <param name="width" type="unsigned long" dir="out">
5568 <desc>
5569 Image width.
5570 </desc>
5571 </param>
5572 <param name="height" type="unsigned long" dir="out">
5573 <desc>
5574 Image height.
5575 </desc>
5576 </param>
5577 <param name="data" type="octet" dir="return" safearray="yes">
5578 <desc>
5579 Array with resulting PNG data.
5580 </desc>
5581 </param>
5582 </method>
5583
5584 <method name="hotPlugCPU">
5585 <desc>
5586 Plugs a CPU into the machine.
5587 </desc>
5588 <param name="cpu" type="unsigned long" dir="in">
5589 <desc>
5590 The CPU id to insert.
5591 </desc>
5592 </param>
5593 </method>
5594
5595 <method name="hotUnplugCPU">
5596 <desc>
5597 Removes a CPU from the machine.
5598 </desc>
5599 <param name="cpu" type="unsigned long" dir="in">
5600 <desc>
5601 The CPU id to remove.
5602 </desc>
5603 </param>
5604 </method>
5605
5606 <method name="getCPUStatus">
5607 <desc>
5608 Returns the current status of the given CPU.
5609 </desc>
5610 <param name="cpu" type="unsigned long" dir="in">
5611 <desc>
5612 The CPU id to check for.
5613 </desc>
5614 </param>
5615 <param name="attached" type="boolean" dir="return">
5616 <desc>
5617 Status of the CPU.
5618 </desc>
5619 </param>
5620 </method>
5621
5622 <method name="queryLogFilename">
5623 <desc>
5624 Queries for the VM log file name of an given index. Returns an empty
5625 string if a log file with that index doesn't exists.
5626 </desc>
5627 <param name="idx" type="unsigned long" dir="in">
5628 <desc>
5629 Which log file name to query. 0=current log file.
5630 </desc>
5631 </param>
5632 <param name="filename" type="wstring" dir="return">
5633 <desc>
5634 On return the full path to the log file or an empty string on error.
5635 </desc>
5636 </param>
5637 </method>
5638
5639 <method name="readLog">
5640 <desc>
5641 Reads the VM log file. The chunk size is limited, so even if you
5642 ask for a big piece there might be less data returned.
5643 </desc>
5644 <param name="idx" type="unsigned long" dir="in">
5645 <desc>
5646 Which log file to read. 0=current log file.
5647 </desc>
5648 </param>
5649 <param name="offset" type="unsigned long long" dir="in">
5650 <desc>
5651 Offset in the log file.
5652 </desc>
5653 </param>
5654 <param name="size" type="unsigned long long" dir="in">
5655 <desc>
5656 Chunk size to read in the log file.
5657 </desc>
5658 </param>
5659 <param name="data" type="octet" dir="return" safearray="yes">
5660 <desc>
5661 Data read from the log file. A data size of 0 means end of file
5662 if the requested chunk size was not 0. This is the unprocessed
5663 file data, i.e. the line ending style depends on the platform of
5664 the system the server is running on.
5665 </desc>
5666 </param>
5667 </method>
5668 </interface>
5669
5670 <!--
5671 // IConsole
5672 /////////////////////////////////////////////////////////////////////////
5673 -->
5674
5675 <interface
5676 name="IRemoteDisplayInfo" extends="$unknown"
5677 uuid="b3741084-806f-4c3b-8c42-ebad1a81e45a"
5678 wsmap="struct"
5679 >
5680 <desc>
5681 Contains information about the remote display (VRDP) capabilities and status.
5682 This is used in the <link to="IConsole::remoteDisplayInfo" /> attribute.
5683 </desc>
5684
5685 <attribute name="active" type="boolean" readonly="yes">
5686 <desc>
5687 Whether the remote display connection is active.
5688 </desc>
5689 </attribute>
5690
5691 <attribute name="port" type="long" readonly="yes">
5692 <desc>
5693 VRDP server port number. If this property is equal to <tt>0</tt>, then
5694 the VRDP server failed to start, usually because there are no free TCP
5695 ports to bind to. If this property is equal to <tt>-1</tt>, then the VRDP
5696 server has not yet been started.
5697 </desc>
5698 </attribute>
5699
5700 <attribute name="numberOfClients" type="unsigned long" readonly="yes">
5701 <desc>
5702 How many times a client connected.
5703 </desc>
5704 </attribute>
5705
5706 <attribute name="beginTime" type="long long" readonly="yes">
5707 <desc>
5708 When the last connection was established, in milliseconds since 1970-01-01 UTC.
5709 </desc>
5710 </attribute>
5711
5712 <attribute name="endTime" type="long long" readonly="yes">
5713 <desc>
5714 When the last connection was terminated or the current time, if
5715 connection is still active, in milliseconds since 1970-01-01 UTC.
5716 </desc>
5717 </attribute>
5718
5719 <attribute name="bytesSent" type="unsigned long long" readonly="yes">
5720 <desc>
5721 How many bytes were sent in last or current, if still active, connection.
5722 </desc>
5723 </attribute>
5724
5725 <attribute name="bytesSentTotal" type="unsigned long long" readonly="yes">
5726 <desc>
5727 How many bytes were sent in all connections.
5728 </desc>
5729 </attribute>
5730
5731 <attribute name="bytesReceived" type="unsigned long long" readonly="yes">
5732 <desc>
5733 How many bytes were received in last or current, if still active, connection.
5734 </desc>
5735 </attribute>
5736
5737 <attribute name="bytesReceivedTotal" type="unsigned long long" readonly="yes">
5738 <desc>
5739 How many bytes were received in all connections.
5740 </desc>
5741 </attribute>
5742
5743 <attribute name="user" type="wstring" readonly="yes">
5744 <desc>
5745 Login user name supplied by the client.
5746 </desc>
5747 </attribute>
5748
5749 <attribute name="domain" type="wstring" readonly="yes">
5750 <desc>
5751 Login domain name supplied by the client.
5752 </desc>
5753 </attribute>
5754
5755 <attribute name="clientName" type="wstring" readonly="yes">
5756 <desc>
5757 The client name supplied by the client.
5758 </desc>
5759 </attribute>
5760
5761 <attribute name="clientIP" type="wstring" readonly="yes">
5762 <desc>
5763 The IP address of the client.
5764 </desc>
5765 </attribute>
5766
5767 <attribute name="clientVersion" type="unsigned long" readonly="yes">
5768 <desc>
5769 The client software version number.
5770 </desc>
5771 </attribute>
5772
5773 <attribute name="encryptionStyle" type="unsigned long" readonly="yes">
5774 <desc>
5775 Public key exchange method used when connection was established.
5776 Values: 0 - RDP4 public key exchange scheme.
5777 1 - X509 certificates were sent to client.
5778 </desc>
5779 </attribute>
5780
5781 </interface>
5782
5783 <interface
5784 name="IConsole" extends="$unknown"
5785 uuid="03cb7897-ea17-4e6c-81ae-4bd90be2fde2"
5786 wsmap="managed"
5787 >
5788 <desc>
5789 The IConsole interface represents an interface to control virtual
5790 machine execution.
5791
5792 A console object gets created when a machine has been locked for a
5793 particular session (client process) using <link to="IMachine::lockMachine" />
5794 or <link to="IMachine::launchVMProcess"/>. The console object can
5795 then be found in the session's <link to="ISession::console" /> attribute.
5796
5797 Methods of the IConsole interface allow the caller to query the current
5798 virtual machine execution state, pause the machine or power it down, save
5799 the machine state or take a snapshot, attach and detach removable media
5800 and so on.
5801
5802 <see>ISession</see>
5803 </desc>
5804
5805 <attribute name="machine" type="IMachine" readonly="yes">
5806 <desc>
5807 Machine object this console is sessioned with.
5808 <note>
5809 This is a convenience property, it has the same value as
5810 <link to="ISession::machine"/> of the corresponding session
5811 object.
5812 </note>
5813 </desc>
5814 </attribute>
5815
5816 <attribute name="state" type="MachineState" readonly="yes">
5817 <desc>
5818 Current execution state of the machine.
5819 <note>
5820 This property always returns the same value as the corresponding
5821 property of the IMachine object this console is sessioned with.
5822 For the process that owns (executes) the VM, this is the
5823 preferable way of querying the VM state, because no IPC
5824 calls are made.
5825 </note>
5826 </desc>
5827 </attribute>
5828
5829 <attribute name="guest" type="IGuest" readonly="yes">
5830 <desc>Guest object.</desc>
5831 </attribute>
5832
5833 <attribute name="keyboard" type="IKeyboard" readonly="yes">
5834 <desc>
5835 Virtual keyboard object.
5836 <note>
5837 If the machine is not running, any attempt to use
5838 the returned object will result in an error.
5839 </note>
5840 </desc>
5841 </attribute>
5842
5843 <attribute name="mouse" type="IMouse" readonly="yes">
5844 <desc>
5845 Virtual mouse object.
5846 <note>
5847 If the machine is not running, any attempt to use
5848 the returned object will result in an error.
5849 </note>
5850 </desc>
5851 </attribute>
5852
5853 <attribute name="display" type="IDisplay" readonly="yes">
5854 <desc>Virtual display object.
5855 <note>
5856 If the machine is not running, any attempt to use
5857 the returned object will result in an error.
5858 </note>
5859 </desc>
5860 </attribute>
5861
5862 <attribute name="debugger" type="IMachineDebugger" readonly="yes">
5863 <desc>Debugging interface.</desc>
5864 </attribute>
5865
5866 <attribute name="USBDevices" type="IUSBDevice" readonly="yes" safearray="yes">
5867 <desc>
5868 Collection of USB devices currently attached to the virtual
5869 USB controller.
5870 <note>
5871 The collection is empty if the machine is not running.
5872 </note>
5873 </desc>
5874 </attribute>
5875
5876 <attribute name="remoteUSBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
5877 <desc>
5878 List of USB devices currently attached to the remote VRDP client.
5879 Once a new device is physically attached to the remote host computer,
5880 it appears in this list and remains there until detached.
5881 </desc>
5882 </attribute>
5883
5884 <attribute name="sharedFolders" type="ISharedFolder" readonly="yes" safearray="yes">
5885 <desc>
5886 Collection of shared folders for the current session. These folders
5887 are called transient shared folders because they are available to the
5888 guest OS running inside the associated virtual machine only for the
5889 duration of the session (as opposed to
5890 <link to="IMachine::sharedFolders"/> which represent permanent shared
5891 folders). When the session is closed (e.g. the machine is powered down),
5892 these folders are automatically discarded.
5893
5894 New shared folders are added to the collection using
5895 <link to="#createSharedFolder"/>. Existing shared folders can be
5896 removed using <link to="#removeSharedFolder"/>.
5897 </desc>
5898 </attribute>
5899
5900 <attribute name="remoteDisplayInfo" type="IRemoteDisplayInfo" readonly="yes">
5901 <desc>
5902 Interface that provides information on Remote Display (VRDP) connection.
5903 </desc>
5904 </attribute>
5905
5906 <attribute name="eventSource" type="IEventSource" readonly="yes">
5907 <desc>
5908 Event source for console events.
5909 </desc>
5910 </attribute>
5911
5912 <method name="powerUp">
5913 <desc>
5914 Starts the virtual machine execution using the current machine
5915 state (that is, its current execution state, current settings and
5916 current storage devices).
5917
5918 <note>
5919 This method is only useful for front-ends that want to actually
5920 execute virtual machines in their own process (like the VirtualBox
5921 or VBoxSDL front-ends). Unless you are intending to write such a
5922 front-end, do not call this method. If you simply want to
5923 start virtual machine execution using one of the existing front-ends
5924 (for example the VirtualBox GUI or headless server), use
5925 <link to="IMachine::launchVMProcess"/> instead; these
5926 front-ends will power up the machine automatically for you.
5927 </note>
5928
5929 If the machine is powered off or aborted, the execution will
5930 start from the beginning (as if the real hardware were just
5931 powered on).
5932
5933 If the machine is in the <link to="MachineState::Saved"/> state,
5934 it will continue its execution the point where the state has
5935 been saved.
5936
5937 If the machine <link to="IMachine::teleporterEnabled"/> property is
5938 enabled on the machine being powered up, the machine will wait for an
5939 incoming teleportation in the <link to="MachineState::TeleportingIn"/>
5940 state. The returned progress object will have at least three
5941 operations where the last three are defined as: (1) powering up and
5942 starting TCP server, (2) waiting for incoming teleportations, and
5943 (3) perform teleportation. These operations will be reflected as the
5944 last three operations of the progress objected returned by
5945 <link to="IMachine::launchVMProcess"/> as well.
5946
5947 <see>#saveState</see>
5948
5949 <result name="VBOX_E_INVALID_VM_STATE">
5950 Virtual machine already running.
5951 </result>
5952 <result name="VBOX_E_HOST_ERROR">
5953 Host interface does not exist or name not set.
5954 </result>
5955 <result name="VBOX_E_FILE_ERROR">
5956 Invalid saved state file.
5957 </result>
5958 </desc>
5959 <param name="progress" type="IProgress" dir="return">
5960 <desc>Progress object to track the operation completion.</desc>
5961 </param>
5962 </method>
5963
5964 <method name="powerUpPaused">
5965 <desc>
5966 Identical to powerUp except that the VM will enter the
5967 <link to="MachineState::Paused"/> state, instead of
5968 <link to="MachineState::Running"/>.
5969
5970 <see>#powerUp</see>
5971 <result name="VBOX_E_INVALID_VM_STATE">
5972 Virtual machine already running.
5973 </result>
5974 <result name="VBOX_E_HOST_ERROR">
5975 Host interface does not exist or name not set.
5976 </result>
5977 <result name="VBOX_E_FILE_ERROR">
5978 Invalid saved state file.
5979 </result>
5980 </desc>
5981 <param name="progress" type="IProgress" dir="return">
5982 <desc>Progress object to track the operation completion.</desc>
5983 </param>
5984 </method>
5985
5986 <method name="powerDown">
5987 <desc>
5988 Initiates the power down procedure to stop the virtual machine
5989 execution.
5990
5991 The completion of the power down procedure is tracked using the returned
5992 IProgress object. After the operation is complete, the machine will go
5993 to the PoweredOff state.
5994 <result name="VBOX_E_INVALID_VM_STATE">
5995 Virtual machine must be Running, Paused or Stuck to be powered down.
5996 </result>
5997 </desc>
5998 <param name="progress" type="IProgress" dir="return">
5999 <desc>Progress object to track the operation completion.</desc>
6000 </param>
6001 </method>
6002
6003 <method name="reset">
6004 <desc>Resets the virtual machine.
6005 <result name="VBOX_E_INVALID_VM_STATE">
6006 Virtual machine not in Running state.
6007 </result>
6008 <result name="VBOX_E_VM_ERROR">
6009 Virtual machine error in reset operation.
6010 </result>
6011 </desc>
6012 </method>
6013
6014 <method name="pause">
6015 <desc>Pauses the virtual machine execution.
6016 <result name="VBOX_E_INVALID_VM_STATE">
6017 Virtual machine not in Running state.
6018 </result>
6019 <result name="VBOX_E_VM_ERROR">
6020 Virtual machine error in suspend operation.
6021 </result>
6022 </desc>
6023 </method>
6024
6025 <method name="resume">
6026 <desc>Resumes the virtual machine execution.
6027 <result name="VBOX_E_INVALID_VM_STATE">
6028 Virtual machine not in Paused state.
6029 </result>
6030 <result name="VBOX_E_VM_ERROR">
6031 Virtual machine error in resume operation.
6032 </result>
6033 </desc>
6034 </method>
6035
6036 <method name="powerButton">
6037 <desc>Sends the ACPI power button event to the guest.
6038 <result name="VBOX_E_INVALID_VM_STATE">
6039 Virtual machine not in Running state.
6040 </result>
6041 <result name="VBOX_E_PDM_ERROR">
6042 Controlled power off failed.
6043 </result>
6044 </desc>
6045 </method>
6046
6047 <method name="sleepButton">
6048 <desc>Sends the ACPI sleep button event to the guest.
6049 <result name="VBOX_E_INVALID_VM_STATE">
6050 Virtual machine not in Running state.
6051 </result>
6052 <result name="VBOX_E_PDM_ERROR">
6053 Sending sleep button event failed.
6054 </result>
6055 </desc>
6056 </method>
6057
6058 <method name="getPowerButtonHandled">
6059 <desc>Checks if the last power button event was handled by guest.
6060 <result name="VBOX_E_PDM_ERROR">
6061 Checking if the event was handled by the guest OS failed.
6062 </result>
6063 </desc>
6064 <param name="handled" type="boolean" dir="return"/>
6065 </method>
6066
6067 <method name="getGuestEnteredACPIMode">
6068 <desc>Checks if the guest entered the ACPI mode G0 (working) or
6069 G1 (sleeping). If this method returns @c false, the guest will
6070 most likely not respond to external ACPI events.
6071 <result name="VBOX_E_INVALID_VM_STATE">
6072 Virtual machine not in Running state.
6073 </result>
6074 </desc>
6075 <param name="entered" type="boolean" dir="return"/>
6076 </method>
6077
6078 <method name="saveState">
6079 <desc>
6080 Saves the current execution state of a running virtual machine
6081 and stops its execution.
6082
6083 After this operation completes, the machine will go to the
6084 Saved state. Next time it is powered up, this state will
6085 be restored and the machine will continue its execution from
6086 the place where it was saved.
6087
6088 This operation differs from taking a snapshot to the effect
6089 that it doesn't create new differencing media. Also, once
6090 the machine is powered up from the state saved using this method,
6091 the saved state is deleted, so it will be impossible to return
6092 to this state later.
6093
6094 <note>
6095 On success, this method implicitly calls
6096 <link to="IMachine::saveSettings"/> to save all current machine
6097 settings (including runtime changes to the DVD medium, etc.).
6098 Together with the impossibility to change any VM settings when it is
6099 in the Saved state, this guarantees adequate hardware
6100 configuration of the machine when it is restored from the saved
6101 state file.
6102 </note>
6103
6104 <note>
6105 The machine must be in the Running or Paused state, otherwise
6106 the operation will fail.
6107 </note>
6108 <result name="VBOX_E_INVALID_VM_STATE">
6109 Virtual machine state neither Running nor Paused.
6110 </result>
6111 <result name="VBOX_E_FILE_ERROR">
6112 Failed to create directory for saved state file.
6113 </result>
6114
6115 <see><link to="#takeSnapshot"/></see>
6116 </desc>
6117 <param name="progress" type="IProgress" dir="return">
6118 <desc>Progress object to track the operation completion.</desc>
6119 </param>
6120 </method>
6121
6122 <method name="adoptSavedState">
6123 <desc>
6124 Associates the given saved state file to the virtual machine.
6125
6126 On success, the machine will go to the Saved state. Next time it is
6127 powered up, it will be restored from the adopted saved state and
6128 continue execution from the place where the saved state file was
6129 created.
6130
6131 The specified saved state file path may be absolute or relative to the
6132 folder the VM normally saves the state to (usually,
6133 <link to="IMachine::snapshotFolder"/>).
6134
6135 <note>
6136 It's a caller's responsibility to make sure the given saved state
6137 file is compatible with the settings of this virtual machine that
6138 represent its virtual hardware (memory size, storage disk configuration
6139 etc.). If there is a mismatch, the behavior of the virtual machine
6140 is undefined.
6141 </note>
6142 <result name="VBOX_E_INVALID_VM_STATE">
6143 Virtual machine state neither PoweredOff nor Aborted.
6144 </result>
6145 </desc>
6146 <param name="savedStateFile" type="wstring" dir="in">
6147 <desc>Path to the saved state file to adopt.</desc>
6148 </param>
6149 </method>
6150
6151 <method name="discardSavedState">
6152 <desc>
6153 Forcibly resets the machine to "Powered Off" state if it is
6154 currently in the "Saved" state (previously created by <link to="#saveState"/>).
6155 Next time the machine is powered up, a clean boot will occur.
6156 <note>
6157 This operation is equivalent to resetting or powering off
6158 the machine without doing a proper shutdown of the guest
6159 operating system; as with resetting a running phyiscal
6160 computer, it can can lead to data loss.
6161 </note>
6162 If @a fRemoveFile is @c true, the file in the machine directory
6163 into which the machine state was saved is also deleted. If
6164 this is @c false, then the state can be recovered and later
6165 re-inserted into a machine using <link to="#adoptSavedState" />.
6166 The location of the file can be found in the
6167 <link to="IMachine::stateFilePath" /> attribute.
6168 <result name="VBOX_E_INVALID_VM_STATE">
6169 Virtual machine not in state Saved.
6170 </result>
6171 </desc>
6172 <param name="fRemoveFile" type="boolean" dir="in" >
6173 <desc>Whether to also remove the saved state file.</desc>
6174 </param>
6175 </method>
6176
6177 <method name="getDeviceActivity">
6178 <desc>
6179 Gets the current activity type of a given device or device group.
6180 <result name="E_INVALIDARG">
6181 Invalid device type.
6182 </result>
6183 </desc>
6184 <param name="type" type="DeviceType" dir="in"/>
6185 <param name="activity" type="DeviceActivity" dir="return"/>
6186 </method>
6187
6188 <method name="attachUSBDevice">
6189 <desc>
6190 Attaches a host USB device with the given UUID to the
6191 USB controller of the virtual machine.
6192
6193 The device needs to be in one of the following states:
6194 <link to="USBDeviceState::Busy"/>,
6195 <link to="USBDeviceState::Available"/> or
6196 <link to="USBDeviceState::Held"/>,
6197 otherwise an error is immediately returned.
6198
6199 When the device state is
6200 <link to="USBDeviceState::Busy">Busy</link>, an error may also
6201 be returned if the host computer refuses to release it for some reason.
6202
6203 <see>IUSBController::deviceFilters, USBDeviceState</see>
6204 <result name="VBOX_E_INVALID_VM_STATE">
6205 Virtual machine state neither Running nor Paused.
6206 </result>
6207 <result name="VBOX_E_PDM_ERROR">
6208 Virtual machine does not have a USB controller.
6209 </result>
6210 </desc>
6211 <param name="id" type="uuid" mod="string" dir="in">
6212 <desc>UUID of the host USB device to attach.</desc>
6213 </param>
6214 </method>
6215
6216 <method name="detachUSBDevice">
6217 <desc>
6218 Detaches an USB device with the given UUID from the USB controller
6219 of the virtual machine.
6220
6221 After this method succeeds, the VirtualBox server re-initiates
6222 all USB filters as if the device were just physically attached
6223 to the host, but filters of this machine are ignored to avoid
6224 a possible automatic re-attachment.
6225
6226 <see>IUSBController::deviceFilters, USBDeviceState</see>
6227
6228 <result name="VBOX_E_PDM_ERROR">
6229 Virtual machine does not have a USB controller.
6230 </result>
6231 <result name="E_INVALIDARG">
6232 USB device not attached to this virtual machine.
6233 </result>
6234 </desc>
6235 <param name="id" type="uuid" mod="string" dir="in">
6236 <desc>UUID of the USB device to detach.</desc>
6237 </param>
6238 <param name="device" type="IUSBDevice" dir="return">
6239 <desc>Detached USB device.</desc>
6240 </param>
6241 </method>
6242
6243 <method name="findUSBDeviceByAddress">
6244 <desc>
6245 Searches for a USB device with the given host address.
6246
6247 <result name="VBOX_E_OBJECT_NOT_FOUND">
6248 Given @c name does not correspond to any USB device.
6249 </result>
6250
6251 <see>IUSBDevice::address</see>
6252 </desc>
6253 <param name="name" type="wstring" dir="in">
6254 <desc>
6255 Address of the USB device (as assigned by the host) to
6256 search for.
6257 </desc>
6258 </param>
6259 <param name="device" type="IUSBDevice" dir="return">
6260 <desc>Found USB device object.</desc>
6261 </param>
6262 </method>
6263
6264 <method name="findUSBDeviceById">
6265 <desc>
6266 Searches for a USB device with the given UUID.
6267
6268 <result name="VBOX_E_OBJECT_NOT_FOUND">
6269 Given @c id does not correspond to any USB device.
6270 </result>
6271
6272 <see>IUSBDevice::id</see>
6273 </desc>
6274 <param name="id" type="uuid" mod="string" dir="in">
6275 <desc>UUID of the USB device to search for.</desc>
6276 </param>
6277 <param name="device" type="IUSBDevice" dir="return">
6278 <desc>Found USB device object.</desc>
6279 </param>
6280 </method>
6281
6282 <method name="createSharedFolder">
6283 <desc>
6284 Creates a transient new shared folder by associating the given logical
6285 name with the given host path, adds it to the collection of shared
6286 folders and starts sharing it. Refer to the description of
6287 <link to="ISharedFolder"/> to read more about logical names.
6288
6289 <result name="VBOX_E_INVALID_VM_STATE">
6290 Virtual machine in Saved state or currently changing state.
6291 </result>
6292 <result name="VBOX_E_FILE_ERROR">
6293 Shared folder already exists or not accessible.
6294 </result>
6295 </desc>
6296 <param name="name" type="wstring" dir="in">
6297 <desc>Unique logical name of the shared folder.</desc>
6298 </param>
6299 <param name="hostPath" type="wstring" dir="in">
6300 <desc>Full path to the shared folder in the host file system.</desc>
6301 </param>
6302 <param name="writable" type="boolean" dir="in">
6303 <desc>Whether the share is writable or readonly</desc>
6304 </param>
6305 <param name="automount" type="boolean" dir="in">
6306 <desc>Whether the share gets automatically mounted by the guest
6307 or not.</desc>
6308 </param>
6309 </method>
6310
6311 <method name="removeSharedFolder">
6312 <desc>
6313 Removes a transient shared folder with the given name previously
6314 created by <link to="#createSharedFolder"/> from the collection of
6315 shared folders and stops sharing it.
6316 <result name="VBOX_E_INVALID_VM_STATE">
6317 Virtual machine in Saved state or currently changing state.
6318 </result>
6319 <result name="VBOX_E_FILE_ERROR">
6320 Shared folder does not exists.
6321 </result>
6322 </desc>
6323 <param name="name" type="wstring" dir="in">
6324 <desc>Logical name of the shared folder to remove.</desc>
6325 </param>
6326 </method>
6327
6328 <method name="takeSnapshot">
6329 <desc>
6330 Saves the current execution state
6331 and all settings of the machine and creates differencing images
6332 for all normal (non-independent) media.
6333 See <link to="ISnapshot" /> for an introduction to snapshots.
6334
6335 This method can be called for a PoweredOff, Saved (see
6336 <link to="#saveState"/>), Running or
6337 Paused virtual machine. When the machine is PoweredOff, an
6338 offline snapshot is created. When the machine is Running a live
6339 snapshot is created, and an online snapshot is is created when Paused.
6340
6341 The taken snapshot is always based on the
6342 <link to="IMachine::currentSnapshot">current snapshot</link>
6343 of the associated virtual machine and becomes a new current snapshot.
6344
6345 <note>
6346 This method implicitly calls <link to="IMachine::saveSettings"/> to
6347 save all current machine settings before taking an offline snapshot.
6348 </note>
6349
6350 <result name="VBOX_E_INVALID_VM_STATE">
6351 Virtual machine currently changing state.
6352 </result>
6353 </desc>
6354 <param name="name" type="wstring" dir="in">
6355 <desc>Short name for the snapshot.</desc>
6356 </param>
6357 <param name="description" type="wstring" dir="in">
6358 <desc>Optional description of the snapshot.</desc>
6359 </param>
6360 <param name="progress" type="IProgress" dir="return">
6361 <desc>Progress object to track the operation completion.</desc>
6362 </param>
6363 </method>
6364
6365 <method name="deleteSnapshot">
6366 <desc>
6367 Starts deleting the specified snapshot asynchronously.
6368 See <link to="ISnapshot" /> for an introduction to snapshots.
6369
6370 The execution state and settings of the associated machine stored in
6371 the snapshot will be deleted. The contents of all differencing media of
6372 this snapshot will be merged with the contents of their dependent child
6373 media to keep the medium chain valid (in other words, all changes
6374 represented by media being deleted will be propagated to their child
6375 medium). After that, this snapshot's differencing medium will be
6376 deleted. The parent of this snapshot will become a new parent for all
6377 its child snapshots.
6378
6379 If the deleted snapshot is the current one, its parent snapshot will
6380 become a new current snapshot. The current machine state is not directly
6381 affected in this case, except that currently attached differencing
6382 media based on media of the deleted snapshot will be also merged as
6383 described above.
6384
6385 If the deleted snapshot is the first or current snapshot, then the
6386 respective IMachine attributes will be adjusted. Deleting the current
6387 snapshot will also implicitly call <link to="IMachine::saveSettings"/>
6388 to make all current machine settings permanent.
6389
6390 Deleting a snapshot has the following preconditions:
6391
6392 <ul>
6393 <li>Child media of all normal media of the deleted snapshot
6394 must be accessible (see <link to="IMedium::state"/>) for this
6395 operation to succeed. In particular, this means that all virtual
6396 machines, whose media are directly or indirectly based on the
6397 media of deleted snapshot, must be powered off.</li>
6398
6399 <li>You cannot delete the snapshot if a medium attached to it has
6400 more than once child medium (differencing images) because otherwise
6401 merging would be impossible. This might be the case if there is
6402 more than one child snapshot or differencing images were created
6403 for other reason (e.g. implicitly because of multiple machine
6404 attachments).</li>
6405 </ul>
6406
6407
6408 The virtual machine's <link to="IMachine::state">state</link> is
6409 changed to "DeletingSnapshot", "DeletingSnapshotOnline" or
6410 "DeletingSnapshotPaused" while this operation is in progress.
6411
6412 <note>
6413 Merging medium contents can be very time and disk space
6414 consuming, if these media are big in size and have many
6415 children. However, if the snapshot being deleted is the last
6416 (head) snapshot on the branch, the operation will be rather
6417 quick.
6418 </note>
6419 <result name="VBOX_E_INVALID_VM_STATE">
6420 The running virtual machine prevents deleting this snapshot. This
6421 happens only in very specific situations, usually snapshots can be
6422 deleted without trouble while a VM is running. The error message
6423 text explains the reason for the failure.
6424 </result>
6425 </desc>
6426 <param name="id" type="uuid" mod="string" dir="in">
6427 <desc>UUID of the snapshot to delete.</desc>
6428 </param>
6429 <param name="progress" type="IProgress" dir="return">
6430 <desc>Progress object to track the operation completion.</desc>
6431 </param>
6432 </method>
6433
6434 <method name="restoreSnapshot">
6435 <desc>
6436 Starts resetting the machine's current state to the state contained
6437 in the given snapshot, asynchronously. All current settings of the
6438 machine will be reset and changes stored in differencing media
6439 will be lost.
6440 See <link to="ISnapshot" /> for an introduction to snapshots.
6441
6442 After this operation is successfully completed, new empty differencing
6443 media are created for all normal media of the machine.
6444
6445 If the given snapshot is an online snapshot, the machine will go to
6446 the <link to="MachineState::Saved"> saved state</link>, so that the
6447 next time it is powered on, the execution state will be restored
6448 from the state of the snapshot.
6449
6450 <note>
6451 The machine must not be running, otherwise the operation will fail.
6452 </note>
6453
6454 <note>
6455 If the machine state is <link to="MachineState::Saved">Saved</link>
6456 prior to this operation, the saved state file will be implicitly
6457 deleted (as if <link to="IConsole::discardSavedState"/> were
6458 called).
6459 </note>
6460
6461 <result name="VBOX_E_INVALID_VM_STATE">
6462 Virtual machine is running.
6463 </result>
6464 </desc>
6465 <param name="snapshot" type="ISnapshot" dir="in">
6466 <desc>The snapshot to restore the VM state from.</desc>
6467 </param>
6468 <param name="progress" type="IProgress" dir="return">
6469 <desc>Progress object to track the operation completion.</desc>
6470 </param>
6471 </method>
6472
6473 <method name="teleport">
6474 <desc>
6475 Teleport the VM to a different host machine or process.
6476
6477 TODO explain the details.
6478
6479 <result name="VBOX_E_INVALID_VM_STATE">
6480 Virtual machine not running or paused.
6481 </result>
6482 </desc>
6483 <param name="hostname" type="wstring" dir="in">
6484 <desc>The name or IP of the host to teleport to.</desc>
6485 </param>
6486 <param name="tcpport" type="unsigned long" dir="in">
6487 <desc>The TCP port to connect to (1..65535).</desc>
6488 </param>
6489 <param name="password" type="wstring" dir="in">
6490 <desc>The password.</desc>
6491 </param>
6492 <param name="maxDowntime" type="unsigned long" dir="in">
6493 <desc>
6494 The maximum allowed downtime given as milliseconds. 0 is not a valid
6495 value. Recommended value: 250 ms.
6496
6497 The higher the value is, the greater the chance for a successful
6498 teleportation. A small value may easily result in the teleportation
6499 process taking hours and eventually fail.
6500
6501 <note>
6502 The current implementation treats this a guideline, not as an
6503 absolute rule.
6504 </note>
6505 </desc>
6506 </param>
6507 <param name="progress" type="IProgress" dir="return">
6508 <desc>Progress object to track the operation completion.</desc>
6509 </param>
6510 </method>
6511
6512 </interface>
6513
6514 <!--
6515 // IHost
6516 /////////////////////////////////////////////////////////////////////////
6517 -->
6518
6519 <enum
6520 name="HostNetworkInterfaceMediumType"
6521 uuid="1aa54aaf-2497-45a2-bfb1-8eb225e93d5b"
6522 >
6523 <desc>
6524 Type of encapsulation. Ethernet encapsulation includes both wired and
6525 wireless Ethernet connections.
6526 <see>IHostNetworkInterface</see>
6527 </desc>
6528
6529 <const name="Unknown" value="0">
6530 <desc>
6531 The type of interface cannot be determined.
6532 </desc>
6533 </const>
6534 <const name="Ethernet" value="1">
6535 <desc>
6536 Ethernet frame encapsulation.
6537 </desc>
6538 </const>
6539 <const name="PPP" value="2">
6540 <desc>
6541 Point-to-point protocol encapsulation.
6542 </desc>
6543 </const>
6544 <const name="SLIP" value="3">
6545 <desc>
6546 Serial line IP encapsulation.
6547 </desc>
6548 </const>
6549 </enum>
6550
6551 <enum
6552 name="HostNetworkInterfaceStatus"
6553 uuid="CC474A69-2710-434B-8D99-C38E5D5A6F41"
6554 >
6555 <desc>
6556 Current status of the interface.
6557 <see>IHostNetworkInterface</see>
6558 </desc>
6559
6560 <const name="Unknown" value="0">
6561 <desc>
6562 The state of interface cannot be determined.
6563 </desc>
6564 </const>
6565 <const name="Up" value="1">
6566 <desc>
6567 The interface is fully operational.
6568 </desc>
6569 </const>
6570 <const name="Down" value="2">
6571 <desc>
6572 The interface is not functioning.
6573 </desc>
6574 </const>
6575 </enum>
6576
6577 <enum
6578 name="HostNetworkInterfaceType"
6579 uuid="67431b00-9946-48a2-bc02-b25c5919f4f3"
6580 >
6581 <desc>
6582 Network interface type.
6583 </desc>
6584 <const name="Bridged" value="1"/>
6585 <const name="HostOnly" value="2"/>
6586 </enum>
6587
6588 <interface
6589 name="IHostNetworkInterface" extends="$unknown"
6590 uuid="ce6fae58-7642-4102-b5db-c9005c2320a8"
6591 wsmap="managed"
6592 >
6593 <desc>
6594 Represents one of host's network interfaces. IP V6 address and network
6595 mask are strings of 32 hexdecimal digits grouped by four. Groups are
6596 separated by colons.
6597 For example, fe80:0000:0000:0000:021e:c2ff:fed2:b030.
6598 </desc>
6599 <attribute name="name" type="wstring" readonly="yes">
6600 <desc>Returns the host network interface name.</desc>
6601 </attribute>
6602
6603 <attribute name="id" type="uuid" mod="string" readonly="yes">
6604 <desc>Returns the interface UUID.</desc>
6605 </attribute>
6606
6607 <attribute name="networkName" type="wstring" readonly="yes">
6608 <desc>Returns the name of a virtual network the interface gets attached to.</desc>
6609 </attribute>
6610
6611 <attribute name="dhcpEnabled" type="boolean" readonly="yes">
6612 <desc>Specifies whether the DHCP is enabled for the interface.</desc>
6613 </attribute>
6614
6615 <attribute name="IPAddress" type="wstring" readonly="yes">
6616 <desc>Returns the IP V4 address of the interface.</desc>
6617 </attribute>
6618
6619 <attribute name="networkMask" type="wstring" readonly="yes">
6620 <desc>Returns the network mask of the interface.</desc>
6621 </attribute>
6622
6623 <attribute name="IPV6Supported" type="boolean" readonly="yes">
6624 <desc>Specifies whether the IP V6 is supported/enabled for the interface.</desc>
6625 </attribute>
6626
6627 <attribute name="IPV6Address" type="wstring" readonly="yes">
6628 <desc>Returns the IP V6 address of the interface.</desc>
6629 </attribute>
6630
6631 <attribute name="IPV6NetworkMaskPrefixLength" type="unsigned long" readonly="yes">
6632 <desc>Returns the length IP V6 network mask prefix of the interface.</desc>
6633 </attribute>
6634
6635 <attribute name="hardwareAddress" type="wstring" readonly="yes">
6636 <desc>Returns the hardware address. For Ethernet it is MAC address.</desc>
6637 </attribute>
6638
6639 <attribute name="mediumType" type="HostNetworkInterfaceMediumType" readonly="yes">
6640 <desc>Type of protocol encapsulation used.</desc>
6641 </attribute>
6642
6643 <attribute name="status" type="HostNetworkInterfaceStatus" readonly="yes">
6644 <desc>Status of the interface.</desc>
6645 </attribute>
6646
6647 <attribute name="interfaceType" type="HostNetworkInterfaceType" readonly="yes">
6648 <desc>specifies the host interface type.</desc>
6649 </attribute>
6650
6651 <method name="enableStaticIpConfig">
6652 <desc>sets and enables the static IP V4 configuration for the given interface.</desc>
6653 <param name="IPAddress" type="wstring" dir="in">
6654 <desc>
6655 IP address.
6656 </desc>
6657 </param>
6658 <param name="networkMask" type="wstring" dir="in">
6659 <desc>
6660 network mask.
6661 </desc>
6662 </param>
6663 </method>
6664
6665 <method name="enableStaticIpConfigV6">
6666 <desc>sets and enables the static IP V6 configuration for the given interface.</desc>
6667 <param name="IPV6Address" type="wstring" dir="in">
6668 <desc>
6669 IP address.
6670 </desc>
6671 </param>
6672 <param name="IPV6NetworkMaskPrefixLength" type="unsigned long" dir="in">
6673 <desc>
6674 network mask.
6675 </desc>
6676 </param>
6677 </method>
6678
6679 <method name="enableDynamicIpConfig">
6680 <desc>enables the dynamic IP configuration.</desc>
6681 </method>
6682
6683 <method name="dhcpRediscover">
6684 <desc>refreshes the IP configuration for dhcp-enabled interface.</desc>
6685 </method>
6686
6687 </interface>
6688
6689 <interface
6690 name="IHost" extends="$unknown"
6691 uuid="35b004f4-7806-4009-bfa8-d1308adba7e5"
6692 wsmap="managed"
6693 >
6694 <desc>
6695 The IHost interface represents the physical machine that this VirtualBox
6696 installation runs on.
6697
6698 An object implementing this interface is returned by the
6699 <link to="IVirtualBox::host" /> attribute. This interface contains
6700 read-only information about the host's physical hardware (such as what
6701 processors and disks are available, what the host operating system is,
6702 and so on) and also allows for manipulating some of the host's hardware,
6703 such as global USB device filters and host interface networking.
6704
6705 </desc>
6706 <attribute name="DVDDrives" type="IMedium" readonly="yes" safearray="yes">
6707 <desc>List of DVD drives available on the host.</desc>
6708 </attribute>
6709
6710 <attribute name="floppyDrives" type="IMedium" readonly="yes" safearray="yes">
6711 <desc>List of floppy drives available on the host.</desc>
6712 </attribute>
6713
6714 <attribute name="USBDevices" type="IHostUSBDevice" readonly="yes" safearray="yes">
6715 <desc>
6716 List of USB devices currently attached to the host.
6717 Once a new device is physically attached to the host computer,
6718 it appears in this list and remains there until detached.
6719
6720 <note>
6721 If USB functionality is not available in the given edition of
6722 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6723 </note>
6724 </desc>
6725 </attribute>
6726
6727 <attribute name="USBDeviceFilters" type="IHostUSBDeviceFilter" readonly="yes" safearray="yes">
6728 <desc>
6729 List of USB device filters in action.
6730 When a new device is physically attached to the host computer,
6731 filters from this list are applied to it (in order they are stored
6732 in the list). The first matched filter will determine the
6733 <link to="IHostUSBDeviceFilter::action">action</link>
6734 performed on the device.
6735
6736 Unless the device is ignored by these filters, filters of all
6737 currently running virtual machines
6738 (<link to="IUSBController::deviceFilters"/>) are applied to it.
6739
6740 <note>
6741 If USB functionality is not available in the given edition of
6742 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6743 </note>
6744
6745 <see>IHostUSBDeviceFilter, USBDeviceState</see>
6746 </desc>
6747 </attribute>
6748
6749 <attribute name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" readonly="yes">
6750 <desc>List of host network interfaces currently defined on the host.</desc>
6751 </attribute>
6752
6753 <attribute name="processorCount" type="unsigned long" readonly="yes">
6754 <desc>Number of (logical) CPUs installed in the host system.</desc>
6755 </attribute>
6756
6757 <attribute name="processorOnlineCount" type="unsigned long" readonly="yes">
6758 <desc>Number of (logical) CPUs online in the host system.</desc>
6759 </attribute>
6760
6761 <attribute name="processorCoreCount" type="unsigned long" readonly="yes">
6762 <desc>Number of physical processor cores installed in the host system.</desc>
6763 </attribute>
6764
6765 <method name="getProcessorSpeed">
6766 <desc>Query the (approximate) maximum speed of a specified host CPU in
6767 Megahertz.
6768 </desc>
6769 <param name="cpuId" type="unsigned long" dir="in">
6770 <desc>
6771 Identifier of the CPU.
6772 </desc>
6773 </param>
6774 <param name="speed" type="unsigned long" dir="return">
6775 <desc>
6776 Speed value. 0 is returned if value is not known or @a cpuId is
6777 invalid.
6778 </desc>
6779 </param>
6780 </method>
6781
6782 <method name="getProcessorFeature">
6783 <desc>Query whether a CPU feature is supported or not.</desc>
6784 <param name="feature" type="ProcessorFeature" dir="in">
6785 <desc>
6786 CPU Feature identifier.
6787 </desc>
6788 </param>
6789 <param name="supported" type="boolean" dir="return">
6790 <desc>
6791 Feature is supported or not.
6792 </desc>
6793 </param>
6794 </method>
6795
6796 <method name="getProcessorDescription">
6797 <desc>Query the model string of a specified host CPU.
6798 </desc>
6799 <param name="cpuId" type="unsigned long" dir="in">
6800 <desc>
6801 Identifier of the CPU.
6802 <note>
6803 The current implementation might not necessarily return the
6804 description for this exact CPU.
6805 </note>
6806 </desc>
6807 </param>
6808 <param name="description" type="wstring" dir="return">
6809 <desc>
6810 Model string. An empty string is returned if value is not known or
6811 @a cpuId is invalid.
6812 </desc>
6813 </param>
6814 </method>
6815
6816 <method name="getProcessorCPUIDLeaf">
6817 <desc>
6818 Returns the CPU cpuid information for the specified leaf.
6819 </desc>
6820 <param name="cpuId" type="unsigned long" dir="in">
6821 <desc>
6822 Identifier of the CPU. The CPU most be online.
6823 <note>
6824 The current implementation might not necessarily return the
6825 description for this exact CPU.
6826 </note>
6827 </desc>
6828 </param>
6829 <param name="leaf" type="unsigned long" dir="in">
6830 <desc>
6831 CPUID leaf index (eax).
6832 </desc>
6833 </param>
6834 <param name="subLeaf" type="unsigned long" dir="in">
6835 <desc>
6836 CPUID leaf sub index (ecx). This currently only applies to cache
6837 information on Intel CPUs. Use 0 if retriving values for
6838 <link to="IMachine::setCPUIDLeaf"/>.
6839 </desc>
6840 </param>
6841 <param name="valEax" type="unsigned long" dir="out">
6842 <desc>
6843 CPUID leaf value for register eax.
6844 </desc>
6845 </param>
6846 <param name="valEbx" type="unsigned long" dir="out">
6847 <desc>
6848 CPUID leaf value for register ebx.
6849 </desc>
6850 </param>
6851 <param name="valEcx" type="unsigned long" dir="out">
6852 <desc>
6853 CPUID leaf value for register ecx.
6854 </desc>
6855 </param>
6856 <param name="valEdx" type="unsigned long" dir="out">
6857 <desc>
6858 CPUID leaf value for register edx.
6859 </desc>
6860 </param>
6861 </method>
6862
6863 <attribute name="memorySize" type="unsigned long" readonly="yes">
6864 <desc>Amount of system memory in megabytes installed in the host system.</desc>
6865 </attribute>
6866
6867 <attribute name="memoryAvailable" type="unsigned long" readonly="yes">
6868 <desc>Available system memory in the host system.</desc>
6869 </attribute>
6870
6871 <attribute name="operatingSystem" type="wstring" readonly="yes">
6872 <desc>Name of the host system's operating system.</desc>
6873 </attribute>
6874
6875 <attribute name="OSVersion" type="wstring" readonly="yes">
6876 <desc>Host operating system's version string.</desc>
6877 </attribute>
6878
6879 <attribute name="UTCTime" type="long long" readonly="yes">
6880 <desc>Returns the current host time in milliseconds since 1970-01-01 UTC.</desc>
6881 </attribute>
6882
6883 <attribute name="Acceleration3DAvailable" type="boolean" readonly="yes">
6884 <desc>Returns @c true when the host supports 3D hardware acceleration.</desc>
6885 </attribute>
6886
6887 <method name="createHostOnlyNetworkInterface">
6888 <desc>
6889 Creates a new adapter for Host Only Networking.
6890 <result name="E_INVALIDARG">
6891 Host network interface @a name already exists.
6892 </result>
6893 </desc>
6894 <param name="hostInterface" type="IHostNetworkInterface" dir="out">
6895 <desc>
6896 Created host interface object.
6897 </desc>
6898 </param>
6899 <param name="progress" type="IProgress" dir="return">
6900 <desc>
6901 Progress object to track the operation completion.
6902 </desc>
6903 </param>
6904 </method>
6905
6906 <method name="removeHostOnlyNetworkInterface">
6907 <desc>
6908 Removes the given Host Only Networking interface.
6909 <result name="VBOX_E_OBJECT_NOT_FOUND">
6910 No host network interface matching @a id found.
6911 </result>
6912 </desc>
6913 <param name="id" type="uuid" mod="string" dir="in">
6914 <desc>
6915 Adapter GUID.
6916 </desc>
6917 </param>
6918 <param name="progress" type="IProgress" dir="return">
6919 <desc>
6920 Progress object to track the operation completion.
6921 </desc>
6922 </param>
6923 </method>
6924
6925 <method name="createUSBDeviceFilter">
6926 <desc>
6927 Creates a new USB device filter. All attributes except
6928 the filter name are set to empty (any match),
6929 <i>active</i> is @c false (the filter is not active).
6930
6931 The created filter can be added to the list of filters using
6932 <link to="#insertUSBDeviceFilter"/>.
6933
6934 <see>#USBDeviceFilters</see>
6935 </desc>
6936 <param name="name" type="wstring" dir="in">
6937 <desc>
6938 Filter name. See <link to="IUSBDeviceFilter::name"/> for more information.
6939 </desc>
6940 </param>
6941 <param name="filter" type="IHostUSBDeviceFilter" dir="return">
6942 <desc>Created filter object.</desc>
6943 </param>
6944 </method>
6945
6946 <method name="insertUSBDeviceFilter">
6947 <desc>
6948 Inserts the given USB device to the specified position
6949 in the list of filters.
6950
6951 Positions are numbered starting from @c 0. If the specified
6952 position is equal to or greater than the number of elements in
6953 the list, the filter is added at the end of the collection.
6954
6955 <note>
6956 Duplicates are not allowed, so an attempt to insert a
6957 filter already in the list is an error.
6958 </note>
6959 <note>
6960 If USB functionality is not available in the given edition of
6961 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6962 </note>
6963
6964 <see>#USBDeviceFilters</see>
6965
6966 <result name="VBOX_E_INVALID_OBJECT_STATE">
6967 USB device filter is not created within this VirtualBox instance.
6968 </result>
6969 <result name="E_INVALIDARG">
6970 USB device filter already in list.
6971 </result>
6972
6973 </desc>
6974 <param name="position" type="unsigned long" dir="in">
6975 <desc>Position to insert the filter to.</desc>
6976 </param>
6977 <param name="filter" type="IHostUSBDeviceFilter" dir="in">
6978 <desc>USB device filter to insert.</desc>
6979 </param>
6980 </method>
6981
6982 <method name="removeUSBDeviceFilter">
6983 <desc>
6984 Removes a USB device filter from the specified position in the
6985 list of filters.
6986
6987 Positions are numbered starting from @c 0. Specifying a
6988 position equal to or greater than the number of elements in
6989 the list will produce an error.
6990
6991 <note>
6992 If USB functionality is not available in the given edition of
6993 VirtualBox, this method will set the result code to @c E_NOTIMPL.
6994 </note>
6995
6996 <see>#USBDeviceFilters</see>
6997
6998 <result name="E_INVALIDARG">
6999 USB device filter list empty or invalid @a position.
7000 </result>
7001
7002 </desc>
7003 <param name="position" type="unsigned long" dir="in">
7004 <desc>Position to remove the filter from.</desc>
7005 </param>
7006 </method>
7007
7008 <method name="findHostDVDDrive">
7009 <desc>
7010 Searches for a host DVD drive with the given @c name.
7011
7012 <result name="VBOX_E_OBJECT_NOT_FOUND">
7013 Given @c name does not correspond to any host drive.
7014 </result>
7015
7016 </desc>
7017 <param name="name" type="wstring" dir="in">
7018 <desc>Name of the host drive to search for</desc>
7019 </param>
7020 <param name="drive" type="IMedium" dir="return">
7021 <desc>Found host drive object</desc>
7022 </param>
7023 </method>
7024
7025 <method name="findHostFloppyDrive">
7026 <desc>
7027 Searches for a host floppy drive with the given @c name.
7028
7029 <result name="VBOX_E_OBJECT_NOT_FOUND">
7030 Given @c name does not correspond to any host floppy drive.
7031 </result>
7032
7033 </desc>
7034 <param name="name" type="wstring" dir="in">
7035 <desc>Name of the host floppy drive to search for</desc>
7036 </param>
7037 <param name="drive" type="IMedium" dir="return">
7038 <desc>Found host floppy drive object</desc>
7039 </param>
7040 </method>
7041
7042 <method name="findHostNetworkInterfaceByName">
7043 <desc>
7044 Searches through all host network interfaces for an interface with
7045 the given @c name.
7046 <note>
7047 The method returns an error if the given @c name does not
7048 correspond to any host network interface.
7049 </note>
7050 </desc>
7051 <param name="name" type="wstring" dir="in">
7052 <desc>Name of the host network interface to search for.</desc>
7053 </param>
7054 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7055 <desc>Found host network interface object.</desc>
7056 </param>
7057 </method>
7058 <method name="findHostNetworkInterfaceById">
7059 <desc>
7060 Searches through all host network interfaces for an interface with
7061 the given GUID.
7062 <note>
7063 The method returns an error if the given GUID does not
7064 correspond to any host network interface.
7065 </note>
7066 </desc>
7067 <param name="id" type="uuid" mod="string" dir="in">
7068 <desc>GUID of the host network interface to search for.</desc>
7069 </param>
7070 <param name="networkInterface" type="IHostNetworkInterface" dir="return">
7071 <desc>Found host network interface object.</desc>
7072 </param>
7073 </method>
7074 <method name="findHostNetworkInterfacesOfType">
7075 <desc>
7076 Searches through all host network interfaces and returns a list of interfaces of the specified type
7077 </desc>
7078 <param name="type" type="HostNetworkInterfaceType" dir="in">
7079 <desc>type of the host network interfaces to search for.</desc>
7080 </param>
7081 <param name="networkInterfaces" type="IHostNetworkInterface" safearray="yes" dir="return">
7082 <desc>Found host network interface objects.</desc>
7083 </param>
7084 </method>
7085
7086 <method name="findUSBDeviceById">
7087 <desc>
7088 Searches for a USB device with the given UUID.
7089
7090 <result name="VBOX_E_OBJECT_NOT_FOUND">
7091 Given @c id does not correspond to any USB device.
7092 </result>
7093
7094 <see>IHostUSBDevice::id</see>
7095 </desc>
7096 <param name="id" type="uuid" mod="string" dir="in">
7097 <desc>UUID of the USB device to search for.</desc>
7098 </param>
7099 <param name="device" type="IHostUSBDevice" dir="return">
7100 <desc>Found USB device object.</desc>
7101 </param>
7102 </method>
7103
7104 <method name="findUSBDeviceByAddress">
7105 <desc>
7106 Searches for a USB device with the given host address.
7107
7108 <result name="VBOX_E_OBJECT_NOT_FOUND">
7109 Given @c name does not correspond to any USB device.
7110 </result>
7111
7112 <see>IHostUSBDevice::address</see>
7113 </desc>
7114 <param name="name" type="wstring" dir="in">
7115 <desc>
7116 Address of the USB device (as assigned by the host) to
7117 search for.
7118 </desc>
7119 </param>
7120 <param name="device" type="IHostUSBDevice" dir="return">
7121 <desc>Found USB device object.</desc>
7122 </param>
7123 </method>
7124
7125 </interface>
7126
7127 <!--
7128 // ISystemProperties
7129 /////////////////////////////////////////////////////////////////////////
7130 -->
7131
7132 <interface
7133 name="ISystemProperties"
7134 extends="$unknown"
7135 uuid="07c3ffd8-8f59-49cc-b608-53a332e85cc3"
7136 wsmap="managed"
7137 >
7138 <desc>
7139 The ISystemProperties interface represents global properties of the given
7140 VirtualBox installation.
7141
7142 These properties define limits and default values for various attributes
7143 and parameters. Most of the properties are read-only, but some can be
7144 changed by a user.
7145 </desc>
7146
7147 <attribute name="minGuestRAM" type="unsigned long" readonly="yes">
7148 <desc>Minimum guest system memory in Megabytes.</desc>
7149 </attribute>
7150
7151 <attribute name="maxGuestRAM" type="unsigned long" readonly="yes">
7152 <desc>Maximum guest system memory in Megabytes.</desc>
7153 </attribute>
7154
7155 <attribute name="minGuestVRAM" type="unsigned long" readonly="yes">
7156 <desc>Minimum guest video memory in Megabytes.</desc>
7157 </attribute>
7158
7159 <attribute name="maxGuestVRAM" type="unsigned long" readonly="yes">
7160 <desc>Maximum guest video memory in Megabytes.</desc>
7161 </attribute>
7162
7163 <attribute name="minGuestCPUCount" type="unsigned long" readonly="yes">
7164 <desc>Minimum CPU count.</desc>
7165 </attribute>
7166
7167 <attribute name="maxGuestCPUCount" type="unsigned long" readonly="yes">
7168 <desc>Maximum CPU count.</desc>
7169 </attribute>
7170
7171 <attribute name="maxGuestMonitors" type="unsigned long" readonly="yes">
7172 <desc>Maximum of monitors which could be connected.</desc>
7173 </attribute>
7174
7175 <attribute name="maxVDISize" type="unsigned long long" readonly="yes">
7176 <desc>Maximum size of a virtual disk image in Megabytes.</desc>
7177 </attribute>
7178
7179 <attribute name="networkAdapterCount" type="unsigned long" readonly="yes">
7180 <desc>
7181 Number of network adapters associated with every
7182 <link to="IMachine"/> instance.
7183 </desc>
7184 </attribute>
7185
7186 <attribute name="serialPortCount" type="unsigned long" readonly="yes">
7187 <desc>
7188 Number of serial ports associated with every
7189 <link to="IMachine"/> instance.
7190 </desc>
7191 </attribute>
7192
7193 <attribute name="parallelPortCount" type="unsigned long" readonly="yes">
7194 <desc>
7195 Number of parallel ports associated with every
7196 <link to="IMachine"/> instance.
7197 </desc>
7198 </attribute>
7199
7200 <attribute name="maxBootPosition" type="unsigned long" readonly="yes">
7201 <desc>
7202 Maximum device position in the boot order. This value corresponds
7203 to the total number of devices a machine can boot from, to make it
7204 possible to include all possible devices to the boot list.
7205 <see><link to="IMachine::setBootOrder"/></see>
7206 </desc>
7207 </attribute>
7208
7209 <attribute name="defaultMachineFolder" type="wstring">
7210 <desc>
7211 Full path to the default directory used to create new or open
7212 existing machines when a settings file name contains no
7213 path.
7214
7215 The initial value of this property is
7216 <tt>&lt;</tt><link to="IVirtualBox::homeFolder">
7217 VirtualBox_home</link><tt>&gt;/Machines</tt>.
7218
7219 <note>
7220 Setting this property to @c null or an empty string will restore the
7221 initial value.
7222 </note>
7223 <note>
7224 When settings this property, the specified path can be
7225 absolute (full path) or relative
7226 to the <link to="IVirtualBox::homeFolder">
7227 VirtualBox home directory</link>.
7228 When reading this property, a full path is
7229 always returned.
7230 </note>
7231 <note>
7232 The specified path may not exist, it will be created
7233 when necessary.
7234 </note>
7235
7236 <see>
7237 <link to="IVirtualBox::createMachine"/>,
7238 <link to="IVirtualBox::openMachine"/>
7239 </see>
7240 </desc>
7241 </attribute>
7242
7243 <attribute name="defaultHardDiskFolder" type="wstring">
7244 <desc>
7245 Full path to the default directory used to create new or open existing
7246 virtual disks.
7247
7248 This path is used when the storage unit of a hard disk is a regular file
7249 in the host's file system and only a file name that contains no path is
7250 given.
7251
7252 The initial value of this property is
7253 <tt>&lt;</tt>
7254 <link to="IVirtualBox::homeFolder">VirtualBox_home</link>
7255 <tt>&gt;/HardDisks</tt>.
7256
7257 <note>
7258 Setting this property to @c null or empty string will restore the
7259 initial value.
7260 </note>
7261 <note>
7262 When settings this property, the specified path can be relative
7263 to the
7264 <link to="IVirtualBox::homeFolder">VirtualBox home directory</link> or
7265 absolute. When reading this property, a full path is
7266 always returned.
7267 </note>
7268 <note>
7269 The specified path may not exist, it will be created
7270 when necessary.
7271 </note>
7272
7273 <see>
7274 IMedium,
7275 <link to="IVirtualBox::createHardDisk"/>,
7276 <link to="IVirtualBox::openMedium"/>,
7277 <link to="IMedium::location"/>
7278 </see>
7279 </desc>
7280 </attribute>
7281
7282 <attribute name="mediumFormats" type="IMediumFormat" safearray="yes" readonly="yes">
7283 <desc>
7284 List of all medium storage formats supported by this VirtualBox
7285 installation.
7286
7287 Keep in mind that the medium format identifier
7288 (<link to="IMediumFormat::id"/>) used in other API calls like
7289 <link to="IVirtualBox::createHardDisk"/> to refer to a particular
7290 medium format is a case-insensitive string. This means that, for
7291 example, all of the following strings:
7292 <pre>
7293 "VDI"
7294 "vdi"
7295 "VdI"</pre>
7296 refer to the same medium format.
7297
7298 Note that the virtual medium framework is backend-based, therefore
7299 the list of supported formats depends on what backends are currently
7300 installed.
7301
7302 <see>
7303 <link to="IMediumFormat"/>,
7304 </see>
7305 </desc>
7306 </attribute>
7307
7308 <attribute name="defaultHardDiskFormat" type="wstring">
7309 <desc>
7310 Identifier of the default medium format used by VirtualBox.
7311
7312 The medium format set by this attribute is used by VirtualBox
7313 when the medium format was not specified explicitly. One example is
7314 <link to="IVirtualBox::createHardDisk"/> with the empty
7315 format argument. A more complex example is implicit creation of
7316 differencing media when taking a snapshot of a virtual machine:
7317 this operation will try to use a format of the parent medium first
7318 and if this format does not support differencing media the default
7319 format specified by this argument will be used.
7320
7321 The list of supported medium formats may be obtained by the
7322 <link to="#mediumFormats"/> call. Note that the default medium
7323 format must have a capability to create differencing media;
7324 otherwise operations that create media implicitly may fail
7325 unexpectedly.
7326
7327 The initial value of this property is <tt>"VDI"</tt> in the current
7328 version of the VirtualBox product, but may change in the future.
7329
7330 <note>
7331 Setting this property to @c null or empty string will restore the
7332 initial value.
7333 </note>
7334
7335 <see>
7336 <link to="#mediumFormats"/>,
7337 <link to="IMediumFormat::id"/>,
7338 <link to="IVirtualBox::createHardDisk"/>
7339 </see>
7340 </desc>
7341 </attribute>
7342
7343 <attribute name="freeDiskSpaceWarning" type="unsigned long long">
7344 <desc>Issue a warning if the free disk space is below (or in some disk
7345 intensive operation is expected to go below) the given size in
7346 Megabytes.</desc>
7347 </attribute>
7348
7349 <attribute name="freeDiskSpacePercentWarning" type="unsigned long">
7350 <desc>Issue a warning if the free disk space is below (or in some disk
7351 intensive operation is expected to go below) the given percentage.</desc>
7352 </attribute>
7353
7354 <attribute name="freeDiskSpaceError" type="unsigned long long">
7355 <desc>Issue an error if the free disk space is below (or in some disk
7356 intensive operation is expected to go below) the given size in
7357 Megabytes.</desc>
7358 </attribute>
7359
7360 <attribute name="freeDiskSpacePercentError" type="unsigned long">
7361 <desc>Issue an error if the free disk space is below (or in some disk
7362 intensive operation is expected to go below) the given percentage.</desc>
7363 </attribute>
7364
7365 <attribute name="remoteDisplayAuthLibrary" type="wstring">
7366 <desc>
7367 Library that provides authentication for VRDP clients. The library
7368 is used if a virtual machine's authentication type is set to "external"
7369 in the VM RemoteDisplay configuration.
7370
7371 The system library extension (".DLL" or ".so") must be omitted.
7372 A full path can be specified; if not, then the library must reside on the
7373 system's default library path.
7374
7375 The default value of this property is <tt>"VRDPAuth"</tt>. There is a library
7376 of that name in one of the default VirtualBox library directories.
7377
7378 For details about VirtualBox authentication libraries and how to implement
7379 them, please refer to the VirtualBox manual.
7380
7381 <note>
7382 Setting this property to @c null or empty string will restore the
7383 initial value.
7384 </note>
7385 </desc>
7386 </attribute>
7387
7388 <attribute name="webServiceAuthLibrary" type="wstring">
7389 <desc>
7390 Library that provides authentication for webservice clients. The library
7391 is used if a virtual machine's authentication type is set to "external"
7392 in the VM RemoteDisplay configuration and will be called from
7393 within the <link to="IWebsessionManager::logon" /> implementation.
7394
7395 As opposed to <link to="ISystemProperties::remoteDisplayAuthLibrary" />,
7396 there is no per-VM setting for this, as the webservice is a global
7397 resource (if it is running). Only for this setting (for the webservice),
7398 setting this value to a literal <tt>"null"</tt> string disables authentication,
7399 meaning that <link to="IWebsessionManager::logon" /> will always succeed,
7400 no matter what user name and password are supplied.
7401
7402 The initial value of this property is <tt>"VRDPAuth"</tt>,
7403 meaning that the webservice will use the same authentication
7404 library that is used by default for VBoxVRDP (again, see
7405 <link to="ISystemProperties::remoteDisplayAuthLibrary" />).
7406 The format and calling convention of authentication libraries
7407 is the same for the webservice as it is for VBoxVRDP.
7408
7409 <note>
7410 Setting this property to @c null or empty string will restore the
7411 initial value.
7412 </note>
7413 </desc>
7414 </attribute>
7415
7416 <attribute name="LogHistoryCount" type="unsigned long">
7417 <desc>
7418 This value specifies how many old release log files are kept.
7419 </desc>
7420 </attribute>
7421
7422 <attribute name="defaultAudioDriver" type="AudioDriverType" readonly="yes">
7423 <desc>This value hold the default audio driver for the current
7424 system.</desc>
7425 </attribute>
7426
7427 <method name="getMaxDevicesPerPortForStorageBus">
7428 <desc>Returns the maximum number of devices which can be attached to a port
7429 for the given storage bus.</desc>
7430
7431 <param name="bus" type="StorageBus" dir="in">
7432 <desc>The storage bus type to get the value for.</desc>
7433 </param>
7434
7435 <param name="maxDevicesPerPort" type="unsigned long" dir="return">
7436 <desc>The maximum number of devices which can eb attached to the port for the given
7437 storage bus.</desc>
7438 </param>
7439 </method>
7440
7441 <method name="getMinPortCountForStorageBus">
7442 <desc>Returns the minimum number of ports the given storage bus supports.</desc>
7443
7444 <param name="bus" type="StorageBus" dir="in">
7445 <desc>The storage bus type to get the value for.</desc>
7446 </param>
7447
7448 <param name="minPortCount" type="unsigned long" dir="return">
7449 <desc>The minimum number of ports for the given storage bus.</desc>
7450 </param>
7451 </method>
7452
7453 <method name="getMaxPortCountForStorageBus">
7454 <desc>Returns the maximum number of ports the given storage bus supports.</desc>
7455
7456 <param name="bus" type="StorageBus" dir="in">
7457 <desc>The storage bus type to get the value for.</desc>
7458 </param>
7459
7460 <param name="maxPortCount" type="unsigned long" dir="return">
7461 <desc>The maximum number of ports for the given storage bus.</desc>
7462 </param>
7463 </method>
7464
7465 <method name="getMaxInstancesOfStorageBus">
7466 <desc>Returns the maximum number of storage bus instances which
7467 can be configured for each VM. This corresponds to the number of
7468 storage controllers one can have.</desc>
7469
7470 <param name="bus" type="StorageBus" dir="in">
7471 <desc>The storage bus type to get the value for.</desc>
7472 </param>
7473
7474 <param name="maxInstances" type="unsigned long" dir="return">
7475 <desc>The maximum number of instances for the given storage bus.</desc>
7476 </param>
7477 </method>
7478
7479 <method name="getDeviceTypesForStorageBus">
7480 <desc>Returns list of all the supported device types
7481 (<link to="DeviceType"/>) for the given type of storage
7482 bus.</desc>
7483
7484 <param name="bus" type="StorageBus" dir="in">
7485 <desc>The storage bus type to get the value for.</desc>
7486 </param>
7487
7488 <param name="deviceTypes" type="DeviceType" safearray="yes" dir="return">
7489 <desc>The list of all supported device types for the given storage bus.</desc>
7490 </param>
7491 </method>
7492 </interface>
7493
7494 <!--
7495 // IGuest
7496 /////////////////////////////////////////////////////////////////////////
7497 -->
7498
7499 <interface
7500 name="IGuestOSType" extends="$unknown"
7501 uuid="e3f6727e-a09b-41ea-a824-864a176472f3"
7502 wsmap="struct"
7503 >
7504 <desc>
7505 </desc>
7506
7507 <attribute name="familyId" type="wstring" readonly="yes">
7508 <desc>Guest OS family identifier string.</desc>
7509 </attribute>
7510
7511 <attribute name="familyDescription" type="wstring" readonly="yes">
7512 <desc>Human readable description of the guest OS family.</desc>
7513 </attribute>
7514
7515 <attribute name="id" type="wstring" readonly="yes">
7516 <desc>Guest OS identifier string.</desc>
7517 </attribute>
7518
7519 <attribute name="description" type="wstring" readonly="yes">
7520 <desc>Human readable description of the guest OS.</desc>
7521 </attribute>
7522
7523 <attribute name="is64Bit" type="boolean" readonly="yes">
7524 <desc>Returns @c true if the given OS is 64-bit</desc>
7525 </attribute>
7526
7527 <attribute name="recommendedIOAPIC" type="boolean" readonly="yes">
7528 <desc>Returns @c true if IO APIC recommended for this OS type.</desc>
7529 </attribute>
7530
7531 <attribute name="recommendedVirtEx" type="boolean" readonly="yes">
7532 <desc>Returns @c true if VT-x or AMD-V recommended for this OS type.</desc>
7533 </attribute>
7534
7535 <attribute name="recommendedRAM" type="unsigned long" readonly="yes">
7536 <desc>Recommended RAM size in Megabytes.</desc>
7537 </attribute>
7538
7539 <attribute name="recommendedVRAM" type="unsigned long" readonly="yes">
7540 <desc>Recommended video RAM size in Megabytes.</desc>
7541 </attribute>
7542
7543 <attribute name="recommendedHDD" type="unsigned long" readonly="yes">
7544 <desc>Recommended hard disk size in Megabytes.</desc>
7545 </attribute>
7546
7547 <attribute name="adapterType" type="NetworkAdapterType" readonly="yes">
7548 <desc>Returns recommended network adapter for this OS type.</desc>
7549 </attribute>
7550
7551 <attribute name="recommendedPae" type="boolean" readonly="yes">
7552 <desc>Returns @c true if using PAE is recommended for this OS type.</desc>
7553 </attribute>
7554
7555 <attribute name="recommendedDvdStorageController" type="StorageControllerType" readonly="yes">
7556 <desc>Recommended storage controller type for DVD/CD drives.</desc>
7557 </attribute>
7558
7559 <attribute name="recommendedDvdStorageBus" type="StorageBus" readonly="yes">
7560 <desc>Recommended storage bus type for DVD/CD drives.</desc>
7561 </attribute>
7562
7563 <attribute name="recommendedHdStorageController" type="StorageControllerType" readonly="yes">
7564 <desc>Recommended storage controller type for HD drives.</desc>
7565 </attribute>
7566
7567 <attribute name="recommendedHdStorageBus" type="StorageBus" readonly="yes">
7568 <desc>Recommended storage bus type for HD drives.</desc>
7569 </attribute>
7570
7571 <attribute name="recommendedFirmware" type="FirmwareType" readonly="yes">
7572 <desc>Recommended firmware type.</desc>
7573 </attribute>
7574
7575 <attribute name="recommendedUsbHid" type="boolean" readonly="yes">
7576 <desc>Returns @c true if using USB Human Interface Devices, such as keyboard and mouse recommended.</desc>
7577 </attribute>
7578
7579 <attribute name="recommendedHpet" type="boolean" readonly="yes">
7580 <desc>Returns @c true if using HPET is recommended for this OS type.</desc>
7581 </attribute>
7582
7583 <attribute name="recommendedUsbTablet" type="boolean" readonly="yes">
7584 <desc>Returns @c true if using a USB Tablet is recommended.</desc>
7585 </attribute>
7586
7587 <attribute name="recommendedRtcUseUtc" type="boolean" readonly="yes">
7588 <desc>Returns @c true if the RTC of this VM should be set to UTC</desc>
7589 </attribute>
7590
7591 </interface>
7592
7593 <interface
7594 name="IGuest" extends="$unknown"
7595 uuid="506da00d-1ca5-4ccf-851d-8683253d0f5e"
7596 wsmap="managed"
7597 >
7598 <desc>
7599 The IGuest interface represents information about the operating system
7600 running inside the virtual machine. Used in
7601 <link to="IConsole::guest"/>.
7602
7603 IGuest provides information about the guest operating system, whether
7604 Guest Additions are installed and other OS-specific virtual machine
7605 properties.
7606 </desc>
7607
7608 <attribute name="OSTypeId" type="wstring" readonly="yes">
7609 <desc>
7610 Identifier of the Guest OS type as reported by the Guest
7611 Additions.
7612 You may use <link to="IVirtualBox::getGuestOSType"/> to obtain
7613 an IGuestOSType object representing details about the given
7614 Guest OS type.
7615 <note>
7616 If Guest Additions are not installed, this value will be
7617 the same as <link to="IMachine::OSTypeId"/>.
7618 </note>
7619 </desc>
7620 </attribute>
7621
7622 <attribute name="additionsActive" type="boolean" readonly="yes">
7623 <desc>
7624 Flag whether the Guest Additions are installed and active
7625 in which case their version will be returned by the
7626 <link to="#additionsVersion"/> property.
7627 </desc>
7628 </attribute>
7629
7630 <attribute name="additionsVersion" type="wstring" readonly="yes">
7631 <desc>
7632 Version of the Guest Additions including the revision (3 decimal numbers
7633 separated by dots + revision number) installed on the guest or empty
7634 when the Additions are not installed.
7635 </desc>
7636 </attribute>
7637
7638 <attribute name="supportsSeamless" type="boolean" readonly="yes">
7639 <desc>
7640 Flag whether seamless guest display rendering (seamless desktop
7641 integration) is supported.
7642 </desc>
7643 </attribute>
7644
7645 <attribute name="supportsGraphics" type="boolean" readonly="yes">
7646 <desc>
7647 Flag whether the guest is in graphics mode. If it is not, then
7648 seamless rendering will not work, resize hints are not immediately
7649 acted on and guest display resizes are probably not initiated by
7650 the guest additions.
7651 </desc>
7652 </attribute>
7653
7654 <attribute name="memoryBalloonSize" type="unsigned long">
7655 <desc>Guest system memory balloon size in megabytes (transient property).</desc>
7656 </attribute>
7657
7658 <attribute name="statisticsUpdateInterval" type="unsigned long">
7659 <desc>Interval to update guest statistics in seconds.</desc>
7660 </attribute>
7661
7662 <method name="internalGetStatistics">
7663 <desc>
7664 Internal method; do not use as it might change at any time
7665 </desc>
7666 <param name="cpuUser" type="unsigned long" dir="out">
7667 <desc>Percentage of processor time spent in user mode as seen by the guest</desc>
7668 </param>
7669 <param name="cpuKernel" type="unsigned long" dir="out">
7670 <desc>Percentage of processor time spent in kernel mode as seen by the guest</desc>
7671 </param>
7672 <param name="cpuIdle" type="unsigned long" dir="out">
7673 <desc>Percentage of processor time spent idling as seen by the guest</desc>
7674 </param>
7675 <param name="memTotal" type="unsigned long" dir="out">
7676 <desc>Total amount of physical guest RAM</desc>
7677 </param>
7678 <param name="memFree" type="unsigned long" dir="out">
7679 <desc>Free amount of physical guest RAM</desc>
7680 </param>
7681 <param name="memBalloon" type="unsigned long" dir="out">
7682 <desc>Amount of ballooned physical guest RAM</desc>
7683 </param>
7684 <param name="memShared" type="unsigned long" dir="out">
7685 <desc>Amount of shared physical guest RAM</desc>
7686 </param>
7687 <param name="memCache" type="unsigned long" dir="out">
7688 <desc>Total amount of guest (disk) cache memory</desc>
7689 </param>
7690 <param name="pagedTotal" type="unsigned long" dir="out">
7691 <desc>Total amount of space in the page file</desc>
7692 </param>
7693 <param name="memAllocTotal" type="unsigned long" dir="out">
7694 <desc>Total amount of memory allocated by the hypervisor</desc>
7695 </param>
7696 <param name="memFreeTotal" type="unsigned long" dir="out">
7697 <desc>Total amount of free memory available in the hypervisor</desc>
7698 </param>
7699 <param name="memBalloonTotal" type="unsigned long" dir="out">
7700 <desc>Total amount of memory ballooned by the hypervisor</desc>
7701 </param>
7702 <param name="memSharedTotal" type="unsigned long" dir="out">
7703 <desc>Total amount of shared memory in the hypervisor</desc>
7704 </param>
7705 </method>
7706
7707 <method name="setCredentials">
7708 <desc>
7709 Store login credentials that can be queried by guest operating
7710 systems with Additions installed. The credentials are transient
7711 to the session and the guest may also choose to erase them. Note
7712 that the caller cannot determine whether the guest operating system
7713 has queried or made use of the credentials.
7714
7715 <result name="VBOX_E_VM_ERROR">
7716 VMM device is not available.
7717 </result>
7718
7719 </desc>
7720 <param name="userName" type="wstring" dir="in">
7721 <desc>User name string, can be empty</desc>
7722 </param>
7723 <param name="password" type="wstring" dir="in">
7724 <desc>Password string, can be empty</desc>
7725 </param>
7726 <param name="domain" type="wstring" dir="in">
7727 <desc>Domain name (guest logon scheme specific), can be empty</desc>
7728 </param>
7729 <param name="allowInteractiveLogon" type="boolean" dir="in">
7730 <desc>
7731 Flag whether the guest should alternatively allow the user to
7732 interactively specify different credentials. This flag might
7733 not be supported by all versions of the Additions.
7734 </desc>
7735 </param>
7736 </method>
7737
7738 <method name="executeProcess">
7739 <desc>
7740 Executes an existing program inside the guest VM.
7741
7742 <result name="VBOX_E_IPRT_ERROR">
7743 Could not execute process.
7744 </result>
7745
7746 </desc>
7747 <param name="execName" type="wstring" dir="in">
7748 <desc>
7749 Full path name of the command to execute on the guest; the
7750 commands has to exists in the guest VM in order to be executed.
7751 </desc>
7752 </param>
7753 <param name="flags" type="unsigned long" dir="in">
7754 <desc>
7755 Execution flags - currently not supported and therefore
7756 has to be set to 0.
7757 </desc>
7758 </param>
7759 <param name="arguments" type="wstring" safearray="yes" dir="in">
7760 <desc>
7761 Array of arguments passed to the execution command.
7762 </desc>
7763 </param>
7764 <param name="environment" type="wstring" safearray="yes" dir="in">
7765 <desc>
7766 Environment variables that can be set while the command is being
7767 executed, in form of "NAME=VALUE"; one pair per entry. To unset a
7768 variable just set its name ("NAME") without a value.
7769 </desc>
7770 </param>
7771 <param name="userName" type="wstring" dir="in">
7772 <desc>
7773 User name under which the command will be executed; has to exist
7774 and have the appropriate rights to execute programs in the VM.
7775 </desc>
7776 </param>
7777 <param name="password" type="wstring" dir="in">
7778 <desc>
7779 Password of the user account specified.
7780 </desc>
7781 </param>
7782 <param name="timeoutMS" type="unsigned long" dir="in">
7783 <desc>
7784 The maximum timeout value (in msec) to wait for finished program
7785 execution. Pass 0 for an infinite timeout.
7786 </desc>
7787 </param>
7788 <param name="pid" type="unsigned long" dir="out">
7789 <desc>
7790 The PID (process ID) of the started command for later reference.
7791 </desc>
7792 </param>
7793 <param name="progress" type="IProgress" dir="return">
7794 <desc>Progress object to track the operation completion.</desc>
7795 </param>
7796 </method>
7797
7798 <method name="getProcessOutput">
7799 <desc>
7800 Retrieves output of a formerly started process.
7801
7802 <result name="VBOX_E_IPRT_ERROR">
7803 Could not retrieve output.
7804 </result>
7805
7806 </desc>
7807 <param name="pid" type="unsigned long" dir="in">
7808 <desc>
7809 Process id returned by earlier executeProcess() call.
7810 </desc>
7811 </param>
7812 <param name="flags" type="unsigned long" dir="in">
7813 <desc>
7814 Flags describing which output to retrieve.
7815 </desc>
7816 </param>
7817 <param name="timeoutMS" type="unsigned long" dir="in">
7818 <desc>
7819 The maximum timeout value (in msec) to wait for output
7820 data. Pass 0 for an infinite timeout.
7821 </desc>
7822 </param>
7823 <param name="size" type="unsigned long long" dir="in">
7824 <desc>
7825 Size in bytes to read in the buffer.
7826 </desc>
7827 </param>
7828 <param name="data" type="octet" dir="return" safearray="yes">
7829 <desc>
7830 Buffer for retrieving the actual output. A data size of 0 means end of file
7831 if the requested size was not 0. This is the unprocessed
7832 output data, i.e. the line ending style depends on the platform of
7833 the system the server is running on.
7834 </desc>
7835 </param>
7836 </method>
7837
7838 <method name="getProcessStatus">
7839 <desc>
7840 Retrieves status, exit code and the exit reason of a formerly started process.
7841
7842 <result name="VBOX_E_IPRT_ERROR">
7843 Process with specified PID was not found.
7844 </result>
7845
7846 </desc>
7847 <param name="pid" type="unsigned long" dir="in">
7848 <desc>
7849 Process id returned by earlier executeProcess() call.
7850 </desc>
7851 </param>
7852 <param name="exitcode" type="unsigned long" dir="out">
7853 <desc>
7854 The exit code (if available).
7855 </desc>
7856 </param>
7857 <param name="flags" type="unsigned long" dir="out">
7858 <desc>
7859 Additional flags of process status (not used at the moment).
7860 </desc>
7861 </param>
7862 <param name="reason" type="unsigned long" dir="return">
7863 <desc>
7864 The current process status.
7865 </desc>
7866 </param>
7867 </method>
7868
7869 </interface>
7870
7871
7872 <!--
7873 // IProgress
7874 /////////////////////////////////////////////////////////////////////////
7875 -->
7876
7877 <interface
7878 name="IProgress" extends="$unknown"
7879 uuid="A163C98F-8635-4AA8-B770-A9941737F3EF"
7880 wsmap="managed"
7881 >
7882 <desc>
7883 The IProgress interface is used to track and control
7884 asynchronous tasks within VirtualBox.
7885
7886 An instance of this is returned every time VirtualBox starts
7887 an asynchronous task (in other words, a separate thread) which
7888 continues to run after a method call returns. For example,
7889 <link to="IConsole::saveState" />, which saves the state of
7890 a running virtual machine, can take a long time to complete.
7891 To be able to display a progress bar, a user interface such as
7892 the VirtualBox graphical user interface can use the IProgress
7893 object returned by that method.
7894
7895 Note that IProgress is a "read-only" interface in the sense
7896 that only the VirtualBox internals behind the Main API can
7897 create and manipulate progress objects, whereas client code
7898 can only use the IProgress object to monitor a task's
7899 progress and, if <link to="#cancelable" /> is @c true,
7900 cancel the task by calling <link to="#cancel" />.
7901
7902 A task represented by IProgress consists of either one or
7903 several sub-operations that run sequentially, one by one (see
7904 <link to="#operation" /> and <link to="#operationCount" />).
7905 Every operation is identified by a number (starting from 0)
7906 and has a separate description.
7907
7908 You can find the individual percentage of completion of the current
7909 operation in <link to="#operationPercent" /> and the
7910 percentage of completion of the task as a whole
7911 in <link to="#percent" />.
7912
7913 Similarly, you can wait for the completion of a particular
7914 operation via <link to="#waitForOperationCompletion" /> or
7915 for the completion of the whole task via
7916 <link to="#waitForCompletion" />.
7917 </desc>
7918
7919 <attribute name="id" type="uuid" mod="string" readonly="yes">
7920 <desc>ID of the task.</desc>
7921 </attribute>
7922
7923 <attribute name="description" type="wstring" readonly="yes">
7924 <desc>Description of the task.</desc>
7925 </attribute>
7926
7927 <attribute name="initiator" type="$unknown" readonly="yes">
7928 <desc>Initiator of the task.</desc>
7929 </attribute>
7930
7931 <attribute name="cancelable" type="boolean" readonly="yes">
7932 <desc>Whether the task can be interrupted.</desc>
7933 </attribute>
7934
7935 <attribute name="percent" type="unsigned long" readonly="yes">
7936 <desc>
7937 Current progress value of the task as a whole, in percent.
7938 This value depends on how many operations are already complete.
7939 Returns 100 if <link to="#completed" /> is @c true.
7940 </desc>
7941 </attribute>
7942
7943 <attribute name="timeRemaining" type="long" readonly="yes">
7944 <desc>
7945 Estimated remaining time until the task completes, in
7946 seconds. Returns 0 once the task has completed; returns -1
7947 if the remaining time cannot be computed, in particular if
7948 the current progress is 0.
7949
7950 Even if a value is returned, the estimate will be unreliable
7951 for low progress values. It will become more reliable as the
7952 task progresses; it is not recommended to display an ETA
7953 before at least 20% of a task have completed.
7954 </desc>
7955 </attribute>
7956
7957 <attribute name="completed" type="boolean" readonly="yes">
7958 <desc>Whether the task has been completed.</desc>
7959 </attribute>
7960
7961 <attribute name="canceled" type="boolean" readonly="yes">
7962 <desc>Whether the task has been canceled.</desc>
7963 </attribute>
7964
7965 <attribute name="resultCode" type="long" readonly="yes">
7966 <desc>
7967 Result code of the progress task.
7968 Valid only if <link to="#completed"/> is @c true.
7969 </desc>
7970 </attribute>
7971
7972 <attribute name="errorInfo" type="IVirtualBoxErrorInfo" readonly="yes">
7973 <desc>
7974 Extended information about the unsuccessful result of the
7975 progress operation. May be @c null if no extended information
7976 is available.
7977 Valid only if <link to="#completed"/> is @c true and
7978 <link to="#resultCode"/> indicates a failure.
7979 </desc>
7980 </attribute>
7981
7982 <attribute name="operationCount" type="unsigned long" readonly="yes">
7983 <desc>
7984 Number of sub-operations this task is divided into.
7985 Every task consists of at least one suboperation.
7986 </desc>
7987 </attribute>
7988
7989 <attribute name="operation" type="unsigned long" readonly="yes">
7990 <desc>Number of the sub-operation being currently executed.</desc>
7991 </attribute>
7992
7993 <attribute name="operationDescription" type="wstring" readonly="yes">
7994 <desc>
7995 Description of the sub-operation being currently executed.
7996 </desc>
7997 </attribute>
7998
7999 <attribute name="operationPercent" type="unsigned long" readonly="yes">
8000 <desc>Progress value of the current sub-operation only, in percent.</desc>
8001 </attribute>
8002
8003 <attribute name="operationWeight" type="unsigned long" readonly="yes">
8004 <desc>Weight value of the current sub-operation only.</desc>
8005 </attribute>
8006
8007 <attribute name="timeout" type="unsigned long">
8008 <desc>
8009 When non-zero, this specifies the number of milliseconds after which
8010 the operation will automatically be canceled. This can only be set on
8011 cancelable objects.
8012 </desc>
8013 </attribute>
8014
8015 <method name="setCurrentOperationProgress">
8016 <desc>Internal method, not to be called externally.</desc>
8017 <param name="percent" type="unsigned long" dir="in" />
8018 </method>
8019 <method name="setNextOperation">
8020 <desc>Internal method, not to be called externally.</desc>
8021 <param name="nextOperationDescription" type="wstring" dir="in" />
8022 <param name="nextOperationsWeight" type="unsigned long" dir="in" />
8023 </method>
8024
8025 <method name="waitForCompletion">
8026 <desc>
8027 Waits until the task is done (including all sub-operations)
8028 with a given timeout in milliseconds; specify -1 for an indefinite wait.
8029
8030 Note that the VirtualBox/XPCOM/COM/native event queues of the calling
8031 thread are not processed while waiting. Neglecting event queues may
8032 have dire consequences (degrade performance, resource hogs,
8033 deadlocks, etc.), this is specially so for the main thread on
8034 platforms using XPCOM. Callers are adviced wait for short periods
8035 and service their event queues between calls, or to create a worker
8036 thread to do the waiting.
8037
8038 <result name="VBOX_E_IPRT_ERROR">
8039 Failed to wait for task completion.
8040 </result>
8041 </desc>
8042
8043 <param name="timeout" type="long" dir="in">
8044 <desc>
8045 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8046 </desc>
8047 </param>
8048 </method>
8049
8050 <method name="waitForOperationCompletion">
8051 <desc>
8052 Waits until the given operation is done with a given timeout in
8053 milliseconds; specify -1 for an indefinite wait.
8054
8055 See <link to="#waitForCompletion"> for event queue considerations.</link>
8056
8057 <result name="VBOX_E_IPRT_ERROR">
8058 Failed to wait for operation completion.
8059 </result>
8060
8061 </desc>
8062 <param name="operation" type="unsigned long" dir="in">
8063 <desc>
8064 Number of the operation to wait for.
8065 Must be less than <link to="#operationCount"/>.
8066 </desc>
8067 </param>
8068 <param name="timeout" type="long" dir="in">
8069 <desc>
8070 Maximum time in milliseconds to wait or -1 to wait indefinitely.
8071 </desc>
8072 </param>
8073 </method>
8074
8075 <method name="cancel">
8076 <desc>
8077 Cancels the task.
8078 <note>
8079 If <link to="#cancelable"/> is @c false, then this method will fail.
8080 </note>
8081
8082 <result name="VBOX_E_INVALID_OBJECT_STATE">
8083 Operation cannot be canceled.
8084 </result>
8085
8086 </desc>
8087 </method>
8088
8089 </interface>
8090
8091 <!--
8092 // ISnapshot
8093 /////////////////////////////////////////////////////////////////////////
8094 -->
8095
8096 <interface
8097 name="ISnapshot" extends="$unknown"
8098 uuid="1a2d0551-58a4-4107-857e-ef414fc42ffc"
8099 wsmap="managed"
8100 >
8101 <desc>
8102 The ISnapshot interface represents a snapshot of the virtual
8103 machine.
8104
8105 Together with the differencing media that are created
8106 when a snapshot is taken, a machine can be brought back to
8107 the exact state it was in when the snapshot was taken.
8108
8109 The ISnapshot interface has no methods, only attributes; snapshots
8110 are controlled through methods of the <link to="IConsole" /> interface
8111 which also manage the media associated with the snapshot.
8112 The following operations exist:
8113
8114 <ul>
8115 <li><link to="IConsole::takeSnapshot"/>: creates a new snapshot
8116 by creating new, empty differencing images for the machine's
8117 media and saving the VM settings and (if the VM is running)
8118 the current VM state in the snapshot.
8119
8120 The differencing images will then receive all data written to
8121 the machine's media, while their parent (base) images
8122 remain unmodified after the snapshot has been taken (see
8123 <link to="IMedium" /> for details about differencing images).
8124 This simplifies restoring a machine to the state of a snapshot:
8125 only the differencing images need to be deleted.
8126
8127 The current machine state is not changed by taking a snapshot.
8128 If the machine is running, it will resume execution after the
8129 snapshot has been taken.
8130 </li>
8131
8132 <li><link to="IConsole::restoreSnapshot"/>: this goes back to
8133 a previous snapshot. This resets the machine's state to that of
8134 the previous snapshot by deleting the differencing image of each
8135 of the machine's media and setting the machine's settings
8136 and state to the state that was saved in the snapshot (if any).
8137
8138 This destroys the machine's current state.
8139 </li>
8140
8141 <li><link to="IConsole::deleteSnapshot"/>: deletes a snapshot
8142 without affecting the current machine state.
8143
8144 This does not change the machine, but instead frees the resources
8145 allocated when the snapshot was taken: the settings and machine state
8146 is deleted (if any), and the snapshot's differencing image for each
8147 of the machine's media gets merged with its parent image.
8148
8149 Neither the current machine state nor other snapshots are affected
8150 by this operation, except that parent media will be modified
8151 to contain the disk data associated with the snapshot being deleted.
8152 </li>
8153 </ul>
8154
8155 Each snapshot contains the settings of the virtual machine (hardware
8156 configuration etc.). In addition, if the machine was running when the
8157 snapshot was taken (<link to="IMachine::state"/> is <link to="MachineState::Running"/>),
8158 the current VM state is saved in the snapshot (similarly to what happens
8159 when a VM's state is saved). The snapshot is then said to
8160 be <i>online</i> because when restoring it, the VM will be running.
8161
8162 If the machine is saved (<link to="MachineState::Saved"/>), the snapshot
8163 receives a copy of the execution state file (<link to="IMachine::stateFilePath"/>).
8164
8165 Otherwise, if the machine was not running (<link to="MachineState::PoweredOff"/>
8166 or <link to="MachineState::Aborted"/>), the snapshot is <i>offline</i>;
8167 it then contains a so-called "zero execution state", representing a
8168 machine that is powered off.
8169
8170 <h3>Snapshot branches and the "current" snapshot</h3>
8171
8172 Snapshots can be chained, whereby every next snapshot is based on the
8173 previous one. This chaining is related to medium branching
8174 (see the <link to="IMedium"/> description) in that every time
8175 a new snapshot is created, a new differencing medium is implicitly
8176 created for all normal media attached to the machine.
8177
8178 Each virtual machine has a "current snapshot", identified by
8179 <link to="IMachine::currentSnapshot"/>. Presently, this is always set
8180 to the last snapshot in the chain. In a future version of VirtualBox,
8181 it will be possible to reset a machine's current state to that of an
8182 earlier snapshot without deleting the current state so that it will be
8183 possible to create alternative snapshot paths in a snapshot tree.
8184
8185 In the current implementation, multiple snapshot branches within one
8186 virtual machine are not allowed. Every machine has a single branch,
8187 and <link to="IConsole::takeSnapshot"/> operation adds a new
8188 snapshot to the top of that branch.
8189 </desc>
8190
8191 <attribute name="id" type="uuid" mod="string" readonly="yes">
8192 <desc>UUID of the snapshot.</desc>
8193 </attribute>
8194
8195 <attribute name="name" type="wstring">
8196 <desc>Short name of the snapshot.</desc>
8197 </attribute>
8198
8199 <attribute name="description" type="wstring">
8200 <desc>Optional description of the snapshot.</desc>
8201 </attribute>
8202
8203 <attribute name="timeStamp" type="long long" readonly="yes">
8204 <desc>
8205 Time stamp of the snapshot, in milliseconds since 1970-01-01 UTC.
8206 </desc>
8207 </attribute>
8208
8209 <attribute name="online" type="boolean" readonly="yes">
8210 <desc>
8211 @c true if this snapshot is an online snapshot and @c false otherwise.
8212
8213 When this attribute is @c true, the
8214 <link to="IMachine::stateFilePath"/> attribute of the
8215 <link to="#machine"/> object associated with this snapshot
8216 will point to the saved state file. Otherwise, it will be
8217 an empty string.
8218 </desc>
8219 </attribute>
8220
8221 <attribute name="machine" type="IMachine" readonly="yes">
8222 <desc>
8223 Virtual machine this snapshot is taken on. This object
8224 stores all settings the machine had when taking this snapshot.
8225 <note>
8226 The returned machine object is immutable, i.e. no
8227 any settings can be changed.
8228 </note>
8229 </desc>
8230 </attribute>
8231
8232 <attribute name="parent" type="ISnapshot" readonly="yes">
8233 <desc>
8234 Parent snapshot (a snapshot this one is based on), or
8235 @c null if the snapshot has no parent (i.e. is the first snapshot).
8236 </desc>
8237 </attribute>
8238
8239 <attribute name="children" type="ISnapshot" readonly="yes" safearray="yes">
8240 <desc>
8241 Child snapshots (all snapshots having this one as a parent).
8242 </desc>
8243 </attribute>
8244
8245 </interface>
8246
8247
8248 <!--
8249 // IMedium
8250 /////////////////////////////////////////////////////////////////////////
8251 -->
8252
8253 <enum
8254 name="MediumState"
8255 uuid="ef41e980-e012-43cd-9dea-479d4ef14d13"
8256 >
8257 <desc>
8258 Virtual medium state.
8259 <see>IMedium</see>
8260 </desc>
8261
8262 <const name="NotCreated" value="0">
8263 <desc>
8264 Associated medium storage does not exist (either was not created yet or
8265 was deleted).
8266 </desc>
8267 </const>
8268 <const name="Created" value="1">
8269 <desc>
8270 Associated storage exists and accessible; this gets set if the
8271 accessibility check performed by <link to="IMedium::refreshState" />
8272 was successful.
8273 </desc>
8274 </const>
8275 <const name="LockedRead" value="2">
8276 <desc>
8277 Medium is locked for reading (see <link to="IMedium::lockRead"/>),
8278 no data modification is possible.
8279 </desc>
8280 </const>
8281 <const name="LockedWrite" value="3">
8282 <desc>
8283 Medium is locked for writing (see <link to="IMedium::lockWrite"/>),
8284 no concurrent data reading or modification is possible.
8285 </desc>
8286 </const>
8287 <const name="Inaccessible" value="4">
8288 <desc>
8289 Medium accessiblity check (see <link to="IMedium::refreshState" />) has
8290 not yet been performed, or else, associated medium storage is not
8291 accessible. In the first case, <link to="IMedium::lastAccessError"/>
8292 is empty, in the second case, it describes the error that occured.
8293 </desc>
8294 </const>
8295 <const name="Creating" value="5">
8296 <desc>
8297 Associated medium storage is being created.
8298 </desc>
8299 </const>
8300 <const name="Deleting" value="6">
8301 <desc>
8302 Associated medium storage is being deleted.
8303 </desc>
8304 </const>
8305 </enum>
8306
8307 <enum
8308 name="MediumType"
8309 uuid="46bf1fd4-ad86-4ded-8c49-28bd2d148e5a"
8310 >
8311 <desc>
8312 Virtual medium type.
8313 <see>IMedium</see>
8314 </desc>
8315
8316 <const name="Normal" value="0">
8317 <desc>
8318 Normal medium (attached directly or indirectly, preserved
8319 when taking snapshots).
8320 </desc>
8321 </const>
8322 <const name="Immutable" value="1">
8323 <desc>
8324 Immutable medium (attached indirectly, changes are wiped out
8325 the next time the virtual machine is started).
8326 </desc>
8327 </const>
8328 <const name="Writethrough" value="2">
8329 <desc>
8330 Write through medium (attached directly, ignored when
8331 taking snapshots).
8332 </desc>
8333 </const>
8334 <const name="Shareable" value="3">
8335 <desc>
8336 Allow using this medium concurrently by several machines.
8337 <note>Present since VirtualBox 3.2.0, and accepted since 3.2.8.</note>
8338 </desc>
8339 </const>
8340 </enum>
8341
8342 <enum
8343 name="MediumVariant"
8344 uuid="584ea502-143b-4ab0-ad14-d1028fdf0316"
8345 >
8346 <desc>
8347 Virtual medium image variant. More than one flag may be set.
8348 <see>IMedium</see>
8349 </desc>
8350
8351 <const name="Standard" value="0">
8352 <desc>
8353 No particular variant requested, results in using the backend default.
8354 </desc>
8355 </const>
8356 <const name="VmdkSplit2G" value="0x01">
8357 <desc>
8358 VMDK image split in chunks of less than 2GByte.
8359 </desc>
8360 </const>
8361 <const name="VmdkStreamOptimized" value="0x04">
8362 <desc>
8363 VMDK streamOptimized image. Special import/export format which is
8364 read-only/append-only.
8365 </desc>
8366 </const>
8367 <const name="VmdkESX" value="0x08">
8368 <desc>
8369 VMDK format variant used on ESX products.
8370 </desc>
8371 </const>
8372 <const name="Fixed" value="0x10000">
8373 <desc>
8374 Fixed image. Only allowed for base images.
8375 </desc>
8376 </const>
8377 <const name="Diff" value="0x20000">
8378 <desc>
8379 Differencing image. Only allowed for child images.
8380 </desc>
8381 </const>
8382 </enum>
8383
8384 <interface
8385 name="IMediumAttachment" extends="$unknown"
8386 uuid="c29452cc-ca72-404b-9261-cfc514f1e412"
8387 wsmap="struct"
8388 >
8389 <desc>
8390 The IMediumAttachment interface links storage media to virtual machines.
8391 For each medium (<link to="IMedium"/>) which has been attached to a
8392 storage controller (<link to="IStorageController"/>) of a machine
8393 (<link to="IMachine"/>) via the <link to="IMachine::attachDevice" />
8394 method, one instance of IMediumAttachment is added to the machine's
8395 <link to="IMachine::mediumAttachments"/> array attribute.
8396
8397 Each medium attachment specifies the storage controller as well as a
8398 port and device number and the IMedium instance representing a virtual
8399 hard disk or floppy or DVD image.
8400
8401 For removeable media (DVDs or floppies), there are two additional
8402 options. For one, the IMedium instance can be @c null to represent
8403 an empty drive with no media inserted (see <link to="IMachine::mountMedium" />);
8404 secondly, the medium can be one of the pseudo-media for host drives
8405 listed in <link to="IHost::DVDDrives"/> or <link to="IHost::floppyDrives"/>.
8406 </desc>
8407
8408 <attribute name="medium" type="IMedium" readonly="yes">
8409 <desc>Medium object associated with this attachment; it
8410 can be @c null for removable devices.</desc>
8411 </attribute>
8412
8413 <attribute name="controller" type="wstring" readonly="yes">
8414 <desc>Name of the storage controller of this attachment; this
8415 refers to one of the controllers in <link to="IMachine::storageControllers" />
8416 by name.</desc>
8417 </attribute>
8418
8419 <attribute name="port" type="long" readonly="yes">
8420 <desc>Port number of this attachment.
8421 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8422 </desc>
8423 </attribute>
8424
8425 <attribute name="device" type="long" readonly="yes">
8426 <desc>Device slot number of this attachment.
8427 See <link to="IMachine::attachDevice" /> for the meaning of this value for the different controller types.
8428 </desc>
8429 </attribute>
8430
8431 <attribute name="type" type="DeviceType" readonly="yes">
8432 <desc>Device type of this attachment.</desc>
8433 </attribute>
8434
8435 <attribute name="passthrough" type="boolean" readonly="yes">
8436 <desc>Pass I/O requests through to a device on the host.</desc>
8437 </attribute>
8438
8439 <attribute name="bandwidthLimit" type="unsigned long">
8440 <desc>
8441 Maximum throughput allowed for this medium attachment, in units of 1 mbps.
8442 A zero value means uncapped/unlimited.
8443 </desc>
8444 </attribute>
8445
8446 </interface>
8447
8448 <interface
8449 name="IMedium" extends="$unknown"
8450 uuid="858ea9d3-9ade-4aa7-91b7-d8a40f8f9b16"
8451 wsmap="managed"
8452 >
8453 <desc>
8454 The IMedium interface represents virtual storage for a machine's
8455 hard disks, CD/DVD or floppy drives. It will typically represent
8456 a disk image on the host, for example a VDI or VMDK file representing
8457 a virtual hard disk, or an ISO or RAW file representing virtual
8458 removable media, but can also point to a network location (e.g.
8459 for iSCSI targets).
8460
8461 Instances of IMedium are connected to virtual machines by way of
8462 medium attachments (see <link to="IMediumAttachment" />), which link
8463 the storage medium to a particular device slot of a storage controller
8464 of the virtual machine.
8465 In the VirtualBox API, virtual storage is therefore always represented
8466 by the following chain of object links:
8467
8468 <ul>
8469 <li><link to="IMachine::storageControllers"/> contains an array of
8470 storage controllers (IDE, SATA, SCSI, SAS or a floppy controller;
8471 these are instances of <link to="IStorageController"/>).</li>
8472 <li><link to="IMachine::mediumAttachments"/> contains an array of
8473 medium attachments (instances of <link to="IMediumAttachment"/>),
8474 each containing a storage controller from the above array, a
8475 port/device specification, and an instance of IMedium representing
8476 the medium storage (image file).
8477
8478 For removable media, the storage medium is optional; a medium
8479 attachment with no medium represents a CD/DVD or floppy drive
8480 with no medium inserted. By contrast, hard disk attachments
8481 will always have an IMedium object attached.</li>
8482 <li>Each IMedium in turn points to a storage unit (such as a file
8483 on the host computer or a network resource) that holds actual
8484 data. This location is represented by the <link to="#location"/>
8485 attribute.</li>
8486 </ul>
8487
8488 Existing media are opened using <link to="IVirtualBox::openMedium"/>;
8489 new hard disk media can be created with the VirtualBox API using the
8490 <link to="IVirtualBox::createHardDisk"/> method.
8491
8492 CD/DVD and floppy images (ISO and RAW files) are usually created outside
8493 VirtualBox, e.g. by storing a copy of the real medium of the corresponding
8494 type in a regular file.
8495
8496 Only for CD/DVDs and floppies, an IMedium instance can also represent a host
8497 drive; in that case the <link to="#id" /> attribute contains the UUID of
8498 one of the drives in <link to="IHost::DVDDrives" /> or <link to="IHost::floppyDrives" />.
8499
8500 <h3>Known media</h3>
8501
8502 When an existing medium is opened for the first time, it is automatically
8503 remembered by the given VirtualBox installation or, in other words, becomes
8504 a <i>known medium</i>. Known media are stored in the media
8505 registry transparently maintained by VirtualBox and stored in settings
8506 files so that this registry is preserved when VirtualBox is not running.
8507
8508 Newly created virtual media are remembered only when the associated
8509 storage unit is actually created.
8510
8511 All known media can be enumerated using
8512 <link to="IVirtualBox::hardDisks"/>,
8513 <link to="IVirtualBox::DVDImages"/> and
8514 <link to="IVirtualBox::floppyImages"/> attributes. Individual media can be
8515 quickly found using the <link to="IVirtualBox::findMedium"/> method.
8516
8517 Only known media can be attached to virtual machines.
8518
8519 Removing known media from the media registry is performed when the given
8520 medium is closed using the <link to="#close"/> method or when its
8521 associated storage unit is deleted.
8522
8523 <h3>Accessibility checks</h3>
8524
8525 VirtualBox defers media accessibility checks until the <link to="#refreshState" />
8526 method is called explicitly on a medium. This is done to make the VirtualBox object
8527 ready for serving requests as fast as possible and let the end-user
8528 application decide if it needs to check media accessibility right away or not.
8529
8530 As a result, when VirtualBox starts up (e.g. the VirtualBox
8531 object gets created for the first time), all known media are in the
8532 "Inaccessible" state, but the value of the <link to="#lastAccessError"/>
8533 attribute is an empty string because no actual accessibility check has
8534 been made yet.
8535
8536 After calling <link to="#refreshState" />, a medium is considered
8537 <i>accessible</i> if its storage unit can be read. In that case, the
8538 <link to="#state"/> attribute has a value of "Created". If the storage
8539 unit cannot be read (for example, because it is located on a disconnected
8540 network resource, or was accidentally deleted outside VirtualBox),
8541 the medium is considered <i>inaccessible</i>, which is indicated by the
8542 "Inaccessible" state. The exact reason why the medium is inaccessible can be
8543 obtained by reading the <link to="#lastAccessError"/> attribute.
8544
8545 <h3>Medium types</h3>
8546
8547 There are four types of medium behavior (see <link to="MediumType" />):
8548 "normal", "immutable", "writethrough" and "shareable", represented by the
8549 <link to="#type"/> attribute. The type of the medium defines how the
8550 medium is attached to a virtual machine and what happens when a
8551 <link to="ISnapshot">snapshot</link> of the virtual machine with the
8552 attached medium is taken. At the moment DVD and floppy media are always
8553 of type "writethrough".
8554
8555 All media can be also divided in two groups: <i>base</i> media and
8556 <i>differencing</i> media. A base medium contains all sectors of the
8557 medium data in its own storage and therefore can be used independently.
8558 In contrast, a differencing mediun is a "delta" to some other medium and
8559 contains only those sectors which differ from that other medium, which is
8560 then called a <i>parent</i>. The differencing medium is said to be
8561 <i>linked to</i> that parent. The parent may be itself a differencing
8562 medium, thus forming a chain of linked media. The last element in that
8563 chain must always be a base medium. Note that several differencing
8564 media may be linked to the same parent medium.
8565
8566 Differencing media can be distinguished from base media by querying the
8567 <link to="#parent"/> attribute: base media do not have parents they would
8568 depend on, so the value of this attribute is always @c null for them.
8569 Using this attribute, it is possible to walk up the medium tree (from the
8570 child medium to its parent). It is also possible to walk down the tree
8571 using the <link to="#children"/> attribute.
8572
8573 Note that the type of all differencing media is "normal"; all other
8574 values are meaningless for them. Base media may be of any type.
8575
8576 <h3>Creating hard disks</h3>
8577
8578 New base hard disks are created using
8579 <link to="IVirtualBox::createHardDisk"/>. Existing hard disks are
8580 opened using <link to="IVirtualBox::openMedium"/>. Differencing hard
8581 disks are usually implicitly created by VirtualBox when needed but may
8582 also be created explicitly using <link to="#createDiffStorage"/>.
8583
8584 After the hard disk is successfully created (including the storage unit)
8585 or opened, it becomes a known hard disk (remembered in the internal media
8586 registry). Known hard disks can be attached to a virtual machine, accessed
8587 through <link to="IVirtualBox::findMedium"/> or enumerated using the
8588 <link to="IVirtualBox::hardDisks"/> array (only for base hard disks).
8589
8590 The following methods, besides <link to="IMedium::close"/>,
8591 automatically remove the hard disk from the media registry:
8592 <ul>
8593 <li><link to="#deleteStorage"/></li>
8594 <li><link to="#mergeTo"/></li>
8595 </ul>
8596
8597 If the storage unit of the hard disk is a regular file in the host's
8598 file system then the rules stated in the description of the
8599 <link to="IMedium::location"/> attribute apply when setting its value. In
8600 addition, a plain file name without any path may be given, in which case
8601 the <link to="ISystemProperties::defaultHardDiskFolder"> default hard disk
8602 folder</link> will be prepended to it.
8603
8604 <h4>Automatic composition of the file name part</h4>
8605
8606 Another extension to the <link to="IMedium::location"/> attribute is that
8607 there is a possibility to cause VirtualBox to compose a unique value for
8608 the file name part of the location using the UUID of the hard disk. This
8609 applies only to hard disks in <link to="MediumState::NotCreated"/> state,
8610 e.g. before the storage unit is created, and works as follows. You set the
8611 value of the <link to="IMedium::location"/> attribute to a location
8612 specification which only contains the path specification but not the file
8613 name part and ends with either a forward slash or a backslash character.
8614 In response, VirtualBox will generate a new UUID for the hard disk and
8615 compose the file name using the following pattern:
8616 <pre>
8617 &lt;path&gt;/{&lt;uuid&gt;}.&lt;ext&gt;
8618 </pre>
8619 where <tt>&lt;path&gt;</tt> is the supplied path specification,
8620 <tt>&lt;uuid&gt;</tt> is the newly generated UUID and <tt>&lt;ext&gt;</tt>
8621 is the default extension for the storage format of this hard disk. After
8622 that, you may call any of the methods that create a new hard disk storage
8623 unit and they will use the generated UUID and file name.
8624
8625 <h3>Attaching Hard Disks</h3>
8626
8627 Hard disks are attached to virtual machines using the
8628 <link to="IMachine::attachDevice"/> method and detached using the
8629 <link to="IMachine::detachDevice"/> method. Depending on their
8630 <link to="#type"/>, hard disks are attached either
8631 <i>directly</i> or <i>indirectly</i>.
8632
8633 When a hard disk is being attached directly, it is associated with the
8634 virtual machine and used for hard disk operations when the machine is
8635 running. When a hard disk is being attached indirectly, a new differencing
8636 hard disk linked to it is implicitly created and this differencing hard
8637 disk is associated with the machine and used for hard disk operations.
8638 This also means that if <link to="IMachine::attachDevice"/> performs
8639 a direct attachment then the same hard disk will be returned in response
8640 to the subsequent <link to="IMachine::getMedium"/> call; however if
8641 an indirect attachment is performed then
8642 <link to="IMachine::getMedium"/> will return the implicitly created
8643 differencing hard disk, not the original one passed to <link
8644 to="IMachine::attachDevice"/>. In detail:
8645
8646 <ul>
8647 <li><b>Normal base</b> hard disks that do not have children (i.e.
8648 differencing hard disks linked to them) and that are not already
8649 attached to virtual machines in snapshots are attached <b>directly</b>.
8650 Otherwise, they are attached <b>indirectly</b> because having
8651 dependent children or being part of the snapshot makes it impossible
8652 to modify hard disk contents without breaking the integrity of the
8653 dependent party. The <link to="#readOnly"/> attribute allows to
8654 quickly determine the kind of the attachment for the given hard
8655 disk. Note that if a normal base hard disk is to be indirectly
8656 attached to a virtual machine with snapshots then a special
8657 procedure called <i>smart attachment</i> is performed (see below).</li>
8658 <li><b>Normal differencing</b> hard disks are like normal base hard disks:
8659 they are attached <b>directly</b> if they do not have children and are
8660 not attached to virtual machines in snapshots, and <b>indirectly</b>
8661 otherwise. Note that the smart attachment procedure is never performed
8662 for differencing hard disks.</li>
8663 <li><b>Immutable</b> hard disks are always attached <b>indirectly</b> because
8664 they are designed to be non-writable. If an immutable hard disk is
8665 attached to a virtual machine with snapshots then a special
8666 procedure called smart attachment is performed (see below).</li>
8667 <li><b>Writethrough</b> hard disks are always attached <b>directly</b>,
8668 also as designed. This also means that writethrough hard disks cannot
8669 have other hard disks linked to them at all.</li>
8670 <li><b>Shareable</b> hard disks are always attached <b>directly</b>,
8671 also as designed. This also means that shareable hard disks cannot
8672 have other hard disks linked to them at all. They behave almost
8673 like writethrough hard disks, except that shareable hard disks can
8674 be attached to several virtual machines which are running, allowing
8675 concurrent accesses. You need special cluster software running in
8676 the virtual machines to make use of such disks.</li>
8677 </ul>
8678
8679 Note that the same hard disk, regardless of its type, may be attached to
8680 more than one virtual machine at a time. In this case, the machine that is
8681 started first gains exclusive access to the hard disk and attempts to
8682 start other machines having this hard disk attached will fail until the
8683 first machine is powered down.
8684
8685 Detaching hard disks is performed in a <i>deferred</i> fashion. This means
8686 that the given hard disk remains associated with the given machine after a
8687 successful <link to="IMachine::detachDevice"/> call until
8688 <link to="IMachine::saveSettings"/> is called to save all changes to
8689 machine settings to disk. This deferring is necessary to guarantee that
8690 the hard disk configuration may be restored at any time by a call to
8691 <link to="IMachine::discardSettings"/> before the settings
8692 are saved (committed).
8693
8694 Note that if <link to="IMachine::discardSettings"/> is called after
8695 indirectly attaching some hard disks to the machine but before a call to
8696 <link to="IMachine::saveSettings"/> is made, it will implicitly delete
8697 all differencing hard disks implicitly created by
8698 <link to="IMachine::attachDevice"/> for these indirect attachments.
8699 Such implicitly created hard disks will also be immediately deleted when
8700 detached explicitly using the <link to="IMachine::detachDevice"/>
8701 call if it is made before <link to="IMachine::saveSettings"/>. This
8702 implicit deletion is safe because newly created differencing hard
8703 disks do not contain any user data.
8704
8705 However, keep in mind that detaching differencing hard disks that were
8706 implicitly created by <link to="IMachine::attachDevice"/>
8707 before the last <link to="IMachine::saveSettings"/> call will
8708 <b>not</b> implicitly delete them as they may already contain some data
8709 (for example, as a result of virtual machine execution). If these hard
8710 disks are no more necessary, the caller can always delete them explicitly
8711 using <link to="#deleteStorage"/> after they are actually de-associated
8712 from this machine by the <link to="IMachine::saveSettings"/> call.
8713
8714 <h3>Smart Attachment</h3>
8715
8716 When normal base or immutable hard disks are indirectly attached to a
8717 virtual machine then some additional steps are performed to make sure the
8718 virtual machine will have the most recent "view" of the hard disk being
8719 attached. These steps include walking through the machine's snapshots
8720 starting from the current one and going through ancestors up to the first
8721 snapshot. Hard disks attached to the virtual machine in all
8722 of the encountered snapshots are checked whether they are descendants of
8723 the given normal base or immutable hard disk. The first found child (which
8724 is the differencing hard disk) will be used instead of the normal base or
8725 immutable hard disk as a parent for creating a new differencing hard disk
8726 that will be actually attached to the machine. And only if no descendants
8727 are found or if the virtual machine does not have any snapshots then the
8728 normal base or immutable hard disk will be used itself as a parent for
8729 this differencing hard disk.
8730
8731 It is easier to explain what smart attachment does using the
8732 following example:
8733 <pre>
8734BEFORE attaching B.vdi: AFTER attaching B.vdi:
8735
8736Snapshot 1 (B.vdi) Snapshot 1 (B.vdi)
8737 Snapshot 2 (D1->B.vdi) Snapshot 2 (D1->B.vdi)
8738 Snapshot 3 (D2->D1.vdi) Snapshot 3 (D2->D1.vdi)
8739 Snapshot 4 (none) Snapshot 4 (none)
8740 CurState (none) CurState (D3->D2.vdi)
8741
8742 NOT
8743 ...
8744 CurState (D3->B.vdi)
8745 </pre>
8746 The first column is the virtual machine configuration before the base hard
8747 disk <tt>B.vdi</tt> is attached, the second column shows the machine after
8748 this hard disk is attached. Constructs like <tt>D1->B.vdi</tt> and similar
8749 mean that the hard disk that is actually attached to the machine is a
8750 differencing hard disk, <tt>D1.vdi</tt>, which is linked to (based on)
8751 another hard disk, <tt>B.vdi</tt>.
8752
8753 As we can see from the example, the hard disk <tt>B.vdi</tt> was detached
8754 from the machine before taking Snapshot 4. Later, after Snapshot 4 was
8755 taken, the user decides to attach <tt>B.vdi</tt> again. <tt>B.vdi</tt> has
8756 dependent child hard disks (<tt>D1.vdi</tt>, <tt>D2.vdi</tt>), therefore
8757 it cannot be attached directly and needs an indirect attachment (i.e.
8758 implicit creation of a new differencing hard disk). Due to the smart
8759 attachment procedure, the new differencing hard disk
8760 (<tt>D3.vdi</tt>) will be based on <tt>D2.vdi</tt>, not on
8761 <tt>B.vdi</tt> itself, since <tt>D2.vdi</tt> is the most recent view of
8762 <tt>B.vdi</tt> existing for this snapshot branch of the given virtual
8763 machine.
8764
8765 Note that if there is more than one descendant hard disk of the given base
8766 hard disk found in a snapshot, and there is an exact device, channel and
8767 bus match, then this exact match will be used. Otherwise, the youngest
8768 descendant will be picked up.
8769
8770 There is one more important aspect of the smart attachment procedure which
8771 is not related to snapshots at all. Before walking through the snapshots
8772 as described above, the backup copy of the current list of hard disk
8773 attachment is searched for descendants. This backup copy is created when
8774 the hard disk configuration is changed for the first time after the last
8775 <link to="IMachine::saveSettings"/> call and used by
8776 <link to="IMachine::discardSettings"/> to undo the recent hard disk
8777 changes. When such a descendant is found in this backup copy, it will be
8778 simply re-attached back, without creating a new differencing hard disk for
8779 it. This optimization is necessary to make it possible to re-attach the
8780 base or immutable hard disk to a different bus, channel or device slot
8781 without losing the contents of the differencing hard disk actually
8782 attached to the machine in place of it.
8783 </desc>
8784
8785 <attribute name="id" type="uuid" mod="string" readonly="yes">
8786 <desc>
8787 UUID of the medium. For a newly created medium, this value is a randomly
8788 generated UUID.
8789
8790 <note>
8791 For media in one of MediumState_NotCreated, MediumState_Creating or
8792 MediumState_Deleting states, the value of this property is undefined
8793 and will most likely be an empty UUID.
8794 </note>
8795 </desc>
8796 </attribute>
8797
8798 <attribute name="description" type="wstring">
8799 <desc>
8800 Optional description of the medium. For a newly created medium the value
8801 of this attribute is an empty string.
8802
8803 Medium types that don't support this attribute will return E_NOTIMPL in
8804 attempt to get or set this attribute's value.
8805
8806 <note>
8807 For some storage types, reading this attribute may return an outdated
8808 (last known) value when <link to="#state"/> is <link
8809 to="MediumState::Inaccessible"/> or <link
8810 to="MediumState::LockedWrite"/> because the value of this attribute is
8811 stored within the storage unit itself. Also note that changing the
8812 attribute value is not possible in such case, as well as when the
8813 medium is the <link to="MediumState::LockedRead"/> state.
8814 </note>
8815 </desc>
8816 </attribute>
8817
8818 <attribute name="state" type="MediumState" readonly="yes">
8819 <desc>
8820 Returns the current medium state, which is the last state set by
8821 the accessibility check performed by <link to="#refreshState"/>.
8822 If that method has not yet been called on the medium, the state
8823 is "Inaccessible"; as opposed to truly inaccessible media, the
8824 value of <link to="#lastAccessError"/> will be an empty string in
8825 that case.
8826
8827 <note>As of version 3.1, this no longer performs an accessibility check
8828 automatically; call <link to="#refreshState"/> for that.
8829 </note>
8830 </desc>
8831 </attribute>
8832
8833 <attribute name="variant" type="MediumVariant" readonly="yes">
8834 <desc>
8835 Returns the storage format variant information for this medium.
8836 Before <link to="#refreshState"/> is called this method returns
8837 an undefined value.
8838 </desc>
8839 </attribute>
8840
8841 <attribute name="location" type="wstring">
8842 <desc>
8843 Location of the storage unit holding medium data.
8844
8845 The format of the location string is medium type specific. For medium
8846 types using regular files in a host's file system, the location
8847 string is the full file name.
8848
8849 Some medium types may support changing the storage unit location by
8850 simply changing the value of this property. If this operation is not
8851 supported, the implementation will return E_NOTIMPL in attempt to set
8852 this attribute's value.
8853
8854 When setting a value of the location attribute which is a regular file
8855 in the host's file system, the given file name may be either relative to
8856 the <link to="IVirtualBox::homeFolder">VirtualBox home folder</link> or
8857 absolute. Note that if the given location specification does not contain
8858 the file extension part then a proper default extension will be
8859 automatically appended by the implementation depending on the medium type.
8860 </desc>
8861 </attribute>
8862
8863 <attribute name="name" type="wstring" readonly="yes">
8864 <desc>
8865 Name of the storage unit holding medium data.
8866
8867 The returned string is a short version of the <link to="#location"/>
8868 attribute that is suitable for representing the medium in situations
8869 where the full location specification is too long (such as lists
8870 and comboboxes in GUI frontends). This string is also used by frontends
8871 to sort the media list alphabetically when needed.
8872
8873 For example, for locations that are regular files in the host's file
8874 system, the value of this attribute is just the file name (+ extension),
8875 without the path specification.
8876
8877 Note that as opposed to the <link to="#location"/> attribute, the name
8878 attribute will not necessary be unique for a list of media of the
8879 given type and format.
8880 </desc>
8881 </attribute>
8882
8883 <attribute name="deviceType" type="DeviceType" readonly="yes">
8884 <desc>Kind of device (DVD/Floppy/HardDisk) which is applicable to this
8885 medium.</desc>
8886 </attribute>
8887
8888 <attribute name="hostDrive" type="boolean" readonly="yes">
8889 <desc>True if this corresponds to a drive on the host.</desc>
8890 </attribute>
8891
8892 <attribute name="size" type="unsigned long long" readonly="yes">
8893 <desc>
8894 Physical size of the storage unit used to hold medium data (in bytes).
8895
8896 <note>
8897 For media whose <link to="#state"/> is <link
8898 to="MediumState::Inaccessible"/>, the value of this property is the
8899 last known size. For <link to="MediumState::NotCreated"/> media,
8900 the returned value is zero.
8901 </note>
8902 </desc>
8903 </attribute>
8904
8905 <attribute name="format" type="wstring" readonly="yes">
8906 <desc>
8907 Storage format of this medium.
8908
8909 The value of this attribute is a string that specifies a backend used
8910 to store medium data. The storage format is defined when you create a
8911 new medium or automatically detected when you open an existing medium,
8912 and cannot be changed later.
8913
8914 The list of all storage formats supported by this VirtualBox
8915 installation can be obtained using
8916 <link to="ISystemProperties::mediumFormats"/>.
8917 </desc>
8918 </attribute>
8919
8920 <attribute name="mediumFormat" type="IMediumFormat" readonly="yes">
8921 <desc>
8922 Storage medium format object corresponding to this medium.
8923
8924 The value of this attribute is a reference to the medium format object
8925 that specifies the backend properties used to store medium data. The
8926 storage format is defined when you create a new medium or automatically
8927 detected when you open an existing medium, and cannot be changed later.
8928
8929 <note>@c null is returned if there is no associated medium format
8930 object. This can e.g. happen for medium objects representing host
8931 drives and other special medium objects.</note>
8932 </desc>
8933 </attribute>
8934
8935 <attribute name="type" type="MediumType">
8936 <desc>
8937 Type (role) of this medium.
8938
8939 The following constraints apply when changing the value of this
8940 attribute:
8941 <ul>
8942 <li>If a medium is attached to a virtual machine (either in the
8943 current state or in one of the snapshots), its type cannot be
8944 changed.
8945 </li>
8946 <li>As long as the medium has children, its type cannot be set
8947 to <link to="MediumType::Writethrough"/>.
8948 </li>
8949 <li>The type of all differencing media is
8950 <link to="MediumType::Normal"/> and cannot be changed.
8951 </li>
8952 </ul>
8953
8954 The type of a newly created or opened medium is set to
8955 <link to="MediumType::Normal"/>, except for DVD and floppy media,
8956 which have a type of <link to="MediumType::Writethrough"/>.
8957 </desc>
8958 </attribute>
8959
8960 <attribute name="parent" type="IMedium" readonly="yes">
8961 <desc>
8962 Parent of this medium (the medium this medium is directly based
8963 on).
8964
8965 Only differencing media have parents. For base (non-differencing)
8966 media, @c null is returned.
8967 </desc>
8968 </attribute>
8969
8970 <attribute name="children" type="IMedium" safearray="yes" readonly="yes">
8971 <desc>
8972 Children of this medium (all differencing media directly based
8973 on this medium). A @c null array is returned if this medium
8974 does not have any children.
8975 </desc>
8976 </attribute>
8977
8978 <attribute name="base" type="IMedium" readonly="yes">
8979 <desc>
8980 Base medium of this medium.
8981
8982 If this is a differencing medium, its base medium is the medium
8983 the given medium branch starts from. For all other types of media, this
8984 property returns the medium object itself (i.e. the same object this
8985 property is read on).
8986 </desc>
8987 </attribute>
8988
8989 <attribute name="readOnly" type="boolean" readonly="yes">
8990 <desc>
8991 Returns @c true if this medium is read-only and @c false otherwise.
8992
8993 A medium is considered to be read-only when its contents cannot be
8994 modified without breaking the integrity of other parties that depend on
8995 this medium such as its child media or snapshots of virtual machines
8996 where this medium is attached to these machines. If there are no
8997 children and no such snapshots then there is no dependency and the
8998 medium is not read-only.
8999
9000 The value of this attribute can be used to determine the kind of the
9001 attachment that will take place when attaching this medium to a
9002 virtual machine. If the value is @c false then the medium will
9003 be attached directly. If the value is @c true then the medium
9004 will be attached indirectly by creating a new differencing child
9005 medium for that. See the interface description for more information.
9006
9007 Note that all <link to="MediumType::Immutable">Immutable</link> media
9008 are always read-only while all
9009 <link to="MediumType::Writethrough">Writethrough</link> media are
9010 always not.
9011
9012 <note>
9013 The read-only condition represented by this attribute is related to
9014 the medium type and usage, not to the current
9015 <link to="IMedium::state">medium state</link> and not to the read-only
9016 state of the storage unit.
9017 </note>
9018 </desc>
9019 </attribute>
9020
9021 <attribute name="logicalSize" type="unsigned long long" readonly="yes">
9022 <desc>
9023 Logical size of this medium (in megabytes), as reported to the
9024 guest OS running inside the virtual machine this medium is
9025 attached to. The logical size is defined when the medium is created
9026 and cannot be changed later.
9027
9028 <note>
9029 Reading this property on a differencing medium will return the size
9030 of its <link to="#base"/> medium.
9031 </note>
9032 <note>
9033 For media whose state is <link to="#state"/> is <link
9034 to="MediumState::Inaccessible"/>, the value of this property is the
9035 last known logical size. For <link to="MediumState::NotCreated"/>
9036 media, the returned value is zero.
9037 </note>
9038 </desc>
9039 </attribute>
9040
9041 <attribute name="autoReset" type="boolean">
9042 <desc>
9043 Whether this differencing medium will be automatically reset each
9044 time a virtual machine it is attached to is powered up. This
9045 attribute is automatically set to @c true for the last
9046 differencing image of an "immutable" medium (see
9047 <link to="MediumType" />).
9048
9049 See <link to="#reset"/> for more information about resetting
9050 differencing media.
9051
9052 <note>
9053 Reading this property on a base (non-differencing) medium will
9054 always @c false. Changing the value of this property in this
9055 case is not supported.
9056 </note>
9057
9058 <result name="VBOX_E_NOT_SUPPORTED">
9059 This is not a differencing medium (when changing the attribute
9060 value).
9061 </result>
9062 </desc>
9063 </attribute>
9064
9065 <attribute name="lastAccessError" type="wstring" readonly="yes">
9066 <desc>
9067 Text message that represents the result of the last accessibility
9068 check performed by <link to="#refreshState"/>.
9069
9070 An empty string is returned if the last accessibility check
9071 was successful or has not yet been called. As a result, if
9072 <link to="#state" /> is "Inaccessible" and this attribute is empty,
9073 then <link to="#refreshState"/> has yet to be called; this is the
9074 default value of media after VirtualBox initialization.
9075 A non-empty string indicates a failure and should normally describe
9076 a reason of the failure (for example, a file read error).
9077 </desc>
9078 </attribute>
9079
9080 <attribute name="machineIds" type="uuid" mod="string" safearray="yes" readonly="yes">
9081 <desc>
9082 Array of UUIDs of all machines this medium is attached to.
9083
9084 A @c null array is returned if this medium is not attached to any
9085 machine or to any machine's snapshot.
9086
9087 <note>
9088 The returned array will include a machine even if this medium is not
9089 attached to that machine in the current state but attached to it in
9090 one of the machine's snapshots. See <link to="#getSnapshotIds"/> for
9091 details.
9092 </note>
9093 </desc>
9094 </attribute>
9095
9096 <method name="setIDs">
9097 <desc>
9098 Changes the UUID and parent UUID for a hard disk medium.
9099 </desc>
9100 <param name="setImageId" type="boolean" dir="in">
9101 <desc>
9102 Select whether a new image UUID is set or not.
9103 </desc>
9104 </param>
9105 <param name="imageId" type="uuid" mod="string" dir="in">
9106 <desc>
9107 New UUID for the image. If an empty string is passed, then a new
9108 UUID is automatically created, provided that @a setImageId is @c true.
9109 Specifying a zero UUID is not allowed.
9110 </desc>
9111 </param>
9112 <param name="setParentId" type="boolean" dir="in">
9113 <desc>
9114 Select whether a new parent UUID is set or not.
9115 </desc>
9116 </param>
9117 <param name="parentId" type="uuid" mod="string" dir="in">
9118 <desc>
9119 New parent UUID for the image. If an empty string is passed, then a
9120 new UUID is automatically created, provided @a setParentId is
9121 @c true. A zero UUID is valid.
9122 </desc>
9123 </param>
9124 <result name="E_INVALIDARG">
9125 Invalid parameter combination.
9126 </result>
9127 <result name="VBOX_E_NOT_SUPPORTED">
9128 Medium is not a hard disk medium.
9129 </result>
9130 </method>
9131
9132 <method name="refreshState">
9133 <desc>
9134 If the current medium state (see <link to="MediumState"/>) is one of
9135 "Created", "Inaccessible" or "LockedRead", then this performs an
9136 accessibility check on the medium and sets the value of the <link to="#state"/>
9137 attribute accordingly; that value is also returned for convenience.
9138
9139 For all other state values, this does not perform a refresh but returns
9140 the state only.
9141
9142 The refresh, if performed, may take a long time (several seconds or even
9143 minutes, depending on the storage unit location and format) because it performs an
9144 accessibility check of the storage unit. This check may cause a significant
9145 delay if the storage unit of the given medium is, for example, a file located
9146 on a network share which is not currently accessible due to connectivity
9147 problems. In that case, the call will not return until a timeout
9148 interval defined by the host OS for this operation expires. For this reason,
9149 it is recommended to never read this attribute on the main UI thread to avoid
9150 making the UI unresponsive.
9151
9152 If the last known state of the medium is "Created" and the accessibility
9153 check fails, then the state would be set to "Inaccessible", and
9154 <link to="#lastAccessError"/> may be used to get more details about the
9155 failure. If the state of the medium is "LockedRead", then it remains the
9156 same, and a non-empty value of <link to="#lastAccessError"/> will
9157 indicate a failed accessibility check in this case.
9158
9159 Note that not all medium states are applicable to all medium types.
9160 </desc>
9161 <param name="state" type="MediumState" dir="return">
9162 <desc>
9163 New medium state.
9164 </desc>
9165 </param>
9166 </method>
9167
9168 <method name="getSnapshotIds">
9169 <desc>
9170 Returns an array of UUIDs of all snapshots of the given machine where
9171 this medium is attached to.
9172
9173 If the medium is attached to the machine in the current state, then the
9174 first element in the array will always be the ID of the queried machine
9175 (i.e. the value equal to the @c machineId argument), followed by
9176 snapshot IDs (if any).
9177
9178 If the medium is not attached to the machine in the current state, then
9179 the array will contain only snapshot IDs.
9180
9181 The returned array may be @c null if this medium is not attached
9182 to the given machine at all, neither in the current state nor in one of
9183 the snapshots.
9184 </desc>
9185 <param name="machineId" type="uuid" mod="string" dir="in">
9186 <desc>
9187 UUID of the machine to query.
9188 </desc>
9189 </param>
9190 <param name="snapshotIds" type="uuid" mod="string" safearray="yes" dir="return">
9191 <desc>
9192 Array of snapshot UUIDs of the given machine using this medium.
9193 </desc>
9194 </param>
9195 </method>
9196
9197 <method name="lockRead">
9198 <desc>
9199 Locks this medium for reading.
9200
9201 A read lock is shared: many clients can simultaneously lock the
9202 same medium for reading unless it is already locked for writing (see
9203 <link to="#lockWrite"/>) in which case an error is returned.
9204
9205 When the medium is locked for reading, it cannot be modified
9206 from within VirtualBox. This means that any method that changes
9207 the properties of this medium or contents of the storage unit
9208 will return an error (unless explicitly stated otherwise). That
9209 includes an attempt to start a virtual machine that wants to
9210 write to the the medium.
9211
9212 When the virtual machine is started up, it locks for reading all
9213 media it uses in read-only mode. If some medium cannot be locked
9214 for reading, the startup procedure will fail.
9215 A medium is typically locked for reading while it is used by a running
9216 virtual machine but has a depending differencing image that receives
9217 the actual write operations. This way one base medium can have
9218 multiple child differencing images which can be written to
9219 simultaneously. Read-only media such as DVD and floppy images are
9220 also locked for reading only (so they can be in use by multiple
9221 machines simultaneously).
9222
9223 A medium is also locked for reading when it is the source of a
9224 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9225
9226 The medium locked for reading must be unlocked using the <link
9227 to="#unlockRead"/> method. Calls to <link to="#lockRead"/>
9228 can be nested and must be followed by the same number of paired
9229 <link to="#unlockRead"/> calls.
9230
9231 This method sets the medium state (see <link to="#state"/>) to
9232 "LockedRead" on success. The medium's previous state must be
9233 one of "Created", "Inaccessible" or "LockedRead".
9234
9235 Locking an inaccessible medium is not an error; this method performs
9236 a logical lock that prevents modifications of this medium through
9237 the VirtualBox API, not a physical file-system lock of the underlying
9238 storage unit.
9239
9240 This method returns the current state of the medium
9241 <i>before</i> the operation.
9242
9243 <result name="VBOX_E_INVALID_OBJECT_STATE">
9244 Invalid medium state (e.g. not created, locked, inaccessible,
9245 creating, deleting).
9246 </result>
9247
9248 </desc>
9249 <param name="state" type="MediumState" dir="return">
9250 <desc>
9251 State of the medium after the operation.
9252 </desc>
9253 </param>
9254 </method>
9255
9256 <method name="unlockRead">
9257 <desc>
9258 Cancels the read lock previously set by <link to="#lockRead"/>.
9259
9260 For both success and failure, this method returns the current state
9261 of the medium <i>after</i> the operation.
9262
9263 See <link to="#lockRead"/> for more details.
9264
9265 <result name="VBOX_E_INVALID_OBJECT_STATE">
9266 Medium not locked for reading.
9267 </result>
9268
9269 </desc>
9270 <param name="state" type="MediumState" dir="return">
9271 <desc>
9272 State of the medium after the operation.
9273 </desc>
9274 </param>
9275 </method>
9276
9277 <method name="lockWrite">
9278 <desc>
9279 Locks this medium for writing.
9280
9281 A write lock, as opposed to <link to="#lockRead"/>, is
9282 exclusive: there may be only one client holding a write lock,
9283 and there may be no read locks while the write lock is held.
9284 As a result, read-locking fails if a write lock is held, and
9285 write-locking fails if either a read or another write lock is held.
9286
9287 When a medium is locked for writing, it cannot be modified
9288 from within VirtualBox, and it is not guaranteed that the values
9289 of its properties are up-to-date. Any method that changes the
9290 properties of this medium or contents of the storage unit will
9291 return an error (unless explicitly stated otherwise).
9292
9293 When a virtual machine is started up, it locks for writing all
9294 media it uses to write data to. If any medium could not be locked
9295 for writing, the startup procedure will fail. If a medium has
9296 differencing images, then while the machine is running, only
9297 the last ("leaf") differencing image is locked for writing,
9298 whereas its parents are locked for reading only.
9299
9300 A medium is also locked for writing when it is the target of a
9301 write operation such as <link to="#cloneTo"/> or <link to="#mergeTo"/>.
9302
9303 The medium locked for writing must be unlocked using the <link
9304 to="#unlockWrite"/> method. Write locks <i>cannot</i> be nested.
9305
9306 This method sets the medium state (see <link to="#state"/>) to
9307 "LockedWrite" on success. The medium's previous state must be
9308 either "Created" or "Inaccessible".
9309
9310 Locking an inaccessible medium is not an error; this method performs
9311 a logical lock that prevents modifications of this medium through
9312 the VirtualBox API, not a physical file-system lock of the underlying
9313 storage unit.
9314
9315 For both, success and failure, this method returns the current
9316 state of the medium <i>before</i> the operation.
9317
9318 <result name="VBOX_E_INVALID_OBJECT_STATE">
9319 Invalid medium state (e.g. not created, locked, inaccessible,
9320 creating, deleting).
9321 </result>
9322
9323 </desc>
9324 <param name="state" type="MediumState" dir="return">
9325 <desc>
9326 State of the medium after the operation.
9327 </desc>
9328 </param>
9329 </method>
9330
9331 <method name="unlockWrite">
9332 <desc>
9333 Cancels the write lock previously set by <link to="#lockWrite"/>.
9334
9335 For both success and failure, this method returns the current
9336 state of the medium <i>after</i> the operation.
9337
9338 See <link to="#lockWrite"/> for more details.
9339
9340 <result name="VBOX_E_INVALID_OBJECT_STATE">
9341 Medium not locked for writing.
9342 </result>
9343
9344 </desc>
9345 <param name="state" type="MediumState" dir="return">
9346 <desc>
9347 State of the medium after the operation.
9348 </desc>
9349 </param>
9350 </method>
9351
9352 <method name="close">
9353 <desc>
9354 Closes this medium.
9355
9356 The medium must not be attached to any known virtual machine
9357 and must not have any known child media, otherwise the
9358 operation will fail.
9359
9360 When the medium is successfully closed, it is removed from
9361 the list of registered media, but its storage unit is not
9362 deleted. In particular, this means that this medium can
9363 later be opened again using the <link to="IVirtualBox::openMedium"/>
9364 call.
9365
9366 Note that after this method successfully returns, the given medium
9367 object becomes uninitialized. This means that any attempt
9368 to call any of its methods or attributes will fail with the
9369 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error.
9370
9371 <result name="VBOX_E_INVALID_OBJECT_STATE">
9372 Invalid medium state (other than not created, created or
9373 inaccessible).
9374 </result>
9375 <result name="VBOX_E_OBJECT_IN_USE">
9376 Medium attached to virtual machine.
9377 </result>
9378 <result name="VBOX_E_FILE_ERROR">
9379 Settings file not accessible.
9380 </result>
9381 <result name="VBOX_E_XML_ERROR">
9382 Could not parse the settings file.
9383 </result>
9384
9385 </desc>
9386 </method>
9387
9388 <!-- storage methods -->
9389
9390 <method name="getProperty">
9391 <desc>
9392 Returns the value of the custom medium property with the given name.
9393
9394 The list of all properties supported by the given medium format can
9395 be obtained with <link to="IMediumFormat::describeProperties"/>.
9396
9397 Note that if this method returns an empty string in @a value, the
9398 requested property is supported but currently not assigned any value.
9399
9400 <result name="VBOX_E_OBJECT_NOT_FOUND">
9401 Requested property does not exist (not supported by the format).
9402 </result>
9403 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9404 </desc>
9405 <param name="name" type="wstring" dir="in">
9406 <desc>Name of the property to get.</desc>
9407 </param>
9408 <param name="value" type="wstring" dir="return">
9409 <desc>Current property value.</desc>
9410 </param>
9411 </method>
9412
9413 <method name="setProperty">
9414 <desc>
9415 Sets the value of the custom medium property with the given name.
9416
9417 The list of all properties supported by the given medium format can
9418 be obtained with <link to="IMediumFormat::describeProperties"/>.
9419
9420 Note that setting the property value to @c null or an empty string is
9421 equivalent to deleting the existing value. A default value (if it is
9422 defined for this property) will be used by the format backend in this
9423 case.
9424
9425 <result name="VBOX_E_OBJECT_NOT_FOUND">
9426 Requested property does not exist (not supported by the format).
9427 </result>
9428 <result name="E_INVALIDARG">@a name is @c null or empty.</result>
9429 </desc>
9430 <param name="name" type="wstring" dir="in">
9431 <desc>Name of the property to set.</desc>
9432 </param>
9433 <param name="value" type="wstring" dir="in">
9434 <desc>Property value to set.</desc>
9435 </param>
9436 </method>
9437
9438 <method name="getProperties">
9439 <desc>
9440 Returns values for a group of properties in one call.
9441
9442 The names of the properties to get are specified using the @a names
9443 argument which is a list of comma-separated property names or
9444 an empty string if all properties are to be returned. Note that currently
9445 the value of this argument is ignored and the method always returns all
9446 existing properties.
9447
9448 The list of all properties supported by the given medium format can
9449 be obtained with <link to="IMediumFormat::describeProperties"/>.
9450
9451 The method returns two arrays, the array of property names corresponding
9452 to the @a names argument and the current values of these properties.
9453 Both arrays have the same number of elements with each elemend at the
9454 given index in the first array corresponds to an element at the same
9455 index in the second array.
9456
9457 Note that for properties that do not have assigned values,
9458 an empty string is returned at the appropriate index in the
9459 @a returnValues array.
9460
9461 </desc>
9462 <param name="names" type="wstring" dir="in">
9463 <desc>
9464 Names of properties to get.
9465 </desc>
9466 </param>
9467 <param name="returnNames" type="wstring" safearray="yes" dir="out">
9468 <desc>Names of returned properties.</desc>
9469 </param>
9470 <param name="returnValues" type="wstring" safearray="yes" dir="return">
9471 <desc>Values of returned properties.</desc>
9472 </param>
9473 </method>
9474
9475 <method name="setProperties">
9476 <desc>
9477 Sets values for a group of properties in one call.
9478
9479 The names of the properties to set are passed in the @a names
9480 array along with the new values for them in the @a values array. Both
9481 arrays have the same number of elements with each elemend at the given
9482 index in the first array corresponding to an element at the same index
9483 in the second array.
9484
9485 If there is at least one property name in @a names that is not valid,
9486 the method will fail before changing the values of any other properties
9487 from the @a names array.
9488
9489 Using this method over <link to="#setProperty"/> is preferred if you
9490 need to set several properties at once since it will result into less
9491 IPC calls.
9492
9493 The list of all properties supported by the given medium format can
9494 be obtained with <link to="IMediumFormat::describeProperties"/>.
9495
9496 Note that setting the property value to @c null or an empty string is
9497 equivalent to deleting the existing value. A default value (if it is
9498 defined for this property) will be used by the format backend in this
9499 case.
9500 </desc>
9501 <param name="names" type="wstring" safearray="yes" dir="in">
9502 <desc>Names of properties to set.</desc>
9503 </param>
9504 <param name="values" type="wstring" safearray="yes" dir="in">
9505 <desc>Values of properties to set.</desc>
9506 </param>
9507 </method>
9508
9509 <!-- storage methods -->
9510
9511 <method name="createBaseStorage">
9512 <desc>
9513 Starts creating a hard disk storage unit (fixed/dynamic, according
9514 to the variant flags) in in the background. The previous storage unit
9515 created for this object, if any, must first be deleted using
9516 <link to="#deleteStorage"/>, otherwise the operation will fail.
9517
9518 Before the operation starts, the medium is placed in
9519 <link to="MediumState::Creating"/> state. If the create operation
9520 fails, the medium will be placed back in <link to="MediumState::NotCreated"/>
9521 state.
9522
9523 After the returned progress object reports that the operation has
9524 successfully completed, the medium state will be set to <link
9525 to="MediumState::Created"/>, the medium will be remembered by this
9526 VirtualBox installation and may be attached to virtual machines.
9527
9528 <result name="VBOX_E_NOT_SUPPORTED">
9529 The variant of storage creation operation is not supported. See <link
9530 to="IMediumFormat::capabilities"/>.
9531 </result>
9532 </desc>
9533 <param name="logicalSize" type="unsigned long long" dir="in">
9534 <desc>Maximum logical size of the medium in megabytes.</desc>
9535 </param>
9536 <param name="variant" type="MediumVariant" dir="in">
9537 <desc>Exact image variant which should be created.</desc>
9538 </param>
9539 <param name="progress" type="IProgress" dir="return">
9540 <desc>Progress object to track the operation completion.</desc>
9541 </param>
9542 </method>
9543
9544 <method name="deleteStorage">
9545 <desc>
9546 Starts deleting the storage unit of this medium.
9547
9548 The medium must not be attached to any known virtual machine and must
9549 not have any known child media, otherwise the operation will fail.
9550 It will also fail if there is no storage unit to delete or if deletion
9551 is already in progress, or if the medium is being in use (locked for
9552 read or for write) or inaccessible. Therefore, the only valid state for
9553 this operation to succeed is <link to="MediumState::Created"/>.
9554
9555 Before the operation starts, the medium is placed in
9556 <link to="MediumState::Deleting"/> state and gets removed from the list
9557 of remembered hard disks (media registry). If the delete operation
9558 fails, the medium will be remembered again and placed back to
9559 <link to="MediumState::Created"/> state.
9560
9561 After the returned progress object reports that the operation is
9562 complete, the medium state will be set to
9563 <link to="MediumState::NotCreated"/> and you will be able to use one of
9564 the storage creation methods to create it again.
9565
9566 <see>#close()</see>
9567
9568 <result name="VBOX_E_OBJECT_IN_USE">
9569 Medium is attached to a virtual machine.
9570 </result>
9571 <result name="VBOX_E_NOT_SUPPORTED">
9572 Storage deletion is not allowed because neither of storage creation
9573 operations are supported. See
9574 <link to="IMediumFormat::capabilities"/>.
9575 </result>
9576
9577 <note>
9578 If the deletion operation fails, it is not guaranteed that the storage
9579 unit still exists. You may check the <link to="IMedium::state"/> value
9580 to answer this question.
9581 </note>
9582 </desc>
9583 <param name="progress" type="IProgress" dir="return">
9584 <desc>Progress object to track the operation completion.</desc>
9585 </param>
9586 </method>
9587
9588 <!-- diff methods -->
9589
9590 <method name="createDiffStorage">
9591 <desc>
9592 Starts creating an empty differencing storage unit based on this
9593 medium in the format and at the location defined by the @a target
9594 argument.
9595
9596 The target medium must be in <link to="MediumState::NotCreated"/>
9597 state (i.e. must not have an existing storage unit). Upon successful
9598 completion, this operation will set the type of the target medium to
9599 <link to="MediumType::Normal"/> and create a storage unit necessary to
9600 represent the differencing medium data in the given format (according
9601 to the storage format of the target object).
9602
9603 After the returned progress object reports that the operation is
9604 successfully complete, the target medium gets remembered by this
9605 VirtualBox installation and may be attached to virtual machines.
9606
9607 <note>
9608 The medium will be set to <link to="MediumState::LockedRead"/>
9609 state for the duration of this operation.
9610 </note>
9611 <result name="VBOX_E_OBJECT_IN_USE">
9612 Medium not in @c NotCreated state.
9613 </result>
9614 </desc>
9615 <param name="target" type="IMedium" dir="in">
9616 <desc>Target medium.</desc>
9617 </param>
9618 <param name="variant" type="MediumVariant" dir="in">
9619 <desc>Exact image variant which should be created.</desc>
9620 </param>
9621 <param name="progress" type="IProgress" dir="return">
9622 <desc>Progress object to track the operation completion.</desc>
9623 </param>
9624 </method>
9625
9626 <method name="mergeTo">
9627 <desc>
9628 Starts merging the contents of this medium and all intermediate
9629 differencing media in the chain to the given target medium.
9630
9631 The target medium must be either a descendant of this medium or
9632 its ancestor (otherwise this method will immediately return a failure).
9633 It follows that there are two logical directions of the merge operation:
9634 from ancestor to descendant (<i>forward merge</i>) and from descendant to
9635 ancestor (<i>backward merge</i>). Let us consider the following medium
9636 chain:
9637
9638 <pre>Base &lt;- Diff_1 &lt;- Diff_2</pre>
9639
9640 Here, calling this method on the <tt>Base</tt> medium object with
9641 <tt>Diff_2</tt> as an argument will be a forward merge; calling it on
9642 <tt>Diff_2</tt> with <tt>Base</tt> as an argument will be a backward
9643 merge. Note that in both cases the contents of the resulting medium
9644 will be the same, the only difference is the medium object that takes
9645 the result of the merge operation. In case of the forward merge in the
9646 above example, the result will be written to <tt>Diff_2</tt>; in case of
9647 the backward merge, the result will be written to <tt>Base</tt>. In
9648 other words, the result of the operation is always stored in the target
9649 medium.
9650
9651 Upon successful operation completion, the storage units of all media in
9652 the chain between this (source) medium and the target medium, including
9653 the source medium itself, will be automatically deleted and the
9654 relevant medium objects (including this medium) will become
9655 uninitialized. This means that any attempt to call any of
9656 their methods or attributes will fail with the
9657 <tt>"Object not ready" (E_ACCESSDENIED)</tt> error. Applied to the above
9658 example, the forward merge of <tt>Base</tt> to <tt>Diff_2</tt> will
9659 delete and uninitialize both <tt>Base</tt> and <tt>Diff_1</tt> media.
9660 Note that <tt>Diff_2</tt> in this case will become a base medium
9661 itself since it will no longer be based on any other medium.
9662
9663 Considering the above, all of the following conditions must be met in
9664 order for the merge operation to succeed:
9665 <ul>
9666 <li>
9667 Neither this (source) medium nor any intermediate
9668 differencing medium in the chain between it and the target
9669 medium is attached to any virtual machine.
9670 </li>
9671 <li>
9672 Neither the source medium nor the target medium is an
9673 <link to="MediumType::Immutable"/> medium.
9674 </li>
9675 <li>
9676 The part of the medium tree from the source medium to the
9677 target medium is a linear chain, i.e. all medium in this
9678 chain have exactly one child which is the next medium in this
9679 chain. The only exception from this rule is the target medium in
9680 the forward merge operation; it is allowed to have any number of
9681 child media because the merge operation will not change its
9682 logical contents (as it is seen by the guest OS or by children).
9683 </li>
9684 <li>
9685 None of the involved media are in
9686 <link to="MediumState::LockedRead"/> or
9687 <link to="MediumState::LockedWrite"/> state.
9688 </li>
9689 </ul>
9690
9691 <note>
9692 This (source) medium and all intermediates will be placed to <link
9693 to="MediumState::Deleting"/> state and the target medium will be
9694 placed to <link to="MediumState::LockedWrite"/> state and for the
9695 duration of this operation.
9696 </note>
9697 </desc>
9698 <param name="target" type="IMedium" dir="in">
9699 <desc>Target medium.</desc>
9700 </param>
9701 <param name="progress" type="IProgress" dir="return">
9702 <desc>Progress object to track the operation completion.</desc>
9703 </param>
9704 </method>
9705
9706 <!-- clone method -->
9707
9708 <method name="cloneTo">
9709 <desc>
9710 Starts creating a clone of this medium in the format and at the
9711 location defined by the @a target argument.
9712
9713 The target medium must be either in <link to="MediumState::NotCreated"/>
9714 state (i.e. must not have an existing storage unit) or in
9715 <link to="MediumState::Created"/> state (i.e. created and not locked, and
9716 big enough to hold the data or else the copy will be partial). Upon
9717 successful completion, the cloned medium will contain exactly the
9718 same sector data as the medium being cloned, except that in the
9719 first case a new UUID for the clone will be randomly generated, and in
9720 the second case the UUID will remain unchanged.
9721
9722 The @a parent argument defines which medium will be the parent
9723 of the clone. Passing a @c null reference indicates that the clone will
9724 be a base image, i.e. completely independent. It is possible to specify
9725 an arbitrary medium for this parameter, including the parent of the
9726 medium which is being cloned. Even cloning to a child of the source
9727 medium is possible. Note that when cloning to an existing image, the
9728 @a parent irgument is ignored.
9729
9730 After the returned progress object reports that the operation is
9731 successfully complete, the target medium gets remembered by this
9732 VirtualBox installation and may be attached to virtual machines.
9733
9734 <note>
9735 This medium will be placed to <link to="MediumState::LockedRead"/>
9736 state for the duration of this operation.
9737 </note>
9738 <result name="E_NOTIMPL">
9739 The specified cloning variant is not supported at the moment.
9740 </result>
9741 </desc>
9742 <param name="target" type="IMedium" dir="in">
9743 <desc>Target medium.</desc>
9744 </param>
9745 <param name="variant" type="MediumVariant" dir="in">
9746 <desc>Exact image variant which should be created.</desc>
9747 </param>
9748 <param name="parent" type="IMedium" dir="in">
9749 <desc>Parent of the cloned medium.</desc>
9750 </param>
9751 <param name="progress" type="IProgress" dir="return">
9752 <desc>Progress object to track the operation completion.</desc>
9753 </param>
9754 </method>
9755
9756 <!-- other methods -->
9757
9758 <method name="compact">
9759 <desc>
9760 Starts compacting of this medium. This means that the medium is
9761 transformed into a possibly more compact storage representation.
9762 This potentially creates temporary images, which can require a
9763 substantial amount of additional disk space.
9764
9765 This medium will be placed to <link to="MediumState::LockedWrite"/>
9766 state and all its parent media (if any) will be placed to
9767 <link to="MediumState::LockedRead"/> state for the duration of this
9768 operation.
9769
9770 Please note that the results can be either returned straight away,
9771 or later as the result of the background operation via the object
9772 returned via the @a progress parameter.
9773
9774 <result name="VBOX_E_NOT_SUPPORTED">
9775 Medium format does not support compacting (but potentially
9776 needs it).
9777 </result>
9778 </desc>
9779 <param name="progress" type="IProgress" dir="return">
9780 <desc>Progress object to track the operation completion.</desc>
9781 </param>
9782 </method>
9783
9784 <method name="resize">
9785 <desc>
9786 Starts resizing this medium. This means that the nominal size of the
9787 medium is set to the new value. Both increasing and decreasing the
9788 size is possible, and there are no safety checks, since VirtualBox
9789 does not make any assumptions about the medium contents.
9790
9791 Resizing usually needs additional disk space, and possibly also
9792 some temporary disk space. Note that resize does not create a full
9793 temporary copy of the medium, so the additional disk space requirement
9794 is usually much lower than using the clone operation.
9795
9796 This medium will be placed to <link to="MediumState::LockedWrite"/>
9797 state for the duration of this operation.
9798
9799 Please note that the results can be either returned straight away,
9800 or later as the result of the background operation via the object
9801 returned via the @a progress parameter.
9802
9803 <result name="VBOX_E_NOT_SUPPORTED">
9804 Medium format does not support resizing.
9805 </result>
9806 </desc>
9807 <param name="logicalSize" type="unsigned long long" dir="in">
9808 <desc>New nominal capacity of the medium in megabytes.</desc>
9809 </param>
9810 <param name="progress" type="IProgress" dir="return">
9811 <desc>Progress object to track the operation completion.</desc>
9812 </param>
9813 </method>
9814
9815 <method name="reset">
9816 <desc>
9817 Starts erasing the contents of this differencing medium.
9818
9819 This operation will reset the differencing medium to its initial
9820 state when it does not contain any sector data and any read operation is
9821 redirected to its parent medium. This automatically gets called
9822 during VM power-up for every medium whose <link to="#autoReset" />
9823 attribute is @c true.
9824
9825 The medium will be write-locked for the duration of this operation (see
9826 <link to="#lockWrite" />).
9827
9828 <result name="VBOX_E_NOT_SUPPORTED">
9829 This is not a differencing medium.
9830 </result>
9831 <result name="VBOX_E_INVALID_OBJECT_STATE">
9832 Medium is not in <link to="MediumState::Created"/> or
9833 <link to="MediumState::Inaccessible"/> state.
9834 </result>
9835 </desc>
9836 <param name="progress" type="IProgress" dir="return">
9837 <desc>Progress object to track the operation completion.</desc>
9838 </param>
9839 </method>
9840
9841 </interface>
9842
9843
9844 <!--
9845 // IMediumFormat
9846 /////////////////////////////////////////////////////////////////////////
9847 -->
9848
9849 <enum
9850 name="DataType"
9851 uuid="d90ea51e-a3f1-4a01-beb1-c1723c0d3ba7"
9852 >
9853 <const name="Int32" value="0"/>
9854 <const name="Int8" value="1"/>
9855 <const name="String" value="2"/>
9856 </enum>
9857
9858 <enum
9859 name="DataFlags"
9860 uuid="86884dcf-1d6b-4f1b-b4bf-f5aa44959d60"
9861 >
9862 <const name="None" value="0x00"/>
9863 <const name="Mandatory" value="0x01"/>
9864 <const name="Expert" value="0x02"/>
9865 <const name="Array" value="0x04"/>
9866 <const name="FlagMask" value="0x07"/>
9867 </enum>
9868
9869 <enum
9870 name="MediumFormatCapabilities"
9871 uuid="70fcf810-99e8-4edc-aee4-7f51d489e657"
9872 >
9873 <desc>
9874 Medium format capability flags.
9875 </desc>
9876
9877 <const name="Uuid" value="0x01">
9878 <desc>
9879 Supports UUIDs as expected by VirtualBox code.
9880 </desc>
9881 </const>
9882
9883 <const name="CreateFixed" value="0x02">
9884 <desc>
9885 Supports creating fixed size images, allocating all space instantly.
9886 </desc>
9887 </const>
9888
9889 <const name="CreateDynamic" value="0x04">
9890 <desc>
9891 Supports creating dynamically growing images, allocating space on
9892 demand.
9893 </desc>
9894 </const>
9895
9896 <const name="CreateSplit2G" value="0x08">
9897 <desc>
9898 Supports creating images split in chunks of a bit less than 2 GBytes.
9899 </desc>
9900 </const>
9901
9902 <const name="Differencing" value="0x10">
9903 <desc>
9904 Supports being used as a format for differencing media (see <link
9905 to="IMedium::createDiffStorage"/>).
9906 </desc>
9907 </const>
9908
9909 <const name="Asynchronous" value="0x20">
9910 <desc>
9911 Supports asynchronous I/O operations for at least some configurations.
9912 </desc>
9913 </const>
9914
9915 <const name="File" value="0x40">
9916 <desc>
9917 The format backend operates on files (the <link to="IMedium::location"/>
9918 attribute of the medium specifies a file used to store medium
9919 data; for a list of supported file extensions see
9920 <link to="IMediumFormat::fileExtensions"/>).
9921 </desc>
9922 </const>
9923
9924 <const name="Properties" value="0x80">
9925 <desc>
9926 The format backend uses the property interface to configure the storage
9927 location and properties (the <link to="IMediumFormat::describeProperties"/>
9928 method is used to get access to properties supported by the given medium format).
9929 </desc>
9930 </const>
9931
9932 <const name="CapabilityMask" value="0xFF"/>
9933 </enum>
9934
9935 <interface
9936 name="IMediumFormat" extends="$unknown"
9937 uuid="89f52554-d469-4799-9fad-1705e86a08b1"
9938 wsmap="managed"
9939 >
9940 <desc>
9941 The IMediumFormat interface represents a medium format.
9942
9943 Each medium format has an associated backend which is used to handle
9944 media stored in this format. This interface provides information
9945 about the properties of the associated backend.
9946
9947 Each medium format is identified by a string represented by the
9948 <link to="#id"/> attribute. This string is used in calls like
9949 <link to="IVirtualBox::createHardDisk"/> to specify the desired
9950 format.
9951
9952 The list of all supported medium formats can be obtained using
9953 <link to="ISystemProperties::mediumFormats"/>.
9954
9955 <see>IMedium</see>
9956 </desc>
9957
9958 <attribute name="id" type="wstring" readonly="yes">
9959 <desc>
9960 Identifier of this format.
9961
9962 The format identifier is a non-@c null non-empty ASCII string. Note that
9963 this string is case-insensitive. This means that, for example, all of
9964 the following strings:
9965 <pre>
9966 "VDI"
9967 "vdi"
9968 "VdI"</pre>
9969 refer to the same medium format.
9970
9971 This string is used in methods of other interfaces where it is necessary
9972 to specify a medium format, such as
9973 <link to="IVirtualBox::createHardDisk"/>.
9974 </desc>
9975 </attribute>
9976
9977 <attribute name="name" type="wstring" readonly="yes">
9978 <desc>
9979 Human readable description of this format.
9980
9981 Mainly for use in file open dialogs.
9982 </desc>
9983 </attribute>
9984
9985 <attribute name="fileExtensions" type="wstring" safearray="yes" readonly="yes">
9986 <desc>
9987 Array of strings containing the supported file extensions.
9988
9989 The first extension in the array is the extension preferred by the
9990 backend. It is recommended to use this extension when specifying a
9991 location of the storage unit for a new medium.
9992
9993 Note that some backends do not work on files, so this array may be
9994 empty.
9995
9996 <see>IMediumFormat::capabilities</see>
9997 </desc>
9998 </attribute>
9999
10000 <attribute name="capabilities" type="unsigned long" readonly="yes">
10001 <desc>
10002 Capabilities of the format as a set of bit flags.
10003
10004 For the meaning of individual capability flags see
10005 <link to="MediumFormatCapabilities"/>.
10006 </desc>
10007 </attribute>
10008
10009 <method name="describeProperties">
10010 <desc>
10011 Returns several arrays describing the properties supported by this
10012 format.
10013
10014 An element with the given index in each array describes one
10015 property. Thus, the number of elements in each returned array is the
10016 same and corresponds to the number of supported properties.
10017
10018 The returned arrays are filled in only if the
10019 <link to="MediumFormatCapabilities::Properties"/> flag is set.
10020 All arguments must be non-@c null.
10021
10022 <see>DataType</see>
10023 <see>DataFlags</see>
10024 </desc>
10025
10026 <param name="names" type="wstring" safearray="yes" dir="out">
10027 <desc>Array of property names.</desc>
10028 </param>
10029 <param name="description" type="wstring" safearray="yes" dir="out">
10030 <desc>Array of property descriptions.</desc>
10031 </param>
10032 <param name="types" type="DataType" safearray="yes" dir="out">
10033 <desc>Array of property types.</desc>
10034 </param>
10035 <param name="flags" type="unsigned long" safearray="yes" dir="out">
10036 <desc>Array of property flags.</desc>
10037 </param>
10038 <param name="defaults" type="wstring" safearray="yes" dir="out">
10039 <desc>Array of default property values.</desc>
10040 </param>
10041 </method>
10042
10043 </interface>
10044
10045
10046 <!--
10047 // IKeyboard
10048 /////////////////////////////////////////////////////////////////////////
10049 -->
10050
10051 <interface
10052 name="IKeyboard" extends="$unknown"
10053 uuid="2d1a531b-4c6e-49cc-8af6-5c857b78b5d7"
10054 wsmap="managed"
10055 >
10056 <desc>
10057 The IKeyboard interface represents the virtual machine's keyboard. Used
10058 in <link to="IConsole::keyboard"/>.
10059
10060 Use this interface to send keystrokes or the Ctrl-Alt-Del sequence
10061 to the virtual machine.
10062
10063 </desc>
10064 <method name="putScancode">
10065 <desc>Sends a scancode to the keyboard.
10066
10067 <result name="VBOX_E_IPRT_ERROR">
10068 Could not send scan code to virtual keyboard.
10069 </result>
10070
10071 </desc>
10072 <param name="scancode" type="long" dir="in"/>
10073 </method>
10074
10075 <method name="putScancodes">
10076 <desc>Sends an array of scancodes to the keyboard.
10077
10078 <result name="VBOX_E_IPRT_ERROR">
10079 Could not send all scan codes to virtual keyboard.
10080 </result>
10081
10082 </desc>
10083 <param name="scancodes" type="long" dir="in" safearray="yes"/>
10084 <param name="codesStored" type="unsigned long" dir="return"/>
10085 </method>
10086
10087 <method name="putCAD">
10088 <desc>Sends the Ctrl-Alt-Del sequence to the keyboard. This
10089 function is nothing special, it is just a convenience function
10090 calling <link to="IKeyboard::putScancodes"/> with the proper scancodes.
10091
10092 <result name="VBOX_E_IPRT_ERROR">
10093 Could not send all scan codes to virtual keyboard.
10094 </result>
10095
10096 </desc>
10097 </method>
10098
10099 </interface>
10100
10101
10102 <!--
10103 // IMouse
10104 /////////////////////////////////////////////////////////////////////////
10105 -->
10106
10107 <enum
10108 name="MouseButtonState"
10109 uuid="9ee094b8-b28a-4d56-a166-973cb588d7f8"
10110 >
10111 <desc>
10112 Mouse button state.
10113 </desc>
10114
10115 <const name="LeftButton" value="0x01"/>
10116 <const name="RightButton" value="0x02"/>
10117 <const name="MiddleButton" value="0x04"/>
10118 <const name="WheelUp" value="0x08"/>
10119 <const name="WheelDown" value="0x10"/>
10120 <const name="XButton1" value="0x20"/>
10121 <const name="XButton2" value="0x40"/>
10122 <const name="MouseStateMask" value="0x7F"/>
10123 </enum>
10124
10125 <interface
10126 name="IMouse" extends="$unknown"
10127 uuid="7c0f2eae-f92d-498c-b802-e1a3763774dc"
10128 wsmap="managed"
10129 >
10130 <desc>
10131 The IMouse interface represents the virtual machine's mouse. Used in
10132 <link to="IConsole::mouse"/>.
10133
10134 Through this interface, the virtual machine's virtual mouse can be
10135 controlled.
10136 </desc>
10137
10138 <attribute name="absoluteSupported" type="boolean" readonly="yes">
10139 <desc>
10140 Whether the guest OS supports absolute mouse pointer positioning
10141 or not.
10142 <note>
10143 You can use the <link to="IMouseCapabilityChangedEvent"/>
10144 event to be instantly informed about changes of this attribute
10145 during virtual machine execution.
10146 </note>
10147 <see><link to="#putMouseEventAbsolute"/></see>
10148 </desc>
10149 </attribute>
10150
10151 <attribute name="relativeSupported" type="boolean" readonly="yes">
10152 <desc>
10153 Whether the guest OS supports relative mouse pointer positioning
10154 or not.
10155 <note>
10156 You can use the <link to="IMouseCapabilityChangedEvent"/>
10157 event to be instantly informed about changes of this attribute
10158 during virtual machine execution.
10159 </note>
10160 <see><link to="#putMouseEvent"/></see>
10161 </desc>
10162 </attribute>
10163
10164 <attribute name="needsHostCursor" type="boolean" readonly="yes">
10165 <desc>
10166 Whether the guest OS can currently switch to drawing it's own mouse
10167 cursor on demand.
10168 <note>
10169 You can use the <link to="IMouseCapabilityChangedEvent"/>
10170 event to be instantly informed about changes of this attribute
10171 during virtual machine execution.
10172 </note>
10173 <see><link to="#putMouseEvent"/></see>
10174 </desc>
10175 </attribute>
10176
10177 <method name="putMouseEvent">
10178 <desc>
10179 Initiates a mouse event using relative pointer movements
10180 along x and y axis.
10181
10182 <result name="E_ACCESSDENIED">
10183 Console not powered up.
10184 </result>
10185 <result name="VBOX_E_IPRT_ERROR">
10186 Could not send mouse event to virtual mouse.
10187 </result>
10188
10189 </desc>
10190
10191 <param name="dx" type="long" dir="in">
10192 <desc>
10193 Amount of pixels the mouse should move to the right.
10194 Negative values move the mouse to the left.
10195 </desc>
10196 </param>
10197 <param name="dy" type="long" dir="in">
10198 <desc>
10199 Amount of pixels the mouse should move downwards.
10200 Negative values move the mouse upwards.
10201 </desc>
10202 </param>
10203 <param name="dz" type="long" dir="in">
10204 <desc>
10205 Amount of mouse wheel moves.
10206 Positive values describe clockwise wheel rotations,
10207 negative values describe counterclockwise rotations.
10208 </desc>
10209 </param>
10210 <param name="dw" type="long" dir="in">
10211 <desc>
10212 Amount of horizontal mouse wheel moves.
10213 Positive values describe a movement to the left,
10214 negative values describe a movement to the right.
10215 </desc>
10216 </param>
10217 <param name="buttonState" type="long" dir="in">
10218 <desc>
10219 The current state of mouse buttons. Every bit represents
10220 a mouse button as follows:
10221 <table>
10222 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10223 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10224 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10225 </table>
10226 A value of <tt>1</tt> means the corresponding button is pressed.
10227 otherwise it is released.
10228 </desc>
10229 </param>
10230 </method>
10231
10232 <method name="putMouseEventAbsolute">
10233 <desc>
10234 Positions the mouse pointer using absolute x and y coordinates.
10235 These coordinates are expressed in pixels and
10236 start from <tt>[1,1]</tt> which corresponds to the top left
10237 corner of the virtual display.
10238
10239 <result name="E_ACCESSDENIED">
10240 Console not powered up.
10241 </result>
10242 <result name="VBOX_E_IPRT_ERROR">
10243 Could not send mouse event to virtual mouse.
10244 </result>
10245
10246 <note>
10247 This method will have effect only if absolute mouse
10248 positioning is supported by the guest OS.
10249 </note>
10250
10251 <see><link to="#absoluteSupported"/></see>
10252 </desc>
10253
10254 <param name="x" type="long" dir="in">
10255 <desc>
10256 X coordinate of the pointer in pixels, starting from @c 1.
10257 </desc>
10258 </param>
10259 <param name="y" type="long" dir="in">
10260 <desc>
10261 Y coordinate of the pointer in pixels, starting from @c 1.
10262 </desc>
10263 </param>
10264 <param name="dz" type="long" dir="in">
10265 <desc>
10266 Amount of mouse wheel moves.
10267 Positive values describe clockwise wheel rotations,
10268 negative values describe counterclockwise rotations.
10269 </desc>
10270 </param>
10271 <param name="dw" type="long" dir="in">
10272 <desc>
10273 Amount of horizontal mouse wheel moves.
10274 Positive values describe a movement to the left,
10275 negative values describe a movement to the right.
10276 </desc>
10277 </param>
10278 <param name="buttonState" type="long" dir="in">
10279 <desc>
10280 The current state of mouse buttons. Every bit represents
10281 a mouse button as follows:
10282 <table>
10283 <tr><td>Bit 0 (<tt>0x01</tt>)</td><td>left mouse button</td></tr>
10284 <tr><td>Bit 1 (<tt>0x02</tt>)</td><td>right mouse button</td></tr>
10285 <tr><td>Bit 2 (<tt>0x04</tt>)</td><td>middle mouse button</td></tr>
10286 </table>
10287 A value of @c 1 means the corresponding button is pressed.
10288 otherwise it is released.
10289 </desc>
10290 </param>
10291 </method>
10292
10293 </interface>
10294
10295 <!--
10296 // IDisplay
10297 /////////////////////////////////////////////////////////////////////////
10298 -->
10299
10300 <enum
10301 name="FramebufferPixelFormat"
10302 uuid="7acfd5ed-29e3-45e3-8136-73c9224f3d2d"
10303 >
10304 <desc>
10305 Format of the video memory buffer. Constants represented by this enum can
10306 be used to test for particular values of <link
10307 to="IFramebuffer::pixelFormat"/>. See also <link
10308 to="IFramebuffer::requestResize"/>.
10309
10310 See also www.fourcc.org for more information about FOURCC pixel formats.
10311 </desc>
10312
10313 <const name="Opaque" value="0">
10314 <desc>
10315 Unknown buffer format (the user may not assume any particular format of
10316 the buffer).
10317 </desc>
10318 </const>
10319 <const name="FOURCC_RGB" value="0x32424752">
10320 <desc>
10321 Basic RGB format (<link to="IFramebuffer::bitsPerPixel"/> determines the
10322 bit layout).
10323 </desc>
10324 </const>
10325 </enum>
10326
10327 <interface
10328 name="IFramebuffer" extends="$unknown"
10329 uuid="b7ed347a-5765-40a0-ae1c-f543eb4ddeaf"
10330 wsmap="suppress"
10331 >
10332 <attribute name="address" type="octet" mod="ptr" readonly="yes">
10333 <desc>Address of the start byte of the frame buffer.</desc>
10334 </attribute>
10335
10336 <attribute name="width" type="unsigned long" readonly="yes">
10337 <desc>Frame buffer width, in pixels.</desc>
10338 </attribute>
10339
10340 <attribute name="height" type="unsigned long" readonly="yes">
10341 <desc>Frame buffer height, in pixels.</desc>
10342 </attribute>
10343
10344 <attribute name="bitsPerPixel" type="unsigned long" readonly="yes">
10345 <desc>
10346 Color depth, in bits per pixel. When <link to="#pixelFormat"/> is <link
10347 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, valid values
10348 are: 8, 15, 16, 24 and 32.
10349 </desc>
10350 </attribute>
10351
10352 <attribute name="bytesPerLine" type="unsigned long" readonly="yes">
10353 <desc>
10354 Scan line size, in bytes. When <link to="#pixelFormat"/> is <link
10355 to="FramebufferPixelFormat::FOURCC_RGB">FOURCC_RGB</link>, the
10356 size of the scan line must be aligned to 32 bits.
10357 </desc>
10358 </attribute>
10359
10360 <attribute name="pixelFormat" type="unsigned long" readonly="yes">
10361 <desc>
10362 Frame buffer pixel format. It's either one of the values defined by <link
10363 to="FramebufferPixelFormat"/> or a raw FOURCC code.
10364 <note>
10365 This attribute must never return <link
10366 to="FramebufferPixelFormat::Opaque"/> -- the format of the buffer
10367 <link to="#address"/> points to must be always known.
10368 </note>
10369 </desc>
10370 </attribute>
10371
10372 <attribute name="usesGuestVRAM" type="boolean" readonly="yes">
10373 <desc>
10374 Defines whether this frame buffer uses the virtual video card's memory
10375 buffer (guest VRAM) directly or not. See <link
10376 to="IFramebuffer::requestResize"/> for more information.
10377 </desc>
10378 </attribute>
10379
10380 <attribute name="heightReduction" type="unsigned long" readonly="yes">
10381 <desc>
10382 Hint from the frame buffer about how much of the standard
10383 screen height it wants to use for itself. This information is
10384 exposed to the guest through the VESA BIOS and VMMDev interface
10385 so that it can use it for determining its video mode table. It
10386 is not guaranteed that the guest respects the value.
10387 </desc>
10388 </attribute>
10389
10390 <attribute name="overlay" type="IFramebufferOverlay" readonly="yes">
10391 <desc>
10392 An alpha-blended overlay which is superposed over the frame buffer.
10393 The initial purpose is to allow the display of icons providing
10394 information about the VM state, including disk activity, in front
10395 ends which do not have other means of doing that. The overlay is
10396 designed to controlled exclusively by IDisplay. It has no locking
10397 of its own, and any changes made to it are not guaranteed to be
10398 visible until the affected portion of IFramebuffer is updated. The
10399 overlay can be created lazily the first time it is requested. This
10400 attribute can also return @c null to signal that the overlay is not
10401 implemented.
10402 </desc>
10403 </attribute>
10404
10405 <attribute name="winId" type="unsigned long long" readonly="yes">
10406 <desc>
10407 Platform-dependent identifier of the window where context of this
10408 frame buffer is drawn, or zero if there's no such window.
10409 </desc>
10410 </attribute>
10411
10412 <method name="lock">
10413 <desc>
10414 Locks the frame buffer.
10415 Gets called by the IDisplay object where this frame buffer is
10416 bound to.
10417 </desc>
10418 </method>
10419
10420 <method name="unlock">
10421 <desc>
10422 Unlocks the frame buffer.
10423 Gets called by the IDisplay object where this frame buffer is
10424 bound to.
10425 </desc>
10426 </method>
10427
10428 <method name="notifyUpdate">
10429 <desc>
10430 Informs about an update.
10431 Gets called by the display object where this buffer is
10432 registered.
10433 </desc>
10434 <param name="x" type="unsigned long" dir="in"/>
10435 <param name="y" type="unsigned long" dir="in"/>
10436 <param name="width" type="unsigned long" dir="in"/>
10437 <param name="height" type="unsigned long" dir="in"/>
10438 </method>
10439
10440 <method name="requestResize">
10441 <desc>
10442 Requests a size and pixel format change.
10443
10444 There are two modes of working with the video buffer of the virtual
10445 machine. The <i>indirect</i> mode implies that the IFramebuffer
10446 implementation allocates a memory buffer for the requested display mode
10447 and provides it to the virtual machine. In <i>direct</i> mode, the
10448 IFramebuffer implementation uses the memory buffer allocated and owned
10449 by the virtual machine. This buffer represents the video memory of the
10450 emulated video adapter (so called <i>guest VRAM</i>). The direct mode is
10451 usually faster because the implementation gets a raw pointer to the
10452 guest VRAM buffer which it can directly use for visualizing the contents
10453 of the virtual display, as opposed to the indirect mode where the
10454 contents of guest VRAM are copied to the memory buffer provided by
10455 the implementation every time a display update occurs.
10456
10457 It is important to note that the direct mode is really fast only when
10458 the implementation uses the given guest VRAM buffer directly, for
10459 example, by blitting it to the window representing the virtual machine's
10460 display, which saves at least one copy operation comparing to the
10461 indirect mode. However, using the guest VRAM buffer directly is not
10462 always possible: the format and the color depth of this buffer may be
10463 not supported by the target window, or it may be unknown (opaque) as in
10464 case of text or non-linear multi-plane VGA video modes. In this case,
10465 the indirect mode (that is always available) should be used as a
10466 fallback: when the guest VRAM contents are copied to the
10467 implementation-provided memory buffer, color and format conversion is
10468 done automatically by the underlying code.
10469
10470 The @a pixelFormat parameter defines whether the direct mode is
10471 available or not. If @a pixelFormat is <link
10472 to="FramebufferPixelFormat::Opaque"/> then direct access to the guest
10473 VRAM buffer is not available -- the @a VRAM, @a bitsPerPixel and
10474 @a bytesPerLine parameters must be ignored and the implementation must use
10475 the indirect mode (where it provides its own buffer in one of the
10476 supported formats). In all other cases, @a pixelFormat together with
10477 @a bitsPerPixel and @a bytesPerLine define the format of the video memory
10478 buffer pointed to by the @a VRAM parameter and the implementation is
10479 free to choose which mode to use. To indicate that this frame buffer uses
10480 the direct mode, the implementation of the <link to="#usesGuestVRAM"/>
10481 attribute must return @c true and <link to="#address"/> must
10482 return exactly the same address that is passed in the @a VRAM parameter
10483 of this method; otherwise it is assumed that the indirect strategy is
10484 chosen.
10485
10486 The @a width and @a height parameters represent the size of the
10487 requested display mode in both modes. In case of indirect mode, the
10488 provided memory buffer should be big enough to store data of the given
10489 display mode. In case of direct mode, it is guaranteed that the given
10490 @a VRAM buffer contains enough space to represent the display mode of the
10491 given size. Note that this frame buffer's <link to="#width"/> and <link
10492 to="#height"/> attributes must return exactly the same values as
10493 passed to this method after the resize is completed (see below).
10494
10495 The @a finished output parameter determines if the implementation has
10496 finished resizing the frame buffer or not. If, for some reason, the
10497 resize cannot be finished immediately during this call, @a finished
10498 must be set to @c false, and the implementation must call
10499 <link to="IDisplay::resizeCompleted"/> after it has returned from
10500 this method as soon as possible. If @a finished is @c false, the
10501 machine will not call any frame buffer methods until
10502 <link to="IDisplay::resizeCompleted"/> is called.
10503
10504 Note that if the direct mode is chosen, the <link to="#bitsPerPixel"/>,
10505 <link to="#bytesPerLine"/> and <link to="#pixelFormat"/> attributes of
10506 this frame buffer must return exactly the same values as specified in the
10507 parameters of this method, after the resize is completed. If the
10508 indirect mode is chosen, these attributes must return values describing
10509 the format of the implementation's own memory buffer <link
10510 to="#address"/> points to. Note also that the <link to="#bitsPerPixel"/>
10511 value must always correlate with <link to="#pixelFormat"/>. Note that
10512 the <link to="#pixelFormat"/> attribute must never return <link
10513 to="FramebufferPixelFormat::Opaque"/> regardless of the selected mode.
10514
10515 <note>
10516 This method is called by the IDisplay object under the
10517 <link to="#lock"/> provided by this IFramebuffer
10518 implementation. If this method returns @c false in @a finished, then
10519 this lock is not released until
10520 <link to="IDisplay::resizeCompleted"/> is called.
10521 </note>
10522 </desc>
10523 <param name="screenId" type="unsigned long" dir="in">
10524 <desc>
10525 Logical screen number. Must be used in the corresponding call to
10526 <link to="IDisplay::resizeCompleted"/> if this call is made.
10527 </desc>
10528 </param>
10529 <param name="pixelFormat" type="unsigned long" dir="in">
10530 <desc>
10531 Pixel format of the memory buffer pointed to by @a VRAM.
10532 See also <link to="FramebufferPixelFormat"/>.
10533 </desc>
10534 </param>
10535 <param name="VRAM" type="octet" mod="ptr" dir="in">
10536 <desc>Pointer to the virtual video card's VRAM (may be @c null).</desc>
10537 </param>
10538 <param name="bitsPerPixel" type="unsigned long" dir="in">
10539 <desc>Color depth, bits per pixel.</desc>
10540 </param>
10541 <param name="bytesPerLine" type="unsigned long" dir="in">
10542 <desc>Size of one scan line, in bytes.</desc>
10543 </param>
10544 <param name="width" type="unsigned long" dir="in">
10545 <desc>Width of the guest display, in pixels.</desc>
10546 </param>
10547 <param name="height" type="unsigned long" dir="in">
10548 <desc>Height of the guest display, in pixels.</desc>
10549 </param>
10550 <param name="finished" type="boolean" dir="return">
10551 <desc>
10552 Can the VM start using the new frame buffer immediately
10553 after this method returns or it should wait for
10554 <link to="IDisplay::resizeCompleted"/>.
10555 </desc>
10556 </param>
10557 </method>
10558
10559 <method name="videoModeSupported">
10560 <desc>
10561 Returns whether the frame buffer implementation is willing to
10562 support a given video mode. In case it is not able to render
10563 the video mode (or for some reason not willing), it should
10564 return @c false. Usually this method is called when the guest
10565 asks the VMM device whether a given video mode is supported
10566 so the information returned is directly exposed to the guest.
10567 It is important that this method returns very quickly.
10568 </desc>
10569 <param name="width" type="unsigned long" dir="in"/>
10570 <param name="height" type="unsigned long" dir="in"/>
10571 <param name="bpp" type="unsigned long" dir="in"/>
10572 <param name="supported" type="boolean" dir="return"/>
10573 </method>
10574
10575 <method name="getVisibleRegion">
10576 <desc>
10577 Returns the visible region of this frame buffer.
10578
10579 If the @a rectangles parameter is @c null then the value of the
10580 @a count parameter is ignored and the number of elements necessary to
10581 describe the current visible region is returned in @a countCopied.
10582
10583 If @a rectangles is not @c null but @a count is less
10584 than the required number of elements to store region data, the method
10585 will report a failure. If @a count is equal or greater than the
10586 required number of elements, then the actual number of elements copied
10587 to the provided array will be returned in @a countCopied.
10588
10589 <note>
10590 The address of the provided array must be in the process space of
10591 this IFramebuffer object.
10592 </note>
10593 <note>
10594 Method not yet implemented.
10595 </note>
10596 </desc>
10597 <param name="rectangles" type="octet" mod="ptr" dir="in">
10598 <desc>Pointer to the @c RTRECT array to receive region data.</desc>
10599 </param>
10600 <param name="count" type="unsigned long" dir="in">
10601 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10602 </param>
10603 <param name="countCopied" type="unsigned long" dir="return">
10604 <desc>Number of elements copied to the @a rectangles array.</desc>
10605 </param>
10606 </method>
10607
10608 <method name="setVisibleRegion">
10609 <desc>
10610 Suggests a new visible region to this frame buffer. This region
10611 represents the area of the VM display which is a union of regions of
10612 all top-level windows of the guest operating system running inside the
10613 VM (if the Guest Additions for this system support this
10614 functionality). This information may be used by the frontends to
10615 implement the seamless desktop integration feature.
10616
10617 <note>
10618 The address of the provided array must be in the process space of
10619 this IFramebuffer object.
10620 </note>
10621 <note>
10622 The IFramebuffer implementation must make a copy of the provided
10623 array of rectangles.
10624 </note>
10625 <note>
10626 Method not yet implemented.
10627 </note>
10628 </desc>
10629 <param name="rectangles" type="octet" mod="ptr" dir="in">
10630 <desc>Pointer to the @c RTRECT array.</desc>
10631 </param>
10632 <param name="count" type="unsigned long" dir="in">
10633 <desc>Number of @c RTRECT elements in the @a rectangles array.</desc>
10634 </param>
10635 </method>
10636
10637 <method name="processVHWACommand">
10638 <desc>
10639 Posts a Video HW Acceleration Command to the frame buffer for processing.
10640 The commands used for 2D video acceleration (DDraw surface creation/destroying, blitting, scaling, color covnersion, overlaying, etc.)
10641 are posted from quest to the host to be processed by the host hardware.
10642
10643 <note>
10644 The address of the provided command must be in the process space of
10645 this IFramebuffer object.
10646 </note>
10647 </desc>
10648
10649 <param name="command" type="octet" mod="ptr" dir="in">
10650 <desc>Pointer to VBOXVHWACMD containing the command to execute.</desc>
10651 </param>
10652 </method>
10653
10654 </interface>
10655
10656 <interface
10657 name="IFramebufferOverlay" extends="IFramebuffer"
10658 uuid="0bcc1c7e-e415-47d2-bfdb-e4c705fb0f47"
10659 wsmap="suppress"
10660 >
10661 <desc>
10662 The IFramebufferOverlay interface represents an alpha blended overlay
10663 for displaying status icons above an IFramebuffer. It is always created
10664 not visible, so that it must be explicitly shown. It only covers a
10665 portion of the IFramebuffer, determined by its width, height and
10666 co-ordinates. It is always in packed pixel little-endian 32bit ARGB (in
10667 that order) format, and may be written to directly. Do re-read the
10668 width though, after setting it, as it may be adjusted (increased) to
10669 make it more suitable for the front end.
10670 </desc>
10671 <attribute name="x" type="unsigned long" readonly="yes">
10672 <desc>X position of the overlay, relative to the frame buffer.</desc>
10673 </attribute>
10674
10675 <attribute name="y" type="unsigned long" readonly="yes">
10676 <desc>Y position of the overlay, relative to the frame buffer.</desc>
10677 </attribute>
10678
10679 <attribute name="visible" type="boolean" readonly="no">
10680 <desc>
10681 Whether the overlay is currently visible.
10682 </desc>
10683 </attribute>
10684
10685 <attribute name="alpha" type="unsigned long" readonly="no">
10686 <desc>
10687 The global alpha value for the overlay. This may or may not be
10688 supported by a given front end.
10689 </desc>
10690 </attribute>
10691
10692 <method name="move">
10693 <desc>
10694 Changes the overlay's position relative to the IFramebuffer.
10695 </desc>
10696 <param name="x" type="unsigned long" dir="in"/>
10697 <param name="y" type="unsigned long" dir="in"/>
10698 </method>
10699
10700 </interface>
10701
10702 <interface
10703 name="IDisplay" extends="$unknown"
10704 uuid="1fa79e39-0cc9-4ab3-9df3-ed3e96b42496"
10705 wsmap="managed"
10706 >
10707 <desc>
10708 The IDisplay interface represents the virtual machine's display.
10709
10710 The object implementing this interface is contained in each
10711 <link to="IConsole::display"/> attribute and represents the visual
10712 output of the virtual machine.
10713
10714 The virtual display supports pluggable output targets represented by the
10715 IFramebuffer interface. Examples of the output target are a window on
10716 the host computer or an RDP session's display on a remote computer.
10717 </desc>
10718 <method name="getScreenResolution">
10719 <desc>Queries display width, height and color depth for given screen.</desc>
10720 <param name="screenId" type="unsigned long" dir="in"/>
10721 <param name="width" type="unsigned long" dir="out"/>
10722 <param name="height" type="unsigned long" dir="out"/>
10723 <param name="bitsPerPixel" type="unsigned long" dir="out"/>
10724 </method>
10725
10726 <method name="setFramebuffer">
10727 <desc>
10728 Sets the framebuffer for given screen.
10729 </desc>
10730 <param name="screenId" type="unsigned long" dir="in"/>
10731 <param name="framebuffer" type="IFramebuffer" dir="in"/>
10732 </method>
10733
10734 <method name="getFramebuffer">
10735 <desc>
10736 Queries the framebuffer for given screen.
10737 </desc>
10738 <param name="screenId" type="unsigned long" dir="in"/>
10739 <param name="framebuffer" type="IFramebuffer" dir="out"/>
10740 <param name="xOrigin" type="long" dir="out"/>
10741 <param name="yOrigin" type="long" dir="out"/>
10742 </method>
10743
10744 <method name="setVideoModeHint">
10745 <desc>
10746 Asks VirtualBox to request the given video mode from
10747 the guest. This is just a hint and it cannot be guaranteed
10748 that the requested resolution will be used. Guest Additions
10749 are required for the request to be seen by guests. The caller
10750 should issue the request and wait for a resolution change and
10751 after a timeout retry.
10752
10753 Specifying @c 0 for either @a width, @a height or @a bitsPerPixel
10754 parameters means that the corresponding values should be taken from the
10755 current video mode (i.e. left unchanged).
10756
10757 If the guest OS supports multi-monitor configuration then the @a display
10758 parameter specifies the number of the guest display to send the hint to:
10759 @c 0 is the primary display, @c 1 is the first secondary and
10760 so on. If the multi-monitor configuration is not supported, @a display
10761 must be @c 0.
10762
10763 <result name="E_INVALIDARG">
10764 The @a display is not associated with any monitor.
10765 </result>
10766
10767 </desc>
10768 <param name="width" type="unsigned long" dir="in"/>
10769 <param name="height" type="unsigned long" dir="in"/>
10770 <param name="bitsPerPixel" type="unsigned long" dir="in"/>
10771 <param name="display" type="unsigned long" dir="in"/>
10772 </method>
10773
10774 <method name="setSeamlessMode">
10775 <desc>
10776 Enables or disables seamless guest display rendering (seamless desktop
10777 integration) mode.
10778 <note>
10779 Calling this method has no effect if <link
10780 to="IGuest::supportsSeamless"/> returns @c false.
10781 </note>
10782 </desc>
10783 <param name="enabled" type="boolean" dir="in"/>
10784 </method>
10785
10786 <method name="takeScreenShot">
10787 <desc>
10788 Takes a screen shot of the requested size and copies it to the
10789 32-bpp buffer allocated by the caller and pointed to by @a address.
10790 A pixel consists of 4 bytes in order: B, G, R, 0.
10791
10792 <note>This API can be used only by the COM/XPCOM C++ API as it
10793 requires pointer support. Use <link to="#takeScreenShotToArray" />
10794 with other language bindings.
10795 </note>
10796
10797 <result name="E_NOTIMPL">
10798 Feature not implemented.
10799 </result>
10800 <result name="VBOX_E_IPRT_ERROR">
10801 Could not take a screenshot.
10802 </result>
10803
10804 </desc>
10805 <param name="screenId" type="unsigned long" dir="in"/>
10806 <param name="address" type="octet" mod="ptr" dir="in"/>
10807 <param name="width" type="unsigned long" dir="in"/>
10808 <param name="height" type="unsigned long" dir="in"/>
10809 </method>
10810
10811 <method name="takeScreenShotToArray">
10812 <desc>
10813 Takes a guest screen shot of the requested size and returns it as
10814 an array of bytes in uncompressed 32-bit RGBA format.
10815 A pixel consists of 4 bytes in order: R, G, B, 0xFF.
10816
10817 This API is slow, but could be the only option to get guest screenshot
10818 for scriptable languages not allowed to manipulate with addresses
10819 directly.
10820
10821 <result name="E_NOTIMPL">
10822 Feature not implemented.
10823 </result>
10824 <result name="VBOX_E_IPRT_ERROR">
10825 Could not take a screenshot.
10826 </result>
10827 </desc>
10828 <param name="screenId" type="unsigned long" dir="in">
10829 <desc>
10830 Monitor to take screenshot from.
10831 </desc>
10832 </param>
10833 <param name="width" type="unsigned long" dir="in">
10834 <desc>
10835 Desired image width.
10836 </desc>
10837 </param>
10838 <param name="height" type="unsigned long" dir="in">
10839 <desc>
10840 Desired image height.
10841 </desc>
10842 </param>
10843 <param name="screenData" type="octet" dir="return" safearray="yes">
10844 <desc>
10845 Array with resulting screen data.
10846 </desc>
10847 </param>
10848 </method>
10849
10850 <method name="drawToScreen">
10851 <desc>
10852 Draws a 32-bpp image of the specified size from the given buffer
10853 to the given point on the VM display.
10854
10855 <result name="E_NOTIMPL">
10856 Feature not implemented.
10857 </result>
10858 <result name="VBOX_E_IPRT_ERROR">
10859 Could not draw to screen.
10860 </result>
10861
10862 </desc>
10863 <param name="screenId" type="unsigned long" dir="in"/>
10864 <param name="address" type="octet" mod="ptr" dir="in"/>
10865 <param name="x" type="unsigned long" dir="in">
10866 <desc>Relative to the screen top left corner.</desc>
10867 </param>
10868 <param name="y" type="unsigned long" dir="in">
10869 <desc>Relative to the screen top left corner.</desc>
10870 </param>
10871 <param name="width" type="unsigned long" dir="in"/>
10872 <param name="height" type="unsigned long" dir="in"/>
10873 </method>
10874
10875 <method name="invalidateAndUpdate">
10876 <desc>
10877 Does a full invalidation of the VM display and instructs the VM
10878 to update it.
10879
10880 <result name="VBOX_E_IPRT_ERROR">
10881 Could not invalidate and update screen.
10882 </result>
10883
10884 </desc>
10885 </method>
10886
10887 <method name="resizeCompleted">
10888 <desc>
10889 Signals that a framebuffer has completed the resize operation.
10890
10891 <result name="VBOX_E_NOT_SUPPORTED">
10892 Operation only valid for external frame buffers.
10893 </result>
10894
10895 </desc>
10896 <param name="screenId" type="unsigned long" dir="in"/>
10897 </method>
10898
10899 <method name="completeVHWACommand">
10900 <desc>
10901 Signals that the Video HW Acceleration command has completed.
10902 </desc>
10903
10904 <param name="command" type="octet" mod="ptr" dir="in">
10905 <desc>Pointer to VBOXVHWACMD containing the completed command.</desc>
10906 </param>
10907 </method>
10908
10909 </interface>
10910
10911 <!--
10912 // INetworkAdapter
10913 /////////////////////////////////////////////////////////////////////////
10914 -->
10915
10916 <enum
10917 name="NetworkAttachmentType"
10918 uuid="44bce1ee-99f7-4e8e-89fc-80597fd9eeaf"
10919 >
10920 <desc>
10921 Network attachment type.
10922 </desc>
10923
10924 <const name="Null" value="0">
10925 <desc>Null value, also means "not attached".</desc>
10926 </const>
10927 <const name="NAT" value="1"/>
10928 <const name="Bridged" value="2"/>
10929 <const name="Internal" value="3"/>
10930 <const name="HostOnly" value="4"/>
10931 <const name="VDE" value="5"/>
10932 </enum>
10933
10934 <enum
10935 name="NetworkAdapterType"
10936 uuid="3c2281e4-d952-4e87-8c7d-24379cb6a81c"
10937 >
10938 <desc>
10939 Network adapter type.
10940 </desc>
10941
10942 <const name="Null" value="0">
10943 <desc>Null value (never used by the API).</desc>
10944 </const>
10945 <const name="Am79C970A" value="1">
10946 <desc>AMD PCNet-PCI II network card (Am79C970A).</desc>
10947 </const>
10948 <const name="Am79C973" value="2">
10949 <desc>AMD PCNet-FAST III network card (Am79C973).</desc>
10950 </const>
10951 <const name="I82540EM" value="3">
10952 <desc>Intel PRO/1000 MT Desktop network card (82540EM).</desc>
10953 </const>
10954 <const name="I82543GC" value="4">
10955 <desc>Intel PRO/1000 T Server network card (82543GC).</desc>
10956 </const>
10957 <const name="I82545EM" value="5">
10958 <desc>Intel PRO/1000 MT Server network card (82545EM).</desc>
10959 </const>
10960 <const name="Virtio" value="6">
10961 <desc>Virtio network device.</desc>
10962 </const>
10963 </enum>
10964
10965 <interface
10966 name="INetworkAdapter" extends="$unknown"
10967 uuid="9bf58a46-c3f7-4f31-80fa-dde9a5dc0b7b"
10968 wsmap="managed"
10969 >
10970 <desc>
10971 Represents a virtual network adapter that is attached to a virtual machine.
10972 Each virtual machine has a fixed number of network adapter slots with one
10973 instance of this attached to each of them. Call
10974 <link to="IMachine::getNetworkAdapter" /> to get the network adapter that
10975 is attached to a given slot in a given machine.
10976
10977 Each network adapter can be in one of five attachment modes, which are
10978 represented by the <link to="NetworkAttachmentType" /> enumeration;
10979 see the <link to="#attachmentType" /> attribute.
10980 </desc>
10981
10982 <attribute name="adapterType" type="NetworkAdapterType">
10983 <desc>
10984 Type of the virtual network adapter. Depending on this value,
10985 VirtualBox will provide a different virtual network hardware
10986 to the guest.
10987 </desc>
10988 </attribute>
10989
10990 <attribute name="slot" type="unsigned long" readonly="yes">
10991 <desc>
10992 Slot number this adapter is plugged into. Corresponds to
10993 the value you pass to <link to="IMachine::getNetworkAdapter"/>
10994 to obtain this instance.
10995 </desc>
10996 </attribute>
10997
10998 <attribute name="enabled" type="boolean">
10999 <desc>
11000 Flag whether the network adapter is present in the
11001 guest system. If disabled, the virtual guest hardware will
11002 not contain this network adapter. Can only be changed when
11003 the VM is not running.
11004 </desc>
11005 </attribute>
11006
11007 <attribute name="MACAddress" type="wstring">
11008 <desc>
11009 Ethernet MAC address of the adapter, 12 hexadecimal characters. When setting
11010 it to @c null or an empty string, VirtualBox will generate a unique MAC address.
11011 </desc>
11012 </attribute>
11013
11014 <attribute name="attachmentType" type="NetworkAttachmentType" readonly="yes"/>
11015
11016 <attribute name="hostInterface" type="wstring">
11017 <desc>
11018 Name of the host network interface the VM is attached to.
11019 </desc>
11020 </attribute>
11021
11022 <attribute name="internalNetwork" type="wstring">
11023 <desc>
11024 Name of the internal network the VM is attached to.
11025 </desc>
11026 </attribute>
11027
11028 <attribute name="NATNetwork" type="wstring">
11029 <desc>
11030 Name of the NAT network the VM is attached to.
11031 </desc>
11032 </attribute>
11033
11034 <attribute name="VDENetwork" type="wstring">
11035 <desc>
11036 Name of the VDE switch the VM is attached to.
11037 </desc>
11038 </attribute>
11039
11040 <attribute name="cableConnected" type="boolean">
11041 <desc>
11042 Flag whether the adapter reports the cable as connected or not.
11043 It can be used to report offline situations to a VM.
11044 </desc>
11045 </attribute>
11046
11047 <attribute name="lineSpeed" type="unsigned long">
11048 <desc>
11049 Line speed reported by custom drivers, in units of 1 kbps.
11050 </desc>
11051 </attribute>
11052
11053 <attribute name="traceEnabled" type="boolean">
11054 <desc>
11055 Flag whether network traffic from/to the network card should be traced.
11056 Can only be toggled when the VM is turned off.
11057 </desc>
11058 </attribute>
11059
11060 <attribute name="traceFile" type="wstring">
11061 <desc>
11062 Filename where a network trace will be stored. If not set, VBox-pid.pcap
11063 will be used.
11064 </desc>
11065 </attribute>
11066
11067 <attribute name="natDriver" type="INATEngine" readonly="yes">
11068 <desc>
11069 Points to the NAT engine which handles the network address translation
11070 for this interface. This is active only when the interface actually uses
11071 NAT (see <link to="#attachToNAT" />).
11072 </desc>
11073 </attribute>
11074
11075 <attribute name="bootPriority" type="unsigned long">
11076 <desc>
11077 Network boot priority of the adapter. Priority 1 is highest. If not set,
11078 the priority is considered to be at the lowest possible setting.
11079 </desc>
11080 </attribute>
11081
11082 <attribute name="bandwidthLimit" type="unsigned long">
11083 <desc>
11084 Maximum throughput allowed for this network adapter, in units of 1 mbps.
11085 A zero value means uncapped/unlimited.
11086 </desc>
11087 </attribute>
11088
11089 <method name="attachToNAT">
11090 <desc>
11091 Attach the network adapter to the Network Address Translation (NAT) interface.
11092 </desc>
11093 </method>
11094
11095 <method name="attachToBridgedInterface">
11096 <desc>
11097 Attach the network adapter to a bridged host interface.
11098 </desc>
11099 </method>
11100
11101 <method name="attachToInternalNetwork">
11102 <desc>
11103 Attach the network adapter to an internal network.
11104 </desc>
11105 </method>
11106
11107 <method name="attachToHostOnlyInterface">
11108 <desc>
11109 Attach the network adapter to the host-only network.
11110 </desc>
11111 </method>
11112
11113 <method name="attachToVDE">
11114 <desc>
11115 Attach the network adapter to a VDE network.
11116 </desc>
11117 </method>
11118
11119 <method name="detach">
11120 <desc>
11121 Detach the network adapter
11122 </desc>
11123 </method>
11124 </interface>
11125
11126
11127 <!--
11128 // ISerialPort
11129 /////////////////////////////////////////////////////////////////////////
11130 -->
11131
11132 <enum
11133 name="PortMode"
11134 uuid="533b5fe3-0185-4197-86a7-17e37dd39d76"
11135 >
11136 <desc>
11137 The PortMode enumeration represents possible communication modes for
11138 the virtual serial port device.
11139 </desc>
11140
11141 <const name="Disconnected" value="0">
11142 <desc>Virtual device is not attached to any real host device.</desc>
11143 </const>
11144 <const name="HostPipe" value="1">
11145 <desc>Virtual device is attached to a host pipe.</desc>
11146 </const>
11147 <const name="HostDevice" value="2">
11148 <desc>Virtual device is attached to a host device.</desc>
11149 </const>
11150 <const name="RawFile" value="3">
11151 <desc>Virtual device is attached to a raw file.</desc>
11152 </const>
11153 </enum>
11154
11155 <interface
11156 name="ISerialPort" extends="$unknown"
11157 uuid="937f6970-5103-4745-b78e-d28dcf1479a8"
11158 wsmap="managed"
11159 >
11160
11161 <desc>
11162 The ISerialPort interface represents the virtual serial port device.
11163
11164 The virtual serial port device acts like an ordinary serial port
11165 inside the virtual machine. This device communicates to the real
11166 serial port hardware in one of two modes: host pipe or host device.
11167
11168 In host pipe mode, the #path attribute specifies the path to the pipe on
11169 the host computer that represents a serial port. The #server attribute
11170 determines if this pipe is created by the virtual machine process at
11171 machine startup or it must already exist before starting machine
11172 execution.
11173
11174 In host device mode, the #path attribute specifies the name of the
11175 serial port device on the host computer.
11176
11177 There is also a third communication mode: the disconnected mode. In this
11178 mode, the guest OS running inside the virtual machine will be able to
11179 detect the serial port, but all port write operations will be discarded
11180 and all port read operations will return no data.
11181
11182 <see>IMachine::getSerialPort</see>
11183 </desc>
11184
11185 <attribute name="slot" type="unsigned long" readonly="yes">
11186 <desc>
11187 Slot number this serial port is plugged into. Corresponds to
11188 the value you pass to <link to="IMachine::getSerialPort"/>
11189 to obtain this instance.
11190 </desc>
11191 </attribute>
11192
11193 <attribute name="enabled" type="boolean">
11194 <desc>
11195 Flag whether the serial port is enabled. If disabled,
11196 the serial port will not be reported to the guest OS.
11197 </desc>
11198 </attribute>
11199
11200 <attribute name="IOBase" type="unsigned long">
11201 <desc>Base I/O address of the serial port.</desc>
11202 </attribute>
11203
11204 <attribute name="IRQ" type="unsigned long">
11205 <desc>IRQ number of the serial port.</desc>
11206 </attribute>
11207
11208 <attribute name="hostMode" type="PortMode">
11209 <desc>
11210 How is this port connected to the host.
11211 <note>
11212 Changing this attribute may fail if the conditions for
11213 <link to="#path"/> are not met.
11214 </note>
11215 </desc>
11216 </attribute>
11217
11218 <attribute name="server" type="boolean">
11219 <desc>
11220 Flag whether this serial port acts as a server (creates a new pipe on
11221 the host) or as a client (uses the existing pipe). This attribute is
11222 used only when <link to="#hostMode"/> is PortMode_HostPipe.
11223 </desc>
11224 </attribute>
11225
11226 <attribute name="path" type="wstring">
11227 <desc>
11228 Path to the serial port's pipe on the host when <link to="ISerialPort::hostMode"/> is
11229 PortMode_HostPipe, or the host serial device name when
11230 <link to="ISerialPort::hostMode"/> is PortMode_HostDevice. For both
11231 cases, setting a @c null or empty string as the attribute's value
11232 is an error. Otherwise, the value of this property is ignored.
11233 </desc>
11234 </attribute>
11235
11236 </interface>
11237
11238 <!--
11239 // IParallelPort
11240 /////////////////////////////////////////////////////////////////////////
11241 -->
11242
11243 <interface
11244 name="IParallelPort" extends="$unknown"
11245 uuid="0c925f06-dd10-4b77-8de8-294d738c3214"
11246 wsmap="managed"
11247 >
11248
11249 <desc>
11250 The IParallelPort interface represents the virtual parallel port device.
11251
11252 The virtual parallel port device acts like an ordinary parallel port
11253 inside the virtual machine. This device communicates to the real
11254 parallel port hardware using the name of the parallel device on the host
11255 computer specified in the #path attribute.
11256
11257 Each virtual parallel port device is assigned a base I/O address and an
11258 IRQ number that will be reported to the guest operating system and used
11259 to operate the given parallel port from within the virtual machine.
11260
11261 <see>IMachine::getParallelPort</see>
11262 </desc>
11263
11264 <attribute name="slot" type="unsigned long" readonly="yes">
11265 <desc>
11266 Slot number this parallel port is plugged into. Corresponds to
11267 the value you pass to <link to="IMachine::getParallelPort"/>
11268 to obtain this instance.
11269 </desc>
11270 </attribute>
11271
11272 <attribute name="enabled" type="boolean">
11273 <desc>
11274 Flag whether the parallel port is enabled. If disabled,
11275 the parallel port will not be reported to the guest OS.
11276 </desc>
11277 </attribute>
11278
11279 <attribute name="IOBase" type="unsigned long">
11280 <desc>Base I/O address of the parallel port.</desc>
11281 </attribute>
11282
11283 <attribute name="IRQ" type="unsigned long">
11284 <desc>IRQ number of the parallel port.</desc>
11285 </attribute>
11286
11287 <attribute name="path" type="wstring">
11288 <desc>
11289 Host parallel device name. If this parallel port is enabled, setting a
11290 @c null or an empty string as this attribute's value will result into
11291 an error.
11292 </desc>
11293 </attribute>
11294
11295 </interface>
11296
11297
11298 <!--
11299 // IMachineDebugger
11300 /////////////////////////////////////////////////////////////////////////
11301 -->
11302
11303 <interface
11304 name="IMachineDebugger" extends="$unknown"
11305 uuid="b0b2a2dd-0627-4502-91c2-ddc5e77609e0"
11306 wsmap="suppress"
11307 >
11308 <method name="resetStats">
11309 <desc>
11310 Reset VM statistics.
11311 </desc>
11312 <param name="pattern" type="wstring" dir="in">
11313 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11314 </param>
11315 </method>
11316
11317 <method name="dumpStats">
11318 <desc>
11319 Dumps VM statistics.
11320 </desc>
11321 <param name="pattern" type="wstring" dir="in">
11322 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11323 </param>
11324 </method>
11325
11326 <method name="getStats">
11327 <desc>
11328 Get the VM statistics in a XMLish format.
11329 </desc>
11330 <param name="pattern" type="wstring" dir="in">
11331 <desc>The selection pattern. A bit similar to filename globbing.</desc>
11332 </param>
11333 <param name="withDescriptions" type="boolean" dir="in">
11334 <desc>Whether to include the descriptions.</desc>
11335 </param>
11336 <param name="stats" type="wstring" dir="out">
11337 <desc>The XML document containing the statistics.</desc>
11338 </param>
11339 </method>
11340
11341 <method name="injectNMI">
11342 <desc>
11343 Inject an NMI into a running VT-x/AMD-V VM.
11344 </desc>
11345 </method>
11346
11347 <attribute name="singlestep" type="boolean">
11348 <desc>Switch for enabling singlestepping.</desc>
11349 </attribute>
11350
11351 <attribute name="recompileUser" type="boolean">
11352 <desc>Switch for forcing code recompilation for user mode code.</desc>
11353 </attribute>
11354
11355 <attribute name="recompileSupervisor" type="boolean">
11356 <desc>Switch for forcing code recompilation for supervisor mode code.</desc>
11357 </attribute>
11358
11359 <attribute name="PATMEnabled" type="boolean">
11360 <desc>Switch for enabling and disabling the PATM component.</desc>
11361 </attribute>
11362
11363 <attribute name="CSAMEnabled" type="boolean">
11364 <desc>Switch for enabling and disabling the CSAM component.</desc>
11365 </attribute>
11366
11367 <attribute name="logEnabled" type="boolean">
11368 <desc>Switch for enabling and disabling logging.</desc>
11369 </attribute>
11370
11371 <attribute name="HWVirtExEnabled" type="boolean" readonly="yes">
11372 <desc>
11373 Flag indicating whether the VM is currently making use of CPU hardware
11374 virtualization extensions.
11375 </desc>
11376 </attribute>
11377
11378 <attribute name="HWVirtExNestedPagingEnabled" type="boolean" readonly="yes">
11379 <desc>
11380 Flag indicating whether the VM is currently making use of the nested paging
11381 CPU hardware virtualization extension.
11382 </desc>
11383 </attribute>
11384
11385 <attribute name="HWVirtExVPIDEnabled" type="boolean" readonly="yes">
11386 <desc>
11387 Flag indicating whether the VM is currently making use of the VPID
11388 VT-x extension.
11389 </desc>
11390 </attribute>
11391
11392 <attribute name="PAEEnabled" type="boolean" readonly="yes">
11393 <desc>
11394 Flag indicating whether the VM is currently making use of the Physical
11395 Address Extension CPU feature.
11396 </desc>
11397 </attribute>
11398
11399 <attribute name="virtualTimeRate" type="unsigned long">
11400 <desc>
11401 The rate at which the virtual time runs expressed as a percentage.
11402 The accepted range is 2% to 20000%.
11403 </desc>
11404 </attribute>
11405
11406 <!-- @todo method for setting log flags, groups and destination! -->
11407
11408 <attribute name="VM" type="unsigned long long" readonly="yes">
11409 <desc>
11410 Gets the VM handle. This is only for internal use while
11411 we carve the details of this interface.
11412 </desc>
11413 </attribute>
11414
11415 </interface>
11416
11417 <!--
11418 // IUSBController
11419 /////////////////////////////////////////////////////////////////////////
11420 -->
11421
11422 <interface
11423 name="IUSBController" extends="$unknown"
11424 uuid="6fdcccc5-abd3-4fec-9387-2ad3914fc4a8"
11425 wsmap="managed"
11426 >
11427 <attribute name="enabled" type="boolean">
11428 <desc>
11429 Flag whether the USB controller is present in the
11430 guest system. If disabled, the virtual guest hardware will
11431 not contain any USB controller. Can only be changed when
11432 the VM is powered off.
11433 </desc>
11434 </attribute>
11435
11436 <attribute name="enabledEhci" type="boolean">
11437 <desc>
11438 Flag whether the USB EHCI controller is present in the
11439 guest system. If disabled, the virtual guest hardware will
11440 not contain a USB EHCI controller. Can only be changed when
11441 the VM is powered off.
11442 </desc>
11443 </attribute>
11444
11445 <attribute name="proxyAvailable" type="boolean" readonly="yes">
11446 <desc>
11447 Flag whether there is an USB proxy available.
11448 </desc>
11449 </attribute>
11450
11451 <attribute name="USBStandard" type="unsigned short" readonly="yes">
11452 <desc>
11453 USB standard version which the controller implements.
11454 This is a BCD which means that the major version is in the
11455 high byte and minor version is in the low byte.
11456 </desc>
11457 </attribute>
11458
11459 <attribute name="deviceFilters" type="IUSBDeviceFilter" readonly="yes" safearray="yes">
11460 <desc>
11461 List of USB device filters associated with the machine.
11462
11463 If the machine is currently running, these filters are activated
11464 every time a new (supported) USB device is attached to the host
11465 computer that was not ignored by global filters
11466 (<link to="IHost::USBDeviceFilters"/>).
11467
11468 These filters are also activated when the machine is powered up.
11469 They are run against a list of all currently available USB
11470 devices (in states
11471 <link to="USBDeviceState::Available"/>,
11472 <link to="USBDeviceState::Busy"/>,
11473 <link to="USBDeviceState::Held"/>) that were not previously
11474 ignored by global filters.
11475
11476 If at least one filter matches the USB device in question, this
11477 device is automatically captured (attached to) the virtual USB
11478 controller of this machine.
11479
11480 <see>IUSBDeviceFilter, ::IUSBController</see>
11481 </desc>
11482 </attribute>
11483
11484 <method name="createDeviceFilter">
11485 <desc>
11486 Creates a new USB device filter. All attributes except
11487 the filter name are set to empty (any match),
11488 <i>active</i> is @c false (the filter is not active).
11489
11490 The created filter can then be added to the list of filters using
11491 <link to="#insertDeviceFilter"/>.
11492
11493 <result name="VBOX_E_INVALID_VM_STATE">
11494 The virtual machine is not mutable.
11495 </result>
11496
11497 <see>#deviceFilters</see>
11498 </desc>
11499 <param name="name" type="wstring" dir="in">
11500 <desc>
11501 Filter name. See <link to="IUSBDeviceFilter::name"/>
11502 for more info.
11503 </desc>
11504 </param>
11505 <param name="filter" type="IUSBDeviceFilter" dir="return">
11506 <desc>Created filter object.</desc>
11507 </param>
11508 </method>
11509
11510 <method name="insertDeviceFilter">
11511 <desc>
11512 Inserts the given USB device to the specified position
11513 in the list of filters.
11514
11515 Positions are numbered starting from <tt>0</tt>. If the specified
11516 position is equal to or greater than the number of elements in
11517 the list, the filter is added to the end of the collection.
11518
11519 <note>
11520 Duplicates are not allowed, so an attempt to insert a
11521 filter that is already in the collection, will return an
11522 error.
11523 </note>
11524
11525 <result name="VBOX_E_INVALID_VM_STATE">
11526 Virtual machine is not mutable.
11527 </result>
11528 <result name="E_INVALIDARG">
11529 USB device filter not created within this VirtualBox instance.
11530 </result>
11531 <result name="VBOX_E_INVALID_OBJECT_STATE">
11532 USB device filter already in list.
11533 </result>
11534
11535 <see>#deviceFilters</see>
11536 </desc>
11537 <param name="position" type="unsigned long" dir="in">
11538 <desc>Position to insert the filter to.</desc>
11539 </param>
11540 <param name="filter" type="IUSBDeviceFilter" dir="in">
11541 <desc>USB device filter to insert.</desc>
11542 </param>
11543 </method>
11544
11545 <method name="removeDeviceFilter">
11546 <desc>
11547 Removes a USB device filter from the specified position in the
11548 list of filters.
11549
11550 Positions are numbered starting from <tt>0</tt>. Specifying a
11551 position equal to or greater than the number of elements in
11552 the list will produce an error.
11553
11554 <see>#deviceFilters</see>
11555
11556 <result name="VBOX_E_INVALID_VM_STATE">
11557 Virtual machine is not mutable.
11558 </result>
11559 <result name="E_INVALIDARG">
11560 USB device filter list empty or invalid @a position.
11561 </result>
11562
11563 </desc>
11564 <param name="position" type="unsigned long" dir="in">
11565 <desc>Position to remove the filter from.</desc>
11566 </param>
11567 <param name="filter" type="IUSBDeviceFilter" dir="return">
11568 <desc>Removed USB device filter.</desc>
11569 </param>
11570 </method>
11571
11572 </interface>
11573
11574
11575 <!--
11576 // IUSBDevice
11577 /////////////////////////////////////////////////////////////////////////
11578 -->
11579
11580 <interface
11581 name="IUSBDevice" extends="$unknown"
11582 uuid="f8967b0b-4483-400f-92b5-8b675d98a85b"
11583 wsmap="managed"
11584 >
11585 <desc>
11586 The IUSBDevice interface represents a virtual USB device attached to the
11587 virtual machine.
11588
11589 A collection of objects implementing this interface is stored in the
11590 <link to="IConsole::USBDevices"/> attribute which lists all USB devices
11591 attached to a running virtual machine's USB controller.
11592 </desc>
11593
11594 <attribute name="id" type="uuid" mod="string" readonly="yes">
11595 <desc>
11596 Unique USB device ID. This ID is built from #vendorId,
11597 #productId, #revision and #serialNumber.
11598 </desc>
11599 </attribute>
11600
11601 <attribute name="vendorId" type="unsigned short" readonly="yes">
11602 <desc>Vendor ID.</desc>
11603 </attribute>
11604
11605 <attribute name="productId" type="unsigned short" readonly="yes">
11606 <desc>Product ID.</desc>
11607 </attribute>
11608
11609 <attribute name="revision" type="unsigned short" readonly="yes">
11610 <desc>
11611 Product revision number. This is a packed BCD represented as
11612 unsigned short. The high byte is the integer part and the low
11613 byte is the decimal.
11614 </desc>
11615 </attribute>
11616
11617 <attribute name="manufacturer" type="wstring" readonly="yes">
11618 <desc>Manufacturer string.</desc>
11619 </attribute>
11620
11621 <attribute name="product" type="wstring" readonly="yes">
11622 <desc>Product string.</desc>
11623 </attribute>
11624
11625 <attribute name="serialNumber" type="wstring" readonly="yes">
11626 <desc>Serial number string.</desc>
11627 </attribute>
11628
11629 <attribute name="address" type="wstring" readonly="yes">
11630 <desc>Host specific address of the device.</desc>
11631 </attribute>
11632
11633 <attribute name="port" type="unsigned short" readonly="yes">
11634 <desc>
11635 Host USB port number the device is physically
11636 connected to.
11637 </desc>
11638 </attribute>
11639
11640 <attribute name="version" type="unsigned short" readonly="yes">
11641 <desc>
11642 The major USB version of the device - 1 or 2.
11643 </desc>
11644 </attribute>
11645
11646 <attribute name="portVersion" type="unsigned short" readonly="yes">
11647 <desc>
11648 The major USB version of the host USB port the device is
11649 physically connected to - 1 or 2. For devices not connected to
11650 anything this will have the same value as the version attribute.
11651 </desc>
11652 </attribute>
11653
11654 <attribute name="remote" type="boolean" readonly="yes">
11655 <desc>
11656 Whether the device is physically connected to a remote VRDP
11657 client or to a local host machine.
11658 </desc>
11659 </attribute>
11660
11661 </interface>
11662
11663
11664 <!--
11665 // IUSBDeviceFilter
11666 /////////////////////////////////////////////////////////////////////////
11667 -->
11668
11669 <interface
11670 name="IUSBDeviceFilter" extends="$unknown"
11671 uuid="d6831fb4-1a94-4c2c-96ef-8d0d6192066d"
11672 wsmap="managed"
11673 >
11674 <desc>
11675 The IUSBDeviceFilter interface represents an USB device filter used
11676 to perform actions on a group of USB devices.
11677
11678 This type of filters is used by running virtual machines to
11679 automatically capture selected USB devices once they are physically
11680 attached to the host computer.
11681
11682 A USB device is matched to the given device filter if and only if all
11683 attributes of the device match the corresponding attributes of the
11684 filter (that is, attributes are joined together using the logical AND
11685 operation). On the other hand, all together, filters in the list of
11686 filters carry the semantics of the logical OR operation. So if it is
11687 desirable to create a match like "this vendor id OR this product id",
11688 one needs to create two filters and specify "any match" (see below)
11689 for unused attributes.
11690
11691 All filter attributes used for matching are strings. Each string
11692 is an expression representing a set of values of the corresponding
11693 device attribute, that will match the given filter. Currently, the
11694 following filtering expressions are supported:
11695
11696 <ul>
11697 <li><i>Interval filters</i>. Used to specify valid intervals for
11698 integer device attributes (Vendor ID, Product ID and Revision).
11699 The format of the string is:
11700
11701 <tt>int:((m)|([m]-[n]))(,(m)|([m]-[n]))*</tt>
11702
11703 where <tt>m</tt> and <tt>n</tt> are integer numbers, either in octal
11704 (starting from <tt>0</tt>), hexadecimal (starting from <tt>0x</tt>)
11705 or decimal (otherwise) form, so that <tt>m &lt; n</tt>. If <tt>m</tt>
11706 is omitted before a dash (<tt>-</tt>), the minimum possible integer
11707 is assumed; if <tt>n</tt> is omitted after a dash, the maximum
11708 possible integer is assumed.
11709 </li>
11710 <li><i>Boolean filters</i>. Used to specify acceptable values for
11711 boolean device attributes. The format of the string is:
11712
11713 <tt>true|false|yes|no|0|1</tt>
11714
11715 </li>
11716 <li><i>Exact match</i>. Used to specify a single value for the given
11717 device attribute. Any string that doesn't start with <tt>int:</tt>
11718 represents the exact match. String device attributes are compared to
11719 this string including case of symbols. Integer attributes are first
11720 converted to a string (see individual filter attributes) and then
11721 compared ignoring case.
11722
11723 </li>
11724 <li><i>Any match</i>. Any value of the corresponding device attribute
11725 will match the given filter. An empty or @c null string is
11726 used to construct this type of filtering expressions.
11727
11728 </li>
11729 </ul>
11730
11731 <note>
11732 On the Windows host platform, interval filters are not currently
11733 available. Also all string filter attributes
11734 (<link to="#manufacturer"/>, <link to="#product"/>,
11735 <link to="#serialNumber"/>) are ignored, so they behave as
11736 <i>any match</i> no matter what string expression is specified.
11737 </note>
11738
11739 <see>IUSBController::deviceFilters, IHostUSBDeviceFilter</see>
11740 </desc>
11741
11742 <attribute name="name" type="wstring">
11743 <desc>
11744 Visible name for this filter.
11745 This name is used to visually distinguish one filter from another,
11746 so it can neither be @c null nor an empty string.
11747 </desc>
11748 </attribute>
11749
11750 <attribute name="active" type="boolean">
11751 <desc>Whether this filter active or has been temporarily disabled.</desc>
11752 </attribute>
11753
11754 <attribute name="vendorId" type="wstring">
11755 <desc>
11756 <link to="IUSBDevice::vendorId">Vendor ID</link> filter.
11757 The string representation for the <i>exact matching</i>
11758 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11759 (including leading zeroes).
11760 </desc>
11761 </attribute>
11762
11763 <attribute name="productId" type="wstring">
11764 <desc>
11765 <link to="IUSBDevice::productId">Product ID</link> filter.
11766 The string representation for the <i>exact matching</i>
11767 has the form <tt>XXXX</tt>, where <tt>X</tt> is the hex digit
11768 (including leading zeroes).
11769 </desc>
11770 </attribute>
11771
11772 <attribute name="revision" type="wstring">
11773 <desc>
11774 <link to="IUSBDevice::productId">Product revision number</link>
11775 filter. The string representation for the <i>exact matching</i>
11776 has the form <tt>IIFF</tt>, where <tt>I</tt> is the decimal digit
11777 of the integer part of the revision, and <tt>F</tt> is the
11778 decimal digit of its fractional part (including leading and
11779 trailing zeros).
11780 Note that for interval filters, it's best to use the hexadecimal
11781 form, because the revision is stored as a 16 bit packed BCD value;
11782 so the expression <tt>int:0x0100-0x0199</tt> will match any
11783 revision from <tt>1.0</tt> to <tt>1.99</tt>.
11784 </desc>
11785 </attribute>
11786
11787 <attribute name="manufacturer" type="wstring">
11788 <desc>
11789 <link to="IUSBDevice::manufacturer">Manufacturer</link> filter.
11790 </desc>
11791 </attribute>
11792
11793 <attribute name="product" type="wstring">
11794 <desc>
11795 <link to="IUSBDevice::product">Product</link> filter.
11796 </desc>
11797 </attribute>
11798
11799 <attribute name="serialNumber" type="wstring">
11800 <desc>
11801 <link to="IUSBDevice::serialNumber">Serial number</link> filter.
11802 </desc>
11803 </attribute>
11804
11805 <attribute name="port" type="wstring">
11806 <desc>
11807 <link to="IUSBDevice::port">Host USB port</link> filter.
11808 </desc>
11809 </attribute>
11810
11811 <attribute name="remote" type="wstring">
11812 <desc>
11813 <link to="IUSBDevice::remote">Remote state</link> filter.
11814 <note>
11815 This filter makes sense only for machine USB filters,
11816 i.e. it is ignored by IHostUSBDeviceFilter objects.
11817 </note>
11818 </desc>
11819 </attribute>
11820
11821 <attribute name="maskedInterfaces" type="unsigned long">
11822 <desc>
11823 This is an advanced option for hiding one or more USB interfaces
11824 from the guest. The value is a bit mask where the bits that are set
11825 means the corresponding USB interface should be hidden, masked off
11826 if you like.
11827 This feature only works on Linux hosts.
11828 </desc>
11829 </attribute>
11830
11831 </interface>
11832
11833
11834 <!--
11835 // IHostUSBDevice
11836 /////////////////////////////////////////////////////////////////////////
11837 -->
11838
11839 <enum
11840 name="USBDeviceState"
11841 uuid="b99a2e65-67fb-4882-82fd-f3e5e8193ab4"
11842 >
11843 <desc>
11844 USB device state. This enumeration represents all possible states
11845 of the USB device physically attached to the host computer regarding
11846 its state on the host computer and availability to guest computers
11847 (all currently running virtual machines).
11848
11849 Once a supported USB device is attached to the host, global USB
11850 filters (<link to="IHost::USBDeviceFilters"/>) are activated. They can
11851 either ignore the device, or put it to USBDeviceState_Held state, or do
11852 nothing. Unless the device is ignored by global filters, filters of all
11853 currently running guests (<link to="IUSBController::deviceFilters"/>) are
11854 activated that can put it to USBDeviceState_Captured state.
11855
11856 If the device was ignored by global filters, or didn't match
11857 any filters at all (including guest ones), it is handled by the host
11858 in a normal way. In this case, the device state is determined by
11859 the host and can be one of USBDeviceState_Unavailable, USBDeviceState_Busy
11860 or USBDeviceState_Available, depending on the current device usage.
11861
11862 Besides auto-capturing based on filters, the device can be manually
11863 captured by guests (<link to="IConsole::attachUSBDevice"/>) if its
11864 state is USBDeviceState_Busy, USBDeviceState_Available or
11865 USBDeviceState_Held.
11866
11867 <note>
11868 Due to differences in USB stack implementations in Linux and Win32,
11869 states USBDeviceState_Busy and USBDeviceState_vailable are applicable
11870 only to the Linux version of the product. This also means that (<link
11871 to="IConsole::attachUSBDevice"/>) can only succeed on Win32 if the
11872 device state is USBDeviceState_Held.
11873 </note>
11874
11875 <see>IHostUSBDevice, IHostUSBDeviceFilter</see>
11876 </desc>
11877
11878 <const name="NotSupported" value="0">
11879 <desc>
11880 Not supported by the VirtualBox server, not available to guests.
11881 </desc>
11882 </const>
11883 <const name="Unavailable" value="1">
11884 <desc>
11885 Being used by the host computer exclusively,
11886 not available to guests.
11887 </desc>
11888 </const>
11889 <const name="Busy" value="2">
11890 <desc>
11891 Being used by the host computer, potentially available to guests.
11892 </desc>
11893 </const>
11894 <const name="Available" value="3">
11895 <desc>
11896 Not used by the host computer, available to guests (the host computer
11897 can also start using the device at any time).
11898 </desc>
11899 </const>
11900 <const name="Held" value="4">
11901 <desc>
11902 Held by the VirtualBox server (ignored by the host computer),
11903 available to guests.
11904 </desc>
11905 </const>
11906 <const name="Captured" value="5">
11907 <desc>
11908 Captured by one of the guest computers, not available
11909 to anybody else.
11910 </desc>
11911 </const>
11912 </enum>
11913
11914 <interface
11915 name="IHostUSBDevice" extends="IUSBDevice"
11916 uuid="173b4b44-d268-4334-a00d-b6521c9a740a"
11917 wsmap="managed"
11918 >
11919 <desc>
11920 The IHostUSBDevice interface represents a physical USB device attached
11921 to the host computer.
11922
11923 Besides properties inherited from IUSBDevice, this interface adds the
11924 <link to="#state"/> property that holds the current state of the USB
11925 device.
11926
11927 <see>IHost::USBDevices, IHost::USBDeviceFilters</see>
11928 </desc>
11929
11930 <attribute name="state" type="USBDeviceState" readonly="yes">
11931 <desc>
11932 Current state of the device.
11933 </desc>
11934 </attribute>
11935
11936 <!-- @todo add class, subclass, bandwidth, configs, interfaces endpoints and such later. -->
11937
11938 </interface>
11939
11940
11941 <!--
11942 // IHostUSBDeviceFilter
11943 /////////////////////////////////////////////////////////////////////////
11944 -->
11945
11946 <enum
11947 name="USBDeviceFilterAction"
11948 uuid="cbc30a49-2f4e-43b5-9da6-121320475933"
11949 >
11950 <desc>
11951 Actions for host USB device filters.
11952 <see>IHostUSBDeviceFilter, USBDeviceState</see>
11953 </desc>
11954
11955 <const name="Null" value="0">
11956 <desc>Null value (never used by the API).</desc>
11957 </const>
11958 <const name="Ignore" value="1">
11959 <desc>Ignore the matched USB device.</desc>
11960 </const>
11961 <const name="Hold" value="2">
11962 <desc>Hold the matched USB device.</desc>
11963 </const>
11964 </enum>
11965
11966 <interface
11967 name="IHostUSBDeviceFilter" extends="IUSBDeviceFilter"
11968 uuid="4cc70246-d74a-400f-8222-3900489c0374"
11969 wsmap="managed"
11970 >
11971 <desc>
11972 The IHostUSBDeviceFilter interface represents a global filter for a
11973 physical USB device used by the host computer. Used indirectly in
11974 <link to="IHost::USBDeviceFilters"/>.
11975
11976 Using filters of this type, the host computer determines the initial
11977 state of the USB device after it is physically attached to the
11978 host's USB controller.
11979
11980 <note>
11981 The <link to="IUSBDeviceFilter::remote"/> attribute is ignored by this type of
11982 filters, because it makes sense only for
11983 <link to="IUSBController::deviceFilters">machine USB filters</link>.
11984 </note>
11985
11986 <see>IHost::USBDeviceFilters</see>
11987 </desc>
11988
11989 <attribute name="action" type="USBDeviceFilterAction">
11990 <desc>
11991 Action performed by the host when an attached USB device
11992 matches this filter.
11993 </desc>
11994 </attribute>
11995
11996 </interface>
11997
11998 <!--
11999 // IAudioAdapter
12000 /////////////////////////////////////////////////////////////////////////
12001 -->
12002
12003 <enum
12004 name="AudioDriverType"
12005 uuid="4bcc3d73-c2fe-40db-b72f-0c2ca9d68496"
12006 >
12007 <desc>
12008 Host audio driver type.
12009 </desc>
12010
12011 <const name="Null" value="0">
12012 <desc>Null value, also means "dummy audio driver".</desc>
12013 </const>
12014 <const name="WinMM" value="1">
12015 <desc>Windows multimedia (Windows hosts only).</desc>
12016 </const>
12017 <const name="OSS" value="2">
12018 <desc>Open Sound System (Linux hosts only).</desc>
12019 </const>
12020 <const name="ALSA" value="3">
12021 <desc>Advanced Linux Sound Architecture (Linux hosts only).</desc>
12022 </const>
12023 <const name="DirectSound" value="4">
12024 <desc>DirectSound (Windows hosts only).</desc>
12025 </const>
12026 <const name="CoreAudio" value="5">
12027 <desc>CoreAudio (Mac hosts only).</desc>
12028 </const>
12029 <const name="MMPM" value="6">
12030 <desc>Reserved for historical reasons.</desc>
12031 </const>
12032 <const name="Pulse" value="7">
12033 <desc>PulseAudio (Linux hosts only).</desc>
12034 </const>
12035 <const name="SolAudio" value="8">
12036 <desc>Solaris audio (Solaris hosts only).</desc>
12037 </const>
12038 </enum>
12039
12040 <enum
12041 name="AudioControllerType"
12042 uuid="7afd395c-42c3-444e-8788-3ce80292f36c"
12043 >
12044 <desc>
12045 Virtual audio controller type.
12046 </desc>
12047
12048 <const name="AC97" value="0"/>
12049 <const name="SB16" value="1"/>
12050 <const name="HDA" value="2"/>
12051 </enum>
12052
12053 <interface
12054 name="IAudioAdapter" extends="$unknown"
12055 uuid="921873db-5f3f-4b69-91f9-7be9e535a2cb"
12056 wsmap="managed"
12057 >
12058 <desc>
12059 The IAudioAdapter interface represents the virtual audio adapter of
12060 the virtual machine. Used in <link to="IMachine::audioAdapter"/>.
12061 </desc>
12062 <attribute name="enabled" type="boolean">
12063 <desc>
12064 Flag whether the audio adapter is present in the
12065 guest system. If disabled, the virtual guest hardware will
12066 not contain any audio adapter. Can only be changed when
12067 the VM is not running.
12068 </desc>
12069 </attribute>
12070 <attribute name="audioController" type="AudioControllerType">
12071 <desc>
12072 The audio hardware we emulate.
12073 </desc>
12074 </attribute>
12075 <attribute name="audioDriver" type="AudioDriverType">
12076 <desc>
12077 Audio driver the adapter is connected to. This setting
12078 can only be changed when the VM is not running.
12079 </desc>
12080 </attribute>
12081 </interface>
12082
12083 <!--
12084 // IVRDPServer
12085 /////////////////////////////////////////////////////////////////////////
12086 -->
12087
12088 <enum
12089 name="VRDPAuthType"
12090 uuid="3d91887a-b67f-4b33-85bf-2da7ab1ea83a"
12091 >
12092 <desc>
12093 VRDP authentication type.
12094 </desc>
12095
12096 <const name="Null" value="0">
12097 <desc>Null value, also means "no authentication".</desc>
12098 </const>
12099 <const name="External" value="1"/>
12100 <const name="Guest" value="2"/>
12101 </enum>
12102
12103 <interface
12104 name="IVRDPServer" extends="$unknown"
12105 uuid="7aeeb530-0b08-41fe-835d-9be9ec1dbe5c"
12106 wsmap="managed"
12107 >
12108 <attribute name="enabled" type="boolean">
12109 <desc>VRDP server status.</desc>
12110 </attribute>
12111
12112 <attribute name="ports" type="wstring">
12113 <desc>
12114 VRDP server port numbers. The server will try to bind to one of free ports from the list.
12115 <note>
12116 This is a string of comma separated TCP port numbers or port number ranges.
12117 Example <tt>5000,5010-5012,5015</tt>
12118 </note>
12119 </desc>
12120 </attribute>
12121
12122 <attribute name="netAddress" type="wstring">
12123 <desc>VRDP server address.</desc>
12124 </attribute>
12125
12126 <attribute name="authType" type="VRDPAuthType">
12127 <desc>VRDP authentication method.</desc>
12128 </attribute>
12129
12130 <attribute name="authTimeout" type="unsigned long">
12131 <desc>Timeout for guest authentication. Milliseconds.</desc>
12132 </attribute>
12133
12134 <attribute name="allowMultiConnection" type="boolean">
12135 <desc>
12136 Flag whether multiple simultaneous connections to the VM are permitted.
12137 Note that this will be replaced by a more powerful mechanism in the future.
12138 </desc>
12139 </attribute>
12140
12141 <attribute name="reuseSingleConnection" type="boolean">
12142 <desc>
12143 Flag whether the existing connection must be dropped and a new connection
12144 must be established by the VRDP server, when a new client connects in single
12145 connection mode.
12146 </desc>
12147 </attribute>
12148
12149 <attribute name="videoChannel" type="boolean">
12150 <desc>
12151 Flag whether RDP video channel is supported.
12152 </desc>
12153 </attribute>
12154
12155 <attribute name="videoChannelQuality" type="unsigned long">
12156 <desc>
12157 Image quality in percents.
12158 </desc>
12159 </attribute>
12160
12161 </interface>
12162
12163
12164 <!--
12165 // ISharedFolder
12166 /////////////////////////////////////////////////////////////////////////
12167 -->
12168
12169 <interface
12170 name="ISharedFolder" extends="$unknown"
12171 uuid="8388da11-b559-4574-a5b7-2bd7acd5cef8"
12172 wsmap="struct"
12173 >
12174 <desc>
12175 The ISharedFolder interface represents a folder in the host computer's
12176 file system accessible from the guest OS running inside a virtual
12177 machine using an associated logical name.
12178
12179 There are three types of shared folders:
12180 <ul>
12181 <li><i>Global</i> (<link to="IVirtualBox::sharedFolders"/>), shared
12182 folders available to all virtual machines.</li>
12183 <li><i>Permanent</i> (<link to="IMachine::sharedFolders"/>),
12184 VM-specific shared folders available to the given virtual machine at
12185 startup.</li>
12186 <li><i>Transient</i> (<link to="IConsole::sharedFolders"/>),
12187 VM-specific shared folders created in the session context (for
12188 example, when the virtual machine is running) and automatically
12189 discarded when the session is closed (the VM is powered off).</li>
12190 </ul>
12191
12192 Logical names of shared folders must be unique within the given scope
12193 (global, permanent or transient). However, they do not need to be unique
12194 across scopes. In this case, the definition of the shared folder in a
12195 more specific scope takes precedence over definitions in all other
12196 scopes. The order of precedence is (more specific to more general):
12197 <ol>
12198 <li>Transient definitions</li>
12199 <li>Permanent definitions</li>
12200 <li>Global definitions</li>
12201 </ol>
12202
12203 For example, if MyMachine has a shared folder named
12204 <tt>C_DRIVE</tt> (that points to <tt>C:\\</tt>), then creating a
12205 transient shared folder named <tt>C_DRIVE</tt> (that points
12206 to <tt>C:\\\\WINDOWS</tt>) will change the definition
12207 of <tt>C_DRIVE</tt> in the guest OS so
12208 that <tt>\\\\VBOXSVR\\C_DRIVE</tt> will give access
12209 to <tt>C:\\WINDOWS</tt> instead of <tt>C:\\</tt> on the host
12210 PC. Removing the transient shared folder <tt>C_DRIVE</tt> will restore
12211 the previous (permanent) definition of <tt>C_DRIVE</tt> that points
12212 to <tt>C:\\</tt> if it still exists.
12213
12214 Note that permanent and transient shared folders of different machines
12215 are in different name spaces, so they don't overlap and don't need to
12216 have unique logical names.
12217
12218 <note>
12219 Global shared folders are not implemented in the current version of the
12220 product.
12221 </note>
12222 </desc>
12223
12224 <attribute name="name" type="wstring" readonly="yes">
12225 <desc>Logical name of the shared folder.</desc>
12226 </attribute>
12227
12228 <attribute name="hostPath" type="wstring" readonly="yes">
12229 <desc>Full path to the shared folder in the host file system.</desc>
12230 </attribute>
12231
12232 <attribute name="accessible" type="boolean" readonly="yes">
12233 <desc>
12234 Whether the folder defined by the host path is currently
12235 accessible or not.
12236 For example, the folder can be unaccessible if it is placed
12237 on the network share that is not available by the time
12238 this property is read.
12239 </desc>
12240 </attribute>
12241
12242 <attribute name="writable" type="boolean" readonly="yes">
12243 <desc>
12244 Whether the folder defined by the host path is writable or
12245 not.
12246 </desc>
12247 </attribute>
12248
12249 <attribute name="autoMount" type="boolean" readonly="yes">
12250 <desc>
12251 Whether the folder gets automatically mounted by the guest or not.
12252 </desc>
12253 </attribute>
12254
12255 <attribute name="lastAccessError" type="wstring" readonly="yes">
12256 <desc>
12257 Text message that represents the result of the last accessibility
12258 check.
12259
12260 Accessibility checks are performed each time the <link to="#accessible"/>
12261 attribute is read. An empty string is returned if the last
12262 accessibility check was successful. A non-empty string indicates a
12263 failure and should normally describe a reason of the failure (for
12264 example, a file read error).
12265 </desc>
12266 </attribute>
12267
12268 </interface>
12269
12270 <!--
12271 // ISession
12272 /////////////////////////////////////////////////////////////////////////
12273 -->
12274
12275 <interface
12276 name="IInternalSessionControl" extends="$unknown"
12277 uuid="ef059f1d-2273-4f81-9342-c152a0d2cd40"
12278 internal="yes"
12279 wsmap="suppress"
12280 >
12281 <method name="getPID">
12282 <desc>PID of the process that has created this Session object.
12283 </desc>
12284 <param name="pid" type="unsigned long" dir="return"/>
12285 </method>
12286
12287 <method name="getRemoteConsole">
12288 <desc>
12289 Returns the console object suitable for remote control.
12290
12291 <result name="VBOX_E_INVALID_VM_STATE">
12292 Session state prevents operation.
12293 </result>
12294 <result name="VBOX_E_INVALID_OBJECT_STATE">
12295 Session type prevents operation.
12296 </result>
12297
12298 </desc>
12299 <param name="console" type="IConsole" dir="return"/>
12300 </method>
12301
12302 <method name="assignMachine">
12303 <desc>
12304 Assigns the machine object associated with this direct-type
12305 session or informs the session that it will be a remote one
12306 (if @a machine == @c null).
12307
12308 <result name="VBOX_E_INVALID_VM_STATE">
12309 Session state prevents operation.
12310 </result>
12311 <result name="VBOX_E_INVALID_OBJECT_STATE">
12312 Session type prevents operation.
12313 </result>
12314
12315 </desc>
12316 <param name="machine" type="IMachine" dir="in"/>
12317 </method>
12318
12319 <method name="assignRemoteMachine">
12320 <desc>
12321 Assigns the machine and the (remote) console object associated with
12322 this remote-type session.
12323
12324 <result name="VBOX_E_INVALID_VM_STATE">
12325 Session state prevents operation.
12326 </result>
12327
12328 </desc>
12329 <param name="machine" type="IMachine" dir="in"/>
12330 <param name="console" type="IConsole" dir="in"/>
12331 </method>
12332
12333 <method name="updateMachineState">
12334 <desc>
12335 Updates the machine state in the VM process.
12336 Must be called only in certain cases
12337 (see the method implementation).
12338
12339 <result name="VBOX_E_INVALID_VM_STATE">
12340 Session state prevents operation.
12341 </result>
12342 <result name="VBOX_E_INVALID_OBJECT_STATE">
12343 Session type prevents operation.
12344 </result>
12345
12346 </desc>
12347 <param name="aMachineState" type="MachineState" dir="in"/>
12348 </method>
12349
12350 <method name="uninitialize">
12351 <desc>
12352 Uninitializes (closes) this session. Used by VirtualBox to close
12353 the corresponding remote session when the direct session dies
12354 or gets closed.
12355
12356 <result name="VBOX_E_INVALID_VM_STATE">
12357 Session state prevents operation.
12358 </result>
12359
12360 </desc>
12361 </method>
12362
12363 <method name="onNetworkAdapterChange">
12364 <desc>
12365 Triggered when settings of a network adapter of the
12366 associated virtual machine have changed.
12367
12368 <result name="VBOX_E_INVALID_VM_STATE">
12369 Session state prevents operation.
12370 </result>
12371 <result name="VBOX_E_INVALID_OBJECT_STATE">
12372 Session type prevents operation.
12373 </result>
12374
12375 </desc>
12376 <param name="networkAdapter" type="INetworkAdapter" dir="in"/>
12377 <param name="changeAdapter" type="boolean" dir="in"/>
12378 </method>
12379
12380 <method name="onSerialPortChange">
12381 <desc>
12382 Triggered when settings of a serial port of the
12383 associated virtual machine have changed.
12384
12385 <result name="VBOX_E_INVALID_VM_STATE">
12386 Session state prevents operation.
12387 </result>
12388 <result name="VBOX_E_INVALID_OBJECT_STATE">
12389 Session type prevents operation.
12390 </result>
12391
12392 </desc>
12393 <param name="serialPort" type="ISerialPort" dir="in"/>
12394 </method>
12395
12396 <method name="onParallelPortChange">
12397 <desc>
12398 Triggered when settings of a parallel port of the
12399 associated virtual machine have changed.
12400
12401 <result name="VBOX_E_INVALID_VM_STATE">
12402 Session state prevents operation.
12403 </result>
12404 <result name="VBOX_E_INVALID_OBJECT_STATE">
12405 Session type prevents operation.
12406 </result>
12407
12408 </desc>
12409 <param name="parallelPort" type="IParallelPort" dir="in"/>
12410 </method>
12411
12412 <method name="onStorageControllerChange">
12413 <desc>
12414 Triggered when settings of a storage controller of the
12415 associated virtual machine have changed.
12416
12417 <result name="VBOX_E_INVALID_VM_STATE">
12418 Session state prevents operation.
12419 </result>
12420 <result name="VBOX_E_INVALID_OBJECT_STATE">
12421 Session type prevents operation.
12422 </result>
12423
12424 </desc>
12425 </method>
12426
12427 <method name="onMediumChange">
12428 <desc>
12429 Triggered when attached media of the
12430 associated virtual machine have changed.
12431
12432 <result name="VBOX_E_INVALID_VM_STATE">
12433 Session state prevents operation.
12434 </result>
12435 <result name="VBOX_E_INVALID_OBJECT_STATE">
12436 Session type prevents operation.
12437 </result>
12438
12439 </desc>
12440
12441 <param name="mediumAttachment" type="IMediumAttachment" dir="in"/>
12442 <param name="force" type="boolean" dir="in"/>
12443 </method>
12444
12445 <method name="onCPUChange">
12446 <desc>
12447 Notification when a CPU changes.
12448 </desc>
12449 <param name="cpu" type="unsigned long" dir="in">
12450 <desc>The CPU which changed</desc>
12451 </param>
12452 <param name="add" type="boolean" dir="in">
12453 <desc>Flag whether the CPU was added or removed</desc>
12454 </param>
12455 </method>
12456
12457 <method name="onCPUPriorityChange">
12458 <desc>
12459 Notification when the CPU priority changes.
12460 </desc>
12461 <param name="priority" type="unsigned long" dir="in">
12462 <desc>The new CPU priority value. (1-100)</desc>
12463 </param>
12464 </method>
12465
12466 <method name="onVRDPServerChange">
12467 <desc>
12468 Triggered when settings of the VRDP server object of the
12469 associated virtual machine have changed.
12470
12471 <result name="VBOX_E_INVALID_VM_STATE">
12472 Session state prevents operation.
12473 </result>
12474 <result name="VBOX_E_INVALID_OBJECT_STATE">
12475 Session type prevents operation.
12476 </result>
12477
12478 </desc>
12479 <param name="restart" type="boolean" dir="in">
12480 <desc>Flag whether the server must be restarted</desc>
12481 </param>
12482 </method>
12483
12484 <method name="onUSBControllerChange">
12485 <desc>
12486 Triggered when settings of the USB controller object of the
12487 associated virtual machine have changed.
12488
12489 <result name="VBOX_E_INVALID_VM_STATE">
12490 Session state prevents operation.
12491 </result>
12492 <result name="VBOX_E_INVALID_OBJECT_STATE">
12493 Session type prevents operation.
12494 </result>
12495
12496 </desc>
12497 </method>
12498
12499 <method name="onSharedFolderChange">
12500 <desc>
12501 Triggered when a permanent (global or machine) shared folder has been
12502 created or removed.
12503 <note>
12504 We don't pass shared folder parameters in this notification because
12505 the order in which parallel notifications are delivered is not defined,
12506 therefore it could happen that these parameters were outdated by the
12507 time of processing this notification.
12508 </note>
12509
12510 <result name="VBOX_E_INVALID_VM_STATE">
12511 Session state prevents operation.
12512 </result>
12513 <result name="VBOX_E_INVALID_OBJECT_STATE">
12514 Session type prevents operation.
12515 </result>
12516
12517 </desc>
12518 <param name="global" type="boolean" dir="in"/>
12519 </method>
12520
12521 <method name="onUSBDeviceAttach">
12522 <desc>
12523 Triggered when a request to capture a USB device (as a result
12524 of matched USB filters or direct call to
12525 <link to="IConsole::attachUSBDevice"/>) has completed.
12526 A @c null @a error object means success, otherwise it
12527 describes a failure.
12528
12529 <result name="VBOX_E_INVALID_VM_STATE">
12530 Session state prevents operation.
12531 </result>
12532 <result name="VBOX_E_INVALID_OBJECT_STATE">
12533 Session type prevents operation.
12534 </result>
12535
12536 </desc>
12537 <param name="device" type="IUSBDevice" dir="in"/>
12538 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12539 <param name="maskedInterfaces" type="unsigned long" dir="in"/>
12540 </method>
12541
12542 <method name="onUSBDeviceDetach">
12543 <desc>
12544 Triggered when a request to release the USB device (as a result
12545 of machine termination or direct call to
12546 <link to="IConsole::detachUSBDevice"/>) has completed.
12547 A @c null @a error object means success, otherwise it
12548 describes a failure.
12549
12550 <result name="VBOX_E_INVALID_VM_STATE">
12551 Session state prevents operation.
12552 </result>
12553 <result name="VBOX_E_INVALID_OBJECT_STATE">
12554 Session type prevents operation.
12555 </result>
12556
12557 </desc>
12558 <param name="id" type="uuid" mod="string" dir="in"/>
12559 <param name="error" type="IVirtualBoxErrorInfo" dir="in"/>
12560 </method>
12561
12562 <method name="onShowWindow">
12563 <desc>
12564 Called by <link to="IMachine::canShowConsoleWindow"/> and by
12565 <link to="IMachine::showConsoleWindow"/> in order to notify
12566 console listeners
12567 <link to="ICanShowWindowEvent"/>
12568 and <link to="IShowWindowEvent"/>.
12569
12570 <result name="VBOX_E_INVALID_OBJECT_STATE">
12571 Session type prevents operation.
12572 </result>
12573
12574 </desc>
12575 <param name="check" type="boolean" dir="in"/>
12576 <param name="canShow" type="boolean" dir="out"/>
12577 <param name="winId" type="unsigned long long" dir="out"/>
12578 </method>
12579
12580 <method name="accessGuestProperty">
12581 <desc>
12582 Called by <link to="IMachine::getGuestProperty"/> and by
12583 <link to="IMachine::setGuestProperty"/> in order to read and
12584 modify guest properties.
12585
12586 <result name="VBOX_E_INVALID_VM_STATE">
12587 Machine session is not open.
12588 </result>
12589 <result name="VBOX_E_INVALID_OBJECT_STATE">
12590 Session type is not direct.
12591 </result>
12592
12593 </desc>
12594 <param name="name" type="wstring" dir="in"/>
12595 <param name="value" type="wstring" dir="in"/>
12596 <param name="flags" type="wstring" dir="in"/>
12597 <param name="isSetter" type="boolean" dir="in"/>
12598 <param name="retValue" type="wstring" dir="out"/>
12599 <param name="retTimestamp" type="unsigned long long" dir="out"/>
12600 <param name="retFlags" type="wstring" dir="out"/>
12601 </method>
12602
12603 <method name="enumerateGuestProperties">
12604 <desc>
12605 Return a list of the guest properties matching a set of patterns along
12606 with their values, time stamps and flags.
12607
12608 <result name="VBOX_E_INVALID_VM_STATE">
12609 Machine session is not open.
12610 </result>
12611 <result name="VBOX_E_INVALID_OBJECT_STATE">
12612 Session type is not direct.
12613 </result>
12614
12615 </desc>
12616 <param name="patterns" type="wstring" dir="in">
12617 <desc>
12618 The patterns to match the properties against as a comma-separated
12619 string. If this is empty, all properties currently set will be
12620 returned.
12621 </desc>
12622 </param>
12623 <param name="key" type="wstring" dir="out" safearray="yes">
12624 <desc>
12625 The key names of the properties returned.
12626 </desc>
12627 </param>
12628 <param name="value" type="wstring" dir="out" safearray="yes">
12629 <desc>
12630 The values of the properties returned. The array entries match the
12631 corresponding entries in the @a key array.
12632 </desc>
12633 </param>
12634 <param name="timestamp" type="unsigned long long" dir="out" safearray="yes">
12635 <desc>
12636 The time stamps of the properties returned. The array entries match
12637 the corresponding entries in the @a key array.
12638 </desc>
12639 </param>
12640 <param name="flags" type="wstring" dir="out" safearray="yes">
12641 <desc>
12642 The flags of the properties returned. The array entries match the
12643 corresponding entries in the @a key array.
12644 </desc>
12645 </param>
12646 </method>
12647
12648 <method name="onlineMergeMedium">
12649 <desc>
12650 Triggers online merging of a hard disk. Used internally when deleting
12651 a snapshot while a VM referring to the same hard disk chain is running.
12652
12653 <result name="VBOX_E_INVALID_VM_STATE">
12654 Machine session is not open.
12655 </result>
12656 <result name="VBOX_E_INVALID_OBJECT_STATE">
12657 Session type is not direct.
12658 </result>
12659
12660 </desc>
12661 <param name="mediumAttachment" type="IMediumAttachment" dir="in">
12662 <desc>The medium attachment to identify the medium chain.</desc>
12663 </param>
12664 <param name="sourceIdx" type="unsigned long" dir="in">
12665 <desc>The index of the source image in the chain.
12666 Redundant, but drastically reduces IPC.</desc>
12667 </param>
12668 <param name="targetIdx" type="unsigned long" dir="in">
12669 <desc>The index of the target image in the chain.
12670 Redundant, but drastically reduces IPC.</desc>
12671 </param>
12672 <param name="source" type="IMedium" dir="in">
12673 <desc>Merge source medium.</desc>
12674 </param>
12675 <param name="target" type="IMedium" dir="in">
12676 <desc>Merge target medium.</desc>
12677 </param>
12678 <param name="mergeForward" type="boolean" dir="in">
12679 <desc>Merge direction.</desc>
12680 </param>
12681 <param name="parentForTarget" type="IMedium" dir="in">
12682 <desc>For forward merges: new parent for target medium.</desc>
12683 </param>
12684 <param name="childrenToReparent" type="IMedium" safearray="yes" dir="in">
12685 <desc>For backward merges: list of media which need their parent UUID
12686 updated.</desc>
12687 </param>
12688 <param name="progress" type="IProgress" dir="in">
12689 <desc>
12690 Progress object for this operation.
12691 </desc>
12692 </param>
12693 </method>
12694
12695 </interface>
12696
12697 <interface
12698 name="ISession" extends="$unknown"
12699 uuid="12F4DCDB-12B2-4EC1-B7CD-DDD9F6C5BF4D"
12700 wsmap="managed"
12701 >
12702 <desc>
12703 The ISession interface represents a client process and allows for locking
12704 virtual machines (represented by IMachine objects) to prevent conflicting
12705 changes to the machine.
12706
12707 Any caller wishing to manipulate a virtual machine needs to create a session
12708 object first, which lives in its own process space. Such session objects are
12709 then associated with <link to="IMachine" /> objects living in the VirtualBox
12710 server process to coordinate such changes.
12711
12712 There are two typical scenarios in which sessions are used:
12713
12714 <ul>
12715 <li>To alter machine settings or control a running virtual machine, one
12716 needs to lock a machine for a given session (client process) by calling
12717 <link to="IMachine::lockMachine"/>.
12718
12719 Whereas multiple sessions may control a running virtual machine, only
12720 one process can obtain a write lock on the machine to prevent conflicting
12721 changes. A write lock is also needed if a process wants to actually run a
12722 virtual machine in its own context, such as the VirtualBox GUI or
12723 VBoxHeadless front-ends. They must also lock a machine for their own
12724 sessions before they are allowed to power up the virtual machine.
12725
12726 As a result, no machine settings can be altered while another process is
12727 already using it, either because that process is modifying machine settings
12728 or because the machine is running.
12729 </li>
12730 <li>
12731 To start a VM using one of the existing VirtualBox front-ends (e.g. the
12732 VirtualBox GUI or VBoxHeadless), one would use
12733 <link to="IMachine::launchVMProcess"/>, which also takes a session object
12734 as its first parameter. This session then identifies the caller and lets the
12735 caller control the started machine (for example, pause machine execution or
12736 power it down) as well as be notified about machine execution state changes.
12737 </li>
12738 </ul>
12739
12740 How sessions objects are created in a client process depends on whether you use
12741 the Main API via COM or via the webservice:
12742
12743 <ul>
12744 <li>When using the COM API directly, an object of the Session class from the
12745 VirtualBox type library needs to be created. In regular COM C++ client code,
12746 this can be done by calling <tt>createLocalObject()</tt>, a standard COM API.
12747 This object will then act as a local session object in further calls to open
12748 a session.
12749 </li>
12750
12751 <li>In the webservice, the session manager (IWebsessionManager) instead creates
12752 a session object automatically whenever <link to="IWebsessionManager::logon" />
12753 is called. A managed object reference to that session object can be retrieved by
12754 calling <link to="IWebsessionManager::getSessionObject" />.
12755 </li>
12756 </ul>
12757 </desc>
12758
12759 <attribute name="state" type="SessionState" readonly="yes">
12760 <desc>Current state of this session.</desc>
12761 </attribute>
12762
12763 <attribute name="type" type="SessionType" readonly="yes">
12764 <desc>
12765 Type of this session. The value of this attribute is valid only
12766 if the session currently has a machine locked (i.e. its
12767 <link to="#state" /> is Locked), otherwise an error will be returned.
12768 </desc>
12769 </attribute>
12770
12771 <attribute name="machine" type="IMachine" readonly="yes">
12772 <desc>Machine object associated with this session.</desc>
12773 </attribute>
12774
12775 <attribute name="console" type="IConsole" readonly="yes">
12776 <desc>Console object associated with this session.</desc>
12777 </attribute>
12778
12779 <method name="unlockMachine">
12780 <desc>
12781 Unlocks a machine that was previously locked for the current session.
12782
12783 Calling this method is required every time a machine has been locked
12784 for a particular session using the <link to="IMachine::launchVMProcess" />
12785 or <link to="IMachine::lockMachine" /> calls. Otherwise the state of
12786 the machine will be set to <link to="MachineState::Aborted" /> on the
12787 server, and changes made to the machine settings will be lost.
12788
12789 Generally, it is recommended to unlock all machines explicitly
12790 before terminating the application (regardless of the reason for
12791 the termination).
12792
12793 <note>
12794 Do not expect the session state (<link to="ISession::state" />
12795 to return to "Unlocked" immediately after you invoke this method,
12796 particularly if you have started a new VM process. The session
12797 state will automatically return to "Unlocked" once the VM is no
12798 longer executing, which can of course take a very long time.
12799 </note>
12800
12801 <result name="E_UNEXPECTED">
12802 Session is not locked.
12803 </result>
12804
12805 </desc>
12806 </method>
12807
12808 </interface>
12809
12810 <!--
12811 // IStorageController
12812 /////////////////////////////////////////////////////////////////////////
12813 -->
12814
12815 <enum
12816 name="StorageBus"
12817 uuid="eee67ab3-668d-4ef5-91e0-7025fe4a0d7a"
12818 >
12819 <desc>
12820 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy);
12821 see <link to="IStorageController::bus" />.
12822 </desc>
12823 <const name="Null" value="0">
12824 <desc>@c null value. Never used by the API.</desc>
12825 </const>
12826 <const name="IDE" value="1"/>
12827 <const name="SATA" value="2"/>
12828 <const name="SCSI" value="3"/>
12829 <const name="Floppy" value="4"/>
12830 <const name="SAS" value="5"/>
12831 </enum>
12832
12833 <enum
12834 name="StorageControllerType"
12835 uuid="8a412b8a-f43e-4456-bd37-b474f0879a58"
12836 >
12837 <desc>
12838 The exact variant of storage controller hardware presented
12839 to the guest; see <link to="IStorageController::controllerType" />.
12840 </desc>
12841
12842 <const name="Null" value="0">
12843 <desc>@c null value. Never used by the API.</desc>
12844 </const>
12845 <const name="LsiLogic" value="1">
12846 <desc>A SCSI controller of the LsiLogic variant.</desc>
12847 </const>
12848 <const name="BusLogic" value="2">
12849 <desc>A SCSI controller of the BusLogic variant.</desc>
12850 </const>
12851 <const name="IntelAhci" value="3">
12852 <desc>An Intel AHCI SATA controller; this is the only variant for SATA.</desc>
12853 </const>
12854 <const name="PIIX3" value="4">
12855 <desc>An IDE controller of the PIIX3 variant.</desc>
12856 </const>
12857 <const name="PIIX4" value="5">
12858 <desc>An IDE controller of the PIIX4 variant.</desc>
12859 </const>
12860 <const name="ICH6" value="6">
12861 <desc>An IDE controller of the ICH6 variant.</desc>
12862 </const>
12863 <const name="I82078" value="7">
12864 <desc>A floppy disk controller; this is the only variant for floppy drives.</desc>
12865 </const>
12866 <const name="LsiLogicSas" value="8">
12867 <desc>A variant of the LsiLogic controller using SAS.</desc>
12868 </const>
12869 </enum>
12870
12871 <interface
12872 name="IStorageController" extends="$unknown"
12873 uuid="fd93adc0-bbaa-4256-9e6e-00e29f9151c9"
12874 wsmap="managed"
12875 >
12876 <desc>
12877 Represents a storage controller that is attached to a virtual machine
12878 (<link to="IMachine" />). Just as drives (hard disks, DVDs, FDs) are
12879 attached to storage controllers in a real computer, virtual drives
12880 (represented by <link to="IMediumAttachment" />) are attached to virtual
12881 storage controllers, represented by this interface.
12882
12883 As opposed to physical hardware, VirtualBox has a very generic concept
12884 of a storage controller, and for purposes of the Main API, all virtual
12885 storage is attached to virtual machines via instances of this interface.
12886 There are five types of such virtual storage controllers: IDE, SCSI, SATA,
12887 SAS and Floppy (see <link to="#bus" />). Depending on which of these four
12888 is used, certain sub-types may be available and can be selected in
12889 <link to="#controllerType" />.
12890
12891 Depending on these settings, the guest operating system might see
12892 significantly different virtual hardware.
12893 </desc>
12894
12895 <attribute name="name" type="wstring" readonly="yes">
12896 <desc>
12897 Name of the storage controller, as originally specified with
12898 <link to="IMachine::addStorageController" />. This then uniquely
12899 identifies this controller with other method calls such as
12900 <link to="IMachine::attachDevice" /> and <link to="IMachine::mountMedium" />.
12901 </desc>
12902 </attribute>
12903
12904 <attribute name="maxDevicesPerPortCount" type="unsigned long" readonly="yes">
12905 <desc>
12906 Maximum number of devices which can be attached to one port.
12907 </desc>
12908 </attribute>
12909
12910 <attribute name="minPortCount" type="unsigned long" readonly="yes">
12911 <desc>
12912 Minimum number of ports that <link to="IStorageController::portCount"/> can be set to.
12913 </desc>
12914 </attribute>
12915
12916 <attribute name="maxPortCount" type="unsigned long" readonly="yes">
12917 <desc>
12918 Maximum number of ports that <link to="IStorageController::portCount"/> can be set to.
12919 </desc>
12920 </attribute>
12921
12922 <attribute name="instance" type="unsigned long">
12923 <desc>
12924 The instance number of the device in the running VM.
12925 </desc>
12926 </attribute>
12927
12928 <attribute name="portCount" type="unsigned long">
12929 <desc>
12930 The number of currently usable ports on the controller.
12931 The minimum and maximum number of ports for one controller are
12932 stored in <link to="IStorageController::minPortCount"/>
12933 and <link to="IStorageController::maxPortCount"/>.
12934 </desc>
12935 </attribute>
12936
12937 <attribute name="bus" type="StorageBus" readonly="yes">
12938 <desc>
12939 The bus type of the storage controller (IDE, SATA, SCSI, SAS or Floppy).
12940 </desc>
12941 </attribute>
12942
12943 <attribute name="controllerType" type="StorageControllerType">
12944 <desc>
12945 The exact variant of storage controller hardware presented
12946 to the guest.
12947 Depending on this value, VirtualBox will provide a different
12948 virtual storage controller hardware to the guest.
12949 For SATA, SAS and floppy controllers, only one variant is
12950 available, but for IDE and SCSI, there are several.
12951
12952 For SCSI controllers, the default type is LsiLogic.
12953 </desc>
12954 </attribute>
12955
12956 <attribute name="useHostIOCache" type="boolean">
12957 <desc>
12958 If true, the storage controller emulation will use a dedicated I/O thread, enable the host I/O
12959 caches and use synchronous file APIs on the host. This was the only option in the API before
12960 VirtualBox 3.2 and is still the default for IDE controllers.
12961
12962 If false, the host I/O cache will be disabled for image files attached to this storage controller.
12963 Instead, the storage controller emulation will use asynchronous I/O APIs on the host. This makes
12964 it possible to turn off the host I/O caches because the emulation can handle unaligned access to
12965 the file. This should be used on OS X and Linux hosts if a high I/O load is expected or many
12966 virtual machines are running at the same time to prevent I/O cache related hangs.
12967 This option new with the API of VirtualBox 3.2 and is now the default for non-IDE storage controllers.
12968 </desc>
12969 </attribute>
12970
12971 <method name="getIDEEmulationPort">
12972 <desc>
12973 Gets the corresponding port number which is emulated as an IDE device.
12974 Works only with SATA controllers.
12975
12976 <result name="E_INVALIDARG">
12977 The @a devicePosition is not in the range 0 to 3.
12978 </result>
12979 <result name="E_NOTIMPL">
12980 The storage controller type is not SATAIntelAhci.
12981 </result>
12982
12983 </desc>
12984 <param name="devicePosition" type="long" dir="in"/>
12985 <param name="portNumber" type="long" dir="return"/>
12986 </method>
12987
12988 <method name="setIDEEmulationPort">
12989 <desc>
12990 Sets the port number which is emulated as an IDE device.
12991 Works only with SATA controllers.
12992
12993 <result name="E_INVALIDARG">
12994 The @a devicePosition is not in the range 0 to 3 or the
12995 @a portNumber is not in the range 0 to 29.
12996 </result>
12997 <result name="E_NOTIMPL">
12998 The storage controller type is not SATAIntelAhci.
12999 </result>
13000
13001 </desc>
13002 <param name="devicePosition" type="long" dir="in"/>
13003 <param name="portNumber" type="long" dir="in"/>
13004 </method>
13005
13006 </interface>
13007
13008<if target="wsdl">
13009
13010 <!--
13011 // IManagedObjectRef
13012 /////////////////////////////////////////////////////////////////////////
13013 -->
13014
13015 <interface
13016 name="IManagedObjectRef" extends="$unknown"
13017 uuid="9474d09d-2313-46de-b568-a42b8718e8ed"
13018 internal="yes"
13019 wsmap="managed"
13020 wscpp="hardcoded"
13021 >
13022 <desc>
13023 Managed object reference.
13024
13025 Only within the webservice, a managed object reference (which is really
13026 an opaque number) allows a webservice client to address an object
13027 that lives in the address space of the webservice server.
13028
13029 Behind each managed object reference, there is a COM object that lives
13030 in the webservice server's address space. The COM object is not freed
13031 until the managed object reference is released, either by an explicit
13032 call to <link to="IManagedObjectRef::release" /> or by logging off from
13033 the webservice (<link to="IWebsessionManager::logoff" />), which releases
13034 all objects created during the webservice session.
13035
13036 Whenever a method call of the VirtualBox API returns a COM object, the
13037 webservice representation of that method will instead return a
13038 managed object reference, which can then be used to invoke methods
13039 on that object.
13040 </desc>
13041
13042 <method name="getInterfaceName">
13043 <desc>
13044 Returns the name of the interface that this managed object represents,
13045 for example, "IMachine", as a string.
13046 </desc>
13047 <param name="return" type="wstring" dir="return"/>
13048 </method>
13049
13050 <method name="release">
13051 <desc>
13052 Releases this managed object reference and frees the resources that
13053 were allocated for it in the webservice server process. After calling
13054 this method, the identifier of the reference can no longer be used.
13055 </desc>
13056 </method>
13057
13058 </interface>
13059
13060 <!--
13061 // IWebsessionManager
13062 /////////////////////////////////////////////////////////////////////////
13063 -->
13064
13065 <interface
13066 name="IWebsessionManager" extends="$unknown"
13067 uuid="dea1b4c7-2de3-418a-850d-7868617f7733"
13068 internal="yes"
13069 wsmap="global"
13070 wscpp="hardcoded"
13071 >
13072 <desc>
13073 Websession manager. This provides essential services
13074 to webservice clients.
13075 </desc>
13076 <method name="logon">
13077 <desc>
13078 Logs a new client onto the webservice and returns a managed object reference to
13079 the IVirtualBox instance, which the client can then use as a basis to further
13080 queries, since all calls to the VirtualBox API are based on the IVirtualBox
13081 interface, in one way or the other.
13082 </desc>
13083 <param name="username" type="wstring" dir="in"/>
13084 <param name="password" type="wstring" dir="in"/>
13085 <param name="return" type="IVirtualBox" dir="return"/>
13086 </method>
13087
13088 <method name="getSessionObject">
13089 <desc>
13090 Returns a managed object reference to the internal ISession object that was created
13091 for this web service session when the client logged on.
13092
13093 <see>ISession</see>
13094 </desc>
13095 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13096 <param name="return" type="ISession" dir="return"/>
13097 </method>
13098
13099 <method name="logoff">
13100 <desc>
13101 Logs off the client who has previously logged on with <link to="IWebsessionManager::logoff" />
13102 and destroys all resources associated with the session (most importantly, all
13103 managed objects created in the server while the session was active).
13104 </desc>
13105 <param name="refIVirtualBox" type="IVirtualBox" dir="in"/>
13106 </method>
13107
13108 </interface>
13109
13110</if>
13111
13112 <!--
13113 // IPerformanceCollector & friends
13114 /////////////////////////////////////////////////////////////////////////
13115 -->
13116
13117 <interface
13118 name="IPerformanceMetric" extends="$unknown"
13119 uuid="2a1a60ae-9345-4019-ad53-d34ba41cbfe9" wsmap="managed"
13120 >
13121 <desc>
13122 The IPerformanceMetric interface represents parameters of the given
13123 performance metric.
13124 </desc>
13125
13126 <attribute name="metricName" type="wstring" readonly="yes">
13127 <desc>
13128 Name of the metric.
13129 </desc>
13130 </attribute>
13131
13132 <attribute name="object" type="$unknown" readonly="yes">
13133 <desc>
13134 Object this metric belongs to.
13135 </desc>
13136 </attribute>
13137
13138 <attribute name="description" type="wstring" readonly="yes">
13139 <desc>
13140 Textual description of the metric.
13141 </desc>
13142 </attribute>
13143
13144 <attribute name="period" type="unsigned long" readonly="yes">
13145 <desc>
13146 Time interval between samples, measured in seconds.
13147 </desc>
13148 </attribute>
13149
13150 <attribute name="count" type="unsigned long" readonly="yes">
13151 <desc>
13152 Number of recent samples retained by the performance collector for this
13153 metric.
13154
13155 When the collected sample count exceeds this number, older samples
13156 are discarded.
13157 </desc>
13158 </attribute>
13159
13160 <attribute name="unit" type="wstring" readonly="yes">
13161 <desc>
13162 Unit of measurement.
13163 </desc>
13164 </attribute>
13165
13166 <attribute name="minimumValue" type="long" readonly="yes">
13167 <desc>
13168 Minimum possible value of this metric.
13169 </desc>
13170 </attribute>
13171
13172 <attribute name="maximumValue" type="long" readonly="yes">
13173 <desc>
13174 Maximum possible value of this metric.
13175 </desc>
13176 </attribute>
13177 </interface>
13178
13179 <interface
13180 name="IPerformanceCollector" extends="$unknown"
13181 uuid="e22e1acb-ac4a-43bb-a31c-17321659b0c6"
13182 wsmap="managed"
13183 >
13184 <desc>
13185 The IPerformanceCollector interface represents a service that collects
13186 and stores performance metrics data.
13187
13188 Performance metrics are associated with objects of interfaces like IHost
13189 and IMachine. Each object has a distinct set of performance metrics. The
13190 set can be obtained with <link to="IPerformanceCollector::getMetrics"/>.
13191
13192 Metric data is collected at the specified intervals and is retained
13193 internally. The interval and the number of retained samples can be set
13194 with <link to="IPerformanceCollector::setupMetrics" />. Both metric data
13195 and collection settings are not persistent, they are discarded as soon as
13196 VBoxSVC process terminates. Moreover, metric settings and data associated
13197 with a particular VM only exist while VM is running. They disappear as
13198 soon as VM shuts down. It is not possible to set up metrics for machines
13199 that are powered off. One needs to start VM first, then set up metric
13200 collection parameters.
13201
13202 Metrics are organized hierarchically, with each level separated by a
13203 slash (/) character. Generally, the scheme for metric names is like this:
13204
13205 <tt>Category/Metric[/SubMetric][:aggregation]</tt>
13206
13207 "Category/Metric" together form the base metric name. A base metric is
13208 the smallest unit for which a sampling interval and the number of
13209 retained samples can be set. Only base metrics can be enabled and
13210 disabled. All sub-metrics are collected when their base metric is
13211 collected. Collected values for any set of sub-metrics can be queried
13212 with <link to="IPerformanceCollector::queryMetricsData" />.
13213
13214 For example "CPU/Load/User:avg" metric name stands for the "CPU"
13215 category, "Load" metric, "User" submetric, "average" aggregate. An
13216 aggregate function is computed over all retained data. Valid aggregate
13217 functions are:
13218
13219 <ul>
13220 <li>avg -- average</li>
13221 <li>min -- minimum</li>
13222 <li>max -- maximum</li>
13223 </ul>
13224
13225 When setting up metric parameters, querying metric data, enabling or
13226 disabling metrics wildcards can be used in metric names to specify a
13227 subset of metrics. For example, to select all CPU-related metrics
13228 use <tt>CPU/*</tt>, all averages can be queried using <tt>*:avg</tt> and
13229 so on. To query metric values without aggregates <tt>*:</tt> can be used.
13230
13231 The valid names for base metrics are:
13232
13233 <ul>
13234 <li>CPU/Load</li>
13235 <li>CPU/MHz</li>
13236 <li>RAM/Usage</li>
13237 </ul>
13238
13239 The general sequence for collecting and retrieving the metrics is:
13240 <ul>
13241 <li>
13242 Obtain an instance of IPerformanceCollector with
13243 <link to="IVirtualBox::performanceCollector" />
13244 </li>
13245 <li>
13246 Allocate and populate an array with references to objects the metrics
13247 will be collected for. Use references to IHost and IMachine objects.
13248 </li>
13249 <li>
13250 Allocate and populate an array with base metric names the data will
13251 be collected for.
13252 </li>
13253 <li>
13254 Call <link to="IPerformanceCollector::setupMetrics" />. From now on
13255 the metric data will be collected and stored.
13256 </li>
13257 <li>
13258 Wait for the data to get collected.
13259 </li>
13260 <li>
13261 Allocate and populate an array with references to objects the metric
13262 values will be queried for. You can re-use the object array used for
13263 setting base metrics.
13264 </li>
13265 <li>
13266 Allocate and populate an array with metric names the data will be
13267 collected for. Note that metric names differ from base metric names.
13268 </li>
13269 <li>
13270 Call <link to="IPerformanceCollector::queryMetricsData" />. The data
13271 that have been collected so far are returned. Note that the values
13272 are still retained internally and data collection continues.
13273 </li>
13274 </ul>
13275
13276 For an example of usage refer to the following files in VirtualBox SDK:
13277 <ul>
13278 <li>
13279 Java: <tt>bindings/webservice/java/jax-ws/samples/metrictest.java</tt>
13280 </li>
13281 <li>
13282 Python: <tt>bindings/xpcom/python/sample/shellcommon.py</tt>
13283 </li>
13284 </ul>
13285 </desc>
13286
13287 <attribute name="metricNames" type="wstring" readonly="yes" safearray="yes">
13288 <desc>
13289 Array of unique names of metrics.
13290
13291 This array represents all metrics supported by the performance
13292 collector. Individual objects do not necessarily support all of them.
13293 <link to="IPerformanceCollector::getMetrics"/> can be used to get the
13294 list of supported metrics for a particular object.
13295 </desc>
13296 </attribute>
13297
13298 <method name="getMetrics">
13299 <desc>
13300 Returns parameters of specified metrics for a set of objects.
13301 <note>
13302 @c Null metrics array means all metrics. @c Null object array means
13303 all existing objects.
13304 </note>
13305 </desc>
13306 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13307 <desc>
13308 Metric name filter. Currently, only a comma-separated list of metrics
13309 is supported.
13310 </desc>
13311 </param>
13312 <param name="objects" type="$unknown" dir="in" safearray="yes">
13313 <desc>
13314 Set of objects to return metric parameters for.
13315 </desc>
13316 </param>
13317 <param name="metrics" type="IPerformanceMetric" dir="return" safearray="yes">
13318 <desc>
13319 Array of returned metric parameters.
13320 </desc>
13321 </param>
13322 </method>
13323
13324 <method name="setupMetrics">
13325 <desc>
13326 Sets parameters of specified base metrics for a set of objects. Returns
13327 an array of <link to="IPerformanceMetric" /> describing the metrics
13328 have been affected.
13329 <note>
13330 @c Null or empty metric name array means all metrics. @c Null or
13331 empty object array means all existing objects. If metric name array
13332 contains a single element and object array contains many, the single
13333 metric name array element is applied to each object array element to
13334 form metric/object pairs.
13335 </note>
13336 </desc>
13337 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13338 <desc>
13339 Metric name filter. Comma-separated list of metrics with wildcard
13340 support.
13341 </desc>
13342 </param>
13343 <param name="objects" type="$unknown" dir="in" safearray="yes">
13344 <desc>
13345 Set of objects to setup metric parameters for.
13346 </desc>
13347 </param>
13348 <param name="period" type="unsigned long" dir="in">
13349 <desc>
13350 Time interval in seconds between two consecutive samples of
13351 performance data.
13352 </desc>
13353 </param>
13354 <param name="count" type="unsigned long" dir="in">
13355 <desc>
13356 Number of samples to retain in performance data history. Older
13357 samples get discarded.
13358 </desc>
13359 </param>
13360 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13361 <desc>
13362 Array of metrics that have been modified by the call to this method.
13363 </desc>
13364 </param>
13365 </method>
13366
13367 <method name="enableMetrics">
13368 <desc>
13369 Turns on collecting specified base metrics. Returns an array of
13370 <link to="IPerformanceMetric" /> describing the metrics have been
13371 affected.
13372 <note>
13373 @c Null or empty metric name array means all metrics. @c Null or
13374 empty object array means all existing objects. If metric name array
13375 contains a single element and object array contains many, the single
13376 metric name array element is applied to each object array element to
13377 form metric/object pairs.
13378 </note>
13379 </desc>
13380 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13381 <desc>
13382 Metric name filter. Comma-separated list of metrics with wildcard
13383 support.
13384 </desc>
13385 </param>
13386 <param name="objects" type="$unknown" dir="in" safearray="yes">
13387 <desc>
13388 Set of objects to enable metrics for.
13389 </desc>
13390 </param>
13391 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13392 <desc>
13393 Array of metrics that have been modified by the call to this method.
13394 </desc>
13395 </param>
13396 </method>
13397
13398 <method name="disableMetrics">
13399 <desc>
13400 Turns off collecting specified base metrics. Returns an array of
13401 <link to="IPerformanceMetric" /> describing the metrics have been
13402 affected.
13403 <note>
13404 @c Null or empty metric name array means all metrics. @c Null or
13405 empty object array means all existing objects. If metric name array
13406 contains a single element and object array contains many, the single
13407 metric name array element is applied to each object array element to
13408 form metric/object pairs.
13409 </note>
13410 </desc>
13411 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13412 <desc>
13413 Metric name filter. Comma-separated list of metrics with wildcard
13414 support.
13415 </desc>
13416 </param>
13417 <param name="objects" type="$unknown" dir="in" safearray="yes">
13418 <desc>
13419 Set of objects to disable metrics for.
13420 </desc>
13421 </param>
13422 <param name="affectedMetrics" type="IPerformanceMetric" dir="return" safearray="yes">
13423 <desc>
13424 Array of metrics that have been modified by the call to this method.
13425 </desc>
13426 </param>
13427 </method>
13428
13429 <method name="queryMetricsData">
13430 <desc>
13431 Queries collected metrics data for a set of objects.
13432
13433 The data itself and related metric information are returned in seven
13434 parallel and one flattened array of arrays. Elements of
13435 <tt>returnMetricNames, returnObjects, returnUnits, returnScales,
13436 returnSequenceNumbers, returnDataIndices and returnDataLengths</tt> with
13437 the same index describe one set of values corresponding to a single
13438 metric.
13439
13440 The <tt>returnData</tt> parameter is a flattened array of arrays. Each
13441 start and length of a sub-array is indicated by
13442 <tt>returnDataIndices</tt> and <tt>returnDataLengths</tt>. The first
13443 value for metric <tt>metricNames[i]</tt> is at
13444 <tt>returnData[returnIndices[i]]</tt>.
13445
13446 <note>
13447 @c Null or empty metric name array means all metrics. @c Null or
13448 empty object array means all existing objects. If metric name array
13449 contains a single element and object array contains many, the single
13450 metric name array element is applied to each object array element to
13451 form metric/object pairs.
13452 </note>
13453 <note>
13454 Data collection continues behind the scenes after call to @c
13455 queryMetricsData. The return data can be seen as the snapshot of the
13456 current state at the time of @c queryMetricsData call. The internally
13457 kept metric values are not cleared by the call. This makes possible
13458 querying different subsets of metrics or aggregates with subsequent
13459 calls. If periodic querying is needed it is highly suggested to query
13460 the values with @c interval*count period to avoid confusion. This way
13461 a completely new set of data values will be provided by each query.
13462 </note>
13463 </desc>
13464 <param name="metricNames" type="wstring" dir="in" safearray="yes">
13465 <desc>
13466 Metric name filter. Comma-separated list of metrics with wildcard
13467 support.
13468 </desc>
13469 </param>
13470 <param name="objects" type="$unknown" dir="in" safearray="yes">
13471 <desc>
13472 Set of objects to query metrics for.
13473 </desc>
13474 </param>
13475 <param name="returnMetricNames" type="wstring" dir="out" safearray="yes">
13476 <desc>
13477 Names of metrics returned in @c returnData.
13478 </desc>
13479 </param>
13480 <param name="returnObjects" type="$unknown" dir="out" safearray="yes">
13481 <desc>
13482 Objects associated with metrics returned in @c returnData.
13483 </desc>
13484 </param>
13485 <param name="returnUnits" type="wstring" dir="out" safearray="yes">
13486 <desc>
13487 Units of measurement for each returned metric.
13488 </desc>
13489 </param>
13490 <param name="returnScales" type="unsigned long" dir="out" safearray="yes">
13491 <desc>
13492 Divisor that should be applied to return values in order to get
13493 floating point values. For example:
13494 <tt>(double)returnData[returnDataIndices[0]+i] / returnScales[0]</tt>
13495 will retrieve the floating point value of i-th sample of the first
13496 metric.
13497 </desc>
13498 </param>
13499 <param name="returnSequenceNumbers" type="unsigned long" dir="out" safearray="yes">
13500 <desc>
13501 Sequence numbers of the first elements of value sequences of
13502 particular metrics returned in @c returnData. For aggregate metrics
13503 it is the sequence number of the sample the aggregate started
13504 calculation from.
13505 </desc>
13506 </param>
13507 <param name="returnDataIndices" type="unsigned long" dir="out" safearray="yes">
13508 <desc>
13509 Indices of the first elements of value sequences of particular
13510 metrics returned in @c returnData.
13511 </desc>
13512 </param>
13513 <param name="returnDataLengths" type="unsigned long" dir="out" safearray="yes">
13514 <desc>
13515 Lengths of value sequences of particular metrics.
13516 </desc>
13517 </param>
13518 <param name="returnData" type="long" dir="return" safearray="yes">
13519 <desc>
13520 Flattened array of all metric data containing sequences of values for
13521 each metric.
13522 </desc>
13523 </param>
13524 </method>
13525
13526 </interface>
13527 <enum
13528 name="NATAliasMode"
13529 uuid="67772168-50d9-11df-9669-7fb714ee4fa1">
13530 <desc></desc>
13531 <const name="AliasLog" value="0x1">
13532 <desc></desc>
13533 </const>
13534 <const name="AliasProxyOnly" value="0x02">
13535 <desc></desc>
13536 </const>
13537 <const name="AliasUseSamePorts" value="0x04">
13538 <desc></desc>
13539 </const>
13540 </enum>
13541 <enum
13542 name="NATProtocol"
13543 uuid="e90164be-eb03-11de-94af-fff9b1c1b19f"
13544 >
13545 <desc>Protocol definitions used with NAT port-forwarding rules.</desc>
13546 <const name="UDP" value="0">
13547 <desc>Port-forwarding uses UDP protocol.</desc>
13548 </const>
13549 <const name="TCP" value="1">
13550 <desc>Port-forwarding uses TCP protocol.</desc>
13551 </const>
13552 </enum>
13553
13554 <interface
13555 name="INATEngine" extends="$unknown"
13556 uuid="4b286616-eb03-11de-b0fb-1701eca42246"
13557 wsmap="managed"
13558 >
13559 <desc>Interface for managing a NAT engine which is used with a virtual machine. This
13560 allows for changing NAT behavior such as port-forwarding rules. This interface is
13561 used in the <link to="INetworkAdapter::natDriver" /> attribute.</desc>
13562 <attribute name="network" type="wstring">
13563 <desc>The network attribute of the NAT engine (the same value is used with built-in
13564 DHCP server to fill corresponding fields of DHCP leases).</desc>
13565 </attribute>
13566 <attribute name="hostIP" type="wstring">
13567 <desc>IP of host interface to bind all opened sockets to.
13568 <note>Changing this does not change binding of port forwarding.</note>
13569 </desc>
13570 </attribute>
13571 <attribute name="tftpPrefix" type="wstring">
13572 <desc>TFTP prefix attribute which is used with the built-in DHCP server to fill
13573 the corresponding fields of DHCP leases.</desc>
13574 </attribute>
13575 <attribute name="tftpBootFile" type="wstring">
13576 <desc>TFTP boot file attribute which is used with the built-in DHCP server to fill
13577 the corresponding fields of DHCP leases.</desc>
13578 </attribute>
13579 <attribute name="tftpNextServer" type="wstring">
13580 <desc>TFTP server attribute which is used with the built-in DHCP server to fill
13581 the corresponding fields of DHCP leases.
13582 <note>The preferred form is IPv4 addresses.</note>
13583 </desc>
13584 </attribute>
13585 <attribute name="aliasMode" type="unsigned long">
13586 <desc></desc>
13587 </attribute>
13588 <attribute name="dnsPassDomain" type="boolean">
13589 <desc>Whether the DHCP server should pass the DNS domain used by the host.</desc>
13590 </attribute>
13591 <attribute name="dnsProxy" type="boolean">
13592 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13593 of the DNS proxy and process traffic using DNS servers registered on the host.</desc>
13594 </attribute>
13595 <attribute name="dnsUseHostResolver" type="boolean">
13596 <desc>Whether the DHCP server (and the DNS traffic by NAT) should pass the address
13597 of the DNS proxy and process traffic using the host resolver mechanism.</desc>
13598 </attribute>
13599 <attribute name="redirects" type="wstring" readonly="yes" safearray="yes">
13600 <desc>Array of NAT port-forwarding rules in string representation, in the following
13601 format: "name,protocol id,host ip,host port,guest ip,guest port".</desc>
13602 </attribute>
13603 <method name="setNetworkSettings">
13604 <desc>Sets network configuration of the NAT engine.</desc>
13605 <param name="mtu" type="unsigned long" dir="in">
13606 <desc>MTU (maximum transmission unit) of the NAT engine in bytes.</desc>
13607 </param>
13608 <param name="sockSnd" type="unsigned long" dir="in">
13609 <desc>Capacity of the socket send buffer in bytes when creating a new socket.</desc>
13610 </param>
13611 <param name="sockRcv" type="unsigned long" dir="in">
13612 <desc>Capacity of the socket receive buffer in bytes when creating a new socket.</desc>
13613 </param>
13614 <param name="TcpWndSnd" type="unsigned long" dir="in">
13615 <desc>Initial size of the NAT engine's sending TCP window in bytes when
13616 establishing a new TCP connection.</desc>
13617 </param>
13618 <param name="TcpWndRcv" type="unsigned long" dir="in">
13619 <desc>Initial size of the NAT engine's receiving TCP window in bytes when
13620 establishing a new TCP connection.</desc>
13621 </param>
13622 </method>
13623 <method name="getNetworkSettings">
13624 <desc>Returns network configuration of NAT engine. See <link to="#setNetworkSettings" />
13625 for parameter descriptions.</desc>
13626 <param name="mtu" type="unsigned long" dir="out" />
13627 <param name="sockSnd" type="unsigned long" dir="out" />
13628 <param name="sockRcv" type="unsigned long" dir="out" />
13629 <param name="TcpWndSnd" type="unsigned long" dir="out" />
13630 <param name="TcpWndRcv" type="unsigned long" dir="out" />
13631 </method>
13632 <method name="addRedirect">
13633 <desc>Adds a new NAT port-forwarding rule.</desc>
13634 <param name="name" type="wstring" dir="in">
13635 <desc>The name of the rule. An empty name is acceptable, in which case the NAT engine
13636 auto-generates one using the other parameters.</desc>
13637 </param>
13638 <param name="proto" type="NATProtocol" dir="in">
13639 <desc>Protocol handled with the rule.</desc>
13640 </param>
13641 <param name="hostIp" type="wstring" dir="in">
13642 <desc>IP of the host interface to which the rule should apply. An empty ip address is
13643 acceptable, in which case the NAT engine binds the handling socket to any interface.</desc>
13644 </param>
13645 <param name="hostPort" type="unsigned short" dir="in">
13646 <desc>The port number to listen on.</desc>
13647 </param>
13648 <param name="guestIp" type="wstring" dir="in">
13649 <desc>The IP address of the guest which the NAT engine will forward matching packets
13650 to. An empty IP address is acceptable, in which case the NAT engine will forward
13651 packets to the first DHCP lease (x.x.x.15).</desc>
13652 </param>
13653 <param name="guestPort" type="unsigned short" dir="in">
13654 <desc>The port number to forward.</desc>
13655 </param>
13656 </method>
13657 <method name="removeRedirect">
13658 <desc>Removes a port-forwarding rule that was previously registered.</desc>
13659 <param name="name" type="wstring" dir="in">
13660 <desc>The name of the rule to delete.</desc>
13661 </param>
13662 </method>
13663 </interface>
13664
13665 <enum
13666 name="VBoxEventType"
13667 uuid="2c76667e-6981-4122-a71a-cdfd6a6eb575">
13668
13669 <desc>
13670 Type of an event.
13671 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13672 </desc>
13673
13674 <const name="Invalid" value="0">
13675 <desc>
13676 Invalid event, must be first.
13677 </desc>
13678 </const>
13679
13680 <const name="Any" value="1">
13681 <desc>
13682 Wildcard for all events.
13683 Events of this type are never delivered, and only used in
13684 registerListener() call to simplify registration.
13685 </desc>
13686 </const>
13687
13688 <const name="Vetoable" value="2">
13689 <desc>
13690 Wildcard for all vetoable events. Events of this type are never delivered, and only
13691 used in registerListener() call to simplify registration.
13692 </desc>
13693 </const>
13694
13695 <const name="MachineEvent" value="3">
13696 <desc>
13697 Wildcard for all machine events. Events of this type are never delivered, and only used in
13698 registerListener() call to simplify registration.
13699 </desc>
13700 </const>
13701
13702 <const name="SnapshotEvent" value="4">
13703 <desc>
13704 Wildcard for all snapshot events. Events of this type are never delivered, and only used in
13705 registerListener() call to simplify registration.
13706 </desc>
13707 </const>
13708
13709 <const name="InputEvent" value="5">
13710 <desc>
13711 Wildcard for all input device (keyboard, mouse) events.
13712 Events of this type are never delivered, and only used in
13713 registerListener() call to simplify registration.
13714 </desc>
13715 </const>
13716
13717 <const name="LastWildcard" value="31">
13718 <desc>
13719 Last wildcard.
13720 </desc>
13721 </const>
13722
13723 <const name="OnMachineStateChanged" value="32">
13724 <desc>
13725 See <link to="IMachineStateChangedEvent">IMachineStateChangedEvent</link>.
13726 </desc>
13727 </const>
13728 <const name="OnMachineDataChanged" value="33">
13729 <desc>
13730 See <link to="IMachineDataChangedEvent">IMachineDataChangedEvent</link>.
13731 </desc>
13732 </const>
13733 <const name="OnExtraDataChanged" value="34">
13734 <desc>
13735 See <link to="IExtraDataChangedEvent">IExtraDataChangedEvent</link>.
13736 </desc>
13737 </const>
13738 <const name="OnExtraDataCanChange" value="35">
13739 <desc>
13740 See <link to="IExtraDataCanChangeEvent">IExtraDataCanChangeEvent</link>.
13741 </desc>
13742 </const>
13743 <const name="OnMediumRegistered" value="36">
13744 <desc>
13745 See <link to="IMediumRegisteredEvent">IMediumRegisteredEvent</link>.
13746 </desc>
13747 </const>
13748 <const name="OnMachineRegistered" value="37">
13749 <desc>
13750 See <link to="IMachineRegisteredEvent">IMachineRegisteredEvent</link>.
13751 </desc>
13752 </const>
13753 <const name="OnSessionStateChanged" value="38">
13754 <desc>
13755 See <link to="ISessionStateChangedEvent">ISessionStateChangedEvent</link>.
13756 </desc>
13757 </const>
13758 <const name="OnSnapshotTaken" value="39">
13759 <desc>
13760 See <link to="ISnapshotTakenEvent">ISnapshotTakenEvent</link>.
13761 </desc>
13762 </const>
13763 <const name="OnSnapshotDeleted" value="40">
13764 <desc>
13765 See <link to="ISnapshotDeletedEvent">ISnapshotDeletedEvent</link>.
13766 </desc>
13767 </const>
13768 <const name="OnSnapshotChanged" value="41">
13769 <desc>
13770 See <link to="ISnapshotChangedEvent">ISnapshotChangedEvent</link>.
13771 </desc>
13772 </const>
13773 <const name="OnGuestPropertyChanged" value="42">
13774 <desc>
13775 See <link to="IGuestPropertyChangedEvent">IGuestPropertyChangedEvent</link>.
13776 </desc>
13777 </const>
13778 <!-- Console events -->
13779 <const name="OnMousePointerShapeChanged" value="43">
13780 <desc>
13781 See <link to="IMousePointerShapeChangedEvent">IMousePointerShapeChangedEvent</link>.
13782 </desc>
13783 </const>
13784 <const name="OnMouseCapabilityChanged" value="44">
13785 <desc>
13786 See <link to="IMouseCapabilityChangedEvent">IMouseCapabilityChangedEvent</link>.
13787 </desc>
13788 </const>
13789 <const name="OnKeyboardLedsChanged" value="45">
13790 <desc>
13791 See <link to="IKeyboardLedsChangedEvent">IKeyboardLedsChangedEvent</link>.
13792 </desc>
13793 </const>
13794 <const name="OnStateChanged" value="46">
13795 <desc>
13796 See <link to="IStateChangedEvent">IStateChangedEvent</link>.
13797 </desc>
13798 </const>
13799 <const name="OnAdditionsStateChanged" value="47">
13800 <desc>
13801 See <link to="IAdditionsStateChangedEvent">IAdditionsStateChangedEvent</link>.
13802 </desc>
13803 </const>
13804 <const name="OnNetworkAdapterChanged" value="48">
13805 <desc>
13806 See <link to="INetworkAdapterChangedEvent">INetworkAdapterChangedEvent</link>.
13807 </desc>
13808 </const>
13809 <const name="OnSerialPortChanged" value="49">
13810 <desc>
13811 See <link to="ISerialPortChangedEvent">ISerialPortChangedEvent</link>.
13812 </desc>
13813 </const>
13814 <const name="OnParallelPortChanged" value="50">
13815 <desc>
13816 See <link to="IParallelPortChangedEvent">IParallelPortChangedEvent</link>.
13817 </desc>
13818 </const>
13819 <const name="OnStorageControllerChanged" value="51">
13820 <desc>
13821 See <link to="IStorageControllerChangedEvent">IStorageControllerChangedEvent</link>.
13822 </desc>
13823 </const>
13824 <const name="OnMediumChanged" value="52">
13825 <desc>
13826 See <link to="IMediumChangedEvent">IMediumChangedEvent</link>.
13827 </desc>
13828 </const>
13829 <const name="OnVRDPServerChanged" value="53">
13830 <desc>
13831 See <link to="IVRDPServerChangedEvent">IVRDPServerChangedEvent</link>.
13832 </desc>
13833 </const>
13834 <const name="OnUSBControllerChanged" value="54">
13835 <desc>
13836 See <link to="IUSBControllerChangedEvent">IUSBControllerChangedEvent</link>.
13837 </desc>
13838 </const>
13839 <const name="OnUSBDeviceStateChanged" value="55">
13840 <desc>
13841 See <link to="IUSBDeviceStateChangedEvent">IUSBDeviceStateChangedEvent</link>.
13842 </desc>
13843 </const>
13844 <const name="OnSharedFolderChanged" value="56">
13845 <desc>
13846 See <link to="ISharedFolderChangedEvent">ISharedFolderChangedEvent</link>.
13847 </desc>
13848 </const>
13849 <const name="OnRuntimeError" value="57">
13850 <desc>
13851 See <link to="IRuntimeErrorEvent">IRuntimeErrorEvent</link>.
13852 </desc>
13853 </const>
13854 <const name="OnCanShowWindow" value="58">
13855 <desc>
13856 See <link to="ICanShowWindowEvent">ICanShowWindowEvent</link>.
13857 </desc>
13858 </const>
13859 <const name="OnShowWindow" value="59">
13860 <desc>
13861 See <link to="IShowWindowEvent">IShowWindowEvent</link>.
13862 </desc>
13863 </const>
13864 <const name="OnCPUChanged" value="60">
13865 <desc>
13866 See <link to="ICPUChangedEvent">ICPUChangedEvent</link>.
13867 </desc>
13868 </const>
13869 <const name="OnRemoteDisplayInfoChanged" value="61">
13870 <desc>
13871 See <link to="IRemoteDisplayInfoChangedEvent">IRemoteDisplayInfoChangedEvent</link>.
13872 </desc>
13873 </const>
13874 <const name="OnEventSourceChanged" value="62">
13875 <desc>
13876 See <link to="IEventSourceChangedEvent">IEventSourceChangedEvent</link>.
13877 </desc>
13878 </const>
13879 <const name="OnCPUPriorityChanged" value="63">
13880 <desc>
13881 See <link to="ICPUPriorityChangedEvent">ICPUPriorityChangedEvent</link>.
13882 </desc>
13883 </const>
13884 <!-- Last event marker -->
13885 <const name="Last" value="64">
13886 <desc>
13887 Must be last event, used for iterations and structures relying on numerical event values.
13888 </desc>
13889 </const>
13890
13891 </enum>
13892
13893 <interface
13894 name="IEventSource" extends="$unknown"
13895 uuid="3c670618-f727-4fe9-94d2-8243f489a033"
13896 wsmap="managed"
13897 >
13898 <desc>
13899 Event source. Generally, any object which could generate events can be an event source,
13900 or aggregate one. To simplify using one-way protocols such as webservices running on top of HTTP(S),
13901 an event source can work with listeners in either active or passive mode. In active mode it is up to
13902 the IEventSource implementation to call <link to="IEventListener::handleEvent" />, in passive mode the
13903 event source keeps track of pending events for each listener and returns available events on demand.
13904
13905 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
13906 </desc>
13907
13908 <method name="createListener">
13909 <desc>
13910 Creates a new listener object, useful for passive mode.
13911 </desc>
13912 <param name="listener" type="IEventListener" dir="return"/>
13913 </method>
13914
13915 <method name="registerListener">
13916 <desc>
13917 Register an event listener.
13918
13919 <note>
13920 To avoid system overload, the VirtualBox server process checks if passive event
13921 listeners call <link to="IEventSource::getEvent"/> frequently enough. In the
13922 current implementation, if more than 100 pending events are detected for a passive
13923 event listener, it is forcefully unregistered by the system, and further
13924 <link to="#getEvent" /> calls will return @c VBOX_E_OBJECT_NOT_FOUND.
13925 </note>
13926 </desc>
13927 <param name="listener" type="IEventListener" dir="in">
13928 <desc>Listener to register.</desc>
13929 </param>
13930 <param name="interesting" type="VBoxEventType" dir="in" safearray="yes">
13931 <desc>
13932 Event types listener is interested in. One can use wildcards like -
13933 <link to="VBoxEventType::Any"/> to specify wildcards, matching more
13934 than one event.
13935 </desc>
13936 </param>
13937 <param name="active" type="boolean" dir="in">
13938 <desc>
13939 Which mode this listener is operating in.
13940 In active mode, <link to="IEventListener::handleEvent" /> is called directly.
13941 In passive mode, an internal event queue is created for this this IEventListener.
13942 For each event coming in, it is added to queues for all interested registered passive
13943 listeners. It is then up to the external code to call the listener's
13944 <link to="IEventListener::handleEvent" /> method. When done with an event, the
13945 external code must call <link to="#eventProcessed" />.
13946 </desc>
13947 </param>
13948 </method>
13949
13950 <method name="unregisterListener">
13951 <desc>
13952 Unregister an event listener. If listener is passive, and some waitable events are still
13953 in queue they are marked as processed automatically.
13954 </desc>
13955 <param name="listener" type="IEventListener" dir="in">
13956 <desc>Listener to unregister.</desc>
13957 </param>
13958 </method>
13959
13960 <method name="fireEvent">
13961 <desc>
13962 Fire an event for this source.
13963 </desc>
13964 <param name="event" type="IEvent" dir="in">
13965 <desc>Event to deliver.</desc>
13966 </param>
13967 <param name="timeout" type="long" dir="in">
13968 <desc>
13969 Maximum time to wait for event processing (if event is waitable), in ms;
13970 0 = no wait, -1 = indefinite wait.
13971 </desc>
13972 </param>
13973 <param name="result" type="boolean" dir="return">
13974 <desc>true if an event was delivered to all targets, or is non-waitable.</desc>
13975 </param>
13976 </method>
13977
13978 <method name="getEvent">
13979 <desc>
13980 Get events from this peer's event queue (for passive mode). Calling this method
13981 regularly is required for passive event listeners to avoid system overload;
13982 see <link to="IEventSource::registerListener" /> for details.
13983
13984 <result name="VBOX_E_OBJECT_NOT_FOUND">
13985 Listener is not registered, or autounregistered.
13986 </result>
13987 </desc>
13988 <param name="listener" type="IEventListener" dir="in">
13989 <desc>Which listener to get data for.</desc>
13990 </param>
13991 <param name="timeout" type="long" dir="in">
13992 <desc>
13993 Maximum time to wait for events, in ms;
13994 0 = no wait, -1 = indefinite wait.
13995 </desc>
13996 </param>
13997 <param name="event" type="IEvent" dir="return">
13998 <desc>Event retrieved, or null if none available.</desc>
13999 </param>
14000 </method>
14001
14002 <method name="eventProcessed">
14003 <desc>
14004 Must be called for waitable events after a particular listener finished its
14005 event processing. When all listeners of a particular event have called this
14006 method, the system will then call <link to="IEvent::setProcessed" />.
14007 </desc>
14008 <param name="listener" type="IEventListener" dir="in">
14009 <desc>Which listener processed event.</desc>
14010 </param>
14011 <param name="event" type="IEvent" dir="in">
14012 <desc>Which event.</desc>
14013 </param>
14014 </method>
14015
14016 </interface>
14017
14018 <interface
14019 name="IEventListener" extends="$unknown"
14020 uuid="67099191-32e7-4f6c-85ee-422304c71b90"
14021 wsmap="managed"
14022 >
14023 <desc>
14024 Event listener. An event listener can work in either active or passive mode, depending on the way
14025 it was registered.
14026 See <link to="IEvent" /> for an introduction to VirtualBox event handling.
14027 </desc>
14028
14029 <method name="handleEvent">
14030 <desc>
14031 Handle event callback (called directly by IEventSource in active mode, or could be
14032 called by event processor thread in passive mode).
14033 </desc>
14034 <param name="event" type="IEvent" dir="in">
14035 <desc>Event available.</desc>
14036 </param>
14037 </method>
14038
14039 </interface>
14040
14041 <interface
14042 name="IEvent" extends="$unknown"
14043 uuid="0ca2adba-8f30-401b-a8cd-fe31dbe839c0"
14044 wsmap="managed"
14045 >
14046 <desc>
14047 Abstract parent interface for VirtualBox events. Actual events will typically implement
14048 a more specific interface which derives from this (see below).
14049
14050 <b>Introduction to VirtualBox events</b>
14051
14052 Generally speaking, an event (represented by this interface) signals that something
14053 happened, while an event listener (see <link to="IEventListener" />) represents an
14054 entity that is interested in certain events. In order for this to work with
14055 unidirectional protocols (i.e. web services), the concepts of passive and active
14056 listener are used.
14057
14058 Event consumers can register themselves as listeners, providing an array of
14059 events they are interested in (see <link to="IEventSource::registerListener" />).
14060 When an event triggers, the listener is notified about the event. The exact
14061 mechanism of the notification depends on whether the listener was registered as
14062 an active or passive listener:
14063
14064 <ul>
14065 <li>An active listener is very similar to a callback: it is a function invoked
14066 by the API. As opposed to the callbacks that were used in the API before
14067 VirtualBox 3.3 however, events are now objects with an interface hierarchy.
14068 </li>
14069
14070 <li>Passive listeners are somewhat tricker to implement, but do not require
14071 a client function to be callable, which is not an option with scripting
14072 languages or web service clients. Internally the <link to="IEventSource" />
14073 implementation maintains an event queue for each passive listener, and
14074 newly arrived events are put in this queue. When the listener calls
14075 <link to="IEventSource::getEvent"/>, first element from its internal event
14076 queue is returned. When the client completes processing of an event,
14077 the <link to="IEventSource::eventProcessed" /> function must be called,
14078 acknowledging that the event was processed. It supports implementing
14079 waitable events. On passive listener unregistration, all events from its
14080 queue are auto-acknowledged.
14081 </li>
14082 </ul>
14083
14084 Waitable events are useful in situations where the event generator wants to track
14085 delivery or a party wants to wait until all listeners have completed the event. A
14086 typical example would be a vetoable event (see <link to="IVetoEvent" />) where a
14087 listeners might veto a certain action, and thus the event producer has to make
14088 sure that all listeners have processed the event and not vetoed before taking
14089 the action.
14090
14091 A given event may have both passive and active listeners at the same time.
14092
14093 <b>Using events</b>
14094
14095 Any VirtualBox object capable of producing externally visible events provides an
14096 @c eventSource read-only attribute, which is of the type <link to="IEventSource" />.
14097 This event source object is notified by VirtualBox once something has happened, so
14098 consumers may register event listeners with this event source. To register a listener,
14099 an object implementing the <link to="IEventListener" /> interface must be provided.
14100 For active listeners, such an object is typically created by the consumer, while for
14101 passive listeners <link to="IEventSource::createListener" /> should be used. Please
14102 note that a listener created with @c createListener() must not be used as an active listener.
14103
14104 Once created, the listener must be registered to listen for the desired events
14105 (see <link to="IEventSource::registerListener" />), providing an array of
14106 <link to="VBoxEventType" /> enums. Those elements can either be the individual
14107 event IDs or wildcards matching multiple event IDs.
14108
14109 After registration, the callback's <link to="IEventListener::handleEvent" /> method is
14110 called automatically when the event is triggered, while passive listeners have to call
14111 <link to="IEventSource::getEvent" /> and <link to="IEventSource::eventProcessed" /> in
14112 an event processing loop.
14113
14114 The IEvent interface is an abstract parent interface for all such VirtualBox events
14115 coming in. As a result, the standard use pattern inside <link to="IEventListener::handleEvent" />
14116 or the event processing loop is to check the <link to="#type" /> attribute of the event and
14117 then cast to the appropriate specific interface using @c QueryInterface().
14118 </desc>
14119
14120 <attribute name="type" readonly="yes" type="VBoxEventType">
14121 <desc>
14122 Event type.
14123 </desc>
14124 </attribute>
14125
14126 <attribute name="source" readonly="yes" type="IEventSource">
14127 <desc>
14128 Source of this event.
14129 </desc>
14130 </attribute>
14131
14132 <attribute name="waitable" readonly="yes" type="boolean">
14133 <desc>
14134 If we can wait for this event being processed. If false, waitProcessed() returns immediately,
14135 and setProcessed() doesn't make sense. Non-waitable events are generally better performing,
14136 as no additional overhead associated with waitability imposed.
14137 Waitable events are needed when one need to be able to wait for particular event processed,
14138 for example for vetoable changes, or if event refers to some resource which need to be kept immutable
14139 until all consumers confirmed events.
14140 </desc>
14141 </attribute>
14142
14143 <method name="setProcessed">
14144 <desc>
14145 Internal method called by the system when all listeners of a particular event have called
14146 <link to="IEventSource::eventProcessed" />. This should not be called by client code.
14147 </desc>
14148 </method>
14149
14150 <method name="waitProcessed">
14151 <desc>
14152 Wait until time outs, or this event is processed. Event must be waitable for this operation to have
14153 described semantics, for non-waitable returns true immediately.
14154 </desc>
14155 <param name="timeout" type="long" dir="in">
14156 <desc>
14157 Maximum time to wait for event processeing, in ms;
14158 0 = no wait, -1 = indefinite wait.
14159 </desc>
14160 </param>
14161 <param name="result" type="boolean" dir="return">
14162 <desc>If this event was processed before timeout.</desc>
14163 </param>
14164 </method>
14165 </interface>
14166
14167
14168 <interface
14169 name="IReusableEvent" extends="IEvent"
14170 uuid="69bfb134-80f6-4266-8e20-16371f68fa25"
14171 wsmap="managed"
14172 >
14173 <desc>Base abstract interface for all reusable events.</desc>
14174
14175 <attribute name="generation" readonly="yes" type="unsigned long">
14176 <desc>Current generation of event, incremented on reuse.</desc>
14177 </attribute>
14178
14179 <method name="reuse">
14180 <desc>
14181 Marks an event as reused, increments 'generation', fields shall no
14182 longer be considered valid.
14183 </desc>
14184 </method>
14185 </interface>
14186
14187 <interface
14188 name="IMachineEvent" extends="IEvent"
14189 uuid="92ed7b1a-0d96-40ed-ae46-a564d484325e"
14190 wsmap="managed" id="MachineEvent"
14191 >
14192 <desc>Base abstract interface for all machine events.</desc>
14193
14194 <attribute name="machineId" readonly="yes" type="uuid" mod="string">
14195 <desc>ID of the machine this event relates to.</desc>
14196 </attribute>
14197
14198 </interface>
14199
14200 <interface
14201 name="IMachineStateChangedEvent" extends="IMachineEvent"
14202 uuid="5748F794-48DF-438D-85EB-98FFD70D18C9"
14203 wsmap="managed" autogen="VBoxEvent" id="OnMachineStateChanged"
14204 >
14205 <desc>Machine state change event.</desc>
14206
14207 <attribute name="state" readonly="yes" type="MachineState">
14208 <desc>New execution state.</desc>
14209 </attribute>
14210 </interface>
14211
14212 <interface
14213 name="IMachineDataChangedEvent" extends="IMachineEvent"
14214 uuid="6AA70A6C-0DCA-4810-8C5C-457B278E3D49"
14215 wsmap="managed" autogen="VBoxEvent" id="OnMachineDataChanged"
14216 >
14217 <desc>
14218 Any of the settings of the given machine has changed.
14219 </desc>
14220 </interface>
14221
14222 <interface
14223 name="IMediumRegisteredEvent" extends="IEvent"
14224 uuid="53fac49a-b7f1-4a5a-a4ef-a11dd9c2a458"
14225 wsmap="managed" autogen="VBoxEvent" id="OnMediumRegistered"
14226 >
14227 <desc>
14228 The given medium was registered or unregistered
14229 within this VirtualBox installation.
14230 </desc>
14231
14232 <attribute name="mediumId" readonly="yes" type="uuid" mod="string">
14233 <desc>ID of the medium this event relates to.</desc>
14234 </attribute>
14235
14236 <attribute name="mediumType" readonly="yes" type="DeviceType">
14237 <desc>Type of the medium this event relates to.</desc>
14238 </attribute>
14239
14240 <attribute name="registered" type="boolean" readonly="yes">
14241 <desc>
14242 If @c true, the medium was registered, otherwise it was
14243 unregistered.
14244 </desc>
14245 </attribute>
14246 </interface>
14247
14248 <interface
14249 name="IMachineRegisteredEvent" extends="IMachineEvent"
14250 uuid="c354a762-3ff2-4f2e-8f09-07382ee25088"
14251 wsmap="managed" autogen="VBoxEvent" id="OnMachineRegistered"
14252 >
14253 <desc>
14254 The given machine was registered or unregistered
14255 within this VirtualBox installation.
14256 </desc>
14257
14258 <attribute name="registered" type="boolean" readonly="yes">
14259 <desc>
14260 If @c true, the machine was registered, otherwise it was
14261 unregistered.
14262 </desc>
14263 </attribute>
14264 </interface>
14265
14266 <interface
14267 name="ISessionStateChangedEvent" extends="IMachineEvent"
14268 uuid="714a3eef-799a-4489-86cd-fe8e45b2ff8e"
14269 wsmap="managed" autogen="VBoxEvent" id="OnSessionStateChanged"
14270 >
14271 <desc>
14272 The state of the session for the given machine was changed.
14273 <see>IMachine::sessionState</see>
14274 </desc>
14275
14276 <attribute name="state" type="SessionState" readonly="yes">
14277 <desc>
14278 New session state.
14279 </desc>
14280 </attribute>
14281 </interface>
14282
14283 <interface
14284 name="IGuestPropertyChangedEvent" extends="IMachineEvent"
14285 uuid="3f63597a-26f1-4edb-8dd2-6bddd0912368"
14286 wsmap="managed" autogen="VBoxEvent" id="OnGuestPropertyChanged"
14287 >
14288 <desc>
14289 Notification when a guest property has changed.
14290 </desc>
14291
14292 <attribute name="name" readonly="yes" type="wstring">
14293 <desc>
14294 The name of the property that has changed.
14295 </desc>
14296 </attribute>
14297
14298 <attribute name="value" readonly="yes" type="wstring">
14299 <desc>
14300 The new property value.
14301 </desc>
14302 </attribute>
14303
14304 <attribute name="flags" readonly="yes" type="wstring">
14305 <desc>
14306 The new property flags.
14307 </desc>
14308 </attribute>
14309
14310 </interface>
14311
14312 <interface
14313 name="ISnapshotEvent" extends="IMachineEvent"
14314 uuid="21637b0e-34b8-42d3-acfb-7e96daf77c22"
14315 wsmap="managed" id="SnapshotEvent"
14316 >
14317 <desc>Base interface for all snapshot events.</desc>
14318
14319 <attribute name="snapshotId" readonly="yes" type="uuid" mod="string">
14320 <desc>ID of the snapshot this event relates to.</desc>
14321 </attribute>
14322
14323 </interface>
14324
14325 <interface
14326 name="ISnapshotTakenEvent" extends="ISnapshotEvent"
14327 uuid="d27c0b3d-6038-422c-b45e-6d4a0503d9f1"
14328 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotTaken"
14329 >
14330 <desc>
14331 A new snapshot of the machine has been taken.
14332 <see>ISnapshot</see>
14333 </desc>
14334 </interface>
14335
14336 <interface
14337 name="ISnapshotDeletedEvent" extends="ISnapshotEvent"
14338 uuid="c48f3401-4a9e-43f4-b7a7-54bd285e22f4"
14339 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotDeleted"
14340 >
14341 <desc>
14342 Snapshot of the given machine has been deleted.
14343
14344 <note>
14345 This notification is delivered <b>after</b> the snapshot
14346 object has been uninitialized on the server (so that any
14347 attempt to call its methods will return an error).
14348 </note>
14349
14350 <see>ISnapshot</see>
14351 </desc>
14352 </interface>
14353
14354 <interface
14355 name="ISnapshotChangedEvent" extends="ISnapshotEvent"
14356 uuid="07541941-8079-447a-a33e-47a69c7980db"
14357 wsmap="managed" autogen="VBoxEvent" id="OnSnapshotChanged"
14358 >
14359 <desc>
14360 Snapshot properties (name and/or description) have been changed.
14361 <see>ISnapshot</see>
14362 </desc>
14363 </interface>
14364
14365 <interface
14366 name="IMousePointerShapeChangedEvent" extends="IEvent"
14367 uuid="a6dcf6e8-416b-4181-8c4a-45ec95177aef"
14368 wsmap="managed" autogen="VBoxEvent" id="OnMousePointerShapeChanged"
14369 >
14370 <desc>
14371 Notification when the guest mouse pointer shape has
14372 changed. The new shape data is given.
14373 </desc>
14374
14375 <attribute name="visible" type="boolean" readonly="yes">
14376 <desc>
14377 Flag whether the pointer is visible.
14378 </desc>
14379 </attribute>
14380 <attribute name="alpha" type="boolean" readonly="yes">
14381 <desc>
14382 Flag whether the pointer has an alpha channel.
14383 </desc>
14384 </attribute>
14385 <attribute name="xhot" type="unsigned long" readonly="yes">
14386 <desc>
14387 The pointer hot spot X coordinate.
14388 </desc>
14389 </attribute>
14390 <attribute name="yhot" type="unsigned long" readonly="yes">
14391 <desc>
14392 The pointer hot spot Y coordinate.
14393 </desc>
14394 </attribute>
14395 <attribute name="width" type="unsigned long" readonly="yes">
14396 <desc>
14397 Width of the pointer shape in pixels.
14398 </desc>
14399 </attribute>
14400 <attribute name="height" type="unsigned long" readonly="yes">
14401 <desc>
14402 Height of the pointer shape in pixels.
14403 </desc>
14404 </attribute>
14405 <attribute name="shape" type="octet" safearray="yes" readonly="yes">
14406 <desc>
14407 Shape buffer arrays.
14408
14409 The @a shape buffer contains a 1-bpp (bits per pixel) AND mask
14410 followed by a 32-bpp XOR (color) mask.
14411
14412 For pointers without alpha channel the XOR mask pixels are 32
14413 bit values: (lsb)BGR0(msb). For pointers with alpha channel
14414 the XOR mask consists of (lsb)BGRA(msb) 32 bit values.
14415
14416 An AND mask is used for pointers with alpha channel, so if the
14417 callback does not support alpha, the pointer could be
14418 displayed as a normal color pointer.
14419
14420 The AND mask is a 1-bpp bitmap with byte aligned scanlines. The
14421 size of the AND mask therefore is <tt>cbAnd = (width + 7) / 8 *
14422 height</tt>. The padding bits at the end of each scanline are
14423 undefined.
14424
14425 The XOR mask follows the AND mask on the next 4-byte aligned
14426 offset: <tt>uint8_t *pXor = pAnd + (cbAnd + 3) &amp; ~3</tt>.
14427 Bytes in the gap between the AND and the XOR mask are undefined.
14428 The XOR mask scanlines have no gap between them and the size of
14429 the XOR mask is: <tt>cXor = width * 4 * height</tt>.
14430
14431 <note>
14432 If @a shape is 0, only the pointer visibility is changed.
14433 </note>
14434 </desc>
14435 </attribute>
14436 </interface>
14437
14438 <interface
14439 name="IMouseCapabilityChangedEvent" extends="IEvent"
14440 uuid="d633ad48-820c-4207-b46c-6bd3596640d5"
14441 wsmap="managed" autogen="VBoxEvent" id="OnMouseCapabilityChanged"
14442 >
14443 <desc>
14444 Notification when the mouse capabilities reported by the
14445 guest have changed. The new capabilities are passed.
14446 </desc>
14447 <attribute name="supportsAbsolute" type="boolean" readonly="yes">
14448 <desc>
14449 Supports absolute coordinates.
14450 </desc>
14451 </attribute>
14452 <attribute name="supportsRelative" type="boolean" readonly="yes">
14453 <desc>
14454 Supports relative coordinates.
14455 </desc>
14456 </attribute>
14457 <attribute name="needsHostCursor" type="boolean" readonly="yes">
14458 <desc>
14459 If host cursor is needed.
14460 </desc>
14461 </attribute>
14462 </interface>
14463
14464 <interface
14465 name="IKeyboardLedsChangedEvent" extends="IEvent"
14466 uuid="6DDEF35E-4737-457B-99FC-BC52C851A44F"
14467 wsmap="managed" autogen="VBoxEvent" id="OnKeyboardLedsChanged"
14468 >
14469 <desc>
14470 Notification when the guest OS executes the KBD_CMD_SET_LEDS command
14471 to alter the state of the keyboard LEDs.
14472 </desc>
14473 <attribute name="numLock" type="boolean" readonly="yes">
14474 <desc>
14475 NumLock status.
14476 </desc>
14477 </attribute>
14478 <attribute name="capsLock" type="boolean" readonly="yes">
14479 <desc>
14480 CapsLock status.
14481 </desc>
14482 </attribute>
14483 <attribute name="scrollLock" type="boolean" readonly="yes">
14484 <desc>
14485 ScrollLock status.
14486 </desc>
14487 </attribute>
14488 </interface>
14489
14490 <interface
14491 name="IStateChangedEvent" extends="IEvent"
14492 uuid="4376693C-CF37-453B-9289-3B0F521CAF27"
14493 wsmap="managed" autogen="VBoxEvent" id="OnStateChanged"
14494 >
14495 <desc>
14496 Notification when the execution state of the machine has changed.
14497 The new state is given.
14498 </desc>
14499 <attribute name="state" type="MachineState" readonly="yes">
14500 <desc>
14501 New machine state.
14502 </desc>
14503 </attribute>
14504 </interface>
14505
14506 <interface
14507 name="IAdditionsStateChangedEvent" extends="IEvent"
14508 uuid="D70F7915-DA7C-44C8-A7AC-9F173490446A"
14509 wsmap="managed" autogen="VBoxEvent" id="OnAdditionsStateChanged"
14510 >
14511 <desc>
14512 Notification when a Guest Additions property changes.
14513 Interested callees should query IGuest attributes to
14514 find out what has changed.
14515 </desc>
14516 </interface>
14517
14518 <interface
14519 name="INetworkAdapterChangedEvent" extends="IEvent"
14520 uuid="08889892-1EC6-4883-801D-77F56CFD0103"
14521 wsmap="managed" autogen="VBoxEvent" id="OnNetworkAdapterChanged"
14522 >
14523 <desc>
14524 Notification when a property of one of the
14525 virtual <link to="IMachine::getNetworkAdapter">network adapters</link>
14526 changes. Interested callees should use INetworkAdapter methods and
14527 attributes to find out what has changed.
14528 </desc>
14529 <attribute name="networkAdapter" type="INetworkAdapter" readonly="yes">
14530 <desc>
14531 Network adapter that is subject to change.
14532 </desc>
14533 </attribute>
14534 </interface>
14535
14536 <interface
14537 name="ISerialPortChangedEvent" extends="IEvent"
14538 uuid="3BA329DC-659C-488B-835C-4ECA7AE71C6C"
14539 wsmap="managed" autogen="VBoxEvent" id="OnSerialPortChanged"
14540 >
14541 <desc>
14542 Notification when a property of one of the
14543 virtual <link to="IMachine::getSerialPort">serial ports</link> changes.
14544 Interested callees should use ISerialPort methods and attributes
14545 to find out what has changed.
14546 </desc>
14547 <attribute name="serialPort" type="ISerialPort" readonly="yes">
14548 <desc>
14549 Serial port that is subject to change.
14550 </desc>
14551 </attribute>
14552 </interface>
14553
14554 <interface
14555 name="IParallelPortChangedEvent" extends="IEvent"
14556 uuid="813C99FC-9849-4F47-813E-24A75DC85615"
14557 wsmap="managed" autogen="VBoxEvent" id="OnParallelPortChanged"
14558 >
14559 <desc>
14560 Notification when a property of one of the
14561 virtual <link to="IMachine::getParallelPort">parallel ports</link>
14562 changes. Interested callees should use ISerialPort methods and
14563 attributes to find out what has changed.
14564 </desc>
14565 <attribute name="parallelPort" type="IParallelPort" readonly="yes">
14566 <desc>
14567 Parallel port that is subject to change.
14568 </desc>
14569 </attribute>
14570 </interface>
14571
14572 <interface
14573 name="IStorageControllerChangedEvent" extends="IEvent"
14574 uuid="715212BF-DA59-426E-8230-3831FAA52C56"
14575 wsmap="managed" autogen="VBoxEvent" id="OnStorageControllerChanged"
14576 >
14577 <desc>
14578 Notification when a
14579 <link to="IMachine::mediumAttachments">medium attachment</link>
14580 changes.
14581 </desc>
14582 </interface>
14583
14584 <interface
14585 name="IMediumChangedEvent" extends="IEvent"
14586 uuid="0FE2DA40-5637-472A-9736-72019EABD7DE"
14587 wsmap="managed" autogen="VBoxEvent" id="OnMediumChanged"
14588 >
14589 <desc>
14590 Notification when a
14591 <link to="IMachine::mediumAttachments">medium attachment</link>
14592 changes.
14593 </desc>
14594 <attribute name="mediumAttachment" type="IMediumAttachment" readonly="yes">
14595 <desc>
14596 Medium attachment that is subject to change.
14597 </desc>
14598 </attribute>
14599 </interface>
14600
14601 <interface
14602 name="ICPUChangedEvent" extends="IEvent"
14603 uuid="D0F0BECC-EE17-4D17-A8CC-383B0EB55E9D"
14604 wsmap="managed" autogen="VBoxEvent" id="OnCPUChanged"
14605 >
14606 <desc>
14607 Notification when a CPU changes.
14608 </desc>
14609 <attribute name="cpu" type="unsigned long" readonly="yes">
14610 <desc>
14611 The CPU which changed.
14612 </desc>
14613 </attribute>
14614 <attribute name="add" type="boolean" readonly="yes">
14615 <desc>
14616 Flag whether the CPU was added or removed.
14617 </desc>
14618 </attribute>
14619 </interface>
14620
14621 <interface
14622 name="ICPUPriorityChangedEvent" extends="IEvent"
14623 uuid="657fe2fe-a75a-4cb6-8cf9-072aa41e7d75"
14624 wsmap="managed" autogen="VBoxEvent" id="OnCPUPriorityChanged"
14625 >
14626 <desc>
14627 Notification when the CPU priority changes.
14628 </desc>
14629 <attribute name="priority" type="unsigned long" readonly="yes">
14630 <desc>
14631 The new CPU priority value. (1-100)
14632 </desc>
14633 </attribute>
14634 </interface>
14635
14636 <interface
14637 name="IVRDPServerChangedEvent" extends="IEvent"
14638 uuid="726038B6-6279-4A7A-8037-D041693D1915"
14639 wsmap="managed" autogen="VBoxEvent" id="OnVRDPServerChanged"
14640 >
14641 <desc>
14642 Notification when a property of the
14643 <link to="IMachine::VRDPServer">VRDP server</link> changes.
14644 Interested callees should use IVRDPServer methods and attributes to
14645 find out what has changed.
14646 </desc>
14647 </interface>
14648
14649 <interface
14650 name="IRemoteDisplayInfoChangedEvent" extends="IEvent"
14651 uuid="65B556C5-2A99-47D8-B311-FC177F0914CD"
14652 wsmap="managed" autogen="VBoxEvent" id="OnRemoteDisplayInfoChanged"
14653 >
14654 <desc>
14655 Notification when the status of the VRDP server changes. Interested callees
14656 should use <link to="IConsole::remoteDisplayInfo">IRemoteDisplayInfo</link>
14657 attributes to find out what is the current status.
14658 </desc>
14659 </interface>
14660
14661 <interface
14662 name="IUSBControllerChangedEvent" extends="IEvent"
14663 uuid="93BADC0C-61D9-4940-A084-E6BB29AF3D83"
14664 wsmap="managed" autogen="VBoxEvent" id="OnUSBControllerChanged"
14665 >
14666 <desc>
14667 Notification when a property of the virtual
14668 <link to="IMachine::USBController">USB controller</link> changes.
14669 Interested callees should use IUSBController methods and attributes to
14670 find out what has changed.
14671 </desc>
14672 </interface>
14673
14674 <interface
14675 name="IUSBDeviceStateChangedEvent" extends="IEvent"
14676 uuid="806da61b-6679-422a-b629-51b06b0c6d93"
14677 wsmap="managed" autogen="VBoxEvent" id="OnUSBDeviceStateChanged"
14678 >
14679 <desc>
14680 Notification when a USB device is attached to or detached from
14681 the virtual USB controller.
14682
14683 This notification is sent as a result of the indirect
14684 request to attach the device because it matches one of the
14685 machine USB filters, or as a result of the direct request
14686 issued by <link to="IConsole::attachUSBDevice"/> or
14687 <link to="IConsole::detachUSBDevice"/>.
14688
14689 This notification is sent in case of both a succeeded and a
14690 failed request completion. When the request succeeds, the
14691 @a error parameter is @c null, and the given device has been
14692 already added to (when @a attached is @c true) or removed from
14693 (when @a attached is @c false) the collection represented by
14694 <link to="IConsole::USBDevices"/>. On failure, the collection
14695 doesn't change and the @a error parameter represents the error
14696 message describing the failure.
14697 </desc>
14698 <attribute name="device" type="IUSBDevice" readonly="yes">
14699 <desc>
14700 Device that is subject to state change.
14701 </desc>
14702 </attribute>
14703 <attribute name="attached" type="boolean" readonly="yes">
14704 <desc>
14705 @c true if the device was attached and @c false otherwise.
14706 </desc>
14707 </attribute>
14708 <attribute name="error" type="IVirtualBoxErrorInfo" readonly="yes">
14709 <desc>
14710 @c null on success or an error message object on failure.
14711 </desc>
14712 </attribute>
14713 </interface>
14714
14715 <interface
14716 name="ISharedFolderChangedEvent" extends="IEvent"
14717 uuid="B66349B5-3534-4239-B2DE-8E1535D94C0B"
14718 wsmap="managed" autogen="VBoxEvent" id="OnSharedFolderChanged"
14719 >
14720 <desc>
14721 Notification when a shared folder is added or removed.
14722 The @a scope argument defines one of three scopes:
14723 <link to="IVirtualBox::sharedFolders">global shared folders</link>
14724 (<link to="Scope::Global">Global</link>),
14725 <link to="IMachine::sharedFolders">permanent shared folders</link> of
14726 the machine (<link to="Scope::Machine">Machine</link>) or <link
14727 to="IConsole::sharedFolders">transient shared folders</link> of the
14728 machine (<link to="Scope::Session">Session</link>). Interested callees
14729 should use query the corresponding collections to find out what has
14730 changed.
14731 </desc>
14732 <attribute name="scope" type="Scope" readonly="yes">
14733 <desc>
14734 Scope of the notification.
14735 </desc>
14736 </attribute>
14737 </interface>
14738
14739 <interface
14740 name="IRuntimeErrorEvent" extends="IEvent"
14741 uuid="883DD18B-0721-4CDE-867C-1A82ABAF914C"
14742 wsmap="managed" autogen="VBoxEvent" id="OnRuntimeError"
14743 >
14744 <desc>
14745 Notification when an error happens during the virtual
14746 machine execution.
14747
14748 There are three kinds of runtime errors:
14749 <ul>
14750 <li><i>fatal</i></li>
14751 <li><i>non-fatal with retry</i></li>
14752 <li><i>non-fatal warnings</i></li>
14753 </ul>
14754
14755 <b>Fatal</b> errors are indicated by the @a fatal parameter set
14756 to @c true. In case of fatal errors, the virtual machine
14757 execution is always paused before calling this notification, and
14758 the notification handler is supposed either to immediately save
14759 the virtual machine state using <link to="IConsole::saveState"/>
14760 or power it off using <link to="IConsole::powerDown"/>.
14761 Resuming the execution can lead to unpredictable results.
14762
14763 <b>Non-fatal</b> errors and warnings are indicated by the
14764 @a fatal parameter set to @c false. If the virtual machine
14765 is in the Paused state by the time the error notification is
14766 received, it means that the user can <i>try to resume</i> the machine
14767 execution after attempting to solve the problem that caused the
14768 error. In this case, the notification handler is supposed
14769 to show an appropriate message to the user (depending on the
14770 value of the @a id parameter) that offers several actions such
14771 as <i>Retry</i>, <i>Save</i> or <i>Power Off</i>. If the user
14772 wants to retry, the notification handler should continue
14773 the machine execution using the <link to="IConsole::resume"/>
14774 call. If the machine execution is not Paused during this
14775 notification, then it means this notification is a <i>warning</i>
14776 (for example, about a fatal condition that can happen very soon);
14777 no immediate action is required from the user, the machine
14778 continues its normal execution.
14779
14780 Note that in either case the notification handler
14781 <b>must not</b> perform any action directly on a thread
14782 where this notification is called. Everything it is allowed to
14783 do is to post a message to another thread that will then talk
14784 to the user and take the corresponding action.
14785
14786 Currently, the following error identifiers are known:
14787 <ul>
14788 <li><tt>"HostMemoryLow"</tt></li>
14789 <li><tt>"HostAudioNotResponding"</tt></li>
14790 <li><tt>"VDIStorageFull"</tt></li>
14791 <li><tt>"3DSupportIncompatibleAdditions"</tt></li>
14792 </ul>
14793 </desc>
14794 <attribute name="fatal" type="boolean" readonly="yes">
14795 <desc>
14796 Whether the error is fatal or not.
14797 </desc>
14798 </attribute>
14799 <attribute name="id" type="wstring" readonly="yes">
14800 <desc>
14801 Error identifier.
14802 </desc>
14803 </attribute>
14804 <attribute name="message" type="wstring" readonly="yes">
14805 <desc>
14806 Optional error message.
14807 </desc>
14808 </attribute>
14809 </interface>
14810
14811
14812 <interface
14813 name="IEventSourceChangedEvent" extends="IEvent"
14814 uuid="e7932cb8-f6d4-4ab6-9cbf-558eb8959a6a"
14815 waitable="yes"
14816 wsmap="managed" autogen="VBoxEvent" id="OnEventSourceChanged"
14817 >
14818 <desc>
14819 Notification when an event source state changes (listener added or removed).
14820 </desc>
14821
14822 <attribute name="listener" type="IEventListener" readonly="yes">
14823 <desc>
14824 Event listener which has changed.
14825 </desc>
14826 </attribute>
14827
14828 <attribute name="add" type="boolean" readonly="yes">
14829 <desc>
14830 Flag whether listener was added or removed.
14831 </desc>
14832 </attribute>
14833 </interface>
14834
14835 <interface
14836 name="IExtraDataChangedEvent" extends="IEvent"
14837 uuid="024F00CE-6E0B-492A-A8D0-968472A94DC7"
14838 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataChanged"
14839 >
14840 <desc>
14841 Notification when machine specific or global extra data
14842 has changed.
14843 </desc>
14844 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14845 <desc>
14846 ID of the machine this event relates to.
14847 Null for global extra data changes.
14848 </desc>
14849 </attribute>
14850 <attribute name="key" type="wstring" readonly="yes">
14851 <desc>
14852 Extra data key that has changed.
14853 </desc>
14854 </attribute>
14855 <attribute name="value" type="wstring" readonly="yes">
14856 <desc>
14857 Extra data value for the given key.
14858 </desc>
14859 </attribute>
14860 </interface>
14861
14862 <interface
14863 name="IVetoEvent" extends="IEvent"
14864 uuid="9a1a4130-69fe-472f-ac10-c6fa25d75007"
14865 wsmap="managed"
14866 >
14867 <desc>Base abstract interface for veto events.</desc>
14868
14869 <method name="addVeto">
14870 <desc>
14871 Adds a veto on this event.
14872 </desc>
14873 <param name="reason" type="wstring" dir="in">
14874 <desc>
14875 Reason for veto, could be null or empty string.
14876 </desc>
14877 </param>
14878 </method>
14879
14880 <method name="isVetoed">
14881 <desc>
14882 If this event was vetoed.
14883 </desc>
14884 <param name="result" type="boolean" dir="return">
14885 <desc>
14886 Reason for veto.
14887 </desc>
14888 </param>
14889 </method>
14890
14891 <method name="getVetos">
14892 <desc>
14893 Current veto reason list, if size is 0 - no veto.
14894 </desc>
14895 <param name="result" type="wstring" dir="return" safearray="yes">
14896 <desc>
14897 Array of reasons for veto provided by different event handlers.
14898 </desc>
14899 </param>
14900 </method>
14901
14902 </interface>
14903
14904 <interface
14905 name="IExtraDataCanChangeEvent" extends="IVetoEvent"
14906 uuid="245d88bd-800a-40f8-87a6-170d02249a55"
14907 wsmap="managed" autogen="VBoxEvent" id="OnExtraDataCanChange"
14908 waitable="true"
14909 >
14910 <desc>
14911 Notification when someone tries to change extra data for
14912 either the given machine or (if @c null) global extra data.
14913 This gives the chance to veto against changes.
14914 </desc>
14915 <attribute name="machineId" type="uuid" mod="string" readonly="yes">
14916 <desc>
14917 ID of the machine this event relates to.
14918 Null for global extra data changes.
14919 </desc>
14920 </attribute>
14921 <attribute name="key" type="wstring" readonly="yes">
14922 <desc>
14923 Extra data key that has changed.
14924 </desc>
14925 </attribute>
14926 <attribute name="value" type="wstring" readonly="yes">
14927 <desc>
14928 Extra data value for the given key.
14929 </desc>
14930 </attribute>
14931 </interface>
14932
14933 <interface
14934 name="ICanShowWindowEvent" extends="IVetoEvent"
14935 uuid="adf292b0-92c9-4a77-9d35-e058b39fe0b9"
14936 wsmap="managed" autogen="VBoxEvent" id="OnCanShowWindow"
14937 waitable="true"
14938 >
14939 <desc>
14940 Notification when a call to
14941 <link to="IMachine::canShowConsoleWindow"/> is made by a
14942 front-end to check if a subsequent call to
14943 <link to="IMachine::showConsoleWindow"/> can succeed.
14944
14945 The callee should give an answer appropriate to the current
14946 machine state using event veto. This answer must
14947 remain valid at least until the next
14948 <link to="IConsole::state">machine state</link> change.
14949 </desc>
14950 </interface>
14951
14952 <interface
14953 name="IShowWindowEvent" extends="IEvent"
14954 uuid="B0A0904D-2F05-4D28-855F-488F96BAD2B2"
14955 wsmap="managed" autogen="VBoxEvent" id="OnShowWindow"
14956 waitable="true"
14957 >
14958 <desc>
14959 Notification when a call to
14960 <link to="IMachine::showConsoleWindow"/>
14961 requests the console window to be activated and brought to
14962 foreground on the desktop of the host PC.
14963
14964 This notification should cause the VM console process to
14965 perform the requested action as described above. If it is
14966 impossible to do it at a time of this notification, this
14967 method should return a failure.
14968
14969 Note that many modern window managers on many platforms
14970 implement some sort of focus stealing prevention logic, so
14971 that it may be impossible to activate a window without the
14972 help of the currently active application (which is supposedly
14973 an initiator of this notification). In this case, this method
14974 must return a non-zero identifier that represents the
14975 top-level window of the VM console process. The caller, if it
14976 represents a currently active process, is responsible to use
14977 this identifier (in a platform-dependent manner) to perform
14978 actual window activation.
14979
14980 This method must set @a winId to zero if it has performed all
14981 actions necessary to complete the request and the console
14982 window is now active and in foreground, to indicate that no
14983 further action is required on the caller's side.
14984 </desc>
14985 <attribute name="winId" type="unsigned long long">
14986 <desc>
14987 Platform-dependent identifier of the top-level VM console
14988 window, or zero if this method has performed all actions
14989 necessary to implement the <i>show window</i> semantics for
14990 the given platform and/or this VirtualBox front-end.
14991 </desc>
14992 </attribute>
14993 </interface>
14994
14995 <module name="VBoxSVC" context="LocalServer">
14996 <class name="VirtualBox" uuid="B1A7A4F2-47B9-4A1E-82B2-07CCD5323C3F"
14997 namespace="virtualbox.org">
14998 <interface name="IVirtualBox" default="yes"/>
14999 </class>
15000 </module>
15001
15002 <module name="VBoxC" context="InprocServer" threadingModel="Free">
15003 <class name="Session" uuid="3C02F46D-C9D2-4F11-A384-53F0CF917214"
15004 namespace="virtualbox.org">
15005 <interface name="ISession" default="yes"/>
15006 </class>
15007
15008 <class name="Console" uuid="577230FF-164F-4CAC-8548-312D8275A4A7"
15009 namespace="virtualbox.org">
15010 <interface name="IConsole" default="yes"/>
15011 </class>
15012 </module>
15013
15014</library>
15015
15016</idl>
15017
15018<!-- 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